Skip to main content
OpenAPI

Member APIs

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID

Query parameters

ParameterTypeRequiredDescription
userIdstringNoExact user UUID lookup; cannot be combined with email
emailstringNoExact email lookup
includeDeletedstringNoSet to true to include removed members
maxResultsintegerNoPage size (default 20, max 100)
nextTokenstringNoPagination 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):
{
  "members": [
    {
      "id": "member_abc123",
      "userId": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Alice",
      "email": "alice@example.com",
      "role": "org_admin",
      "status": "ENABLED",
      "joinedAt": "2025-06-01T08:00:00Z"
    },
    {
      "id": "member_ghi789",
      "userId": "550e8400-e29b-41d4-a716-446655440001",
      "name": "Charlie",
      "role": "org_member",
      "status": "ENABLED",
      "joinedAt": "2025-07-10T14:30:00Z"
    }
  ],
  "maxResults": 20,
  "nextToken": "eyJwYWdlIjogMn0="
}
Some member records may not return the email field; treat it as optional during integration.
Including deleted members (**includeDeleted=true**):
{
  "members": [
    {
      "id": "member_abc123",
      "userId": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Alice",
      "email": "alice@example.com",
      "role": "org_admin",
      "status": "ENABLED",
      "joinedAt": "2025-06-01T08:00:00Z"
    },
    {
      "id": "member_def456",
      "userId": "550e8400-e29b-41d4-a716-446655440002",
      "name": "Bob",
      "email": "bob@example.com",
      "role": "org_member",
      "status": "DELETED",
      "joinedAt": "2025-03-15T10:00:00Z",
      "deletedAt": "2026-02-01T12:00:00Z"
    }
  ],
  "maxResults": 20
}
deletedAt is only returned for deleted members; active members do not include this field. When nextToken is absent, the response is the last page.

Response fields

FieldTypeDescription
membersarrayMember list
members[].idstringMember ID
members[].userIdstringUser 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; 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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID
member_idstringYesMember ID

Success response (200 OK)

Active member:
{
  "id": "member_abc123",
  "userId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Alice",
  "email": "alice@example.com",
  "role": "org_admin",
  "status": "ENABLED",
  "joinedAt": "2025-06-01T08:00:00Z"
}
Deleted member (**GetMember** automatically includes deleted members):
{
  "id": "member_def456",
  "userId": "550e8400-e29b-41d4-a716-446655440002",
  "name": "Bob",
  "email": "bob@example.com",
  "role": "org_member",
  "status": "DELETED",
  "joinedAt": "2025-03-15T10:00:00Z",
  "deletedAt": "2026-02-01T12:00:00Z"
}

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID

Request body (JSON)

{
  "email": "alice@example.com",
  "name": "Alice",
  "password": "StrongPassword123!",
  "role": "org_member"
}
FieldTypeRequiredDescription
emailstringYesNew user email. Its domain must be verified and enabled for the organization
namestringYesUser and member display name
passwordstringYesInitial password. It must meet the password-strength requirements and is never returned
rolestringNoMember role: org_member or org_admin; defaults to org_member

Success response (200 OK)

{
  "member": {
    "id": "member_abc123",
    "userId": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Alice",
    "email": "alice@example.com",
    "role": "org_member",
    "status": "ENABLED",
    "joinedAt": "2026-05-23T08:00:00Z"
  }
}

Error responses

Error codeHTTP statusDescription
InvalidParameter400email or name is missing or invalid
InvalidPassword400Password is missing or does not meet the strength requirements
InvalidRole400Role is not org_member or org_admin
EmailDomainRequired400The organization has no verified and enabled email domain
EmailDomainNotSupported400The email domain is not enabled for the organization
InsufficientSeats400The organization has no available seat
EmailAlreadyExists409The email is already registered

4. 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)

{
  "totalMembers": 50,
  "billableMembers": 45,
  "adminMembers": 3,
  "purchasedSeats": 100,
  "remainingSeats": 55
}

