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
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
ask_id | path | string | Yes | Made by the server that refused the request, so it exists even while approvals is down. |
project | query | string | Yes | The project the call is about. Every route is scoped to one. |
Pod-Organisation | header | string | No | The 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.
{
"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"
}
]
}| Field | Type | Always | What it is |
|---|---|---|---|
id | string | Yes | Made by the server that refused the request, so it exists even while approvals is down. |
kind | "permission" | "spend" | No | Always sent by the approvals service; absent is read as permission. |
spend | AskSpend | null | No | For a spend Ask, the amount; null otherwise. |
state | "waiting" | "allowed" | "denied" | "expired" | Yes | |
opened_at | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
expires_at | string | Yes | An Ask nobody answers ends as Deny after 24 hours. |
sandboxes | string[] | Yes | The sandboxes asking. One question from many sandboxes under one policy is grouped. |
end_user | string | null | Yes | The end user the sandboxes work for, if any. |
policy | string | Yes | |
rule | string | Yes | The rule that asked, in the simple form. |
request | AskRequest | Yes | The request behind an Ask, decoded on the server. A host name alone is never the whole question. |
claimed_reason | string | null | Yes | What the agent said about why. A guest claim, shown apart; no decision uses it. |
allows | object | Yes | Exactly what each answer would allow, in plain words. |
policy_cap_s | integer | null | Yes | The policy's cap on how long an answer lasts; null for 24 hours. |
answer | AskGivenAnswer | null | Yes | The answer; null while waiting or once expired. |
grants | AskGrant[] | No | The 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.