API reference · Agents
Add a schedule or a webhook
POST/api/account/agents/{id}/triggersSigned in session
A schedule runs the agent on its cron with the stated input; a webhook runs it when a signed delivery arrives, and its secret is in this answer once and never again. Same origin only. A 404 while hosted runs or triggers (ANTIMATTER_AGENT_TRIGGERS) are off on the deployment.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | string | The agent's id. |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| kindrequired | any | One of "schedule", "webhook". |
| cron | string | |
| inputrequired | string |
Example
{
"kind": "schedule",
"cron": "string",
"input": "Say hello in five words."
}Answer 201
The trigger (a webhook's with its secret).
The answer's fields are not named in the document.
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 404OpenAI shaped error.
- 409OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.