Skip to main content

Member APIs

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

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

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, org_admin, org_config_admin, or org_directory; 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, org_admin, org_config_admin, or org_directory
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
OrgInvitationUserAlreadyInOrg409The user is already a member of this organization
OrgInvitationUserInOtherOrg409The 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

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 member shared quota cap and usage.

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"
}
Member usage is restricted:
{
  "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"
}
sharedQuota describes the member's shared quota cap and usage. restricted means that the member is restricted from using the service. When the member has no resource pack, resourcePackageQuota is not returned.

Response fields

FieldTypeDescription
userIdstringUser ID
planQuotaobjectPlan quota information
resourcePackageQuotaobjectResource pack quota information
totalQuotaobjectTotal quota information (plan + resource pack)
sharedQuotaobject or nullMember shared quota cap and usage; -1 means unlimited
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[].sharedQuotaobjectMember shared quota cap and usage; 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 nullYesNon-negative integer or nullQuota cap; null 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 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:
{
  "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"
}

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID
member_idstringYesMember ID returned by a member query endpoint; this is not the user ID

Request body

{
  "role": "org_admin"
}
FieldTypeRequiredDescription
rolestringYesorg_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.
{
  "id": "member_abc123",
  "userId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Alice",
  "email": "alice@example.com",
  "role": "org_admin",
  "status": "ENABLED",
  "joinedAt": "2026-09-01T08:00:00Z"
}

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 codeHTTP statusDescription
BadRequest400Malformed request body, invalid member ID, or member state does not allow changes
InvalidRole400Role is missing or unsupported
OrgMemberAdminCountLacked400Cannot remove the last administrator role
OrganizationPendingUpgrade400Organization is awaiting activation of a Teams-to-Enterprise upgrade
Unauthorized401Missing or invalid credentials
Forbidden403Credentials lack permission, or the new role is not enabled for the organization
UserNotTeamMember404Member does not exist, was removed, or belongs to a different organization
InternalError500Internal service error
Other IAM business errors use the standard OpenAPI error response with requestId, code, and message.
{
  "requestId": "req_abc123",
  "code": "InvalidRole",
  "message": "role must be org_admin, org_member, org_config_admin or org_directory"
}

Request example

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

11. Update member name

PUT /v1/organizations/{organization_id}/members/{member_id}/profile Update the current display name of an organization member.

Path parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization ID bound to the API key
member_idstringYesMember ID from the id field returned by a member query endpoint; this is not userId

Request body

{
  "name": "Alice"
}
FieldTypeRequiredDescription
namestringYesNew display name; up to 100 characters

Success response (200 OK)

Returns the updated member ID, associated user ID, and display name.
{
  "memberId": "member_abc123",
  "userId": "user_abc123",
  "name": "Alice"
}
FieldTypeDescription
memberIdstringOrganization member ID updated by this request
userIdstringUser ID associated with this member
namestringUpdated 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 codeHTTP statusDescription
BadRequest400Malformed request body, unknown fields, request body over 16 KiB, invalid ID, invalid name, or a name that violates the content policy
Unauthorized401Missing, invalid, revoked, or expired credentials
Forbidden403The path organization does not match the API key’s organization, or the credential type is not supported
NotFound404Member does not exist, was removed, or belongs to a different organization
InternalError500Internal service error
Errors use the standard OpenAPI response with requestId, code, and message.
{
  "requestId": "req_abc123",
  "code": "BadRequest",
  "message": "name must contain 1 to 100 characters"
}

Request example

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

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

ParameterTypeRequiredDescription
organization_idstringYesOrganization 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.
The request supports partial success. Individual failures appear in 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

FieldTypeRequiredDescription
emailsstring[]Yes1 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.
rolestringNoorg_member or org_admin. Defaults to org_member.
inviterIdstringNoInviter'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.
expiresInHoursint32NoValidity 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

{
  "emails": ["zhangsan@example.com", "invalid-email"],
  "role": "org_member"
}

Success response (200 OK)

{
  "invitations": [
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "organizationId": "550e8400-e29b-41d4-a716-446655440000",
      "email": "zhangsan@example.com",
      "role": "org_member",
      "status": "PENDING",
      "expiresAt": "2026-10-22T08:00:00Z",
      "batchId": "770e8400-e29b-41d4-a716-446655440002",
      "createdAt": "2026-10-15T08:00:00Z",
      "updatedAt": "2026-10-15T08:00:00Z"
    }
  ],
  "failedEmails": [
    {
      "email": "invalid-email",
      "reason": "invalid email format"
    }
  ],
  "totalSent": 1,
  "totalFailed": 1
}

Response fields

