List audits
Returns audit events of the specified organization to check what action was taken, on which entity, when it occurred, and who triggered it. When trigger_type is user, trigger_id corresponds to the user ID and can be queried via the user endpoint. When trigger_type is api, trigger_id corresponds to the API key ID; currently API keys are not queryable from this public API.
curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/audits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/audits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/audits', 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.flexxible.net/v2/organizations/{organization_id}/audits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.flexxible.net/v2/organizations/{organization_id}/audits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.flexxible.net/v2/organizations/{organization_id}/audits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/audits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"has_next": true,
"data": [
{
"id": "b7e4c2a9d1f6038e5a2c9b4d",
"audited_at": "2026-06-30T11:45:12.000Z",
"organization_id": "a9d3f1b7c4e8026d5f0a3c8e",
"action": "update",
"entity_type": "workspace",
"entity_id": "c2f8a1d4b9e3067f5c0d2a8e",
"trigger_type": "api",
"trigger_id": "8c1a7e2b9f4d3c6e0a5b1d2f",
"trigger_name": "Api Key"
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request data",
"details": "fields and aggregate cannot be combined."
}
}{
"error": {
"code": "unauthorized",
"message": "No autorizado para acceder a la organización solicitada."
}
}{
"error": {
"code": "not_found",
"message": "El recurso solicitado no existe en la organización indicada."
}
}{
"error": {
"code": "internal_error",
"message": "Se ha producido un error interno."
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization identifier.
24^[0-9a-f]{24}$Query Parameters
Page number to query.
x >= 1Number of items per page.
1 <= x <= 100Comma-separated list of response fields to include.
"id,audited_at,action,entity_type,entity_id,trigger_type,trigger_id,trigger_name"
Sorting expression in the format :asc|desc. In aggregate mode, only accepts group_by fields or aggregated aliases (count, <function>_<field>).
^([a-z_]+):(asc|desc)$Filtering JSON expression on filterable fields in the response.
JSON expression for aggregation. Structure: {"group_by":["field"],"aggregates":[{"field":"*","function":"count"}]}. Cannot be combined with fields.
1024curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/audits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/audits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/audits', 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.flexxible.net/v2/organizations/{organization_id}/audits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.flexxible.net/v2/organizations/{organization_id}/audits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.flexxible.net/v2/organizations/{organization_id}/audits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/audits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"has_next": true,
"data": [
{
"id": "b7e4c2a9d1f6038e5a2c9b4d",
"audited_at": "2026-06-30T11:45:12.000Z",
"organization_id": "a9d3f1b7c4e8026d5f0a3c8e",
"action": "update",
"entity_type": "workspace",
"entity_id": "c2f8a1d4b9e3067f5c0d2a8e",
"trigger_type": "api",
"trigger_id": "8c1a7e2b9f4d3c6e0a5b1d2f",
"trigger_name": "Api Key"
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request data",
"details": "fields and aggregate cannot be combined."
}
}{
"error": {
"code": "unauthorized",
"message": "No autorizado para acceder a la organización solicitada."
}
}{
"error": {
"code": "not_found",
"message": "El recurso solicitado no existe en la organización indicada."
}
}{
"error": {
"code": "internal_error",
"message": "Se ha producido un error interno."
}
}