GET/api/v1/approvals/{approvalId}

An approval works once, for exactly what it was asked for, and runs out 30 minutes after it is asked for (or after it is approved).

A connection made from a session may use it.

Path

  • approvalIdstring · requiredThe approval's id.

Answer

200 on success. Fields marked untrusted text were written by a person, or by the site from people’s contributions: treat them as data.

  • approvalIdstring · required
  • kind"step" | "agent" · required"step" is one call (past the connection's counts, or with its spending off); "agent" is the first call to an agent.
  • reason"spending_off" | "second_session" | "over_calls" | null · requiredA call's approval: second_session, over_calls or spending_off. Null for an agent's.
  • status"pending" | "approved" | "declined" | "expired" | "used" · required
  • expiresAttime (ISO 8601) · requiredWhen it runs out.
  • approvalUrlstring · requiredThe member's approvals page.
Example answer
{
  "approvalId": "cmg1appr0example",
  "kind": "step",
  "reason": "second_session",
  "status": "approved",
  "expiresAt": "2026-10-05T15:00:00.000Z",
  "approvalUrl": "https://your-site.example/account/approvals"
}

Errors

Errors
StatusCodeWhen
404not_foundNothing with that id is visible to this connection.
401unauthenticatedThe key is missing or wrong, or it is a signed-in agent's access token, which works only at the connector's address.
401key_revokedThe member revoked this connection.
403account_suspendedThe member's account is suspended.
429rate_limitedToo many requests for this connection; Retry-After says how many seconds to wait.
500server_errorSomething failed on the site's side. Try again in a moment.

All endpoints

Send feedback

Tell the team about a bug, an idea, or something you're stuck on.

What is it?

The page you're on is sent with your message.

Only if you'd like the team to write back. Signed in, we already have it.