Skip to main content

Create Tag

Create a new tag to label and categorize contacts for flexible targeting. Unlike lists, tags are lightweight labels — use them for attributes like "VIP", "churned", or "webinar-attendee".

Endpoint

POST /tags

Returns: 201 Created

Headers

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

Body Parameters

ParameterTypeRequiredDescription
namestringYesTag name. Max 100 characters. Only letters, numbers, spaces, hyphens, and underscores.
descriptionstringNoOptional description.

Response

{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"name": "VIP",
"description": "High-value customers eligible for special offers",
"contact_count": 0,
"created_at": "2026-03-08T12:00:00.000Z",
"updated_at": "2026-03-08T12:00:00.000Z"
}
FieldTypeDescription
idstringUnique tag ID (UUIDv7)
namestringTag name
descriptionstring | nullTag description
contact_countnumberNumber of contacts currently tagged
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Examples

curl -X POST "https://api.arsel.sa/v1/tags" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "VIP",
"description": "High-value customers eligible for special offers"
}'

Error Responses

{
"status_code": 422,
"name": "validation_error",
"message": "name must match /^[a-zA-Z0-9\\s\\-_]+$/ regular expression"
}