SynapSynapDocs
Hub REST API

Rules

The Rules operations of the Hub REST API (4 operations).

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

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
text*string
Length1 <= length
context?

Response Body

Intent route

application/json
  1. response
shapes*array<>
primary*string
oneShot*boolean
needsClarification?
Example Request
curl -X POST 'https://pod.example.com/api/hub/rules/classify' \  -H 'Content-Type: application/json' \  -d '{  "text": "string"}'
Example Response
{  "shapes": [    {      "shape": "string",      "confidence": 0,      "cues": [        "string"      ]    }  ],  "primary": "string",  "oneShot": true,  "needsClarification": {    "reason": "string",    "question": "string"  }}
POST
/rules/parse

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
text*string
Length1 <= length <= 2000
workspaceId?string
Formatuuid

Response Body

Parsed sentence

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

List rules

GET
/rules

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

workspaceId?string
Formatuuid
limit?number
Range1 <= value <= 100
offset?|
Range0 <= value
includeProposed?boolean|

Response Body

Rules

application/json
  1. response
rules*array<>
Example Request
curl -X GET 'https://pod.example.com/api/hub/rules'
Example Response
{  "rules": [    {      "id": "string",      "name": "string",      "approved": true,      "workspaceId": "string",      "createdAt": "string",      "rule": {        "property1": null,        "property2": null      },      "status": "active",      "proposalId": "string"    }  ]}

Create a rule (governed)

POST
/rules

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
intent*string
Length1 <= length
scope*
expiresAt?string
Formatdate-time
factSkillId?string
Formatuuid
automationIds?array<>
Default[]
sentence?
agentUserId?string
Formatuuid
userId?string
Formatuuid

Response Body

Created or proposed

application/json
  1. response
status*"created"
Value in"created"
ruleId*string
Example Request
curl -X POST 'https://pod.example.com/api/hub/rules' \  -H 'Content-Type: application/json' \  -d '{  "intent": "string",  "scope": {    "kind": "pod"  }}'
Example Response
{  "status": "created",  "ruleId": "string"}