Audit Logs

Use the audit logs endpoints to inspect normalized change events for one organization. Audit log responses are scoped to your API key client and organization, and all identifiers are returned as encoded ids.

List audit logs

GET /api/v2/organizations/{organization_id}/audit-logs

This endpoint returns a paginated collection of audit log entries.

Supported query filters:

  • Name
    limit
    Description

    Optional number of items to return (default 50, max 500).

  • Name
    cursor
    Description

    Optional pagination cursor from a previous response.

  • Name
    start_date
    Description

    Optional inclusive lower bound for occurred_at in ISO 8601 format.

  • Name
    end_date
    Description

    Optional exclusive upper bound for occurred_at in ISO 8601 format.

  • Name
    agent_id
    Description

    Optional agent ID to filter logs by one agent.

  • Name
    record_type
    Description

    Optional record type filter: sale, conversation, message_draft, or response_draft.

  • Name
    action_type
    Description

    Optional action filter: insert, update, or delete.

List audit logs request

curl -G https://api.hyperrep.ai/api/v2/organizations/HR_id_example_organization_id/audit-logs \
  -H "X-API-KEY: your-api-key" \
  --data-urlencode "limit=25" \
  --data-urlencode "record_type=sale" \
  --data-urlencode "action_type=update" \
  --data-urlencode "start_date=2026-05-01T00:00:00Z" \
  --data-urlencode "end_date=2026-05-31T23:59:59Z"

Example response

{
  "data": [
    {
      "audit_log_id": "HR_id_example_audit_log_id",
      "occurred_at": "2026-05-21T17:42:31.000000Z",
      "agent_id": "HR_id_example_agent_id",
      "action_type": "update",
      "record": {
        "type": "sale",
        "id": "HR_id_example_sale_id"
      },
      "changes": [
        {
          "field": "status",
          "from": "Qualified",
          "to": "Accepted"
        },
        {
          "field": "custom_fields",
          "from": {},
          "to": {
            "notes": "Customer requested implementation call."
          }
        }
      ]
    }
  ],
  "pagination": {
    "limit": 25,
    "cursor": null,
    "next_cursor": "HR_tok_example_next_cursor",
    "has_more": true
  }
}

Get an audit log

GET /api/v2/organizations/{organization_id}/audit-logs/{audit_log_id}

Use the audit_log_id returned by the list endpoint.

This endpoint returns one audit log entry in the same canonical shape used in data[] items from the collection route.

Get audit log request

curl https://api.hyperrep.ai/api/v2/organizations/HR_id_example_organization_id/audit-logs/HR_id_example_audit_log_id \
  -H "X-API-KEY: your-api-key"

Example response

{
  "audit_log_id": "HR_id_example_audit_log_id",
  "occurred_at": "2026-05-21T17:42:31.000000Z",
  "agent_id": "HR_id_example_agent_id",
  "action_type": "update",
  "record": {
    "type": "sale",
    "id": "HR_id_example_sale_id"
  },
  "changes": [
    {
      "field": "status",
      "from": "Qualified",
      "to": "Accepted"
    }
  ]
}

Data shape

  • Name
    audit_log_id
    Description

    Identifier for the audit log entity.

  • Name
    occurred_at
    Description

    Timestamp for when the change event occurred.

  • Name
    agent_id
    Description

    Agent ID when one agent can be resolved for the event; otherwise null.

  • Name
    action_type
    Description

    Action type: insert, update, or delete.

  • Name
    record.type
    Description

    Normalized record type: sale, conversation, message_draft, or response_draft.

  • Name
    record.id
    Description

    Record identifier for the normalized record type, or null when unavailable.

  • Name
    changes[].field
    Description

    Name of the field that changed.

  • Name
    changes[].from
    Description

    Previous value for the changed field. Type varies by field (string, boolean, object, array, or null).

  • Name
    changes[].to
    Description

    New value for the changed field. Type varies by field (string, boolean, object, array, or null).

Possible Field Changes

Changes are returned as an array of changed fields with from and to values. The possible fields are determined by the record type.

Sale (record.type = sale)

  • Name
    owner_id
    Description

    The id of the agent assigned to the sale, when applicable.

  • Name
    company_id
    Description

    The id of the company associated with the sale, when applicable.

  • Name
    associated_conversation_ids
    Description

    The conversation ids associated with the sale, represented as an array of encoded ids.

  • Name
    status
    Description

    The status of the sale, represented as the label customized in your organization's sales pipeline.

  • Name
    associated_contacts
    Description

    Contacts associated with the sale, represented as an array of objects with contact_id and is_primary.

  • Name
    quote_details
    Description

    The quote details for the sale, when applicable. This is an object with amount, currency, and products fields.

  • Name
    custom_fields
    Description

    Custom sales field values keyed by field name.

Conversation (record.type = conversation)

  • Name
    conversation_id
    Description

    The id of the conversation associated with the conversation record, when applicable.

  • Name
    contact_id
    Description

    The id of the contact associated with the conversation, when applicable.

  • Name
    folder
    Description

    The folder slug associated with the conversation, when applicable.

  • Name
    is_read
    Description

    The read-state of the conversation, represented as a boolean value.

Response draft (record.type = response_draft)

  • Name
    conversation_id
    Description

    The id of the conversation associated with the response draft, when applicable.

  • Name
    content
    Description

    The content of the response draft, when applicable. This is a text field.

  • Name
    created_at
    Description

    The creation timestamp of the response draft, when applicable.

  • Name
    cc_emails
    Description

    The CC email array of the response draft, when applicable.

  • Name
    bcc_emails
    Description

    The BCC email array of the response draft, when applicable.

  • Name
    scheduled_send_at
    Description

    The scheduled send timestamp of the response draft, when applicable.

Message draft (record.type = message_draft)

  • Name
    content
    Description

    The content of the message draft, when applicable. This is a text field.

  • Name
    subject
    Description

    The subject of the message draft, when applicable. This is a text field.

  • Name
    agent_id
    Description

    The id of the agent associated with the message draft, when applicable.

  • Name
    to_email
    Description

    The email address of the recipient associated with the message draft, when applicable.

  • Name
    to_phone_number
    Description

    The phone number of the recipient associated with the message draft, when applicable.

  • Name
    cc_emails
    Description

    The CC email array of the message draft, when applicable.

  • Name
    bcc_emails
    Description

    The BCC email array of the message draft, when applicable.

  • Name
    created_at
    Description

    The creation timestamp of the message draft, when applicable.

  • Name
    organization_id
    Description

    The id of the organization associated with the message draft, when applicable.

  • Name
    sale_id
    Description

    The id of the sale associated with the message draft, when applicable.

  • Name
    scheduled_send_at
    Description

    The scheduled send timestamp of the message draft, when applicable.

  • Name
    modality
    Description

    The modality of the message draft, represented as email or text, when applicable.

  • Name
    folder
    Description

    The folder slug associated with the message draft, when applicable.

Was this page helpful?