Skip to main content

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID

Query parameters

ParameterTypeRequiredDescription
emailstringNoExact email lookup
includeDeletedstringNoSet to true to include removed members
maxResultsintegerNoPage size (default 20, max 100)
nextTokenstringNoPagination 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**):
deletedAt is only returned for deleted members; active members do not include this field. An empty nextToken string indicates the last page.

Response fields

FieldTypeDescription
membersarrayMember list
members[].idstringMember ID
members[].namestringMember name
members[].emailstringMember email (may be empty)
members[].rolestringRole name (e.g., org_admin, org_member)
members[].statusstringMember status: ENABLED (active), DISABLED (suspended), UNACTIVATED (not activated), APPROVE_PENDING (pending approval), APPROVE_DECLINED (approval declined), DELETED (removed)
members[].joinedAtstringJoin time (ISO 8601)
members[].deletedAtstring or nullDeletion time (ISO 8601); not returned for active members
maxResultsint32Page size for this request
nextTokenstringNext-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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID
member_idstringYesMember ID

Success response (200 OK)

Active member:
Deleted member (**GetMember** automatically includes deleted members):

Response fields

Same as the members[] fields in “List members”.

3. Get member statistics

GET /v1/organizations/{organization_id}/members/statistics Retrieve statistical data about organization members.

Path parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID

Success response (200 OK)

Response fields

FieldTypeDescription
totalMembersint32Total number of members
billableMembersint32Number of billable members
adminMembersint32Number of admins
purchasedSeatsint32Number of purchased seats
remainingSeatsint32Number 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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID
member_idstringYesMember ID

Success response (200 OK)

Member has usage in the current cycle (seat release deferred to end of cycle):
Member has no usage in the current cycle (seat can be released immediately):

Response fields

FieldTypeDescription
idstringID of the deleted member
hasBillingCycleUsageboolWhether the member had usage in the current billing cycle (affects seat release timing)

Error responses

Member not in this team (404)
Insufficient members (400)

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID
member_idstringYesMember ID

Success response (200 OK)

With organization shared pack, status normal:
No organization shared pack, usage exceeded:
When the organization has no shared pack, sharedQuota is not returned; when the member has no resource pack, resourcePackageQuota is not returned. A status of restricted means the usage limit has been reached.

Response fields

FieldTypeDescription
userIdstringUser ID
planQuotaobjectPlan quota information
resourcePackageQuotaobjectResource pack quota information
totalQuotaobjectTotal quota information (plan + resource pack)
sharedQuotaobject or nullOrganization shared pack quota (not returned if the member’s organization has no shared pack)
lastResetAtstringLast reset time (ISO 8601)
nextResetAtstringNext reset time (ISO 8601)
statusstringUser status: active or restricted
Quota summary fields
FieldTypeDescription
usedValuefloat64Amount used
limitValuefloat64Quota limit
unitstringUnit (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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID

Request body (JSON)

FieldTypeRequiredValidationDescription
memberIdsstring[]Yes1–100 non-empty member IDsMembers whose quota usage should be returned

Success response (200 OK)

The 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

FieldTypeDescription
quotasarrayQuota usage results
quotas[].memberIdstringMember ID
quotas[].userIdstringUser ID
quotas[].planQuotaobjectPlan quota information; omitted when unavailable
quotas[].resourcePackageQuotaobjectResource pack quota information; omitted when unavailable
quotas[].totalQuotaobjectTotal quota information; omitted when unavailable
quotas[].sharedQuotaobjectOrganization shared pack quota; omitted when unavailable
quotas[].lastResetAtstringLast reset time (ISO 8601); omitted when unavailable
quotas[].nextResetAtstringNext reset time (ISO 8601); omitted when unavailable
quotas[].statusstringactive 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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID
member_idstringYesMember ID

Request parameters (JSON)

FieldTypeRequiredValidationDescription
addOnCapint64 or nullYesNon-negative integer or nullQuota cap; null means unlimited, 0 means disabled

Request examples

Set a quota cap:
Set to unlimited:

Success response (200 OK)

When unlimited:

Response fields

FieldTypeDescription
memberIdstringMember ID
emailstringMember email
addOnCapint64 or nullCurrent quota cap; null means unlimited

Error responses

Invalid addOnCap format (400)
Member not in this team (404)

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID

Request parameters (JSON)

FieldTypeRequiredValidationDescription
addOnCapint64 or nullYesNon-negative integer or nullQuota cap; null means unlimited, 0 means disabled
memberIdsstring[]Yes1–100 non-empty stringsList of member IDs to update

Request examples

Batch set quota cap:
Batch set to unlimited:

Success response (200 OK)

previousAddOnCap of null means the member previously had no limit (unlimited).

Response fields

FieldTypeDescription
membersarrayUpdate result list, in the same order as memberIds in the request
members[].memberIdstringMember ID
members[].previousAddOnCapint64 or nullPrevious quota cap; null means previously unlimited

Error responses

Invalid addOnCap format (400)
memberIds is empty (400)
memberIds exceeds 100 (400)

Error codes

Error codeHTTP statusDescription
BadRequest400Invalid request parameters (e.g., empty member_id, negative addOnCap)
InvalidBatchQuotaRequest400Invalid JSON body for the batch quota request
InvalidAddOnCapFormat400Invalid addOnCap format
InsufficientMembers400Organization member count cannot be lower than the minimum requirement
Unauthorized401API key missing or invalid
Forbidden403No permission to access this organization
NotFound404Member not found
UserNotTeamMember404User is not a member of this team
InternalError500Internal server error
Error response shape: see Error responses in Conventions.

Usage examples

List members

Search member by email

List members (including removed)

Get member details

Get member statistics

Delete member

Update member Add-On Cap

Get member quota

Batch get member quotas

Batch update member Add-On Cap