Skip to content

Activities

Activities

Activity log for entity resources. Tracks actions like creation, updates, deletions, and custom events across all resource types. Read-only - activities are created automatically by the system.

List activities

GET/activities

Retrieve a paginated list of activities for the entity. Supports filtering by resource_type, resource_id, and action. Activities are ordered by created_at descending by default.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Cursor to fetch the next page of results. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Cursor to fetch the previous page of results. Use the value from pagination.prev_cursor in the previous response.

include_total_countbooleanoptional

Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.

order_byoptional
querystring<json>optional

JSON query object for filtering results. Supports MongoDB-style operators.

Supported operators:
- equals or direct value - Exact match (default)
- gte - Greater than or equal
- lte - Less than or equal
- gt - Greater than
- lt - Less than
- in - Value in array
- notIn - Value not in array
- contains - String contains (case-insensitive)
- startsWith - String starts with
- endsWith - String ends with
- between - Value between two numbers/dates [min, max]

Allowed fields: id, resource_type, resource_id, action, actor_type, created_at

Examples:
- {"total": {"gte": 1000}} - Invoices over 1000
- {"customer.name": {"contains": "Acme"}} - Customer name contains "Acme"
- {"date": {"between": ["2025-01-01", "2025-12-31"]}} - Date range

resource_typestringoptional

Filter by resource type (e.g., Invoice, Customer, Payment)

resource_idstringoptional

Filter by specific resource ID

actionstringoptional

Filter by action type (e.g., created, updated, deleted, sent)

curl "https://eu.spaceinvoices.com/activities" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "act_abc123",
      "entity_id": "ent_xyz789",
      "resource_type": "Invoice",
      "resource_id": "inv_def456",
      "action": "sent",
      "actor_type": "user",
      "actor_id": "usr_abc123",
      "actor_label": "user@example.com",
      "details": {
        "to": "customer@example.com",
        "subject": "Invoice #INV-2024-001"
      },
      "created_at": "2024-01-15T14:30:00.000Z"
    },
    {
      "id": "act_def456",
      "entity_id": "ent_xyz789",
      "resource_type": "Invoice",
      "resource_id": "inv_def456",
      "action": "created",
      "actor_type": "user",
      "actor_id": "usr_abc123",
      "actor_label": "user@example.com",
      "details": {},
      "created_at": "2024-01-15T10:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}