SynapSynapDocs
Hub REST API

Automations

The Automations operations of the Hub REST API (7 operations).

For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)

Create an automation

POST
/automations/create

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
userId?string
agentUserId?string
workspaceId?string|null
sourceMessageId?string
name*string
description?string
triggerType*AutomationTriggerType
Value in"event""cron""webhook""manual"
triggerConfig?
flowDefinition*
status?AutomationStatus
Value in"draft""active""paused""error"
metadata?

Response Body

Created automation

application/json
  1. response
id*string
userId*string
workspaceId?string|null
name*string
description?string|null
triggerType*AutomationTriggerType
Value in"event""cron""webhook""manual"
triggerConfig?
flowDefinition?
status*AutomationStatus
Value in"draft""active""paused""error"
metadata?
createdAt?string|
updatedAt?string|
Example Request
curl -X POST 'https://pod.example.com/api/hub/automations/create' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "triggerType": "event",  "flowDefinition": {    "nodes": [      {        "property1": null,        "property2": null      }    ],    "edges": [      {        "property1": null,        "property2": null      }    ]  }}'
Example Response
{  "id": "string",  "userId": "string",  "workspaceId": "string",  "name": "string",  "description": "string",  "triggerType": "event",  "triggerConfig": {    "property1": null,    "property2": null  },  "flowDefinition": {    "nodes": [      {        "property1": null,        "property2": null      }    ],    "edges": [      {        "property1": null,        "property2": null      }    ]  },  "status": "draft",  "metadata": {    "property1": null,    "property2": null  },  "createdAt": "string",  "updatedAt": "string"}

List automations

GET
/automations

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Query Parameters

userId*string
workspaceId?string
status?string
Value in"draft""active""paused""error"
limit?string

Response Body

Array of automations

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://pod.example.com/api/hub/automations?userId=string'
Example Response
[  {    "id": "string",    "userId": "string",    "workspaceId": "string",    "name": "string",    "description": "string",    "triggerType": "event",    "triggerConfig": {      "property1": null,      "property2": null    },    "flowDefinition": {      "nodes": [        {          "property1": null,          "property2": null        }      ],      "edges": [        {          "property1": null,          "property2": null        }      ]    },    "status": "draft",    "metadata": {      "property1": null,      "property2": null    },    "createdAt": "string",    "updatedAt": "string"  }]

Get an automation

GET
/automations/{automationId}

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

automationId*string

Query Parameters

userId*string
workspaceId?string

Response Body

Automation

application/json
  1. response
id*string
userId*string
workspaceId?string|null
name*string
description?string|null
triggerType*AutomationTriggerType
Value in"event""cron""webhook""manual"
triggerConfig?
flowDefinition?
status*AutomationStatus
Value in"draft""active""paused""error"
metadata?
createdAt?string|
updatedAt?string|
Example Request
curl -X GET 'https://pod.example.com/api/hub/automations/string?userId=string'
Example Response
{  "id": "string",  "userId": "string",  "workspaceId": "string",  "name": "string",  "description": "string",  "triggerType": "event",  "triggerConfig": {    "property1": null,    "property2": null  },  "flowDefinition": {    "nodes": [      {        "property1": null,        "property2": null      }    ],    "edges": [      {        "property1": null,        "property2": null      }    ]  },  "status": "draft",  "metadata": {    "property1": null,    "property2": null  },  "createdAt": "string",  "updatedAt": "string"}

Update an automation

PATCH
/automations/{automationId}

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

automationId*string

Request Body

application/json
  1. body
userId?string
workspaceId*string
name?string
description?string
triggerType?AutomationTriggerType
Value in"event""cron""webhook""manual"
triggerConfig?
flowDefinition?
status?AutomationStatus
Value in"draft""active""paused""error"
metadata?

Response Body

Updated automation

application/json
  1. response
id*string
userId*string
workspaceId?string|null
name*string
description?string|null
triggerType*AutomationTriggerType
Value in"event""cron""webhook""manual"
triggerConfig?
flowDefinition?
status*AutomationStatus
Value in"draft""active""paused""error"
metadata?
createdAt?string|
updatedAt?string|
Example Request
curl -X PATCH 'https://pod.example.com/api/hub/automations/string' \  -H 'Content-Type: application/json' \  -d '{  "workspaceId": "string"}'
Example Response
{  "id": "string",  "userId": "string",  "workspaceId": "string",  "name": "string",  "description": "string",  "triggerType": "event",  "triggerConfig": {    "property1": null,    "property2": null  },  "flowDefinition": {    "nodes": [      {        "property1": null,        "property2": null      }    ],    "edges": [      {        "property1": null,        "property2": null      }    ]  },  "status": "draft",  "metadata": {    "property1": null,    "property2": null  },  "createdAt": "string",  "updatedAt": "string"}
POST
/automations/{automationId}/trigger

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

automationId*string

Request Body

application/json
  1. body
userId?string
agentUserId?string

Explicit agent user ID when an AI agent asks for the run — routes through the governance gate.

reasoning?string

AI reasoning surfaced on the proposal card.

Lengthlength <= 2000
workspaceId?string|null
payload?

Optional payload passed to the flow's first node.

Response Body

Trigger result (run id, status, optional output)

application/json
  1. response
[key: string]?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/automations/string/trigger' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "property1": null,  "property2": null}

Activate an automation

POST
/automations/{automationId}/activate

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

automationId*string

Request Body

application/json
  1. body
userId?string
workspaceId*string

Response Body

Activated automation

application/json
  1. response
id*string
userId*string
workspaceId?string|null
name*string
description?string|null
triggerType*AutomationTriggerType
Value in"event""cron""webhook""manual"
triggerConfig?
flowDefinition?
status*AutomationStatus
Value in"draft""active""paused""error"
metadata?
createdAt?string|
updatedAt?string|
Example Request
curl -X POST 'https://pod.example.com/api/hub/automations/string/activate' \  -H 'Content-Type: application/json' \  -d '{  "workspaceId": "string"}'
Example Response
{  "id": "string",  "userId": "string",  "workspaceId": "string",  "name": "string",  "description": "string",  "triggerType": "event",  "triggerConfig": {    "property1": null,    "property2": null  },  "flowDefinition": {    "nodes": [      {        "property1": null,        "property2": null      }    ],    "edges": [      {        "property1": null,        "property2": null      }    ]  },  "status": "draft",  "metadata": {    "property1": null,    "property2": null  },  "createdAt": "string",  "updatedAt": "string"}

Pause an automation

POST
/automations/{automationId}/pause

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

automationId*string

Request Body

application/json
  1. body
userId?string
workspaceId*string

Response Body

Paused automation

application/json
  1. response
id*string
userId*string
workspaceId?string|null
name*string
description?string|null
triggerType*AutomationTriggerType
Value in"event""cron""webhook""manual"
triggerConfig?
flowDefinition?
status*AutomationStatus
Value in"draft""active""paused""error"
metadata?
createdAt?string|
updatedAt?string|
Example Request
curl -X POST 'https://pod.example.com/api/hub/automations/string/pause' \  -H 'Content-Type: application/json' \  -d '{  "workspaceId": "string"}'
Example Response
{  "id": "string",  "userId": "string",  "workspaceId": "string",  "name": "string",  "description": "string",  "triggerType": "event",  "triggerConfig": {    "property1": null,    "property2": null  },  "flowDefinition": {    "nodes": [      {        "property1": null,        "property2": null      }    ],    "edges": [      {        "property1": null,        "property2": null      }    ]  },  "status": "draft",  "metadata": {    "property1": null,    "property2": null  },  "createdAt": "string",  "updatedAt": "string"}