List audit events for current tenant
Requires admin. On cloud, returns 403 unless the organization is on the Team plan.
curl -X GET "https://slugbase.app/api/admin/audit-log?limit=42&before_created_at=example_string&before_id=example_string" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (JWT or sb_ API token)"
import requests
import json
url = "https://slugbase.app/api/admin/audit-log?limit=42&before_created_at=example_string&before_id=example_string"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT or sb_ API token)"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://slugbase.app/api/admin/audit-log?limit=42&before_created_at=example_string&before_id=example_string", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT or sb_ API token)"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://slugbase.app/api/admin/audit-log?limit=42&before_created_at=example_string&before_id=example_string", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT or sb_ API token)")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://slugbase.app/api/admin/audit-log?limit=42&before_created_at=example_string&before_id=example_string')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT or sb_ API token)'
response = http.request(request)
puts response.body
{
"events": [
{
"id": "example_string",
"created_at": "example_string",
"action": "example_string",
"entity_type": "example_string",
"entity_id": "example_string",
"metadata": {},
"actor_user_id": "example_string",
"actor_email": "user@example.com",
"actor_name": "John Doe"
}
],
"next_cursor": {
"before_created_at": "example_string",
"before_id": "example_string"
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
GET
/api/admin/audit-log
GET
Bearer Token (JWT or sb_ API token)
Bearer Tokenstring
RequiredUse Authorization: Bearer <token>. Personal API tokens from Profile use the sb_ prefix.
You may also send the access JWT as Bearer (same value as the token cookie after login).
Use
Authorization: Bearer <token>. Personal API tokens from Profile use the sb_ prefix.
You may also send the access JWT as Bearer (same value as the token cookie after login).
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token (JWT or sb_ API token). Use Authorization: Bearer \<token\>. Personal API tokens from Profile use the sb_ prefix.
You may also send the access JWT as Bearer (same value as the token cookie after login).
Query Parameters
Responses
eventsarray
idstring
created_atstring
actionstring
entity_typestring
entity_idstring
metadataobject
actor_user_idstring
actor_emailstring
actor_namestring
next_cursorobject
before_created_atstring
before_idstring
errorstring
errorstring
errorstring
Was this page helpful?
Last updated Apr 17, 2026
Built with Documentation.AI