curl --request GET \
--url https://api.coderabbit.ai/v1/audit-logs \
--header 'x-coderabbitai-api-key: <api-key>'import requests
url = "https://api.coderabbit.ai/v1/audit-logs"
headers = {"x-coderabbitai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-coderabbitai-api-key': '<api-key>'}};
fetch('https://api.coderabbit.ai/v1/audit-logs', 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/audit-logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.coderabbit.ai/v1/audit-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-coderabbitai-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coderabbit.ai/v1/audit-logs")
.header("x-coderabbitai-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coderabbit.ai/v1/audit-logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-coderabbitai-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"action": "repository_create",
"actionLabel": "Added repository",
"resourceType": "repository",
"resourceTypeLabel": "Repository",
"resourceSummary": "my-org/my-repo",
"actor": {
"name": "<string>",
"subtitle": "<string>",
"isBot": true,
"avatarUrl": "<string>"
},
"metadata": {},
"ipAddress": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"relativeTime": "1d ago"
}
],
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123,
"has_next_page": true,
"has_previous_page": true
},
"filter_options": {
"actions": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"resource_types": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
]
}
}{
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>"
}
]
}{
"errors": [
{
"message": "<string>"
}
]
}{
"error": {
"code": "NOT_ADMIN",
"message": "<string>"
}
}{
"error": {
"code": "LEGACY_API_KEY",
"message": "<string>"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>"
}
}{
"errors": [
{
"code": "INTERNAL_ERROR",
"message": "<string>"
}
]
}Audit Logs
Retrieve audit log entries for the organization. Supports filtering by actions, resource types, and date range. Returns paginated results with filter options.
curl --request GET \
--url https://api.coderabbit.ai/v1/audit-logs \
--header 'x-coderabbitai-api-key: <api-key>'import requests
url = "https://api.coderabbit.ai/v1/audit-logs"
headers = {"x-coderabbitai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-coderabbitai-api-key': '<api-key>'}};
fetch('https://api.coderabbit.ai/v1/audit-logs', 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/audit-logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.coderabbit.ai/v1/audit-logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-coderabbitai-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.coderabbit.ai/v1/audit-logs")
.header("x-coderabbitai-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coderabbit.ai/v1/audit-logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-coderabbitai-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"action": "repository_create",
"actionLabel": "Added repository",
"resourceType": "repository",
"resourceTypeLabel": "Repository",
"resourceSummary": "my-org/my-repo",
"actor": {
"name": "<string>",
"subtitle": "<string>",
"isBot": true,
"avatarUrl": "<string>"
},
"metadata": {},
"ipAddress": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"relativeTime": "1d ago"
}
],
"pagination": {
"page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123,
"has_next_page": true,
"has_previous_page": true
},
"filter_options": {
"actions": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"resource_types": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
]
}
}{
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "<string>"
}
]
}{
"errors": [
{
"message": "<string>"
}
]
}{
"error": {
"code": "NOT_ADMIN",
"message": "<string>"
}
}{
"error": {
"code": "LEGACY_API_KEY",
"message": "<string>"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "<string>"
}
}{
"errors": [
{
"code": "INTERNAL_ERROR",
"message": "<string>"
}
]
}search, actions, resource_types, date_from, and date_to query parameters to filter results. Unknown query parameters are rejected with a 400 error.
For a guided overview of the feature, see the Audit Logs documentation.Authorizations
API key for authentication. You can create an API key from the CodeRabbit dashboard.
Headers
API key for authentication
Query Parameters
GitHub organization login for a workspace API key, matched case-insensitively within that workspace. Supply either org_name or org_id, never both; omit for an organization-bound key.
^[A-Za-z0-9][A-Za-z0-9-]{0,38}$Workspace-scoped API tokens only. Supply this git-provider organization ID or org_name, never both, to select one organization's audit logs. When both selectors are omitted, returns workspace-wide audit logs (all organizations plus workspace-level events). This org_id parameter is ignored for organization and self-hosted keys.
Search audit logs by actor name (case-insensitive partial match)
200Comma-separated list of action types to filter by (max 50).
create, delete, update, assign, unassign, cancellation_initiated, cancellation_confirmed Comma-separated list of resource types to filter by (max 50).
organization, repository, subscription_seat, cr_config, subscription, repo_config, user_role, api_key, payment_source, custom_certificate Start date for the query range (ISO 8601 format)
"2026-01-01T00:00:00.000Z"
End date for the query range (ISO 8601 format)
"2026-03-19T23:59:59.999Z"
Page number for pagination
x >= 1Number of items per page
1 <= x <= 100Was this page helpful?