Schemas

Create or update profile schema

Creates or updates profile schema.

Each account has one profile schema. Updating it with this request will substitute the previous version.

Learn more about the Profile System and its other API endpoints.

put/api/storage/profile-system/profiles/schema

Headers

Content-Typestring required
Example:application/json

Type of the content being sent.

Acceptstring required
Example:application/json

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

titlestring required

Schema title.

typestring required

Schema type.

descriptionstring required

Schema's human readable description.

requiredstring[] required

Schema required fields.

documentTTLinteger

Document time to live, in days. After this many days from its creation or update, any document cerated from this schema will be deleted.

versioninteger

Schema version.

v-indexedstring[]

List of fields to be indexed.

v-uniquestring[]

List of fields that must be unique.

Example request

{
  "title": "Client profile schema.",
  "type": "object",
  "description": "This schema describes a b2c customer profile.",
  "required": [
    "firstName",
    "lastName",
    "email",
    "document",
    "documentType"
  ],
  "properties": {
    "{fieldName}": {
      "type": "string",
      "sensitive": true,
      "pii": true,
      "items": {
        "type": "string"
      }
    }
  },
  "documentTTL": 1825,
  "version": 1,
  "v-indexed": [
    "email",
    "document"
  ],
  "v-unique": [
    "email",
    "document"
  ]
}

Response

Created

object required

Changes