Create an automation

View as Markdown
Creates an agent task: a stored prompt plus a cadence (`cron` with an IANA timezone, a `once` instant, or `manual` for trigger-only). When it fires it drops a message into a real thread you can join, nudge and correct — not a hidden pipeline. Omit `spaceId` for your own desk; a named space needs `space:contribute` for you AND for the owner the automation runs as. The inbound trigger secret is returned ONCE, here. Authorization: organization admin.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
namestringRequired1-80 characters
promptstringRequired1-4000 characters
The user message injected into the thread when the automation fires.
scheduleobjectRequired
descriptionstringOptional<=400 characters
playbookIdstringOptional1-128 characters
fileIdslist of stringsOptional
spaceIdstringOptional1-128 characters
threadPolicyenumOptionalDefaults to reuse
enabledbooleanOptionalDefaults to true
triggerEnabledbooleanOptionalDefaults to false
originThreadIdstringOptional1-128 characters

Response

The automation and its one-time trigger secret.

automationobject
secretstring

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error