pydo.gateway_approvals.update()

Generated on 13 Nov 2026 from pydo version v0.46.0

Usage

client.gateway_approvals.update(
    x_session_id=None,
    x_endpoint_id=None,
    x_actor_id=None,
    approval_id="7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d",
    body={
        "decision": "approve",
    },
)
Returns JSON Raises HttpResponseError

Description

Approves or denies a tool call that is waiting for approval, identifying the session with the X-Session-Id header or the endpoint with the X-Endpoint-Id header. With X-Session-Id, it behaves the same as POST /approvals/session/{session_id}/{approval_id}, which is the path returned in a result’s _meta.decide. An unknown X-Endpoint-Id returns 404.

Parameters

x_session_id string optional

The session to act in: the UUID at the end of the session's sessionUrn and mcpUrl. For a pinned endpoint version, use the session UUID at the end of its mcp_url, not the composite version ID. The session must belong to the authenticated user and team. Send either this header or X-Endpoint-Id, not both; both returns 400. With neither, the request uses your default endpoint when default endpoints are enabled for your team, and otherwise returns 403.

x_endpoint_id string optional

The endpoint to act in, as a lowercase endpoint UUID. The request uses the endpoint's current head version, which the response reports in X-Action-Gateway-Endpoint-Version. The endpoint must belong to the authenticated user and team; an unknown or inaccessible endpoint returns 404. Send either this header or X-Session-Id, not both. A malformed value or more than one value returns 400.

x_actor_id string optional

The actor you expect the session or endpoint to be bound to. It does not select an actor or connections; those come from the session's or endpoint's actor_id. When sent, it must equal that binding. A different value, including any value for a target with no actor, returns 403 with the message "The session is not bound to the request's actor."

approval_id string required

The approval_id from a tool result whose _meta.status is requires_approval.

decision string required

Whether to let the pending call run.

One of: approve, deny

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "decision": "deny"
}

resp = client.gateway_approvals.update(approval_id="7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d", body=req)

Response Example

Show Response Example
{
  "id": "7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d",
  "status": "denied",
  "expires_at": "2026-10-09T18:30:00Z"
}

More Information

See /approvals/{approval_id} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.