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 keyword search support.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | string | Yes | Organization ID |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
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 |
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. An emptynextTokenstring indicates the last page.
Response fields
| Field | Type | Description |
|---|---|---|
members | array | Member list |
members[].id | string | Member 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; empty means 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 themembers[] fields in “List members”.
3. 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 |
4. 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)5. 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) |
6. 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 |
7. 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)8. 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)
previousAddOnCapofnullmeans 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 or null | Previous quota cap; null means 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, negative addOnCap) |
InvalidBatchQuotaRequest | 400 | Invalid JSON body for the batch quota request |
InvalidAddOnCapFormat | 400 | Invalid addOnCap format |
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 |
InternalError | 500 | Internal server error |