Update the seat assignment mode
curl --request POST \
--url https://api.coderabbit.ai/v1/users/seats/assignment \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"mode": "manual"
}
'import requests
url = "https://api.coderabbit.ai/v1/users/seats/assignment"
payload = { "mode": "manual" }
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({mode: 'manual'})
};
fetch('https://api.coderabbit.ai/v1/users/seats/assignment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coderabbit.ai/v1/users/seats/assignment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'manual'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-coderabbitai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coderabbit.ai/v1/users/seats/assignment"
payload := strings.NewReader("{\n \"mode\": \"manual\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-coderabbitai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coderabbit.ai/v1/users/seats/assignment")
.header("x-coderabbitai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"manual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coderabbit.ai/v1/users/seats/assignment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-coderabbitai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"manual\"\n}"
response = http.request(request)
puts response.read_body{
"mode": "manual"
}{
"error": {
"code": "INVALID_REQUEST",
"message": "Invalid enum value. Expected 'manual' | 'automatic', received 'invalid'"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or inactive API key"
}
}{
"error": {
"code": "NO_ACTIVE_SUBSCRIPTION",
"message": "No active subscription found for the organization"
}
}{
"error": {
"code": "SELF_HOSTED_ONLY",
"message": "This endpoint is only available for self-hosted instances"
}
}{
"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 while updating seat assignment mode"
}
}Update the seat assignment mode
Update the seat assignment mode for the organization. Only accessible by fully self-hosted organizations with enterprise plans. Rate limited to 10 requests per 60 seconds per organization.
POST
/
v1
/
users
/
seats
/
assignment
Update the seat assignment mode
curl --request POST \
--url https://api.coderabbit.ai/v1/users/seats/assignment \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"mode": "manual"
}
'import requests
url = "https://api.coderabbit.ai/v1/users/seats/assignment"
payload = { "mode": "manual" }
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({mode: 'manual'})
};
fetch('https://api.coderabbit.ai/v1/users/seats/assignment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coderabbit.ai/v1/users/seats/assignment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'manual'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-coderabbitai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coderabbit.ai/v1/users/seats/assignment"
payload := strings.NewReader("{\n \"mode\": \"manual\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-coderabbitai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coderabbit.ai/v1/users/seats/assignment")
.header("x-coderabbitai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"manual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coderabbit.ai/v1/users/seats/assignment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-coderabbitai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"manual\"\n}"
response = http.request(request)
puts response.read_body{
"mode": "manual"
}{
"error": {
"code": "INVALID_REQUEST",
"message": "Invalid enum value. Expected 'manual' | 'automatic', received 'invalid'"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or inactive API key"
}
}{
"error": {
"code": "NO_ACTIVE_SUBSCRIPTION",
"message": "No active subscription found for the organization"
}
}{
"error": {
"code": "SELF_HOSTED_ONLY",
"message": "This endpoint is only available for self-hosted instances"
}
}{
"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 while updating seat assignment mode"
}
}Authorizations
API key for authentication. You can create an API key from the CodeRabbit dashboard.
Headers
API key for authentication
Body
application/json
The seat assignment mode to set. "automatic" auto-assigns seats when CodeRabbit is tagged; "manual" requires admin approval.
Available options:
automatic, manual Example:
"manual"
Response
Seat assignment mode updated successfully
The updated seat assignment mode
Available options:
automatic, manual Example:
"manual"
Was this page helpful?