audit

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-audit"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/3337be47-a23c-4e5c-b43e-e0b6edc64242/social-card.svg?v=3e7ae33eec8b" alt="audit" width="600" height="315"></a>
POSThttps://lucidace.com/v1/orgs/{org_id}/audit/sinksScope admin

Parameters

org_idstringpathrequired

Request body

application/json
kindstringrequired
webhook | s3
targetstringrequired
Webhook: an https URL. S3: a key prefix inside the platform object store.
{
  "kind": "string",
  "target": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/orgs/{org_id}/audit/sinks" \
  -H "Content-Type: application/json" \
  -d '{"kind":"string","target":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "secret": "string",
  "sink": {
    "created_at": "2024-01-01T00:00:00Z",
    "enabled": true,
    "id": "string",
    "kind": "string",
    "last_delivery_at": "2024-01-01T00:00:00Z",
    "last_error": "string",
    "last_seq": 0,
    "org_id": "string",
    "target": "string"
  }
}
Schema
secretstringrequired
Shown once. Deliveries carry X-Lucida-Signature: sha256=hex(hmac(secret, timestamp + "." + body)).
sinkobjectrequired
Show child parameters
created_atstringrequired
enabledbooleanrequired
idstringrequired
kindstringrequired
webhook | s3
last_delivery_atstring
last_errorstring
last_seqintegerrequired
org_idstringrequired
targetstringrequired
Webhook URL, or object-store key prefix.
400
403
404
DELETEhttps://lucidace.com/v1/orgs/{org_id}/audit/sinks/{id}Scope admin

Parameters

org_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/orgs/{org_id}/audit/sinks/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
403
404
GEThttps://lucidace.com/v1/orgs/{org_id}/audit/subscriptionsScope admin

Parameters

org_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/orgs/{org_id}/audit/subscriptions"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
[
  {
    "actions": [
      "string"
    ],
    "channels": [
      {}
    ],
    "created_at": "2024-01-01T00:00:00Z",
    "email": true,
    "id": "string",
    "project_id": "string",
    "user_id": "string"
  }
]
Schema
actionsstring[]required
Exact action names or prefix.* patterns; empty matches every action.
channelsobject[]required
Chat channels (slack, teams, discord) that get one digest per delivery; webhook URLs sealed with the org id (P-H11). Callers redact before showing them.
created_atstringrequired
emailbooleanrequired
idstringrequired
project_idstring
Only this project's entries; None for the whole org (org-level entries included).
user_idstringrequired
403
404
POSThttps://lucidace.com/v1/orgs/{org_id}/audit/subscriptionsScope admin

Parameters

org_idstringpathrequired

Request body

application/json
actionsstring[]
Exact action names (flag.update) or prefix.*; empty for every action. At most 50.
channelsobject[]
Chat channels that get a digest of each delivery: {"type":"slack"|"teams"|"discord","url":..} (incoming-webhook URLs, stored sealed and never shown again).
emailboolean
Also email a digest of each delivery.
project_idstring
Only this project's entries; omitted for the whole org.
{
  "actions": [
    "string"
  ],
  "channels": [
    {}
  ],
  "email": true,
  "project_id": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/orgs/{org_id}/audit/subscriptions" \
  -H "Content-Type: application/json" \
  -d '{"actions":["string"],"channels":[{}],"email":true,"project_id":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "actions": [
    "string"
  ],
  "channels": [
    {}
  ],
  "created_at": "2024-01-01T00:00:00Z",
  "email": true,
  "id": "string",
  "project_id": "string",
  "user_id": "string"
}
Schema
actionsstring[]required
Exact action names or prefix.* patterns; empty matches every action.
channelsobject[]required
Chat channels (slack, teams, discord) that get one digest per delivery; webhook URLs sealed with the org id (P-H11). Callers redact before showing them.
created_atstringrequired
emailbooleanrequired
idstringrequired
project_idstring
Only this project's entries; None for the whole org (org-level entries included).
user_idstringrequired
400
403
404
DELETEhttps://lucidace.com/v1/orgs/{org_id}/audit/subscriptions/{id}Scope admin

Parameters

org_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/orgs/{org_id}/audit/subscriptions/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
404
GEThttps://lucidace.com/v1/orgs/{org_id}/audit/verifyScope audit:read

Recompute the org's hash chain.

Parameters

org_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/orgs/{org_id}/audit/verify"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "entries": 0,
  "status": "valid"
}
Option 1
entriesintegerrequired
statusstringrequired
valid
{
  "entries": 0,
  "status": "valid"
}
Option 2
seqintegerrequired
statusstringrequired
broken
{
  "seq": 0,
  "status": "broken"
}
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/activityScope admin

The project's activity log, newest first, with the same filters as the org log. Project admins (and org admins) only; `project_id` is forced to the path, never taken from the query.

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery
sincestringquery
Inclusive lower bound (RFC 3339).
untilstringquery
Exclusive upper bound (RFC 3339).
project_idstringquery
user_idstringquery
Acting user.
actor_kindstringquery
user | api_key | system | scim
actionstringquery
Action prefix, e.g. flag. (scope) or flag.update (activity).
resource_typestringquery
resource_idstringquery
ipstringquery
api_key_idstringquery
Calls made with one API key, OAuth token or MCP credential.
clientstringquery
Calling client (mcp, cli, terraform, web).
impersonatedbooleanquery
qstringquery
Text search over action, resource id and detail.

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/activity"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of AuditEntry
Example
{
  "data": [
    {
      "action": "string",
      "actor_kind": "string",
      "actor_user_id": "string",
      "created_at": "2024-01-01T00:00:00Z",
      "detail": {},
      "id": "string",
      "ip": "string",
      "org_id": "string",
      "project_id": "string",
      "resource_id": "string",
      "resource_type": "string",
      "seq": 0
    }
  ],
  "next_cursor": "string"
}
Schema
dataAuditEntry[]required
Show child parameters
actionstringrequired
actor_kindstringrequired
actor_user_idstring
created_atstringrequired
detailobjectrequired
idstringrequired
ipstring
org_idstringrequired
project_idstring
resource_idstring
resource_typestringrequired
seqintegerrequired
next_cursorstring
400
404
GEThttps://lucidace.com/v1/projects/{project_id}/history/{resource_type}/{resource_id}Scope insight:read

Change history of one resource in a project, newest first. Any member who can read the project sees it; `resource_type` is the audit name (`flag`, `cohort`, `dashboard`, ...).

Parameters

project_idstringpathrequired
resource_typestringpathrequired
resource_idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/history/{resource_type}/{resource_id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of AuditEntry

Same as 200 · GET /v1/projects/{project_id}/activity

400
404
Updated