RaabtaHQ
Add tags to a contact

Add tags to a contact

POST/api/v1/contacts/{id}/tags

scope contacts:write

Applies one or more existing tags. Tags already applied are ignored. Returns the updated contact.

Path parameters

NameTypeDescription
idrequired
string (uuid)Contact id

Body

application/json
NameTypeDescription
tag_idsrequired
string (uuid)[]Tags to apply; must belong to this account
Request
curl -X POST "https://your-crm.example.com/api/v1/contacts/9d7e4c11-5a2b-4f7c-8e3d-2a1b0c9d8e7f/tags" \
  -H "Authorization: Bearer $RAABTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tag_ids": [
      "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f"
    ]
  }'
Response · 200 OK
{
  "data": {
    "id": "9d7e4c11-5a2b-4f7c-8e3d-2a1b0c9d8e7f",
    "name": "Ayesha Khan",
    "phone": "+971501234567",
    "email": "ayesha@example.com",
    "company": "Khan Trading LLC",
    "avatar_url": null,
    "tags": [
      {
        "id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
        "name": "VIP",
        "color": "#10b981"
      }
    ],
    "custom_fields": [
      {
        "field_id": "6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d",
        "name": "Source",
        "value": "Instagram ad"
      }
    ],
    "created_at": "2026-09-01T08:15:00.000Z",
    "updated_at": "2026-09-02T10:00:00.000Z"
  }
}

Response

Wrapped in { data: … }
NameTypeDescription
idrequired
string (uuid)UUID
namerequired
string | nullDisplay name
phonerequired
string | nullE.164 phone number, or null for a contact reached only on Messenger/Instagram/web chat
emailrequired
string | nullEmail address, when one is known
companyrequired
string | nullCompany or organisation the contact belongs to
avatar_urlrequired
string | nullProfile picture URL, when a channel supplied one
tagsrequired
object[]Tags applied to this contact
tags[].idrequired
string (uuid)UUID
tags[].namerequired
stringTag name
tags[].colorrequired
stringHex colour chosen in the dashboard
custom_fieldsrequired
object[]Custom-field values set on this contact
custom_fields[].field_idrequired
string (uuid)The custom field definition
custom_fields[].namerequired
stringField name as shown in the dashboard
custom_fields[].valuerequired
string | nullThe value for this contact
created_atrequired
string (date-time)ISO 8601 timestamp
updated_atrequired
string (date-time)ISO 8601 timestamp

Errors

StatusCodeWhen
400bad_requestThe request could not be parsed: malformed JSON, an invalid cursor, or a query parameter of the wrong shape.
400validation_errorThe body or query failed validation. `details` lists each failing field with a `path` and a `message`.
401unauthorizedNo usable API key: the Authorization header is missing or malformed, or the key is unknown, revoked or expired. The three are deliberately indistinguishable.
403forbiddenThe key is valid but lacks the scope this endpoint requires, or the request came from an address outside the key’s IP allowlist. The message says which.
403account_suspendedThe account this key belongs to is suspended. Rotating the key will not help; contact support.
404not_foundNo such resource in this account. A resource that exists in another account also returns this.
422unprocessableThe request was well-formed but cannot be carried out. `reason` is a stable string saying why (for example `outside_window` or `stage_not_in_pipeline`).
429rate_limitedThe per-key budget, or the per-IP budget for failed authentication, is exhausted. Honour `Retry-After` before retrying.
500internalSomething failed on our side. Safe to retry with the same Idempotency-Key; quote `request_id` if it persists.