FieldTypeDescription
invitationsarrayCreated email invitation objects. Invitations from one batch share a batchId. Empty if none were created.
failedEmailsarrayFailed items, each with email and reason. Empty if none failed.
totalSentint32Number of invitations created. Email is sent asynchronously; this is not a delivery count.
totalFailedint32Number 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.
reasonDescription
invalid email formatInvalid address format.
duplicate email in batchDuplicate address after normalization.
pending invitation already exists for this emailA pending invitation already exists.
this email has already joined the organizationAn accepted invitation record already exists.
OrgEmailInvitationUserInAnotherOrgThe user already has an organization membership, possibly in the current organization.
OrgEmailInvitationDomainOwnedByAnotherOrgAnother organization manages the email domain.
OrgEmailInvitationDomainNotMatchedWith domain validation enabled, the address does not match a verified domain of this organization.
internal_error_batch_write_failedBatch write failure. Retain successful results and investigate or retry only failed items.
Resolve the cause in 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

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID.

Query parameters

ParameterTypeRequiredDescription
statusstringNoPENDING, JOINED, EXPIRED, or CANCELLED. Omit to list all statuses.
batchIdstringNoFilter by the batch UUID from a create response.
maxResultsintegerNoDefaults 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.
nextTokenstringNoPagination token from the previous response. Omit for the first page.
An unsupported status or a batchId that is not a valid UUID returns 400 BadRequest.

Success response (200 OK)

This example is the last page:
{
  "invitations": [
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "organizationId": "550e8400-e29b-41d4-a716-446655440000",
      "email": "zhangsan@example.com",
      "role": "org_member",
      "status": "PENDING",
      "expiresAt": "2026-10-22T08:00:00Z",
      "batchId": "770e8400-e29b-41d4-a716-446655440002",
      "createdAt": "2026-10-15T08:00:00Z",
      "updatedAt": "2026-10-15T08:00:00Z"
    }
  ],
  "maxResults": 20
}
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.
FieldTypeDescription
idstringInvitation UUID for cancel, resend, or delete operations.
organizationIdstringOrganization ID.
emailstringInvited email address.
rolestringAssigned role: org_member or org_admin.
statusstringPENDING (awaiting acceptance), JOINED (joined), EXPIRED (expired), or CANCELLED (cancelled).
expiresAtstringExpiration time.
joinedUserIdstringUser ID after joining; omitted when unset.
joinedAtstringJoin time; omitted when unset.
emailSentAtstringRecorded email send time; omitted when unset. The current sending flow does not guarantee updates to this field. Do not use it to determine delivery.
cancelledAtstringCancellation time; omitted when unset.
batchIdstringBatch ID; omitted when unset.
createdAtstringCreation time.
updatedAtstringLast update time.

14. Cancel an email invitation

POST /v1/organizations/{organization_id}/members/emailInvitations/{invitation_id}/cancel

Path parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID.
invitation_idstringYesInvitation UUID from the id field.
Cancelling, resending, and deleting invitations are subject to the organization plan restrictions. Only 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:
{
  "id": "660e8400-e29b-41d4-a716-446655440001"
}

15. Resend an email invitation

POST /v1/organizations/{organization_id}/members/emailInvitations/{invitation_id}/resend

Path parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID.
invitation_idstringYesInvitation UUID from the id field.
Cancelling, resending, and deleting invitations are subject to the organization plan restrictions. No request body is required. Only 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.
Resend behavior depends on the stored 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:
{
  "invitation": {
    "id": "660e8400-e29b-41d4-a716-446655440004",
    "organizationId": "550e8400-e29b-41d4-a716-446655440000",
    "email": "zhangsan@example.com",
    "role": "org_member",
    "status": "PENDING",
    "expiresAt": "2026-10-22T08:00:00Z",
    "batchId": "770e8400-e29b-41d4-a716-446655440002",
    "createdAt": "2026-10-15T08:00:00Z",
    "updatedAt": "2026-10-15T08:00:00Z"
  }
}

16. Delete an email invitation

DELETE /v1/organizations/{organization_id}/members/emailInvitations/{invitation_id}

Path parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID.
invitation_idstringYesInvitation UUID from the id field.
Cancelling, resending, and deleting invitations are subject to the organization plan restrictions. No request body is required. You can delete a record in any status; a pending invitation also becomes invalid. Deleting a JOINED record does not remove the organization member. Use the Delete member to remove members.

Success response (200 OK)

id identifies the deleted invitation:
{
  "id": "660e8400-e29b-41d4-a716-446655440001"
}
The following link invitation and approval endpoints are available on Global. Use an organization API key for the target organization; service account credentials are not supported. The organization plan must support invitations. GET /v1/organizations/{organization_id}/settings/invitationLink Get the invitation link switch. If no configuration exists, enabled is false.

Path parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID

Success response (200 OK)

{"enabled":false}
PUT /v1/organizations/{organization_id}/settings/invitationLink Enable or disable invitation links. Disabling does not delete existing codes or applications.

Path parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID

Request body

FieldTypeRequiredDescription
enabledbooleanYesMust be explicitly provided; null is not allowed.

Request example

{"enabled":true}

Success response (200 OK)

{"enabled":true}

Error responses

Error codeHTTP statusDescription
BadRequest400Missing, 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

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID

Request body

FieldTypeRequiredDescription
operatorUserIdstringYesUser UUID of an active organization administrator (org_admin or org_config_admin).
expiresAtstring or nullNoFuture RFC 3339 timestamp. Omit or use null for no expiration.

Request example

{"operatorUserId":"550e8400-e29b-41d4-a716-446655440020","expiresAt":"2027-01-01T00:00:00Z"}

Success response (200 OK)

{"invitationCode":{"id":"code_id","code":"example-code","link":"https://qoder.com/organization/invitation/example-code","expiresAt":"2027-01-01T00:00:00Z","createdAt":"2026-11-06T00:00:00Z"}}

Response fields

FieldTypeDescription
invitationCode.idstringCode record ID
invitationCode.codestringCode used when revoking
invitationCode.linkstringInvitation page URL
invitationCode.expiresAtstringExpiration time; omitted if unset
invitationCode.createdAtstringCreation time

Error responses

Error codeHTTP statusDescription
InvalidParameter400Missing or invalid operatorUserId.
BadRequest400Invalid or non-future expiresAt.
OrgInvitationCodeLimitExceed400Valid code limit reached.
Forbidden403User is not an eligible administrator.

20. List valid invitation codes

GET /v1/organizations/{organization_id}/invitationCodes List valid codes for the organization.

Path parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID

Query parameters

ParameterTypeRequiredDescription
maxResultsintegerNoDefault 20; maximum 100
nextTokenstringNoPrevious cursor; invalid values return the first page

Success response (200 OK)

{"invitationCodes":[],"maxResults":20}
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

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID
codestringYesFull code, URL-encoded as a path segment. Do not use the record ID.
No request body is required.

Success response (200 OK)

{}

Error responses

Error codeHTTP statusDescription
NotFound404Code 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

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID

Query parameters

ParameterTypeRequiredDescription
statusstringNoPENDING, APPROVED, or REJECTED. Omit to list all.
maxResultsintegerNoDefault 20; maximum 100
nextTokenstringNoPrevious cursor; invalid values return the first page

Success response (200 OK)

{"invitations":[{"id":"application_id","invitee":{"userId":"user_id","name":"Alice","email":"alice@example.com"},"status":"PENDING","createdAt":"2026-11-06T00:00:00Z"}],"maxResults":20}

Response fields

FieldTypeDescription
invitations[].idstringApplication ID
invitations[].inviteeobjectApplicant userId, name, and email
invitations[].statusstringApplication status
invitations[].createdAtstringApplication time
invitations[].assignedRolestringAssigned role; omitted if unset
invitations[].processedAtstringProcessing time; omitted if unset
invitations[].processorIdstringRecorded administrator user ID; omitted if unset
nextTokenstringNext-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

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID
invitation_idstringYesJoin application UUID

Request body

FieldTypeRequiredDescription
rolestringYesorg_member, org_admin, org_config_admin, or org_directory
operatorUserIdstringYesUser UUID of an active organization administrator (org_admin or org_config_admin).

Request example

{"role":"org_member","operatorUserId":"550e8400-e29b-41d4-a716-446655440020"}

Success response (200 OK)

{"invitation":{"id":"application_id","invitee":{"userId":"user_id","name":"Alice","email":"alice@example.com"},"status":"APPROVED","createdAt":"2026-11-06T00:00:00Z","assignedRole":"org_member","processorId":"550e8400-e29b-41d4-a716-446655440020"}}
The invitation object uses the fields in "List join applications".

Error responses

Error codeHTTP statusDescription
InvalidRole400Missing or invalid role.
InvalidParameter400Missing or invalid administrator user ID.
OrgInvitationRequestNotPending400Application has already been processed.
Forbidden403User is not an eligible administrator.
A 200 response requires both approval and member creation to succeed. If the response says 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

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID
invitation_idstringYesJoin application UUID

Request body

FieldTypeRequiredDescription
operatorUserIdstringYesUser UUID of an active organization administrator (org_admin or org_config_admin).

Request example

{"operatorUserId":"550e8400-e29b-41d4-a716-446655440020"}