Response fields

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

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):
{
  "id": "member_abc123",
  "hasBillingCycleUsage": true
}
Member has no usage in the current cycle (seat can be released immediately):
{
  "id": "member_abc123",
  "hasBillingCycleUsage": false
}

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)
{
  "requestId": "req_abc123",
  "code": "UserNotTeamMember",
  "message": "User is not a member of this team"
}
Insufficient members (400)
{
  "requestId": "req_abc123",
  "code": "InsufficientMembers",
  "message": "The number of organization members cannot be less than the minimum requirement"
}

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID
member_idstringYesMember ID

Success response (200 OK)

With organization shared pack, status normal:
{
  "userId": "user_abc123",
  "planQuota": {
    "quotaSummary": {
      "usedValue": 350.5,
      "limitValue": 1000.0,
      "unit": "credits"
    }
  },
  "resourcePackageQuota": {
    "quotaSummary": {
      "usedValue": 100.0,
      "limitValue": 500.0,
      "unit": "credits"
    }
  },
  "totalQuota": {
    "quotaSummary": {
      "usedValue": 450.5,
      "limitValue": 1500.0,
      "unit": "credits"
    }
  },
  "sharedQuota": {
    "quotaSummary": {
      "usedValue": 200.0,
      "limitValue": 1000.0,
      "unit": "credits"
    }
  },
  "lastResetAt": "2026-03-01T00:00:00Z",
  "nextResetAt": "2026-04-01T00:00:00Z",
  "status": "active"
}
No organization shared pack, usage exceeded:
{
  "userId": "user_def456",
  "planQuota": {
    "quotaSummary": {
      "usedValue": 1000.0,
      "limitValue": 1000.0,
      "unit": "credits"
    }
  },
  "totalQuota": {
    "quotaSummary": {
      "usedValue": 1000.0,
      "limitValue": 1000.0,
      "unit": "credits"
    }
  },
  "lastResetAt": "2026-03-01T00:00:00Z",
  "nextResetAt": "2026-04-01T00:00:00Z",
  "status": "restricted"
}
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)

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID

Request body (JSON)

FieldTypeRequiredValidationDescription
memberIdsstring[]Yes1–100 non-empty member IDsMembers whose quota usage should be returned
{
  "memberIds": ["member_abc123", "member_def456"]
}

Success response (200 OK)

{
  "quotas": [
    {
      "memberId": "member_abc123",
      "userId": "user_abc123",
      "planQuota": {
        "quotaSummary": {
          "usedValue": 350.5,
          "limitValue": 1000.0,
          "unit": "credits"
        }
      },
      "resourcePackageQuota": {
        "quotaSummary": {
          "usedValue": 100.0,
          "limitValue": 500.0,
          "unit": "credits"
        }
      },
      "totalQuota": {
        "quotaSummary": {
          "usedValue": 450.5,
          "limitValue": 1500.0,
          "unit": "credits"
        }
      },
      "sharedQuota": {
        "quotaSummary": {
          "usedValue": 200.0,
          "limitValue": 1000.0,
          "unit": "credits"
        }
      },
      "lastResetAt": "2026-03-01T00:00:00Z",
      "nextResetAt": "2026-04-01T00:00:00Z",
      "status": "active"
    },
    {
      "memberId": "member_def456",
      "userId": "user_def456"
    }
  ]
}
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

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID
member_idstringYesMember ID

Request parameters (JSON)

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

Request examples

Set a quota cap:
{
  "addOnCap": 1000
}
Set to unlimited:
{
  "addOnCap": null
}

Success response (200 OK)

{
  "memberId": "member_abc123",
  "email": "alice@example.com",
  "addOnCap": 1000
}
When unlimited:
{
  "memberId": "member_abc123",
  "email": "alice@example.com",
  "addOnCap": null
}

Response fields

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

Error responses

Invalid addOnCap format (400)
{
  "requestId": "req_abc123",
  "code": "InvalidAddOnCapFormat",
  "message": "Invalid addOnCap format"
}
Member not in this team (404)
{
  "requestId": "req_abc123",
  "code": "UserNotTeamMember",
  "message": "User is not a member of this team"
}

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID

Request parameters (JSON)

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

Request examples

