curl --request POST \
--url https://app.thinnest.ai/api/v1/sequences/{sequenceId}/enrolments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+91 98765 43210",
"variables": {
"order": "10432",
"eta": "Thursday"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({to: '+91 98765 43210', variables: {order: '10432', eta: 'Thursday'}})
};
fetch('https://app.thinnest.ai/api/v1/sequences/{sequenceId}/enrolments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/sequences/{sequenceId}/enrolments"
payload = {
"to": "+91 98765 43210",
"variables": {
"order": "10432",
"eta": "Thursday"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"enrolled": true,
"id": "3c0b9e7d-2f4a-4b18-a6c5-8e1d3f7a9b42"
}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.
curl --request POST \
--url https://app.thinnest.ai/api/v1/sequences/{sequenceId}/enrolments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+91 98765 43210",
"variables": {
"order": "10432",
"eta": "Thursday"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({to: '+91 98765 43210', variables: {order: '10432', eta: 'Thursday'}})
};
fetch('https://app.thinnest.ai/api/v1/sequences/{sequenceId}/enrolments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/sequences/{sequenceId}/enrolments"
payload = {
"to": "+91 98765 43210",
"variables": {
"order": "10432",
"eta": "Thursday"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"enrolled": true,
"id": "3c0b9e7d-2f4a-4b18-a6c5-8e1d3f7a9b42"
}Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
Headers
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.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Path Parameters
The sequence's id — a bare uuid.
Body
The contact's number, with or without the +. Matched to an existing contact by its digits.
"+91 98765 43210"
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.
Show child attributes
Show child attributes
{ "order": "10432", "eta": "Thursday" }