approvals

Decide approval

Approve or reject a pending approval request.

Approving resumes the run. Rejecting fails the run, or resumes it with the rejection when the request's on_rejection is continue. Returns 409 when the request is no longer pending or its run has ended.

Required permission: approvals.decide.

post/v1/projects/{project_id}/approvals/{approval_id}/decide

Request

  • Base URL: https://api.connic.co
  • URL: https://api.connic.co/v1/projects/{project_id}/approvals/{approval_id}/decide
  • Auth: HTTP bearer

Path parameters

project_idstring uuid required

ID of the project the API key belongs to.

approval_idstring uuid required

Approval ID from GET /approvals.

Request body

status'approved' | 'rejected' required

approved resumes the run. rejected fails the run, or resumes it when the agent's on_rejection is continue.

reasonstring nullable

Optional note. On rejection it is added to the run error or passed to the agent.

responsestring nullable

Text returned to the agent as the tool result. Required when approving a request with a response_label; not accepted otherwise.

Response

Successful Response

idstring uuid required
run_idstring uuid required

Run that is paused until the request is decided.

environment_idstring uuid required

Environment of the run.

agent_namestring required

Agent that made the tool call.

tool_namestring required

Tool the agent wants to call.

tool_paramsobject nullable

Arguments of the pending tool call.

messagestring nullable

Message for reviewers from the agent's approval settings.

response_labelstring nullable

Label of the text a reviewer must provide when approving. Set for human input requests; null for plain approvals.

response_sensitiveboolean

Whether the reviewer's response is redacted from recorded run data.

timeoutinteger required

Seconds the request waits for a decision before it times out (30 to 604800).

on_rejectionstring

What happens on rejection or timeout: fail ends the run, continue resumes it and tells the agent the call was not approved.

status'pending' | 'approved' | 'rejected' | 'timeout' required

pending until decided. timeout when no decision arrived in time or the run ended first.

created_atstring date-time required
resolved_atstring date-time nullable

When the request was resolved. null while pending.

resolved_by_idstring nullable

ID of the user who decided, or a system value such as system for automatic resolutions. null while pending.

resolved_bystring nullable

Email of the user who decided, or a system value for automatic resolutions. null while pending.

reasonstring nullable

Note given with the decision, or why the request was closed automatically. null when none.

Changes

No recorded changes to this operation across all 2 revisions of this API.