LemuAIDocs

Contacts · 2 min read

Contact Activity

Get everything one contact did, from every source, newest first

Open in ChatGPTOpen in ClaudeMarkdown

Returns a contact's activity timeline, newest first: events you sent, Shopify orders, website visits, message status changes, segment changes and custom record changes. It is the same timeline as the Activity tab on the contact's page.

The timeline covers the whole person:

  • events stored against contacts that were later merged into this one;
  • website visits made before the person was identified, through the visitor ids linked to the contact.

Setup required. Activity is read from the event store. If the event store isn't turned on for your workspace, the response has enabled: false and no events. Use List events in that case.

GET/api/v1/contacts/{contact_id}/activity

Headers#

NameRequiredDescription
X-API-KeyYesAn API key from your organization. See Authentication.

Path parameters#

NameTypeRequiredDescription
contact_idintegerYesThe contact's id, from List contacts or an upsert response.

Query parameters#

NameTypeRequiredDescription
limitintegerNoHow many events to return, 1 to 200. Default 50.
beforestringNoOnly return events before this time, in ISO 8601. To get the next page, pass the next_before value from the previous response.

Example request:

cURL
curl "https://app.lemuai.com/api/v1/contacts/901/activity?limit=20" \
  -H "X-API-Key: lemu_your_api_key"

Response#

200

JSON
{
  "enabled": true,
  "events": [
    {
      "event_id": "3f6c2a9e-8d1b-5c7a-9e42-1b7d0c5a6f13",
      "event_type": "Purchase",
      "occurred_at": "2026-10-27T09:14:02.511000Z",
      "source": "api",
      "contact_id": 901,
      "anonymous_id": null,
      "properties": { "order_id": "SO-10422", "value": 2499, "currency": "INR" }
    },
    {
      "event_id": "a81d4c0e-27f3-4b0a-9a55-6c1e2f7b9d40",
      "event_type": "PageView",
      "occurred_at": "2026-10-27T09:02:40.118000Z",
      "source": "pixel",
      "contact_id": null,
      "anonymous_id": "6b1e2c4f-9a7d-4e3b-8c21-0f5d7a9e3b12",
      "properties": { "url": "https://shop.example.com/products/running-shoes" }
    }
  ],
  "next_before": null
}
FieldTypeDescription
enabledbooleanfalse when the event store isn't turned on. events is then empty.
eventsarrayThe events on this page, newest first.
events[].event_idstringThe event's unique id (UUID).
events[].event_typestringThe event name, for example Purchase, PageView or message_delivered. Events stored before Lemu switched to Meta's standard event names keep their older name, such as order_placed or page_viewed.
events[].occurred_atstringWhen it happened, in ISO 8601 (UTC).
events[].sourcestringWhere it came from: api, shopify, pixel, messaging, segments, records or backfill. See Event sources.
events[].contact_idinteger or nullThe contact the event was stored against: this contact or one merged into it. null for website activity from before the person was identified.
events[].anonymous_idstring or nullThe website or app visitor id, for events from a tracking source.
events[].propertiesobjectThe details of the event.
next_beforestring or nullPass this as before to get the next page. null on the last page.

Errors#

StatusWhen
401The API key is missing or not valid.
404No contact with this id in your organization.
503The event store couldn't be read right now. Try again shortly.

See Errors for the error format.