Enrol in Sequence

Sequences

Enrol in Sequence

Puts one existing contact into a sequence, with values its messages can use — an order number your system knows and the console does not. The person must already be a contact; this never creates one. enrolled: false is a 200, not an error: they are already in it, the number is not a contact, they opted out, or the sequence has no first message yet. Prefer Report Event unless your system must choose the sequence itself, since this puts a sequence id in your code. Only enrol people who agreed to hear from you. Needs a full key.

POST/sequences/{sequenceId}/enrolments

Path parameters

sequenceIdstring (uuid)required
The sequence's id — a bare uuid.

Headers

Katexs-Workspacestring
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.

Request body

tostringrequired
The contact's number, with or without the +. Matched to an existing contact by its digits.
variablesobject
Values the sequence's messages can use. At most 20; each name 1–60 characters (a longer one is refused); values are text, numbers or true/false, stored as text and cut at 300 characters. An object or list as a value is refused.

Example request

bash
curl -X POST "https://app.katexs.com/api/v1/sequences/{sequenceId}/enrolments" \
  -H "Authorization: Bearer $KATEXS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "to": "+1 415 555 0134",
  "variables": {
    "order": "10432",
    "eta": "Thursday"
  }
}'

Responses

StatusDescription
200Whether they were enrolled. Branch on enrolled.
400The body is not JSON, to is missing, or variables breaks a rule.
401The key is missing, wrong or revoked. The answer is always the same, whichever it is.
403The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden.
404No sequence with that id in this workspace.
410The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date.
429Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit.
500They could not be enrolled just now. Safe to retry.

Response fields

enrolledbooleanrequired
Whether they were put into the sequence.
idstring (uuid)
The enrolment's id, when enrolled.
reasonstring
When not enrolled: the four possible reasons, together.
200 response
{
  "enrolled": true,
  "id": "3c0b9e7d-2f4a-4b18-a6c5-8e1d3f7a9b42"
}

Last updated November 2026 · Found a problem? Email support@katexs.com