curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/scenarios/manage/{scenarioId}/revisions/{version}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authorUid": "4d170fc7-5cd6-4496-98e4-f4f03a11456e"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({authorUid: '4d170fc7-5cd6-4496-98e4-f4f03a11456e'})
};
fetch('https://{projectID}.texterchat.com/server/api/v2/scenarios/manage/{scenarioId}/revisions/{version}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{projectID}.texterchat.com/server/api/v2/scenarios/manage/{scenarioId}/revisions/{version}/activate"
payload = { "authorUid": "4d170fc7-5cd6-4496-98e4-f4f03a11456e" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"_id": "6970b3c1d2e3f40123456789",
"drafts": [],
"inactiveRevisions": [],
"activeRevision": {
"_id": "6970b3c1d2e3f4012345678a",
"scenarioId": "6970b3c1d2e3f40123456789",
"name": "(SUB) New Incoming Messages",
"description": "Sends a webhook for each new incoming message",
"status": "active",
"version": 1,
"triggerEvents": [
"domain.message.created"
],
"conditions": [
[
{
"name": "filtrex",
"params": {
"expression": "direction == \"incoming\""
},
"confidentialData": false
}
]
],
"loaders": {
"afterConditions": [
{
"name": "chat",
"alias": "chat",
"params": {},
"confidentialData": false
}
]
},
"actions": [
{
"name": "request",
"params": {
"url": "https://example.com/hook",
"method": "post",
"json": true
},
"confidentialData": false
}
],
"options": {
"unorderedActions": false
},
"metadata": {
"authorUid": "4d170fc7-5cd6-4496-98e4-f4f03a11456e",
"created": 1768314807488,
"activated": 1768314808000
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Activate Subscription
Resume a paused subscription, or revert to a specific version of the scenario.
curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/scenarios/manage/{scenarioId}/revisions/{version}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authorUid": "4d170fc7-5cd6-4496-98e4-f4f03a11456e"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({authorUid: '4d170fc7-5cd6-4496-98e4-f4f03a11456e'})
};
fetch('https://{projectID}.texterchat.com/server/api/v2/scenarios/manage/{scenarioId}/revisions/{version}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{projectID}.texterchat.com/server/api/v2/scenarios/manage/{scenarioId}/revisions/{version}/activate"
payload = { "authorUid": "4d170fc7-5cd6-4496-98e4-f4f03a11456e" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"_id": "6970b3c1d2e3f40123456789",
"drafts": [],
"inactiveRevisions": [],
"activeRevision": {
"_id": "6970b3c1d2e3f4012345678a",
"scenarioId": "6970b3c1d2e3f40123456789",
"name": "(SUB) New Incoming Messages",
"description": "Sends a webhook for each new incoming message",
"status": "active",
"version": 1,
"triggerEvents": [
"domain.message.created"
],
"conditions": [
[
{
"name": "filtrex",
"params": {
"expression": "direction == \"incoming\""
},
"confidentialData": false
}
]
],
"loaders": {
"afterConditions": [
{
"name": "chat",
"alias": "chat",
"params": {},
"confidentialData": false
}
]
},
"actions": [
{
"name": "request",
"params": {
"url": "https://example.com/hook",
"method": "post",
"json": true
},
"confidentialData": false
}
],
"options": {
"unorderedActions": false
},
"metadata": {
"authorUid": "4d170fc7-5cd6-4496-98e4-f4f03a11456e",
"created": 1768314807488,
"activated": 1768314808000
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Activate/inactivate scenarios, Manage scenarios on behalf of user (both are required)
Include an authorUid body field (a Texter user UID) to attribute the action to a specific user - recommended: when omitted, the action is attributed to an arbitrary user account.Authorizations
API token generated in Texter: gear icon → Developers → API Tokens. When creating a token, assign it the scopes required by the endpoints you plan to call - each endpoint lists its required scopes.
Path Parameters
The unique identifier of the subscription (scenario). Use List All Subscriptions to find it under scenarios[]._id
The scenario version to activate. Found under scenarios[].inactiveRevisions[].version
^[0-9]+$Body
Optional - Texter user ID (UID) to attribute the action to. When omitted, it is attributed automatically
Response
The updated scenario object with the revision activated. Field-by-field reference: The Scenario object
An event subscription (scenario) in Texter
Unique identifier of the subscription/scenario
System scenario identifier. Present only on built-in system scenarios (returned when includeSystem=true)
Draft revisions of this scenario being edited. Same shape as a revision, but with status: "draft", no version/revisionComment, and metadata limited to authorUid/created/modified
Inactive revisions
Show child attributes
Show child attributes
The currently active version of the scenario
Show child attributes
Show child attributes