Skip to content
Hayonix

API reference · Audit logs

List audit log entries

GET/v1/orgs/{org_id}/audit-logs
Console sessionaudit_log:readOrganizationPaginated

Newest first. Entries are kept for the life of the organization and cannot be changed or deleted.

Console session only: no API key can be granted the audit_log:read permission it needs. Requires the audit_log:read permission (a key's scope, or a role that includes it).

Request

Path parameters

  • org_idstring

    Your organization. The SDKs and the CLI fill it in from the API key.

    ID with prefix org_

Query parameters

  • limitinteger

    1–200, default 50

    1–200

  • cursorstring

    `next_cursor` of the previous page

    up to 200 characters

  • actor_kindstring

    Only this kind of actor

    One ofmemberapi_keyplatformsystem

  • actor_idstring

    Only this actor: a user ID, an API key ID, a component, or `platform` for platform operators

    up to 64 characters

  • actionstring

    An action (`api_key:create`) or every action on a resource (`api_key:*`)

    up to 64 characters · pattern ^[a-z_]+:(\*|[a-z_]+)$

  • target_typestring

    Only entries about this kind of resource

    up to 64 characters

  • target_idstring

    Only entries about this resource

    up to 64 characters

  • created_afterstring (date-time)

    Entries at or after this time

  • created_beforestring (date-time)

    Entries before this time

Response

200 a page of results — A page of entries, newest first

  • The items of this page.

    Show 12 fields of data
    • objectstringrequired

      Always `audit_log_entry`: the type of this object

      One ofaudit_log_entry

    • idstringrequired

      Unique ID (`aud_…`)

      ID with prefix aud_

    • org_idstring | nullrequired

      Organization it belongs to

    • project_idstring | nullrequired

      Project it belongs to

    • actorobjectrequired

      Who made the change

      Show 4 fields of actor
      • typestringrequired

        Finer kind of actor than `kind`: `user` or `playground` (a member, directly or through the console playground), `api_key`, `operator` (a platform operator) or the type of a platform component

      • idstringrequired

        The member’s user ID, the API key ID or the component; `platform` for every platform operator

      • kindstringrequired

        `member` (a person in the org), `api_key`, `platform` (a platform operator, never named) or `system` (the platform itself: billing enforcement, sign-in checks, the payment processor)

        One ofmemberapi_keyplatformsystem

      • namestring | nullrequired

        Who it was when the entry was written: a member’s name or an API key’s name. Kept after the member leaves or the key is revoked or renamed.

    • actionstringrequired

      What was done, as `resource:verb`

    • targetobjectrequired

      The resource the change was made to

      Show 2 fields of target
      • typestring | nullrequired

        Kind of resource the change was made to (null when there is none)

      • idstring | nullrequired

        Unique ID

    • metadataobject | nullrequired

      Your own key/value labels, returned as given

    • requestobjectrequired

      The API request that made the change (all null when none)

      Show 4 fields of request
      • idstring | nullrequired

        Unique ID

      • methodstring | nullrequired

        HTTP method

      • routestring | nullrequired

        Route that handled it, with path parameters as placeholders

      • statusinteger | nullrequired

        HTTP status code of the response

    • ipstring | nullrequired

      IP address the change came from (null when unknown or made by the platform)

    • user_agentstring | nullrequired

      User-Agent header of the request (null when none)

    • created_atstring (date-time)required

      When it was created (ISO 8601, UTC)

  • next_cursorstring | nullrequired

    Pass as `cursor` for the next page; null on the last page.

Example response
Example response
{
  "data": [
    {
      "object": "audit_log_entry",
      "id": "aud_01jc5zq4m8k3v6x9t2w7r0b1e4",
      "org_id": "string",
      "project_id": "string",
      "actor": {
        "type": "string",
        "id": "string",
        "kind": "member",
        "name": "Ada Lovelace"
      },
      "action": "api_key:create",
      "target": {
        "type": "api_key",
        "id": "string"
      },
      "metadata": {},
      "request": {
        "id": "string",
        "method": "POST",
        "route": "string",
        "status": 1
      },
      "ip": "string",
      "user_agent": "string",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "next_cursor": "string"
}

Errors

Errors use the standard envelope. What this operation can answer:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.