Organization API: Organizations & Members: Members
The 4 Organization API operations for members.
Part of Organizations & Members.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/members |
List members |
| POST | /api/v1/orgs/{org_slug}/members |
Add a member: an existing coritan.com account by its email, or a new one |
| PATCH | /api/v1/orgs/{org_slug}/members/{member_id} |
Update member |
| DELETE | /api/v1/orgs/{org_slug}/members/{member_id} |
Remove member |
List members
Section titled List membersGET /api/v1/orgs/{org_slug}/members
The organization's members, oldest first, each with the name and email
of their coritan.com account and its account_status
(MEMBER_ACCOUNT_STATUSES).
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
A 200 response is a list; each item has these fields:
| Field | Type |
|---|---|
[].id |
integer |
[].org_id |
integer |
[].user_id |
integer |
[].role |
string |
[].permissions |
object or null |
[].joined_at |
string (date-time) or null |
[].customer_link_mode |
string or null |
[].linked_customer_id |
integer or null |
[].email |
string or null |
[].first_name |
string or null |
[].last_name |
string or null |
[].account_status |
string or null |
Add a member: an existing coritan.com account by its email, or a new one
Section titled Add a member: an existing coritan.com account by its email, or a new onePOST /api/v1/orgs/{org_slug}/members
Add a member: an existing coritan.com account by its email, or a new
one. Owners and admins; adding an Admin, who may change everything but
the organization's owner, takes a fresh step-up (403
reauth_required) as a role change does, before anything is written.
Counted against the staff console's invite budget (staff.invite, 429
past it) and audited as member.invited.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
email |
string | yes |
role |
string | no |
name |
string or null | no |
password |
string or null | no |
send_invite_email |
boolean | no |
permissions |
object or null | no |
customer_link |
string | no |
customer_id |
integer or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 201 response:
| Field | Type |
|---|---|
id |
integer |
org_id |
integer |
user_id |
integer |
role |
string |
permissions |
object or null |
joined_at |
string (date-time) or null |
customer_link_mode |
string or null |
linked_customer_id |
integer or null |
email |
string or null |
first_name |
string or null |
last_name |
string or null |
account_status |
string or null |
Update member
Section titled Update memberPATCH /api/v1/orgs/{org_slug}/members/{member_id}
Change a member's role or permissions, as the staff console's
team does: owners and admins, after a fresh step-up (403
reauth_required). 400 for the owner's row and for your own; 404 for a
member of another organization; 429 past org.member_change. A new
role ends the member's staff console sessions. Audited as
member.role_changed and member.permissions_changed. Answers the
member as a row of GET /members reads.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
member_id |
path | integer | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
role |
string or null | no |
permissions |
object or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
id |
integer |
org_id |
integer |
user_id |
integer |
role |
string |
permissions |
object or null |
joined_at |
string (date-time) or null |
customer_link_mode |
string or null |
linked_customer_id |
integer or null |
email |
string or null |
first_name |
string or null |
last_name |
string or null |
account_status |
string or null |
Remove member
Section titled Remove memberDELETE /api/v1/orgs/{org_slug}/members/{member_id}
Take a member off the team, as the staff console's team does: owners
and admins, after a fresh step-up (403 reauth_required). Their staff
console sessions end; their coritan.com account and storefront customer
account stay. 400 for the owner and for yourself; 404 for a member of
another organization; 429 past org.member_change. Audited as
member.removed.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
member_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |