audit-events

Stable. Describes behaviour that is built and covered by tests in this repository.

API reference

GET /v1/audit-events #

The audit log of the tenant, newest first

Who did what and when, for the actions that change money or access: API keys created, rotated and revoked; members invited, changed and removed; plan versions published; webhook endpoints created, changed, deleted and their secrets rolled; customers blocked and unblocked; credit notes and refunds; the operator's invoice actions; payment provider accounts connected, replaced, removed and made the default; the tenant's status and settings. Each entry has the actor (a person, an API key, the operator or the system), the target, a one-line summary with no secret in it, a small detail object, the address and the request id. The log is append-only: the database refuses any change to an entry. It is read from several services and merged; when one does not answer, incomplete is true and unavailable_sources names it. Needs the permission audit:read (an admin key has it; the read_only role does not). A person who is a viewer of the account may not read it.

Parameters

NameInTypeDescription
actionquerystringAction names such as api_key.created, or an area such as api_key.*, separated by commas
actorquerystringAn actor id (user id, API key id) or an e-mail address
target_typequerystring
target_idquerystring
fromquerystring · date-timeInclusive, RFC 3339
toquerystring · date-timeExclusive, RFC 3339
page_sizequeryinteger
page_tokenquerystring

Responses

StatusMeaningBody
200OKListAuditEventsResponse
400Error envelopeError
403Error envelopeError
Example response
{
  "events": [
    {
      "id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
      "tenant_id": "string",
      "account_id": "string",
      "actor_type": "user",
      "actor_id": "string",
      "actor_email": "string",
      "action": "api_key.created",
      "target_type": "string",
      "target_id": "string",
      "summary": "string",
      "detail_json": "string",
      "before_hash": "string",
      "after_hash": "string",
      "source_ip": "string",
      "request_id": "string",
      "create_time": "2026-11-03T10:15:00Z"
    }
  ],
  "next_page_token": "string",
  "incomplete": false,
  "unavailable_sources": [
    "plans"
  ]
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/audit-events \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

GET /v1/audit-events/export #

The audit log as CSV (the newest 5000 entries of the filter)

The same filter as listAuditEvents, one line per entry with the columns id, create_time, tenant_id, account_id, actor_type, actor_id, actor_email, action, target_type, target_id, summary, detail (JSON), before_hash, after_hash, source_ip, request_id. A cell that starts with =, +, - or @ gets a leading ', so a spreadsheet does not run it. An export that cannot read every service fails with 503 audit.unavailable rather than leave entries out. Needs audit:read.

Parameters

NameInTypeDescription
actionquerystringAction names such as api_key.created, or an area such as api_key.*, separated by commas
actorquerystringAn actor id (user id, API key id) or an e-mail address
target_typequerystring
target_idquerystring
fromquerystring · date-timeInclusive, RFC 3339
toquerystring · date-timeExclusive, RFC 3339

Responses

StatusMeaningBody
200OK
400Error envelopeError
403Error envelopeError
503Error envelopeError
curl
curl -X GET https://YOUR-API-ADDRESS/v1/audit-events/export \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

Models

AuditEvent

FieldTypeDescription
id requiredstring · uuid
tenant_id requiredstringEmpty for an entry that belongs to no tenant
account_id requiredstringSet for an entry that is an account's and no tenant's (its members)
actor_type requireduser | api_key | operator | system
actor_id requiredstring
actor_email requiredstring
action requiredstring<area>.<what>, for example api_key.created
target_type requiredstring
target_id requiredstring
summary requiredstringOne line for a person; secrets are masked
detail_json requiredstringA small JSON object of what changed, as text; it holds no secret
before_hash requiredstring
after_hash requiredstring
source_ip requiredstring
request_id requiredstring
create_time requiredstring · date-time

Error

FieldTypeDescription
error requiredobject

ListAuditEventsResponse

FieldTypeDescription
events requiredarray of AuditEvent
next_page_token requiredstring
incomplete requiredbooleanA service that keeps part of the log did not answer: the page may lack its entries
unavailable_sources requiredarray of plans | billing | payments