List and manage organization members, stats, quotas, and add-on caps.
About this document
For integrations that 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.
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. This endpoint creates new accounts only. If the email is already registered, the existing account is not reused and its password is not changed.
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 or org_admin; 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 or org_admin |
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 |
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 organization shared pack quota.
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:
When the organization has no shared pack,sharedQuotais not returned; when the member has no resource pack,resourcePackageQuotais not returned. Astatusofrestrictedmeans the usage limit has been reached.
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 | Organization shared pack quota (not returned if the member's organization has no shared pack) |
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 | Organization shared pack quota; 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 | No | Non-negative integer or null | Quota cap; null or omission 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 | No | Non-negative integer or null | Quota cap; null or omission 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)
Error codes
| Error code | HTTP status | Description |
|---|---|---|
BadRequest | 400 | Invalid request parameters (e.g., empty member_id) |
InvalidParameter | 400 | Member creation email or name is missing or invalid, or userId is invalid or combined with email |
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 |
Unauthorized | 401 | API key missing or invalid |
Forbidden | 403 | No permission to access this organization |
NotFound | 404 | Member not found |
UserNotTeamMember | 404 | User is not a member of this team |
EmailAlreadyExists | 409 | Email is already registered |
InternalError | 500 | Internal server error |

