curl --request PATCH \
--url https://app.thinnest.ai/api/v1/sequences/{sequenceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"exitOnTags": [
"refunded",
"complained"
],
"stopOn": [
"order.returned",
"order.cancelled"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
exitOnTags: ['refunded', 'complained'],
stopOn: ['order.returned', 'order.cancelled']
})
};
fetch('https://app.thinnest.ai/api/v1/sequences/{sequenceId}', 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}"
payload = {
"exitOnTags": ["refunded", "complained"],
"stopOn": ["order.returned", "order.cancelled"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "7c0e4b2a-9d3f-4e61-8a5c-1b7f3e9d2c08",
"name": "After delivery",
"status": "active",
"agent": "ag_2c7e9a14-5b3d-4f8e-a1c6-7d9b0e3f5a21",
"exitOnReply": true,
"triggerTags": [
"delivered"
],
"exitOnTags": [
"refunded",
"complained"
],
"startOn": [
"order.delivered"
],
"stopOn": [
"order.returned",
"order.cancelled"
],
"steps": [
{
"position": 1,
"delayHours": 2,
"template": {
"name": "delivery_thanks",
"language": "en"
}
},
{
"position": 2,
"delayHours": 48,
"template": {
"name": "review_request",
"language": "en"
}
}
],
"enrolments": {
"active": 37,
"completed": 412,
"exited": 58
},
"createdAt": "2026-09-29T07:45:10.226Z"
}{
"error": "`agent` cannot be changed — a sequence stays with the agent it was made for."
}{
"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": "That sequence was not found."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Update Sequence
Changes any of name, exitOnReply, triggerTags, exitOnTags, startOn and stopOn. A list you send replaces the old one; a list you leave out is kept. Works while the sequence runs, and applies to the people already in it — add a stop tag and they stop when they get it. Steps cannot be changed here. A build key may do this.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/sequences/{sequenceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"exitOnTags": [
"refunded",
"complained"
],
"stopOn": [
"order.returned",
"order.cancelled"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
exitOnTags: ['refunded', 'complained'],
stopOn: ['order.returned', 'order.cancelled']
})
};
fetch('https://app.thinnest.ai/api/v1/sequences/{sequenceId}', 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}"
payload = {
"exitOnTags": ["refunded", "complained"],
"stopOn": ["order.returned", "order.cancelled"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "7c0e4b2a-9d3f-4e61-8a5c-1b7f3e9d2c08",
"name": "After delivery",
"status": "active",
"agent": "ag_2c7e9a14-5b3d-4f8e-a1c6-7d9b0e3f5a21",
"exitOnReply": true,
"triggerTags": [
"delivered"
],
"exitOnTags": [
"refunded",
"complained"
],
"startOn": [
"order.delivered"
],
"stopOn": [
"order.returned",
"order.cancelled"
],
"steps": [
{
"position": 1,
"delayHours": 2,
"template": {
"name": "delivery_thanks",
"language": "en"
}
},
{
"position": 2,
"delayHours": 48,
"template": {
"name": "review_request",
"language": "en"
}
}
],
"enrolments": {
"active": 37,
"completed": 412,
"exited": 58
},
"createdAt": "2026-09-29T07:45:10.226Z"
}{
"error": "`agent` cannot be changed — a sequence stays with the agent it was made for."
}{
"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": "That sequence was not found."
}{
"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
Any of these; at least one. agent cannot be changed.
What you call it.
1 - 120Whether a reply from the customer takes them out.
Replaces the enrolling tags.
Replaces the exit tags.
Replaces the events that enrol the contact.
Replaces the events that take them out. Checked against startOn as stored when you send only one side.
Response
The sequence as saved.
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.