Metadata is a customer-driven dictionary for storing additional filterable information about a resource. It is not used or updated by Abound. Currently, only the User resource is supported.

Metadata keys can be up to 40 characters and their corresponding values up to 300 characters long. Multiple keys and values are allowed and each key must have a corresponding value.

Metadata is not obfuscated as PII, so do not store any sensitive information.

Examples

Create a User with metadata

curl \
  --request POST \
  --url https://sandbox-api.withabound.com/<<apiVersion>>/users \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "user": {
      "metadata": {
        "key1": "value"
      }
    }
  }'

Add/update metadata

curl \
  --request PUT \
  --url https://sandbox-api.withabound.com/<<apiVersion>>/users/<<testUserId>> \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "user": {
      "metadata": {
        "key1": "updated value",
        "key2": "new value"
      }
    }
  }'

Remove a metadata key

curl \
  --request PUT \
  --url https://sandbox-api.withabound.com/<<apiVersion>>/users/<<testUserId>> \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "user": {
      "metadata": {
        "key2": ""
      }
    }
  }'

Remove all metadata keys

curl \
  --request PUT \
  --url https://sandbox-api.withabound.com/<<apiVersion>>/users/<<testUserId>> \
  --header 'Authorization: Bearer <<apiKey>>' \
  --header 'Content-Type: application/json' \
  --data '{
    "user": {
      "metadata": {}
    }
  }'