Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.scaling.cloud/llms.txt

Use this file to discover all available pages before exploring further.

These endpoints let you list, invite, remove, and manage the roles of members in your organization. You can also revoke pending invitations.
All team management endpoints require the org:admin role. Requests from non-admin members will receive a 401 not_authorized error.

GET /api/team/members

List all current members of your organization and any pending invitations. Authentication
Authorization: Bearer YOUR_API_KEY
Example request
curl https://api.scaling.cloud/v1/team/members \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
{
  "data": {
    "members": [
      {
        "id": "user_2abc123def456",
        "email": "jane@example.com",
        "firstName": "Jane",
        "lastName": "Smith",
        "imageUrl": "https://example.com/avatars/jane.jpg",
        "role": "org:admin",
        "joinedAt": "2025-01-15T09:30:00.000Z"
      },
      {
        "id": "user_3xyz789ghi012",
        "email": "bob@example.com",
        "firstName": "Bob",
        "lastName": "Jones",
        "imageUrl": null,
        "role": "org:member",
        "joinedAt": "2025-03-22T14:00:00.000Z"
      }
    ],
    "invitations": [
      {
        "id": "orginv_4lmn321opq654",
        "emailAddress": "alice@example.com",
        "role": "org:member",
        "status": "pending",
        "createdAt": "2026-04-05T10:00:00.000Z"
      }
    ]
  }
}
Error codes
StatusCodeDescription
401not_authorizedYou are not authenticated or do not have the org:admin role.

POST /api/team/members/invite

Send an invitation to a new member by email address. The invited person will receive an email prompting them to join your organization. Authentication
Authorization: Bearer YOUR_API_KEY
Request body
emailAddress
string
required
The email address to send the invitation to. Must be a valid email and no longer than 320 characters.
role
"org:admin" | "org:member"
required
The role to assign to the invitee upon accepting. Use org:admin to grant admin access or org:member for standard access.
Example request
curl -X POST https://api.scaling.cloud/v1/team/members/invite \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "emailAddress": "alice@example.com",
    "role": "org:member"
  }'
Example response
{
  "data": {
    "id": "orginv_4lmn321opq654",
    "emailAddress": "alice@example.com",
    "role": "org:member",
    "status": "pending",
    "createdAt": "2026-04-07T11:20:00.000Z"
  }
}
Error codes
StatusCodeDescription
400invalid_request_errorThe request body is missing or contains invalid fields.
401not_authorizedYou are not authenticated or do not have the org:admin role.
500server_errorAn unexpected error occurred.

PATCH /api/team/members//role

Update the role of an existing organization member.
You cannot change your own role. Attempting to do so returns a 400 cannot_change_own_role error. Similarly, you cannot remove yourself from the organization — that returns a 400 cannot_remove_self error on the delete endpoint.
Authentication
Authorization: Bearer YOUR_API_KEY
Path parameters
userId
string
required
The ID of the member whose role you want to update. You can retrieve member IDs from the GET /api/team/members response.
Request body
role
"org:admin" | "org:member"
required
The new role to assign to the member.
Example request
curl -X PATCH https://api.scaling.cloud/v1/team/members/user_3xyz789ghi012/role \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "org:admin"
  }'
Example response
{
  "data": {
    "id": "user_3xyz789ghi012",
    "role": "org:admin"
  }
}
Error codes
StatusCodeDescription
400cannot_change_own_roleYou attempted to change your own role, which is not allowed.
401not_authorizedYou are not authenticated or do not have the org:admin role.
500server_errorAn unexpected error occurred.

DELETE /api/team/members/

Remove a member from your organization. This revokes their access immediately. Authentication
Authorization: Bearer YOUR_API_KEY
Path parameters
userId
string
required
The ID of the member to remove. You can retrieve member IDs from the GET /api/team/members response.
Example request
curl -X DELETE https://api.scaling.cloud/v1/team/members/user_3xyz789ghi012 \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
{
  "data": {
    "success": true
  }
}
Error codes
StatusCodeDescription
400cannot_remove_selfYou attempted to remove yourself from the organization, which is not allowed.
401not_authorizedYou are not authenticated or do not have the org:admin role.
500server_errorAn unexpected error occurred.

DELETE /api/team/members/invitations/

Revoke a pending invitation. The invitee will no longer be able to accept it. Authentication
Authorization: Bearer YOUR_API_KEY
Path parameters
invitationId
string
required
The ID of the invitation to revoke. You can retrieve invitation IDs from the GET /api/team/members response.
Example request
curl -X DELETE https://api.scaling.cloud/v1/team/members/invitations/orginv_4lmn321opq654 \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
{
  "data": {
    "success": true
  }
}
Error codes
StatusCodeDescription
401not_authorizedYou are not authenticated or do not have the org:admin role.
500server_errorAn unexpected error occurred.