List the roles an agency invite can give

POST /agencies/{agencyId}/members/role_choices

POST https://zanpki.com/agencies/{agencyId}/members/role_choices

Operation ID agencies.agencyId.members.role_choices.post
Access Browser session signed in through ZanAuth, using the access token cookie alongside its ID token and refresh token cookies. Or: An access token issued for this site by its ZanAuth issuer, or a static key.

Parameters

NameInTypeDescription
agencyId Path Required string (snowflake) Agency ID.

Request body

Required, sent as application/x-www-form-urlencoded, application/json.

Schema: B2bInviteRoleChoicesBody

PropertyTypeDescription
organization_id string (snowflake), or null Optional The organization the invite gives roles in, or null for the whole agency.
role_names list of string Optional The names of the roles chosen on the invite form so far.
organization_name string, or null Optional Part of an organization's name, to list only the organizations whose name contains it. Leave it empty to list the first organizations by name.

Responses

StatusDescriptionSchemaContent type
200 The roles the invite can give on the chosen scope. B2bInviteRoleChoices application/json
403 Your roles here do not allow this. Problem application/json
422 The request input was rejected. The errors object lists each validation failure. ValidationProblem application/json
Any other status The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation. Problem application/json

200 The roles the invite can give on the chosen scope.

PropertyTypeDescription
role_choices list of FormChoice Required The roles the invite can give on that scope. Each is chosen if it was chosen before and is still offered there.
organization_choices list of FormChoice Required The agency's organizations the form can name, in name order: the first 50 that match the name typed, with the organization already picked listed first.
organization_id string (snowflake), or null Optional The organization picked, if it is one of the agency's organizations. Null for all organizations, including future ones.

403 Your roles here do not allow this.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.

422 The request input was rejected. The errors object lists each validation failure.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.
errors InputErrors Required Validation errors for each rejected value. Parameter errors are returned as a list, and body errors as a tree matching the request body structure.

Any other status: The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.

Example

curl -X POST 'https://zanpki.com/agencies/{agencyId}/members/role_choices' \
  -H 'Authorization: Bearer <access token>' \
  -H 'Content-Type: application/json' \
  -d '{}'

All documentation