dots.approvals.session.bySession_id().byApproval_id().post()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.approvals.session.bySession_id(session_id).byApproval_id(approval_id).post(body: Approval_decision, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Approval_decision_response>

Description

Approves or denies a tool call that is waiting for approval. A tool result returns _meta.status set to requires_approval when the session policy sets ask for the call, and its _meta.decide gives this request’s path.

Send the decision with the session owner’s token. Approval is a separate control request, not a tool, so an agent cannot approve its own calls. After approving, repeat the original call with the same arguments before expires_at. An approval applies only to that session, tool version, and set of arguments, and is used once. To ask again after a denial or expiry, repeat the tool call.

Parameters

Path Parameters

session_id string required

Example: 2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b

The session UUID: the value at the end of the session's sessionUrn and mcpUrl. The session must belong to the authenticated user and team.

approval_id string required

Example: 7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d

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

Request Body

decision string required

Whether to let the pending call run.

One of: approve, deny

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.approvals.session
    .bySession_id("2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b")
    .byApproval_id("7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d").post({
    decision: "approve",
});

Response Example

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

More Information

See /approvals/session/{session_id}/{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.