Batch set quota cap:
{
  "addOnCap": 1000,
  "memberIds": ["member_abc123", "member_def456"]
}
Batch set to unlimited:
{
  "addOnCap": null,
  "memberIds": ["member_abc123"]
}

Success response (200 OK)

{
  "members": [
    {
      "memberId": "member_abc123",
      "previousAddOnCap": 500
    },
    {
      "memberId": "member_def456"
    }
  ]
}
previousAddOnCap is omitted when 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[].previousAddOnCapint64Previous quota cap; omitted when previously unlimited

Error responses

Invalid addOnCap format (400)
{
  "requestId": "req_abc123",
  "code": "InvalidAddOnCapFormat",
  "message": "Invalid addOnCap format"
}
memberIds is empty (400)
{
  "requestId": "req_abc123",
  "code": "EmptyMemberIDs",
  "message": "memberIds must not be empty"
}
memberIds exceeds 100 (400)
{
  "requestId": "req_abc123",
  "code": "TooManyMemberIDs",
  "message": "memberIds must not exceed 100"
}

Error codes

Error codeHTTP statusDescription
BadRequest400Invalid request parameters (e.g., empty member_id)
InvalidParameter400Member creation email or name is missing or invalid, or userId is invalid or combined with email
InvalidPassword400Password is missing or does not meet the strength requirements
InvalidRole400Member role is invalid
EmailDomainRequired400Organization has no verified and enabled email domain
EmailDomainNotSupported400Email domain is not enabled for the organization
InsufficientSeats400Organization has no available seat
InvalidBatchQuotaRequest400Invalid JSON body for the batch quota request
InvalidAddOnCapFormat400Invalid addOnCap format
InvalidBatchAddOnCapRequest400Invalid JSON body for the batch Add-On Cap request
EmptyMemberIDs400memberIds is empty
TooManyMemberIDs400memberIds contains more than 100 items
EmptyMemberIDAtIndex400A memberIds item is empty
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
EmailAlreadyExists409Email is already registered
InternalError500Internal server error
Error response shape: see Error responses in Conventions.

Usage examples

List members

curl -X GET "https://api.qoder.com/v1/organizations/org_xxx/members?maxResults=20" \
  -H "Authorization: Bearer <api_key>"

Search member by email

curl -X GET "https://api.qoder.com/v1/organizations/org_xxx/members?email=alice@example.com" \
  -H "Authorization: Bearer <api_key>"

Search member by user ID

curl -X GET "https://api.qoder.com/v1/organizations/org_xxx/members?userId=550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer <api_key>"

List members (including removed)

curl -X GET "https://api.qoder.com/v1/organizations/org_xxx/members?includeDeleted=true" \
  -H "Authorization: Bearer <api_key>"

Get member details

curl -X GET "https://api.qoder.com/v1/organizations/org_xxx/members/member_abc123" \
  -H "Authorization: Bearer <api_key>"

Create member

curl -X POST "https://api.qoder.com/v1/organizations/org_xxx/members" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{"email":"alice@example.com","name":"Alice","password":"StrongPassword123!","role":"org_member"}'

Get member statistics

curl -X GET "https://api.qoder.com/v1/organizations/org_xxx/members/statistics" \
  -H "Authorization: Bearer <api_key>"

Delete member

curl -X DELETE "https://api.qoder.com/v1/organizations/org_xxx/members/member_abc123" \
  -H "Authorization: Bearer <api_key>"

Update member Add-On Cap

curl -X PUT "https://api.qoder.com/v1/organizations/org_xxx/members/member_abc123/addon-cap" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "addOnCap": 1000
  }'

Get member quota

curl -X GET "https://api.qoder.com/v1/organizations/org_xxx/members/member_abc123/quota" \
  -H "Authorization: Bearer <api_key>"

Batch get member quotas

curl -X POST "https://api.qoder.com/v1/organizations/org_xxx/members/batchGetQuota" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "memberIds": ["member_abc123", "member_def456"]
  }'

Batch update member Add-On Cap

curl -X POST "https://api.qoder.com/v1/organizations/org_xxx/batchUpdateAddOnCap" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "addOnCap": 1000,
    "memberIds": ["member_abc123", "member_def456"]
  }'