Request cURL
curl -s "https://app.upfour.io/v1/organization/audit-logs" \
-H "Authorization: Bearer $UP4_API_KEY"
JavaScript
const res = await fetch("https://app.upfour.io/v1/organization/audit-logs", {
headers: {
Authorization: `Bearer ${process.env.UP4_API_KEY}`,
},
});
console.log(res.status, await res.json());
Python
import os
import requests
res = requests.get(
"https://app.upfour.io/v1/organization/audit-logs",
headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
)
print(res.status_code, res.json())
Go
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://app.upfour.io/v1/organization/audit-logs", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}
PHP
<?php
$ch = curl_init("https://app.upfour.io/v1/organization/audit-logs");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("UP4_API_KEY"),
],
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
Response
200
{
"data": [
{
"action": "organization.ai_quota_updated",
"actor_email": "anna@example.com",
"actor_user_id": "00000000-0000-4000-8000-000000000001",
"created_at": "2026-10-27T09:00:00Z",
"id": "00000000-0000-4000-8000-000000000002",
"metadata": {
"monthly_call_cap": 200,
"monthly_cap_cents": 1000
},
"organization_id": "00000000-0000-4000-8000-000000000003",
"resource_id": "00000000-0000-4000-8000-000000000003",
"resource_type": "organization"
},
{
"action": "sso.provider_updated",
"actor_email": "anna@example.com",
"actor_user_id": "00000000-0000-4000-8000-000000000001",
"created_at": "2026-10-27T09:00:00Z",
"id": "00000000-0000-4000-8000-000000000004",
"metadata": {
"enabled": false,
"provider": "google"
},
"organization_id": "00000000-0000-4000-8000-000000000003",
"resource_id": "google",
"resource_type": "organization_sso_provider"
},
{
"action": "organization.security_updated",
"actor_email": "anna@example.com",
"actor_user_id": "00000000-0000-4000-8000-000000000001",
"created_at": "2026-10-27T09:00:00Z",
"id": "00000000-0000-4000-8000-000000000005",
"metadata": {
"allow_ai_features": true,
"audit_drain_url": "",
"require_2fa": false
},
"organization_id": "00000000-0000-4000-8000-000000000003",
"resource_id": "00000000-0000-4000-8000-000000000003",
"resource_type": "organization"
},
{
"action": "advisor.fix_applied",
"actor_email": "anna@example.com",
"actor_user_id": "00000000-0000-4000-8000-000000000001",
"created_at": "2026-10-27T09:00:00Z",
"id": "00000000-0000-4000-8000-000000000006",
"metadata": {
"applied": "channel_attached",
"rule_id": "monitor_without_recipient"
},
"organization_id": "00000000-0000-4000-8000-000000000003",
"resource_id": "00000000-0000-4000-8000-000000000007",
"resource_type": "monitor"
},
{
"action": "status_page.access_token_revoked",
"actor_email": "anna@example.com",
"actor_user_id": "00000000-0000-4000-8000-000000000001",
"created_at": "2026-10-27T09:00:00Z",
"id": "00000000-0000-4000-8000-000000000008",
"metadata": {},
"organization_id": "00000000-0000-4000-8000-000000000003",
"resource_id": "00000000-0000-4000-8000-000000000009",
"resource_type": "status_page"
},
{
"action": "status_page.access_token_rotated",
"actor_email": "anna@example.com",
"actor_user_id": "00000000-0000-4000-8000-000000000001",
"created_at": "2026-10-27T09:00:00Z",
"id": "00000000-0000-4000-8000-000000000010",
"metadata": {},
"organization_id": "00000000-0000-4000-8000-000000000003",
"resource_id": "00000000-0000-4000-8000-000000000009",
"resource_type": "status_page"
},
{
"action": "status_page.access_policy_updated",
"actor_email": "anna@example.com",
"actor_user_id": "00000000-0000-4000-8000-000000000001",
"created_at": "2026-10-27T09:00:00Z",
"id": "00000000-0000-4000-8000-000000000011",
"metadata": {
"access_email_codes": false,
"ip_allowlist": [
"203.0.113.0/24"
]
},
"organization_id": "00000000-0000-4000-8000-000000000003",
"resource_id": "00000000-0000-4000-8000-000000000009",
"resource_type": "status_page"
}
],
"pagination": {
"cursor": null,
"has_more": false,
"limit": 50,
"next_cursor": null,
"prev_cursor": null
}
}
400
{
"error": {
"code": "bad_request",
"message": "The request is malformed or fails validation.",
"request_id": "req_…"
}
}
403
{
"error": {
"code": "permission_denied",
"message": "The credentials do not permit this action.",
"request_id": "req_…"
}
}