Release Candidate — the API is undergoing final validation before general availability, and minor changes may still occur.
Hellomateo API Documentation
Audit Logs

List Audit Logs

GET
/v1/audit-logs

Lists audit logs for the API token organisation in descending occurred_at order. Every valid API token may read these logs, and entity permissions do not filter events. Queries for one subject require both subject_type and subject_id; all other queries require an RFC 3339 time range in occurred_at[gte] and occurred_at[lte]. Follow next_page_url until it is null and treat event IDs as stable deduplication keys.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

subject_type?"opt_in" | "contact" | "opt_in_group" | "import" | "campaign" | "message_action"

Filters resources by subject type.

subject_id?string

Unique identifier of the related subject.

subject_role?"primary" | "related" | "cause"

Filters resources by subject role.

action?"opt_in.created" | "opt_in.status_changed" | "opt_in.deleted"

Filters resources by action.

action[in]?string

Filters by any of the supplied action values.

actor_type?"employee" | "partner_employee" | "api_key" | "contact" | "external_system" | "user" | "anonymous" | "service" | "unknown"

Type of entity that performed the event.

actor_id?string

Unique identifier of the related actor.

occurred_at[gte]?string

Filters resources by occurred at using the gte operator.

Formatdate-time
occurred_at[lte]?string

Filters resources by occurred at using the lte operator.

Formatdate-time
limit?integer

Maximum number of resources to return.

Default10
Range0 <= value <= 100
page_token?string

Opaque token returned by a previous page request.

Length1 <= length
include?array<"subjects">

Additional fields to include in the response. Use repeated query syntax: include=foo&include=bar.

Response Body

application/json

curl -X GET "https://api.getmateo.com/v1/audit-logs"
{  "object": "list",  "data": [    {      "occurred_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "action": "opt_in.created",      "actor": {        "type": "employee",        "id": "string"      },      "actor_type": "employee",      "actor_id": "string",      "changes": [        {          "field": "string",          "before": {},          "after": {}        }      ],      "subjects": [        {          "subject_type": "opt_in",          "subject_id": "string",          "subject_role": "primary",          "external_id": "string",          "secondary_external_id": "string"        }      ]    }  ],  "next_page_url": "string",  "previous_page_url": "string"}