Success response (200 OK)

{"invitation":{"id":"application_id","invitee":{"userId":"user_id","name":"Alice","email":"alice@example.com"},"status":"REJECTED","createdAt":"2026-11-06T00:00:00Z","processorId":"550e8400-e29b-41d4-a716-446655440020"}}
The invitation object uses the fields in "List join applications".

Error responses

Error codeHTTP statusDescription
InvalidParameter400Missing or invalid administrator user ID.
OrgInvitationRequestNotPending400Application has already been processed.
Forbidden403User 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

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID

Request body

FieldTypeRequiredDescription
emailstringYesMember's actual login email; exact match
newPasswordstringYes8–72 ASCII characters; include uppercase, lowercase, a digit, and a special character. Only ! through ~ are allowed; spaces are not allowed.

Request example

{"email":"alice@example.com","newPassword":"NewStrongPass1!"}

Success response (200 OK)

{"requestId":"req_abc123"}
The member must be active and not removed. The login email domain must be verified, enabled, and owned by the organization. The account must have a local password and allow password login. No password email is sent.

Error responses

Error codeHTTP statusDescription
BadRequest400Invalid request or weak password
OrgEmailDomainNotVerified403Email domain is not verified, enabled, or owned by this organization
PasswordLoginUnsupported403Local password login is not available
MemberNotFound404Member is missing, removed, or belongs to another organization
SessionRevocationIncomplete409Password changed, but session revocation is incomplete
PasswordResetResultUnknown503Final reset result is unknown
Do not automatically retry 409, 503, or timeouts. Record requestId and contact support to verify the result.

Error codes

Error codeHTTP statusDescription
BadRequest400Invalid request parameters (e.g., empty member_id). For invitations: Invalid request body, invalid status / batchId, or a missing organization subscription record.
InvalidParameter400Member 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.
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
OrgEmailInvitationInviterNotFound400Inviter user does not exist.
OrgEmailInvitationBatchSizeExceeded400Batch exceeds 3000 invitations.
OrgInvitationInsufficientSeats400No seats available when creating invitations.
OrgEmailInvitationNoVerifiedDomain400Domain validation is enabled but no verified, enabled domain exists.
OrgEmailInvitationDomainOwnedByAnotherOrg400The domain of the address being reinvited is managed by another organization.
OrgEmailInvitationOrgMismatch400Invitation does not belong to the specified organization.
OrgEmailInvitationCannotCancel400Invitation is not PENDING.
OrgEmailInvitationStatusNotResendable400Invitation is not EXPIRED.
OrgEmailInvitationCannotResend400Recreating an expired invitation produced no invitation. Request-level failures, such as subscription or seat checks, return their own codes.
Unauthorized401API key missing or invalid
Forbidden403No permission to access this organization, or the supplied administrator user ID is not eligible
OrganizationPlanExpired403The organization plan is expired, suspended, cancelled, or an active Free plan. Creating, cancelling, resending, and deleting invitations are blocked.
NotFound404Member or invitation not found.
UserNotTeamMember404User is not a member of this team
EmailAlreadyExists409Email is already registered
OrgInvitationUserAlreadyInOrg409The user is already a member of this organization
OrgInvitationUserInOtherOrg409The user is already a member of another organization
InternalError500Internal server error
Request-level errors contain 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:
{
  "requestId": "req_abc123",
  "code": "OrgEmailInvitationInviterNotFound",
  "message": "Inviter user does not exist, please provide a valid user id as inviter"
}
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"]
  }'

Create email invitations

curl -X POST "https://api.qoder.com/v1/organizations/org_xxx/members/emailInvitations" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{"emails":["zhangsan@example.com","invalid-email"],"role":"org_member"}'

List email invitations

curl --get "https://api.qoder.com/v1/organizations/org_xxx/members/emailInvitations" \
  -H "Authorization: Bearer <api_key>" \
  --data-urlencode "status=PENDING" \
  --data-urlencode "maxResults=20"

Cancel an email invitation

curl -X POST "https://api.qoder.com/v1/organizations/org_xxx/members/emailInvitations/660e8400-e29b-41d4-a716-446655440001/cancel" \
  -H "Authorization: Bearer <api_key>"

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.
curl -X POST "https://api.qoder.com/v1/organizations/org_xxx/members/emailInvitations/660e8400-e29b-41d4-a716-446655440004/resend" \
  -H "Authorization: Bearer <api_key>"

Delete an email invitation

curl -X DELETE "https://api.qoder.com/v1/organizations/org_xxx/members/emailInvitations/660e8400-e29b-41d4-a716-446655440001" \
  -H "Authorization: Bearer <api_key>"