Set who may answer the project's approval requests
People only, with a fresh second factor.
PUT/v1/approvers
People only, with a fresh second factor. Each account must be a member of the organization.
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 PUT "https://api.pod.mapier.ai/v1/approvers?project=example" \
-H "Authorization: Bearer $POD_PERSON_TOKEN" \
-H "Content-Type: application/json" \
-d '{"accounts":["example"]}'Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
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 |
|---|---|---|---|
project | string | No | Optional; when sent it must be the project of the query. |
accounts | string[] | Yes |
Answer
200. The approver list as set.
{
"project": "example",
"accounts": ["example"],
"caller_may_answer": false,
"updated_at": null,
"updated_by": null
}| Field | Type | Always | What it is |
|---|---|---|---|
project | string | Yes | |
accounts | string[] | Yes | |
caller_may_answer | boolean | Yes | Whether the caller is on the list. |
updated_at | string | null | Yes | |
updated_by | string | null | Yes |
Errors
The refusals this call is known for: invalid, unauthorized, person_required, forbidden. 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.