Skip to main content

Create Property

Define a custom contact property. Once defined, you can store values for it on any contact via the properties field on Create Contact and reference it in personalization.

Endpoint

POST /properties

Returns: 201 Created

Headers

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes
Content-Typeapplication/jsonYes

Body Parameters

ParameterTypeRequiredDescription
field_keystringYesInternal identifier used in contact.properties. Lowercase letters, digits, and underscores. Must start with a letter. Max 100 characters. Immutable after creation.
display_namestringYesHuman-readable label shown in the dashboard. Max 255 characters.
data_typestringNoOne of string (default), number, boolean, date. Immutable after creation.
descriptionstringNoOptional description. Max 500 characters.
fallback_valuestringNoDefault used in merge tags when a contact has no value. Max 2000 characters.
Reserved field keys

The following keys conflict with built-in contact columns and are rejected: id, firstName, lastName, email, phoneNumber, unsubscribed, createdAt, updatedAt, deletedAt, organizationId.

Response

{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"field_key": "lifetime_value",
"display_name": "Lifetime Value",
"data_type": "number",
"description": "Aggregate revenue from this contact across all orders.",
"fallback_value": "0",
"created_at": "2026-03-08T12:00:00.000Z",
"updated_at": "2026-03-08T12:00:00.000Z"
}
FieldTypeDescription
idstringProperty ID
field_keystringInternal identifier — use this as a key in contact.properties
display_namestringHuman-readable label
data_typestringstring, number, boolean, or date
descriptionstring | nullDescription
fallback_valuestring | nullDefault value for merge tags
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Examples

curl -X POST "https://api.arsel.sa/v1/properties" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"field_key": "lifetime_value",
"display_name": "Lifetime Value",
"data_type": "number",
"fallback_value": "0"
}'

Error Responses

{
"status_code": 409,
"name": "conflict",
"message": "Property with field_key \"lifetime_value\" already exists"
}