curl --request POST \
--url https://api.finalsay-hitl.com/v1/approvals \
--header 'Content-Type: application/json' \
--header 'X-Agent-Id: <api-key>' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"question": "Deploy v2.4 to production?",
"context_markdown": "**Change:** 12 commits since v2.3. Tests passed. Rollback: redeploy v2.3.",
"options": [
{
"label": "Approve",
"value": "approve"
},
{
"label": "Reject",
"value": "reject"
}
]
}
'
{
"approval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "<string>",
"status": "pending",
"expires_at": "2023-11-07T05:31:56Z",
"idempotent": true
}{
"error": "invalid_payload",
"issues": {}
}{
"error": "missing_agent_auth"
}{
"error": "USAGE_APPROVAL_LIMIT",
"code": "USAGE_APPROVAL_LIMIT",
"over_limit": true
}{
"error": "idempotency_conflict",
"message": "<string>",
"request_id": "<string>",
"existing_approval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "rate_limited"
}{
"error": "approval_creation_failed"
}Approvals
Create an approval
Sends a question to the people assigned to the agent. Returns right away; the answer arrives later on
GET /v1/approvals/{requestId}/result or on your callback.url.
Send the same request_id again to retry safely: an identical body returns the existing approval with
idempotent: true, and a different body returns 409.
POST
/
v1
/
approvals
curl --request POST \
--url https://api.finalsay-hitl.com/v1/approvals \
--header 'Content-Type: application/json' \
--header 'X-Agent-Id: <api-key>' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"question": "Deploy v2.4 to production?",
"context_markdown": "**Change:** 12 commits since v2.3. Tests passed. Rollback: redeploy v2.3.",
"options": [
{
"label": "Approve",
"value": "approve"
},
{
"label": "Reject",
"value": "reject"
}
]
}
'
{
"approval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request_id": "<string>",
"status": "pending",
"expires_at": "2023-11-07T05:31:56Z",
"idempotent": true
}{
"error": "invalid_payload",
"issues": {}
}{
"error": "missing_agent_auth"
}{
"error": "USAGE_APPROVAL_LIMIT",
"code": "USAGE_APPROVAL_LIMIT",
"over_limit": true
}{
"error": "idempotency_conflict",
"message": "<string>",
"request_id": "<string>",
"existing_approval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "rate_limited"
}{
"error": "approval_creation_failed"
}Authorizations
Body
application/json
Your id for the run, ticket or execution this approval belongs to. Not unique: many approvals can share one. Trimmed; null or blank means none. Returned in the result. Not part of the idempotency comparison: a retry with the same request_id and body but another correlation_id returns the existing approval, which keeps its original correlation_id.
Maximum string length:
120Response
Created, or an idempotent match for a request_id you already used