curl --request POST \
--url https://app.thinnest.ai/api/v1/sequences/{sequenceId}/steps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "review_request",
"language": "en",
"delayHours": 48
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({template: 'review_request', language: 'en', delayHours: 48})
};
fetch('https://app.thinnest.ai/api/v1/sequences/{sequenceId}/steps', 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}/steps"
payload = {
"template": "review_request",
"language": "en",
"delayHours": 48
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "7c0e4b2a-9d3f-4e61-8a5c-1b7f3e9d2c08",
"name": "After delivery",
"status": "draft",
"agent": "ag_2c7e9a14-5b3d-4f8e-a1c6-7d9b0e3f5a21",
"exitOnReply": true,
"triggerTags": [
"delivered"
],
"exitOnTags": [
"refunded"
],
"startOn": [
"order.delivered"
],
"stopOn": [
"order.returned"
],
"steps": [
{
"position": 1,
"delayHours": 2,
"template": {
"name": "delivery_thanks",
"language": "en"
}
},
{
"position": 2,
"delayHours": 48,
"template": {
"name": "review_request",
"language": "en"
}
}
],
"enrolments": {
"active": 0,
"completed": 0,
"exited": 0
},
"createdAt": "2026-10-06T10:00:04.512Z"
}{
"error": "\"review_request\" is approved in en, hi — pass `language` to say which."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "No approved template called \"review_request\" in \"hi\"."
}{
"error": "Another step was added at the same moment. Retry."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Add Sequence Step
Appends a message at the end of the sequence: an approved template, sent delayHours after the step before (or after the person joined, for the first step). Steps cannot be edited, reordered or removed — someone partway through a live sequence would skip a message or get one twice — so to change the messages, delete the sequence and make another. A build key may do this.
curl --request POST \
--url https://app.thinnest.ai/api/v1/sequences/{sequenceId}/steps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "review_request",
"language": "en",
"delayHours": 48
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({template: 'review_request', language: 'en', delayHours: 48})
};
fetch('https://app.thinnest.ai/api/v1/sequences/{sequenceId}/steps', 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}/steps"
payload = {
"template": "review_request",
"language": "en",
"delayHours": 48
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "7c0e4b2a-9d3f-4e61-8a5c-1b7f3e9d2c08",
"name": "After delivery",
"status": "draft",
"agent": "ag_2c7e9a14-5b3d-4f8e-a1c6-7d9b0e3f5a21",
"exitOnReply": true,
"triggerTags": [
"delivered"
],
"exitOnTags": [
"refunded"
],
"startOn": [
"order.delivered"
],
"stopOn": [
"order.returned"
],
"steps": [
{
"position": 1,
"delayHours": 2,
"template": {
"name": "delivery_thanks",
"language": "en"
}
},
{
"position": 2,
"delayHours": 48,
"template": {
"name": "review_request",
"language": "en"
}
}
],
"enrolments": {
"active": 0,
"completed": 0,
"exited": 0
},
"createdAt": "2026-10-06T10:00:04.512Z"
}{
"error": "\"review_request\" is approved in en, hi — pass `language` to say which."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "No approved template called \"review_request\" in \"hi\"."
}{
"error": "Another step was added at the same moment. Retry."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}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.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Path Parameters
The sequence's id — a bare uuid.
Body
The name of an approved WhatsApp template in your workspace. The sequence's own agent's template wins when two agents share a name.
512"review_request"
Which approved language version, e.g. en or hi. Needed only when the name is approved in more than one language.
20"en"
Hours after the step before — or after joining, for the first step. Up to 2,160 (ninety days); rounded to a whole hour.
0 <= x <= 216048
Response
The whole sequence, steps included.
The sequence's id — a bare uuid.
The sequence's name.
Only active sequences send.
draft, active, paused The agent it belongs to (ag_…).
Whether a reply from the customer takes them out.
Tagging a contact with one of these enrols them.
Tagging someone in it with one of these takes them out.
Event names (Report Event) that enrol the contact.
Event names that take them out.
The messages, in order.
Show child attributes
Show child attributes
How many people are in it now, have finished it, and left it early.
Show child attributes
Show child attributes
When it was created.