Assign or unassign seats for multiple users
curl --request POST \
--url https://api.coderabbit.ai/v1/users/seats \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"action": "assign",
"user_ids": [
"121358802",
"234567"
]
}
'import requests
url = "https://api.coderabbit.ai/v1/users/seats"
payload = {
"action": "assign",
"user_ids": ["121358802", "234567"]
}
headers = {
"x-coderabbitai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-coderabbitai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'assign', user_ids: ['121358802', '234567']})
};
fetch('https://api.coderabbit.ai/v1/users/seats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"succeeded": [
"121358802"
],
"failed": [
{
"user_id": "234567",
"code": "SEAT_NOT_AVAILABLE"
}
]
}{
"error": {
"code": "BATCH_SIZE_EXCEEDED",
"message": "Maximum 500 users per request"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or inactive API key"
}
}{
"error": {
"code": "NO_ACTIVE_SUBSCRIPTION",
"message": "No active subscription found for the organization"
}
}{
"error": {
"code": "NOT_ADMIN",
"message": "Only administrators can perform seat management operations"
}
}{
"error": {
"code": "LEGACY_API_KEY",
"message": "You are using a legacy API key. We are deprecating use of legacy keys. Regenerate a new API key and retry the request."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}
}Assign or unassign seats for multiple users
Bulk assign or unassign seats for users in the organization. Supports up to 500 users per request. Rate limited to 10 requests per 60 seconds with max 3 concurrent requests per organization. Organization and self-hosted API keys identify users by provider user id (user_ids); workspace-scoped API tokens declaratively upsert members (members[]) identified by email or cr_user_id, reconciling each member’s seat state and linked subscription_user accounts workspace-wide.
POST
/
v1
/
users
/
seats
Assign or unassign seats for multiple users
curl --request POST \
--url https://api.coderabbit.ai/v1/users/seats \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"action": "assign",
"user_ids": [
"121358802",
"234567"
]
}
'import requests
url = "https://api.coderabbit.ai/v1/users/seats"
payload = {
"action": "assign",
"user_ids": ["121358802", "234567"]
}
headers = {
"x-coderabbitai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-coderabbitai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'assign', user_ids: ['121358802', '234567']})
};
fetch('https://api.coderabbit.ai/v1/users/seats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"succeeded": [
"121358802"
],
"failed": [
{
"user_id": "234567",
"code": "SEAT_NOT_AVAILABLE"
}
]
}{
"error": {
"code": "BATCH_SIZE_EXCEEDED",
"message": "Maximum 500 users per request"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or inactive API key"
}
}{
"error": {
"code": "NO_ACTIVE_SUBSCRIPTION",
"message": "No active subscription found for the organization"
}
}{
"error": {
"code": "NOT_ADMIN",
"message": "Only administrators can perform seat management operations"
}
}{
"error": {
"code": "LEGACY_API_KEY",
"message": "You are using a legacy API key. We are deprecating use of legacy keys. Regenerate a new API key and retry the request."
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}
}- CLI Tool
- MCP Server
coderabbit api request /users/seats --input request.json
This operation isn’t a tool on the CodeRabbit MCP server. Call it over REST or from the CLI.
Authorizations
See Authentication for the key types and where to create a key.
Body
application/json
- By provider user id (organization & self-hosted keys)
- By email or cr_user_id with account identities (workspace-scoped tokens)
Response
Seat management completed (partial or full success)
Was this page helpful?