Skip to main content
POST
/
relay
/
v1
/
approvals
/
{id}
/
resolve
Resolve a HITL approval request
curl --request POST \
  --url https://api.swarmd.ai/relay/v1/approvals/{id}/resolve \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "APPROVED",
  "message": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "taskId": "<string>",
  "contextId": "<string>",
  "tenantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agentMessageRole": "<string>",
  "agentMessageText": "<string>",
  "detectionSource": "SYNC_RESPONSE",
  "sourceAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sourceUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sinkAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agentMessageData": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "resolution": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "action": "APPROVED",
    "message": "<string>",
    "resolvedBy": "<string>",
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

JWT token (USER, AGENT, or SERVICE auth)

Path Parameters

id
string<uuid>
required

Body

application/json
action
enum<string>
required
Available options:
APPROVED,
REJECTED
message
string

Response

200 - application/json

OK

id
string<uuid>
taskId
string
contextId
string
tenantId
string<uuid>
agentId
string<uuid>
agentMessageRole
string
agentMessageText
string
detectionSource
enum<string>
Available options:
SYNC_RESPONSE,
PUSH_NOTIFICATION
sourceAgentId
string<uuid>
sourceUserId
string<uuid>
sinkAgentId
string<uuid>
agentMessageData
string
createdAt
string<date-time>
resolution
object