Get audit logs
Get a comprehensive audit trail of all operations performed in your Metronome account, whether initiated through the API, web interface, or automated processes. This endpoint provides detailed logs of who did what and when, enabling compliance reporting, security monitoring, and operational troubleshooting across all interaction channels.
Use this endpoint to:
- Monitor all account activity for security and compliance purposes
- Track configuration changes regardless of source (API, UI, or system)
- Investigate issues by reviewing historical operations
Key response fields:
An array of AuditLog objects containing:
- id: Unique identifier for the audit log entry
- timestamp: When the action occurred (RFC 3339 format)
- actor: Information about who performed the action
- request: Details including request ID, IP address, and user agent
resource_type: The type of resource affected (e.g., customer, contract, invoice)resource_id: The specific resource identifieraction: The operation performednext_page: Cursor for continuous log retrieval
Usage guidelines:
- Continuous retrieval: The next_page token enables uninterrupted log streaming—save it between requests to ensure no logs are missed
- Empty responses: An empty data array means no new logs yet; continue polling with the same next_page token
- Date filtering:
starting_on: Earliest logs to return (inclusive)ending_before: Latest logs to return (exclusive)- Cannot be used with
next_page
- Resource filtering: Must specify both
resource_typeandresource_idtogether - Sort order: Default is
date_asc; usedate_descfor newest first
Authorizations
Query Parameters
Response
Success
The next_page parameter is always returned to support ongoing log retrieval. It enables continuous querying, even when some requests return no new data. Save the next_page token from each response and use it for future requests to ensure no logs are missed. This setup is ideal for regular updates via automated processes, like cron jobs, to fetch logs continuously as they become available. When you receive an empty data array, it indicates a temporary absence of new logs, but subsequent requests might return new data.