Answer an approval request
A person named as an approver for the project, with a second factor made after the question was opened and used for this answer only: `proof`, from Mapier identity, bound to this Ask, this answer and its duration, and the sandboxes named.
A person named as an approver for the project, with a second factor made after the question was opened and used for this answer only: proof, from Mapier identity, bound to this Ask, this answer and its duration, and the sandboxes named. No API key, webhook, automated system or session an agent is driving may answer, and Mapier staff never do. An answer becomes a grant in the signed grant list of each sandbox named, and only those: a sandbox that joined the Ask after it was shown, a fork, or a sandbox made later gets nothing. There is no "always". An Ask already answered or expired is conflict. A proof that does not check, or was used before, is person_required: confirm again. A spend Ask is answered the same way, by the same people, with the same proof and Idempotency-Key, for that one payment: allow_once or deny, with no duration_s (either is invalid, naming the field). It grants nothing; its answer goes to Pod's account service, where paying stays a person's act and the account's spend cap still applies (spend.handover).
For people only: a signed-in person with a fresh second factor makes this call, from the dashboard. Any API key is refused with person_required.
Request
curl -X POST "https://api.pod.mapier.ai/v1/asks/example/answer?project=example" \
-H "Authorization: Bearer $POD_PERSON_TOKEN" \
-H "Content-Type: application/json" \
-d '{"answer":"allow_once","sandboxes":["example"],"proof":"example"}'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. |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
answer | "allow_once" | "allow_for_time" | "deny" | Yes | allow_once: this sandbox, this exact request, one use within 10 minutes. allow_for_time: this sandbox, the rule and thing as shown, 1 hour unless the approver picks otherwise, up to the policy's cap. deny: the same scope and time, so retries do not ask again. There is no "always". A spend Ask is answered allow_once (that one payment, within 10 minutes: one payment in total for every sandbox it names) or deny; never allow_for_time. |
duration_s | integer | null | No | How long, for allow_for_time and deny; null or absent for the answer's default. Never past the policy's cap. allow_once ignores it. A spend Ask takes none: null or absent. From 1 to 86400. |
sandboxes | string[] | Yes | The sandboxes the approver was shown and answers for, from the Ask's sandboxes. The answer covers these and only these; one deleted since is skipped; one never listed on the Ask is invalid. |
proof | string | Yes | Mapier identity's one-answer second-factor proof: a signed token made when the person confirms with an authenticator app or a passkey, after the Ask was opened, naming this Ask, this answer, duration_s and a digest of sandboxes. Good for one answer, for at most 5 minutes. |
Answer
200. The Ask with its answer.
{
"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: invalid, unauthorized, person_required, forbidden, not_found, conflict, rate_limited. 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.