ApprovalRequests
Human-in-the-loop approval requests — review and respond to agent-escalated decisions
Authorization
bearerAuth AuthorizationBearer <token>
API key via Authorization: Bearer <API_KEY>
In: header
Query Parameters
status?string
workflowRunId?string
limit?|
Response Body
application/json
curl -X GET "http://localhost:3013/api/approval-requests"{
"approvalRequests": [
{
"id": "string",
"title": "string",
"questions": [
{
"id": "string",
"type": "approval",
"label": "string",
"required": true,
"description": "string",
"placeholder": "string",
"multiline": true,
"options": [
{
"value": "string",
"label": "string",
"description": "string"
}
],
"minSelections": 0,
"maxSelections": 1,
"defaultValue": true
}
],
"workflowRunId": "string",
"workflowRunStepId": "string",
"sourceTaskId": "string",
"approvers": {
"users": [
"string"
],
"roles": [
"string"
],
"policy": "any"
},
"status": "pending",
"responses": {
"property1": null,
"property2": null
},
"resolvedBy": "string",
"resolvedAt": "string",
"resolutionReason": "string",
"timeoutSeconds": 0,
"expiresAt": "string",
"notificationChannels": [
{
"channel": "slack",
"target": "string",
"messageTs": "string"
}
],
"createdBy": "string",
"createdAt": "string",
"updatedAt": "string"
}
]
}Authorization
bearerAuth AuthorizationBearer <token>
API key via Authorization: Bearer <API_KEY>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "http://localhost:3013/api/approval-requests" \ -H "Content-Type: application/json" \ -d '{ "title": "string", "questions": [ { "id": "string", "type": "approval", "label": "string" } ], "approvers": { "policy": "any" } }'{
"approvalRequest": {
"id": "string",
"title": "string",
"questions": [
{
"id": "string",
"type": "approval",
"label": "string",
"required": true,
"description": "string",
"placeholder": "string",
"multiline": true,
"options": [
{
"value": "string",
"label": "string",
"description": "string"
}
],
"minSelections": 0,
"maxSelections": 1,
"defaultValue": true
}
],
"workflowRunId": "string",
"workflowRunStepId": "string",
"sourceTaskId": "string",
"approvers": {
"users": [
"string"
],
"roles": [
"string"
],
"policy": "any"
},
"status": "pending",
"responses": {
"property1": null,
"property2": null
},
"resolvedBy": "string",
"resolvedAt": "string",
"resolutionReason": "string",
"timeoutSeconds": 0,
"expiresAt": "string",
"notificationChannels": [
{
"channel": "slack",
"target": "string",
"messageTs": "string"
}
],
"createdBy": "string",
"createdAt": "string",
"updatedAt": "string"
}
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth AuthorizationBearer <token>
API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
id*string
Format
uuidResponse Body
application/json
application/json
curl -X GET "http://localhost:3013/api/approval-requests/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"approvalRequest": {
"id": "string",
"title": "string",
"questions": [
{
"id": "string",
"type": "approval",
"label": "string",
"required": true,
"description": "string",
"placeholder": "string",
"multiline": true,
"options": [
{
"value": "string",
"label": "string",
"description": "string"
}
],
"minSelections": 0,
"maxSelections": 1,
"defaultValue": true
}
],
"workflowRunId": "string",
"workflowRunStepId": "string",
"sourceTaskId": "string",
"approvers": {
"users": [
"string"
],
"roles": [
"string"
],
"policy": "any"
},
"status": "pending",
"responses": {
"property1": null,
"property2": null
},
"resolvedBy": "string",
"resolvedAt": "string",
"resolutionReason": "string",
"timeoutSeconds": 0,
"expiresAt": "string",
"notificationChannels": [
{
"channel": "slack",
"target": "string",
"messageTs": "string"
}
],
"createdBy": "string",
"createdAt": "string",
"updatedAt": "string"
}
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth AuthorizationBearer <token>
API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
id*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:3013/api/approval-requests/497f6eca-6276-4993-bfeb-53cbbbba6f08/respond" \ -H "Content-Type: application/json" \ -d '{ "responses": { "property1": null, "property2": null } }'{
"approvalRequest": {
"id": "string",
"title": "string",
"questions": [
{
"id": "string",
"type": "approval",
"label": "string",
"required": true,
"description": "string",
"placeholder": "string",
"multiline": true,
"options": [
{
"value": "string",
"label": "string",
"description": "string"
}
],
"minSelections": 0,
"maxSelections": 1,
"defaultValue": true
}
],
"workflowRunId": "string",
"workflowRunStepId": "string",
"sourceTaskId": "string",
"approvers": {
"users": [
"string"
],
"roles": [
"string"
],
"policy": "any"
},
"status": "pending",
"responses": {
"property1": null,
"property2": null
},
"resolvedBy": "string",
"resolvedAt": "string",
"resolutionReason": "string",
"timeoutSeconds": 0,
"expiresAt": "string",
"notificationChannels": [
{
"channel": "slack",
"target": "string",
"messageTs": "string"
}
],
"createdBy": "string",
"createdAt": "string",
"updatedAt": "string"
}
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}