API reference

API reference · Agents

Turn a trigger on or off, or change it

PATCH/api/account/agents/{id}/triggers/{trigger}Signed in session

Same origin only. A 404 while hosted runs or triggers (ANTIMATTER_AGENT_TRIGGERS) are off on the deployment.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredstringThe agent's id.
trigger (path)requiredstringThe trigger's id.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
statusanyOne of "on", "off".
cronstring
inputstring

Example

{
  "status": "on",
  "cron": "string",
  "input": "Say hello in five words."
}

Answer 200

The trigger.

The answer's fields are not named in the document.

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.
  • 404OpenAI 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.

Antimatter