Docs / API reference

Audit log

Who changed members, roles, API keys, sending providers, domains and settings, and when.

Base URL https://your-server.example (your OneSend server). Authentication and errors are described in the overview.

List audit log entries

GET /v1/audit-log

Admins and the owner (or an admin-scoped key). Newest first. Records member, role and invitation changes, and changes to sending providers, routing, domains, DNS hosts, mailboxes, webhooks, API keys, workspace settings and AI provider connections. Request bodies are not stored, only field names and non-secret values.

Authentication: Authorization: Bearer with an API key or a session token.

Parameters

NameInTypeDescription
actionquerystringExact action (member.role_changed) or a prefix ending in a dot (member.)
actorquerystringUser id or API key id
targetquerystring
sincequerystring (date-time)
untilquerystring (date-time)
limitqueryinteger1 to 200.
cursorquerystring

Responses

200 Success

{
  "data": [{
    "id": string,
    "action": string,
    "target": string or null,
    "actor": {
      "id": string,
      "type": "user" | "api_key" | "system",
      "label": string
    },
    "data": object or null,
    "createdAt": string
  }],
  "nextCursor": string or null
}
Errors: 400, 401, 403, 404, 429, 500
  • 400 Invalid request: validation failed, a parameter is not allowed, the body is not valid JSON (invalid_json) or the pagination cursor is not valid (invalid_cursor). Type invalid_request.
  • 401 Missing credentials (unauthorized), an unknown or revoked API key (invalid_api_key) or an expired session (invalid_session). Type unauthorized.
  • 403 The API key's permission does not allow this operation (insufficient_scope; configuration needs an admin key), a test key was used outside its sandbox (test_key_not_allowed), a Conversion tracking key was used (publishable_key), or a cookie request is missing X-OneSend-Client: dashboard (csrf_header_required). Type forbidden.
  • 404 The resource does not exist in this workspace (not_found)
  • 429 Too many requests; retry after the time in the Retry-After header (rate_limited)
  • 500 Unexpected server error (internal)

Export the audit log as CSV

GET /v1/audit-log/export

Same filters as the list. Up to 50,000 rows, newest first.

Authentication: Authorization: Bearer with an API key or a session token.

Parameters

NameInTypeDescription
actionquerystringExact action (member.role_changed) or a prefix ending in a dot (member.)
actorquerystringUser id or API key id
targetquerystring
sincequerystring (date-time)
untilquerystring (date-time)

Responses

200 Success (text/csv)

Errors: 400, 401, 403, 404, 429, 500
  • 400 Invalid request: validation failed, a parameter is not allowed, the body is not valid JSON (invalid_json) or the pagination cursor is not valid (invalid_cursor). Type invalid_request.
  • 401 Missing credentials (unauthorized), an unknown or revoked API key (invalid_api_key) or an expired session (invalid_session). Type unauthorized.
  • 403 The API key's permission does not allow this operation (insufficient_scope; configuration needs an admin key), a test key was used outside its sandbox (test_key_not_allowed), a Conversion tracking key was used (publishable_key), or a cookie request is missing X-OneSend-Client: dashboard (csrf_header_required). Type forbidden.
  • 404 The resource does not exist in this workspace (not_found)
  • 429 Too many requests; retry after the time in the Retry-After header (rate_limited)
  • 500 Unexpected server error (internal)