Get an approval request, decoded

Get an approval request, decoded

GET/v1/asks/{ask_id}

A key with the permissions:read scope.

Request

curl "https://api.pod.mapier.ai/v1/asks/example?project=example" \
  -H "Authorization: Bearer $POD_API_KEY"

Parameters

NameInTypeRequiredWhat it is
ask_idpathstringYesMade by the server that refused the request, so it exists even while approvals is down.
projectquerystringYesThe project the call is about. Every route is scoped to one.
Pod-OrganisationheaderstringNoThe organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden.

Answer

200. The Ask.

200
{
  "id": "example",
  "kind": "permission",
  "spend": null,
  "state": "waiting",
  "opened_at": "2026-11-23T12:00:00.000Z",
  "expires_at": "2026-11-23T12:00:00.000Z",
  "sandboxes": ["example"],
  "end_user": null,
  "policy": "example",
  "rule": "example",
  "request": {
    "action": "read",
    "method": null,
    "address": "example",
    "bytes": null,
    "content_type": null,
    "tool": null
  },
  "claimed_reason": null,
  "allows": {
    "allow_once": "example",
    "allow_for_time": "example",
    "deny": "example"
  },
  "policy_cap_s": null,
  "answer": null,
  "grants": [
    {
      "sandbox": "example",
      "state": "waiting_to_apply"
    }
  ]
}
FieldTypeAlwaysWhat it is
idstringYesMade by the server that refused the request, so it exists even while approvals is down.
kind"permission" | "spend"NoAlways sent by the approvals service; absent is read as permission.
spendAskSpend | nullNoFor a spend Ask, the amount; null otherwise.
state"waiting" | "allowed" | "denied" | "expired"Yes
opened_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
expires_atstringYesAn Ask nobody answers ends as Deny after 24 hours.
sandboxesstring[]YesThe sandboxes asking. One question from many sandboxes under one policy is grouped.
end_userstring | nullYesThe end user the sandboxes work for, if any.
policystringYes
rulestringYesThe rule that asked, in the simple form.
requestAskRequestYesThe request behind an Ask, decoded on the server. A host name alone is never the whole question.
claimed_reasonstring | nullYesWhat the agent said about why. A guest claim, shown apart; no decision uses it.
allowsobjectYesExactly what each answer would allow, in plain words.
policy_cap_sinteger | nullYesThe policy's cap on how long an answer lasts; null for 24 hours.
answerAskGivenAnswer | nullYesThe answer; null while waiting or once expired.
grantsAskGrant[]NoThe grants the answer made, one for each sandbox it covers, and whether each sandbox's server has applied it. Empty while waiting, once expired, and for a spend request.

Errors

The refusals this call is known for: unauthorized, forbidden, not_found. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.