Create attribute definition

Create attribute definition

post

This endpoint is used to create a new attribute definition for all contacts in a workspace. A contact attribute definition is used to define the attributes that a contact can have.

Authorizations
AuthorizationstringRequired

An access token issued to a user.

Path parameters
workspaceIdstring · uuidRequired

Your workspace identifier.

Example: b4e02c85-c6d2-4b15-8885-e09671799c61
Body
keystringRequired

A user-specified key, primarily for client reference.

Example: countryCodePattern: ^[A-Za-z\d_-]{1,64}$
displayNamestring · min: 1 · max: 150Required

A human-readable name of the attribute.

Example: Country Code
descriptionstring · max: 500Optional

A user-friendly description of the attribute.

Example: The country code of the contact
cardinalitystring · enumRequired

The cardinality configures how many values belong to the single key.

Possible values:
typestring · enumRequiredPossible values:
formatone ofOptional
or
or
or
or
or
or
or
piibooleanRequired

A flag to indicate whether this attribute is considered personally identifiable information.

Example: false
readOnlybooleanRequired

A flag to indicate whether this attribute may be updated after creation.

Example: false
Responses
post
/workspaces/{workspaceId}/attribute-definitions

Examples

Let's establish some of our data that will be used in the following examples:

  • Workspace ID: a1405560-c8d3-4b1a-877d-3f449ad95352

  • AccessKey: abcd

Create an attribute definition

In this example, we're creating a basic attribute definition.

Create an attribute definition with a format

In this example, we're creating an attribute definition and prodivding a format in order to validate the value.

Last updated

Was this helpful?