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.

POST/v1/asks/{ask_id}/answer

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

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.
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Body

FieldTypeRequiredWhat it is
answer"allow_once" | "allow_for_time" | "deny"Yesallow_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_sinteger | nullNoHow 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.
sandboxesstring[]YesThe 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.
proofstringYesMapier 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.

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: 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.