Skip to main content
GET
/
leads
/
{leadId}
/
events
cURL
curl --request GET \
  --url https://api.attent.app/v1/leads/{leadId}/events \
  --header 'x-api-key: <api-key>'
{
  "events": [
    {
      "id": "msg_abc",
      "roomId": "room_abc",
      "orgId": "org_123",
      "type": "MESSAGE",
      "timestamp": "2026-05-14T15:00:00.000Z",
      "updatedAt": "2026-05-14T15:00:00.000Z",
      "data": {
        "direction": "INBOUND",
        "content": {
          "text": "Hi, I am interested"
        },
        "isAiGenerated": false,
        "deliveryChannel": "SMS"
      }
    }
  ],
  "nextToken": null
}

Documentation Index

Fetch the complete documentation index at: https://docs.apten.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Path Parameters

leadId
string
required

The lead (room) ID to fetch events for.

Query Parameters

since
string<date-time>
required

ISO 8601 timestamp. Returns events whose updatedAt is greater than or equal to this value.

types
string

Comma-separated list of event types to include. Allowed values: MESSAGE, CALL, EMAIL, TOOL_CALL, CUSTOM. Defaults to all types. When supplied, a page may return fewer than limit items even if more matching events exist — always paginate using nextToken.

Example:

"MESSAGE,CALL"

limit
integer
default:100

Maximum number of events to return per page. Defaults to 100, max 1000.

Required range: 1 <= x <= 1000
nextToken
string

Opaque cursor from a prior response. Pass it back to fetch the next page. null in the response means you have reached the end; a non-null value means more pages exist (true regardless of how many items the current page returned).

Response

A page of events ordered by updatedAt ascending.

events
object[]

An interaction event between a lead and your organization. The type discriminator determines the shape of data.

nextToken
string | null

Cursor for the next page. null if there are no more results.