sessions
Update a session
Changed onUpdate a session's tags or metadata. Pass metadata: null to clear it.
Requires a secret key — a session public token cannot update a session. externalId is read-only after create: it cannot be changed or cleared. Sending a value different from the current one (including null when one is set) returns 422; sending the same value is accepted as a no-op.
patch/api/v1/sessions/{session}
Request
- Base URLhttps://api.trigger.dev
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Session updated successfully
Example response
{
"id": "session_abc123",
"externalId": "chat_1234",
"type": "chat.agent",
"taskIdentifier": "my-chat",
"triggerConfig": {
"machine": "small-1x",
"lockToVersion": "20240523.1"
},
"currentRunId": "run_def456",
"tags": [
"chat:1234"
]
}Changes
- info
endpoint added
- info