Skip to content

Create a contact field

POST
/api/v1/contact-attributes
curl --request POST \
--url https://dashboard.azimea.com/api/v1/contact-attributes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "key": "plan", "label": "Plan", "type": "Text", "description": "The subscription plan the person is on." }'

Defines a custom attribute before any contact carries it, so its type is fixed: a value is then stored as that type everywhere, and a rule like greater than 5000 means one thing in every segment. The key is lowercase letters, digits and underscores, starting with a letter, up to 40 characters (audience.attribute_key_invalid); a built-in field’s name is refused (audience.attribute_reserved), an existing key gives 409 audience.attribute_exists, and a company has at most 100 fields (audience.attribute_limit_reached). The label defaults to the key made readable. Needs contacts:write.

Media typeapplication/json
object
key
string
Example
plan
label
string
nullable 0 <= 80 characters
Example
Plan
type
string
Allowed values: Text Number Boolean Date DateTime TextList
Example
Text
description
string
nullable 0 <= 300 characters
Example
The subscription plan the person is on.
Example
{
"key": "plan",
"label": "Plan",
"type": "Text",
"description": "The subscription plan the person is on."
}

The field as defined

Media typeapplication/json
object
isSuccess
boolean
value
One of:
object
key
string
label
string
type
string
Allowed values: Text Number Boolean Date DateTime TextList
description
string
nullable
createdFrom
string
Allowed values: Ui Api Csv
createdAt
string format: date-time
archivedAt
string format: date-time
nullable
status
integer format: int32
errors
Array<object>
object
code
string
message
string
params
object
key
additional properties
fieldErrors
object
key
additional properties
Array<object>
object
code
string
message
string
params
object
key
additional properties
Example
{
"isSuccess": true,
"value": {
"key": "plan",
"label": "Plan",
"type": "Text",
"description": "The subscription plan the person is on.",
"createdFrom": "Api",
"createdAt": "2026-10-05T09:30:00+00:00",
"archivedAt": null
},
"status": 0,
"errors": [],
"fieldErrors": null
}

Validation failed: see errors[].code and fieldErrors

Media typeapplication/problem+json
object
statusCode
integer format: int32
default: 400
message
string
default: One or more errors occurred!
errors
object
key
additional properties
Array<string>
Example
{
"statusCode": 400,
"message": "One or more errors occurred!"
}

Missing or invalid API key

The key lacks the contacts:write permission