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

NameInTypeRequiredWhat it is
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
projectstringNoOptional; when sent it must be the project of the query.
accountsstring[]Yes

Answer

200. The approver list as set.

200
{
  "project": "example",
  "accounts": ["example"],
  "caller_may_answer": false,
  "updated_at": null,
  "updated_by": null
}
FieldTypeAlwaysWhat it is
projectstringYes
accountsstring[]Yes
caller_may_answerbooleanYesWhether the caller is on the list.
updated_atstring | nullYes
updated_bystring | nullYes

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.