Approve or deny a confirmation

Approves or denies a pending tool-use confirmation. AI SRE asks for a confirmation before sensitive actions such as writing code or creating alerts. While a confirmation is pending, the chat status is awaiting_confirmation and the agent waits. Once you resolve it, the agent continues and the status returns to processing.

PATCH https://chat.betterstack.com/api/v2/chats/{chat_id}/confirmations/{id}

URL parameters

chat_id
required string
id
required integer

Headers

Authorization
required string
Content-Type
required string

Body parameters

approved
required boolean
comment
string
allow_tool_for_session
boolean
200

Response body

{
  "data": {
    "id": "501",
    "type": "confirmation",
    "attributes": {
      "tool_name": "Bash",
      "tool_input": {
        "command": "kubectl rollout restart deployment/checkout-api -n production"
      },
      "status": "approved",
      "resolution_note": null,
      "expires_at": "2026-09-07T11:31:05.000Z",
      "confirmed_at": "2026-09-07T10:33:40.000Z",
      "created_at": "2026-09-07T10:31:05.000Z"
    }
  }
}
401

Response body

{
  "errors": "Invalid authentication"
}
404

Response body

{
  "errors": "Resource with the provided ID was not found"
}
409

Response body

{
  "errors": "This confirmation is no longer pending."
}
422

Response body

{
  "errors": "Sorry, some values are incorrect",
  "invalid_values": {
    "approved": "must be true or false"
  }
}

Example cURL

Example
curl --request PATCH \
  --url https://chat.betterstack.com/api/v2/chats/12345/confirmations/501 \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "approved": true,
    "allow_tool_for_session": false
  }'