Invite, create, and manage organization members, update names and roles, and query stats, quotas, and add-on caps.
About this document
For integrations that invite and manage members and quotas outside the Qoder UI. Complete Get API Key first, then read Conventions.
Requirements
- Valid API key:
Authorization: Bearer <api_key>. - Key must belong to the target organization; caller permissions must allow the operation.
Overview
The member management API supports invitations, creation, lookup, name and role updates, statistics, usage queries, removal, and Add-On Cap management. All endpoints authenticate through an API key associated with the target organization.
Main features
- Invite members: create invitations in batches, query invitation status, and revoke, resend, or delete invitations.
- List members: exact user ID or email lookup, cursor pagination, and optional inclusion of removed members.
- Create members: create enterprise email users, add them to the organization, and assign seats automatically.
- Get member details: retrieve a member by member ID.
- Update names: update the current display name of an organization member.
- Update roles: assign organization administrator, organization member, Config Admin, or Directory roles.
- Member statistics: query member counts and seat usage.
- Member usage: query quotas and usage for individual or multiple members, including Plan, resource packs, and totals.
- Remove members: remove members from the organization.
- Add-On Cap management: set Shared Add-On caps for individual members or in batches.
API list
1. List members
GET /v1/organizations/{organization_id}/members
Paginated retrieval of organization members, with exact matching by user ID or email.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | string | No | Exact user UUID lookup; cannot be combined with email |
email | string | No | Exact email lookup |
includeDeleted | string | No | Set to true to include removed members |
maxResults | integer | No | Page size (default 20, max 100) |
nextToken | string | No | Pagination cursor |
userId must be a non-empty standard UUID. Exact lookup by userId or email returns at most one member and does not return a new nextToken. If no member matches, the API returns 200 OK with an empty members array.
Success response (200 OK)
Default query (active members only):
Some member records may not return the email field; treat it as optional during integration.
Including deleted members (**includeDeleted=true**):
deletedAtis only returned for deleted members; active members do not include this field. WhennextTokenis absent, the response is the last page.
Response fields
| Field | Type | Description |
|---|---|---|
members | array | Member list |
members[].id | string | Member ID |
members[].userId | string | User ID |
members[].name | string | Member name |
members[].email | string | Member email (may be empty) |
members[].role | string | Role name (e.g., org_admin, org_member) |
members[].status | string | Member status: ENABLED (active), DISABLED (suspended), UNACTIVATED (not activated), APPROVE_PENDING (pending approval), APPROVE_DECLINED (approval declined), DELETED (removed) |
members[].joinedAt | string | Join time (ISO 8601) |
members[].deletedAt | string or null | Deletion time (ISO 8601); not returned for active members |
maxResults | int32 | Page size for this request |
nextToken | string | Next-page cursor; omitted on the last page |
2. Get member details
GET /v1/organizations/{organization_id}/members/{member_id}
Retrieve detailed information for a single member.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
member_id | string | Yes | Member ID |
Success response (200 OK)
Active member:
**GetMember** automatically includes deleted members):
Response fields
Same as the members[] fields in "List members".
3. Create member
POST /v1/organizations/{organization_id}/members
Create a new user and add the user to the organization. If the email is not registered, a new account is created. If it is registered and the user has no current organization membership, the existing account is reused without changing its password. To let users register or sign in and accept an invitation, use Create email invitations.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | New user email. Its domain must be verified and enabled for the organization |
name | string | Yes | User and member display name |
password | string | Yes | Initial password. It must meet the password-strength requirements and is never returned |
role | string | No | Member role: org_member, org_admin, org_config_admin, or org_directory; defaults to org_member |
Success response (200 OK)
Error responses
| Error code | HTTP status | Description |
|---|---|---|
InvalidParameter | 400 | email or name is missing or invalid |
InvalidPassword | 400 | Password is missing or does not meet the strength requirements |
InvalidRole | 400 | Role is not org_member, org_admin, org_config_admin, or org_directory |
EmailDomainRequired | 400 | The organization has no verified and enabled email domain |
EmailDomainNotSupported | 400 | The email domain is not enabled for the organization |
InsufficientSeats | 400 | The organization has no available seat |
EmailAlreadyExists | 409 | The email is already registered |
OrgInvitationUserAlreadyInOrg | 409 | The user is already a member of this organization |
OrgInvitationUserInOtherOrg | 409 | The user is already a member of another organization |
4. Get member statistics
GET /v1/organizations/{organization_id}/members/statistics
Retrieve statistical data about organization members.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
Success response (200 OK)
Response fields
| Field | Type | Description |
|---|---|---|
totalMembers | int32 | Total number of members |
billableMembers | int32 | Number of billable members |
adminMembers | int32 | Number of admins |
purchasedSeats | int32 | Number of purchased seats |
remainingSeats | int32 | Number of remaining seats |
5. Delete member
DELETE /v1/organizations/{organization_id}/members/{member_id}
Remove a member from the organization. Before removal, the system checks whether the member had usage in the current billing cycle.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
member_id | string | Yes | Member ID |
Success response (200 OK)
Member has usage in the current cycle (seat release deferred to end of cycle):
Response fields
| Field | Type | Description |
|---|---|---|
id | string | ID of the deleted member |
hasBillingCycleUsage | bool | Whether the member had usage in the current billing cycle (affects seat release timing) |
Error responses
Member not in this team (404)
6. Get member quota
GET /v1/organizations/{organization_id}/members/{member_id}/quota
Query the full usage details for a specified member, including plan quota, resource pack quota, total quota, and member shared quota cap and usage.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
member_id | string | Yes | Member ID |
Success response (200 OK)
With organization shared pack, status normal:
sharedQuotadescribes the member's shared quota cap and usage.restrictedmeans that the member is restricted from using the service. When the member has no resource pack,resourcePackageQuotais not returned.
Response fields
| Field | Type | Description |
|---|---|---|
userId | string | User ID |
planQuota | object | Plan quota information |
resourcePackageQuota | object | Resource pack quota information |
totalQuota | object | Total quota information (plan + resource pack) |
sharedQuota | object or null | Member shared quota cap and usage; -1 means unlimited |
lastResetAt | string | Last reset time (ISO 8601) |
nextResetAt | string | Next reset time (ISO 8601) |
status | string | User status: active or restricted |
| Field | Type | Description |
|---|---|---|
usedValue | float64 | Amount used |
limitValue | float64 | Quota limit |
unit | string | Unit (e.g., credits) |
7. Batch get member quotas
POST /v1/organizations/{organization_id}/members/batchGetQuota
Query quota usage for multiple members in one request. This endpoint has the same quota scope as Get member quota.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
Request body (JSON)
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
memberIds | string[] | Yes | 1–100 non-empty member IDs | Members whose quota usage should be returned |
Success response (200 OK)
quotas array follows the order of memberIds, including duplicate IDs. If a member has no quota record, only memberId and userId are returned for that item. If any member does not exist in the organization, the entire request returns 404 NotFound; partial success is not returned.
Response fields
| Field | Type | Description |
|---|---|---|
quotas | array | Quota usage results |
quotas[].memberId | string | Member ID |
quotas[].userId | string | User ID |
quotas[].planQuota | object | Plan quota information; omitted when unavailable |
quotas[].resourcePackageQuota | object | Resource pack quota information; omitted when unavailable |
quotas[].totalQuota | object | Total quota information; omitted when unavailable |
quotas[].sharedQuota | object | Member shared quota cap and usage; omitted when unavailable |
quotas[].lastResetAt | string | Last reset time (ISO 8601); omitted when unavailable |
quotas[].nextResetAt | string | Next reset time (ISO 8601); omitted when unavailable |
quotas[].status | string | active or restricted; omitted when quota data is unavailable |
8. Update member Add-On Cap
PUT /v1/organizations/{organization_id}/members/{member_id}/addon-cap
Update a member's Shared Add-On quota cap (based on Big Model Credits quota).
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
member_id | string | Yes | Member ID |
Request parameters (JSON)
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
addOnCap | int64 or null | Yes | Non-negative integer or null | Quota cap; null means unlimited, 0 means disabled |
Request examples
Set a quota cap:
Success response (200 OK)
Response fields
| Field | Type | Description |
|---|---|---|
memberId | string | Member ID |
email | string | Member email |
addOnCap | int64 or null | Current quota cap; null means unlimited |
Error responses
Invalid addOnCap format (400)
9. Batch update member Add-On Cap
POST /v1/organizations/{organization_id}/batchUpdateAddOnCap
Batch update the Shared Add-On quota cap for specified members (based on Big Model Credits quota). Up to 100 members per request; all members are set to the same cap.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
Request parameters (JSON)
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
addOnCap | int64 or null | Yes | Non-negative integer or null | Quota cap; null means unlimited, 0 means disabled |
memberIds | string[] | Yes | 1–100 non-empty strings | List of member IDs to update |
Request examples
Batch set quota cap:
Success response (200 OK)
previousAddOnCap is omitted when the member previously had no limit (unlimited).
Response fields
| Field | Type | Description |
|---|---|---|
members | array | Update result list, in the same order as memberIds in the request |
members[].memberId | string | Member ID |
members[].previousAddOnCap | int64 | Previous quota cap; omitted when previously unlimited |
Error responses
Invalid addOnCap format (400)
10. Update member role
PUT /v1/organizations/{organization_id}/members/{member_id}/role
Set an organization member’s role to Organization Admin, Organization Member, Config Admin, or Directory. Available for CN / Global and Teams / Enterprise, using the same IAM role-change capability as the dashboard.
Authentication and permissions
Use the target organization’s API key: Authorization: Bearer <api_key>. The key must belong to the organization in the path. Service account credentials cannot call this endpoint. The member_id must belong to that organization.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
member_id | string | Yes | Member ID returned by a member query endpoint; this is not the user ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
role | string | Yes | org_admin: Organization Admin; org_member: Organization Member; org_config_admin: Config Admin; org_directory: Directory |
role cannot be omitted, null, or an empty string. The deprecated org_free_member and other roles are not supported. Setting a non-billable role again still triggers IAM entitlement reclamation and can retry an incomplete reclamation.
Success response (200 OK)
Returns the updated member details directly, using the same fields as the get member details endpoint.
Business restrictions
- At least one administrator (Organization Admin or Config Admin) must remain. Role transitions use the same IAM validation as the dashboard.
- Removed members cannot change roles; IAM rejects other unavailable member states.
- Role changes are prohibited while a Teams-to-Enterprise upgrade is pending activation.
- New assignments of Config Admin or Directory require the DirectoryRole rollout to be enabled for the organization; otherwise, the endpoint returns 403. Both are non-billable roles. Switching to them uses the IAM flow to release seats, remove billing entitlements, and revoke sessions. Switching back to a billable role requires an available seat; failures use the IAM compensation flow. Special-account restrictions match the dashboard.
Error responses
| Error code | HTTP status | Description |
|---|---|---|
BadRequest | 400 | Malformed request body, invalid member ID, or member state does not allow changes |
InvalidRole | 400 | Role is missing or unsupported |
OrgMemberAdminCountLacked | 400 | Cannot remove the last administrator role |
OrganizationPendingUpgrade | 400 | Organization is awaiting activation of a Teams-to-Enterprise upgrade |
Unauthorized | 401 | Missing or invalid credentials |
Forbidden | 403 | Credentials lack permission, or the new role is not enabled for the organization |
UserNotTeamMember | 404 | Member does not exist, was removed, or belongs to a different organization |
InternalError | 500 | Internal service error |
requestId, code, and message.
Request example
11. Update member name
PUT /v1/organizations/{organization_id}/members/{member_id}/profile
Update the current display name of an organization member.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID bound to the API key |
member_id | string | Yes | Member ID from the id field returned by a member query endpoint; this is not userId |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | New display name; up to 100 characters |
Success response (200 OK)
Returns the updated member ID, associated user ID, and display name.
| Field | Type | Description |
|---|---|---|
memberId | string | Organization member ID updated by this request |
userId | string | User ID associated with this member |
name | string | Updated display name, with leading and trailing whitespace removed |
Business restrictions
- The target must be a member who has not been removed from this organization. Disabled members can still be renamed.
- Display names do not have to be unique. Submitting the current name also returns
200 OK. - Only the associated account’s display name is changed. The avatar, email, sign-in method, role, and seat are unchanged.
- When name content checks are enabled, names that explicitly violate the content policy are rejected.
Error responses
| Error code | HTTP status | Description |
|---|---|---|
BadRequest | 400 | Malformed request body, unknown fields, request body over 16 KiB, invalid ID, invalid name, or a name that violates the content policy |
Unauthorized | 401 | Missing, invalid, revoked, or expired credentials |
Forbidden | 403 | The path organization does not match the API key’s organization, or the credential type is not supported |
NotFound | 404 | Member does not exist, was removed, or belongs to a different organization |
InternalError | 500 | Internal service error |
requestId, code, and message.
Request example
12. Create email invitations
POST /v1/organizations/{organization_id}/members/emailInvitations
Invite users to join the organization. Invitations are currently sent by email; recipients follow the link to register or sign in and accept.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID. |
Email invitation requirements
- Creating, cancelling, resending, and deleting invitations are subject to organization plan restrictions. These writes are rejected if the plan is expired, suspended, cancelled, or an active Free plan. Listing invitations remains available.
- Creating an invitation also requires an allocatable seat. Sending an invitation does not reserve a seat; availability is checked and a seat is allocated when it is accepted.
- You cannot invite an address whose domain is managed by another organization. If verified-domain validation is enabled for the deployment (disabled by default), your organization must also have a verified, enabled email domain matching the recipient's address.
failedEmails; even a batch in which every address fails can return 200 OK. Invalid request parameters or unmet organization prerequisites fail the whole request.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
emails | string[] | Yes | 1 to 3000 addresses per batch. Leading and trailing whitespace is removed, and addresses are lowercased. Empty strings are ignored; an empty resulting list is rejected. |
role | string | No | org_member or org_admin. Defaults to org_member. |
inviterId | string | No | Inviter's user UUID. Must identify an active administrator (org_admin or org_config_admin) in this organization. Use the member's userId. Defaults to the organization creator; provide it explicitly if creator information is missing or the creator is not an eligible administrator. |
expiresInHours | int32 | No | Validity in hours, from 24 to 720. Omitted values or int32 values outside that range use 168 (7 days). Fractional values or values outside the int32 range fail request-body parsing. |
Request example
Success response (200 OK)
Response fields
| Field | Type | Description |
|---|---|---|
invitations | array | Created email invitation objects. Invitations from one batch share a batchId. Empty if none were created. |
failedEmails | array | Failed items, each with email and reason. Empty if none failed. |
totalSent | int32 | Number of invitations created. Email is sent asynchronously; this is not a delivery count. |
totalFailed | int32 | Number of failed items, including validation and write failures. |
Per-address failure reasons
failedEmails[].reason can be a code or text. Preserve the original value for troubleshooting.
| reason | Description |
|---|---|
invalid email format | Invalid address format. |
duplicate email in batch | Duplicate address after normalization. |
pending invitation already exists for this email | A pending invitation already exists. |
this email has already joined the organization | An accepted invitation record already exists. |
OrgEmailInvitationUserInAnotherOrg | The user already has an organization membership, possibly in the current organization. |
OrgEmailInvitationDomainOwnedByAnotherOrg | Another organization manages the email domain. |
OrgEmailInvitationDomainNotMatched | With domain validation enabled, the address does not match a verified domain of this organization. |
internal_error_batch_write_failed | Batch write failure. Retain successful results and investigate or retry only failed items. |
reason, then submit only the addresses that need retrying to the create endpoint. Do not resubmit successful items. Use resend for an existing pending invitation.
13. List email invitations
GET /v1/organizations/{organization_id}/members/emailInvitations
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | PENDING, JOINED, EXPIRED, or CANCELLED. Omit to list all statuses. |
batchId | string | No | Filter by the batch UUID from a create response. |
maxResults | integer | No | Defaults to 20, maximum 100. Positive int32 values above 100 are capped at 100; nonpositive values or values that cannot be parsed as int32 use 20. |
nextToken | string | No | Pagination token from the previous response. Omit for the first page. |
status or a batchId that is not a valid UUID returns 400 BadRequest.
Success response (200 OK)
This example is the last page:
invitations contains the invitation objects; maxResults is the effective page size. When another page exists, pass the returned nextToken unchanged in the next request. The last page omits nextToken. An empty list returns invitations: []. An invalid nextToken returns the first page.
Email invitation object
Create and list responses use this structure for invitations[]; resend uses it for invitation. Timestamps are RFC 3339 strings.
| Field | Type | Description |
|---|---|---|
id | string | Invitation UUID for cancel, resend, or delete operations. |
organizationId | string | Organization ID. |
email | string | Invited email address. |
role | string | Assigned role: org_member or org_admin. |
status | string | PENDING (awaiting acceptance), JOINED (joined), EXPIRED (expired), or CANCELLED (cancelled). |
expiresAt | string | Expiration time. |
joinedUserId | string | User ID after joining; omitted when unset. |
joinedAt | string | Join time; omitted when unset. |
emailSentAt | string | Recorded email send time; omitted when unset. The current sending flow does not guarantee updates to this field. Do not use it to determine delivery. |
cancelledAt | string | Cancellation time; omitted when unset. |
batchId | string | Batch ID; omitted when unset. |
createdAt | string | Creation time. |
updatedAt | string | Last update time. |
14. Cancel an email invitation
POST /v1/organizations/{organization_id}/members/emailInvitations/{invitation_id}/cancel
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID. |
invitation_id | string | Yes | Invitation UUID from the id field. |
PENDING invitations can be cancelled. The invitation becomes invalid and its record remains with status CANCELLED. No request body is required.
Success response (200 OK)
id identifies the cancelled invitation:
15. Resend an email invitation
POST /v1/organizations/{organization_id}/members/emailInvitations/{invitation_id}/resend
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID. |
invitation_id | string | Yes | Invitation UUID from the id field. |
EXPIRED invitations can be resent.
EXPIRED: Creates a new invitation with the same email, role, and inviter, and rechecks creation prerequisites. The new invitation has a new ID, link, and batch ID, with the default 168-hour validity. The service attempts to delete the old record after creation; a deletion failure does not fail the response. Use the returned new ID for subsequent operations.
status, whose refresh can lag behind expiration. If expiresAt has passed but the status is still PENDING, the request is rejected. To obtain a new invitation, first list invitations and confirm the status is EXPIRED.
Email sending failures are not returned as errors by this endpoint. 200 OK does not confirm delivery.
Success response (200 OK)
invitation is the invitation used for this request:
16. Delete an email invitation
DELETE /v1/organizations/{organization_id}/members/emailInvitations/{invitation_id}
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID. |
invitation_id | string | Yes | Invitation UUID from the id field. |
JOINED record does not remove the organization member. Use the Delete member to remove members.
Success response (200 OK)
id identifies the deleted invitation:
17. Get invitation link settings
GET /v1/organizations/{organization_id}/settings/invitationLink
Get the invitation link switch. If no configuration exists, enabled is false.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID |
Success response (200 OK)
18. Update invitation link settings
PUT /v1/organizations/{organization_id}/settings/invitationLink
Enable or disable invitation links. Disabling does not delete existing codes or applications.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | Must be explicitly provided; null is not allowed. |
Request example
Success response (200 OK)
Error responses
| Error code | HTTP status | Description |
|---|---|---|
BadRequest | 400 | Missing, null, or invalid enabled. |
19. Create an invitation code
POST /v1/organizations/{organization_id}/invitationCode
Create a code. The invitation link switch must be enabled. Up to 20 valid codes are allowed.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
operatorUserId | string | Yes | User UUID of an active organization administrator (org_admin or org_config_admin). |
expiresAt | string or null | No | Future RFC 3339 timestamp. Omit or use null for no expiration. |
Request example
Success response (200 OK)
Response fields
| Field | Type | Description |
|---|---|---|
invitationCode.id | string | Code record ID |
invitationCode.code | string | Code used when revoking |
invitationCode.link | string | Invitation page URL |
invitationCode.expiresAt | string | Expiration time; omitted if unset |
invitationCode.createdAt | string | Creation time |
Error responses
| Error code | HTTP status | Description |
|---|---|---|
InvalidParameter | 400 | Missing or invalid operatorUserId. |
BadRequest | 400 | Invalid or non-future expiresAt. |
OrgInvitationCodeLimitExceed | 400 | Valid code limit reached. |
Forbidden | 403 | User is not an eligible administrator. |
20. List valid invitation codes
GET /v1/organizations/{organization_id}/invitationCodes
List valid codes for the organization.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
maxResults | integer | No | Default 20; maximum 100 |
nextToken | string | No | Previous cursor; invalid values return the first page |
Success response (200 OK)
invitationCodes[] uses the code object above. nextToken is omitted on the last page.
21. Revoke an invitation code
PUT /v1/organizations/{organization_id}/invitationCodes/{code}/revoke
Revoke a code without changing existing applications or members.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID |
code | string | Yes | Full code, URL-encoded as a path segment. Do not use the record ID. |
Success response (200 OK)
Error responses
| Error code | HTTP status | Description |
|---|---|---|
NotFound | 404 | Code does not exist or belongs to another organization. |
22. List join applications
GET /v1/organizations/{organization_id}/invitations
List applications to join the organization.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | PENDING, APPROVED, or REJECTED. Omit to list all. |
maxResults | integer | No | Default 20; maximum 100 |
nextToken | string | No | Previous cursor; invalid values return the first page |
Success response (200 OK)
Response fields
| Field | Type | Description |
|---|---|---|
invitations[].id | string | Application ID |
invitations[].invitee | object | Applicant userId, name, and email |
invitations[].status | string | Application status |
invitations[].createdAt | string | Application time |
invitations[].assignedRole | string | Assigned role; omitted if unset |
invitations[].processedAt | string | Processing time; omitted if unset |
invitations[].processorId | string | Recorded administrator user ID; omitted if unset |
nextToken | string | Next-page cursor; omitted on the last page |
23. Approve a join application
POST /v1/organizations/{organization_id}/invitations/{invitation_id}/approve
Approve a PENDING application and create the organization member.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID |
invitation_id | string | Yes | Join application UUID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
role | string | Yes | org_member, org_admin, org_config_admin, or org_directory |
operatorUserId | string | Yes | User UUID of an active organization administrator (org_admin or org_config_admin). |
Request example
Success response (200 OK)
Error responses
| Error code | HTTP status | Description |
|---|---|---|
InvalidRole | 400 | Missing or invalid role. |
InvalidParameter | 400 | Missing or invalid administrator user ID. |
OrgInvitationRequestNotPending | 400 | Application has already been processed. |
Forbidden | 403 | User is not an eligible administrator. |
approval may already be recorded, or approval recorded but member creation is incomplete, query the application and member before retrying. Do not automatically retry these errors or timeouts.
24. Reject a join application
POST /v1/organizations/{organization_id}/invitations/{invitation_id}/reject
Reject a PENDING application.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID |
invitation_id | string | Yes | Join application UUID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
operatorUserId | string | Yes | User UUID of an active organization administrator (org_admin or org_config_admin). |
Request example
Success response (200 OK)
Error responses
| Error code | HTTP status | Description |
|---|---|---|
InvalidParameter | 400 | Missing or invalid administrator user ID. |
OrgInvitationRequestNotPending | 400 | Application has already been processed. |
Forbidden | 403 | User is not an eligible administrator. |
25. Reset a member password
POST /v1/organizations/{organization_id}/members/resetPassword
Reset a member's password and revoke old sessions and tokens. Use the target organization's API key; service account credentials are not supported.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization UUID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Member's actual login email; exact match |
newPassword | string | Yes | 8–72 ASCII characters; include uppercase, lowercase, a digit, and a special character. Only ! through ~ are allowed; spaces are not allowed. |
Request example
Success response (200 OK)
Error responses
| Error code | HTTP status | Description |
|---|---|---|
BadRequest | 400 | Invalid request or weak password |
OrgEmailDomainNotVerified | 403 | Email domain is not verified, enabled, or owned by this organization |
PasswordLoginUnsupported | 403 | Local password login is not available |
MemberNotFound | 404 | Member is missing, removed, or belongs to another organization |
SessionRevocationIncomplete | 409 | Password changed, but session revocation is incomplete |
PasswordResetResultUnknown | 503 | Final reset result is unknown |
requestId and contact support to verify the result.
Error codes
| Error code | HTTP status | Description |
|---|---|---|
BadRequest | 400 | Invalid request parameters (e.g., empty member_id). For invitations: Invalid request body, invalid status / batchId, or a missing organization subscription record. |
InvalidParameter | 400 | Member creation email or name is missing or invalid, or userId is invalid or combined with email. For invitations: Empty email list or invalid inviter / invitation ID. inviterId is required means creator information is missing or the creator is not an eligible administrator; provide the inviter explicitly. |
InvalidPassword | 400 | Password is missing or does not meet the strength requirements |
InvalidRole | 400 | Member role is invalid |
EmailDomainRequired | 400 | Organization has no verified and enabled email domain |
EmailDomainNotSupported | 400 | Email domain is not enabled for the organization |
InsufficientSeats | 400 | Organization has no available seat |
InvalidBatchQuotaRequest | 400 | Invalid JSON body for the batch quota request |
InvalidAddOnCapFormat | 400 | Invalid addOnCap format |
InvalidBatchAddOnCapRequest | 400 | Invalid JSON body for the batch Add-On Cap request |
EmptyMemberIDs | 400 | memberIds is empty |
TooManyMemberIDs | 400 | memberIds contains more than 100 items |
EmptyMemberIDAtIndex | 400 | A memberIds item is empty |
InsufficientMembers | 400 | Organization member count cannot be lower than the minimum requirement |
OrgEmailInvitationInviterNotFound | 400 | Inviter user does not exist. |
OrgEmailInvitationBatchSizeExceeded | 400 | Batch exceeds 3000 invitations. |
OrgInvitationInsufficientSeats | 400 | No seats available when creating invitations. |
OrgEmailInvitationNoVerifiedDomain | 400 | Domain validation is enabled but no verified, enabled domain exists. |
OrgEmailInvitationDomainOwnedByAnotherOrg | 400 | The domain of the address being reinvited is managed by another organization. |
OrgEmailInvitationOrgMismatch | 400 | Invitation does not belong to the specified organization. |
OrgEmailInvitationCannotCancel | 400 | Invitation is not PENDING. |
OrgEmailInvitationStatusNotResendable | 400 | Invitation is not EXPIRED. |
OrgEmailInvitationCannotResend | 400 | Recreating an expired invitation produced no invitation. Request-level failures, such as subscription or seat checks, return their own codes. |
Unauthorized | 401 | API key missing or invalid |
Forbidden | 403 | No permission to access this organization, or the supplied administrator user ID is not eligible |
OrganizationPlanExpired | 403 | The organization plan is expired, suspended, cancelled, or an active Free plan. Creating, cancelling, resending, and deleting invitations are blocked. |
NotFound | 404 | Member or invitation not found. |
UserNotTeamMember | 404 | User is not a member of this team |
EmailAlreadyExists | 409 | Email is already registered |
OrgInvitationUserAlreadyInOrg | 409 | The user is already a member of this organization |
OrgInvitationUserInOtherOrg | 409 | The user is already a member of another organization |
InternalError | 500 | Internal server error |
requestId, code, and message. Handle them separately from failedEmails in a 200 OK response. For example, resending an expired invitation returns 400 if the original inviter no longer exists:
Usage examples
List members
Search member by email
Search member by user ID
List members (including removed)
Get member details
Create member
Get member statistics
Delete member
Update member Add-On Cap
Get member quota
Batch get member quotas
Batch update member Add-On Cap
Create email invitations
List email invitations
Cancel an email invitation
Resend an email invitation
The examples are independent. Replace the invitation ID below with a real EXPIRED invitation; an invitation that has been cancelled cannot be resent.