Update Draft
Apply a list of edit operations to the scenario’s draft. The body is an array of operations, each containing exactly one of:
Required token scopes: Edit scenarios, Manage scenarios on behalf of user (both are required)
| Operation | Payload |
|---|---|
addTriggerEvent / removeTriggerEvent | Event name string |
addLoader | { name, position, params, alias, confidentialData? } |
removeLoader | { index, position } |
addCondition | { name, params, groupIndex, confidentialData? } |
removeCondition | { groupIndex, index } |
addAction / removeAction | Action definition / index |
addLoop / removeLoop | Loop definition / position |
rename | New name string |
setUnorderedActions | Boolean |
Use the List Components endpoints to discover valid event, loader, condition and action names and their parameters.
Optionally, you can include an authorUid body field (a Texter user UID) to attribute the action to a specific user; when omitted, it is attributed automatically.
הרשאות
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.
פרמטרי נתיב
The unique identifier of the subscription (scenario). Use List All Subscriptions to find it under scenarios[]._id
גוף
1תגובה
The scenario with the updated draft. 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
The currently active version of the scenario