Trails
Update a Trail, including pause, resume, finish, or archive
Replace the mutable Trail definition. The server validates the trigger and action bindings before it saves the update. The creator is immutable. A status change can pause, resume, or archive the Trail. Archive keeps existing run history and does not cancel action runs that already started.
PATCH
/trails/{trail_id}Replace the mutable Trail definition. The server validates the trigger and action bindings before it saves the update. The creator is immutable. A status change can pause, resume, or archive the Trail. Archive keeps existing run history and does not cancel action runs that already started.
storyden-session<token>
In: cookie
Path Parameters
trail_id*string
A unique identifier for this resource.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/trails/cc5lnd2s1s4652adtu50" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "status": "active", "trigger": { "type": "schedule", "schedule": { "start": "2026-08-18T10:00:00", "timezone": "string", "rule": { "frequency": "hourly", "interval": 1 } } }, "actions": [ { "type": "robot_run", "robot_ref": "string", "instruction": "string" } ] }'{
"id": "cc5lnd2s1s4652adtu50",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"misc": {},
"name": "string",
"description": "string",
"created_by": {
"id": "cc5lnd2s1s4652adtu50",
"joined": "2019-08-24T14:15:22Z",
"suspended": "2019-08-24T14:15:22Z",
"handle": "Southclaws",
"name": "Barnaby Keene",
"signature": "<body><p>Sent with love from London!</p></body>",
"roles": [
{
"badge": true,
"default": true,
"id": "cc5lnd2s1s4652adtu50",
"name": "string",
"colour": "string",
"meta": {}
}
]
},
"status": "active",
"trigger": {
"type": "schedule",
"schedule": {
"start": "2026-08-18T10:00:00",
"timezone": "string",
"rule": {
"frequency": "hourly",
"interval": 1,
"by_weekday": [
"monday"
],
"by_month": [
1
],
"by_month_day": [
-31
],
"count": 1
}
}
},
"actions": [
{
"id": "cc5lnd2s1s4652adtu50",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"misc": {},
"action": {
"type": "robot_run",
"robot_ref": "string",
"instruction": "string"
}
}
],
"next_occurrence_at": "2019-08-24T14:15:22Z",
"last_occurrence_at": "2019-08-24T14:15:22Z"
}Empty
Empty
Empty
Empty
{
"type": "string",
"title": "string",
"detail": "string",
"trace_id": "string",
"metadata": {}
}