---
title: "Find cross-source temporal event sequences"
method: GET
path: "/api/v1/ackdb/entities/events/sequence"
tags: ["ackDB"]
---

# Find cross-source temporal event sequences

`GET /api/v1/ackdb/entities/events/sequence`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/ackdb/entities/events/sequence`
- Auth: HTTP bearer

Find ordered event types within windowDays for the same non-null company or person selected by grain. Person grain joins personal and company-associated history for one human; company graph is incompatible. Ownership/personId filters apply to both sides. One earliest sequence per owner.

## Query parameters

- `firstEventType` string, required
- `secondEventType` string, required
- `windowDays` integer
- `firstSource` string
- `secondSource` string
- `since` string, date-time
- `until` string, date-time
- `limit` integer
- `offset` integer
- `graphRoot` string
- `graphScope` 'parents' | 'children' | 'connected'
- `graphMaxDepth` integer
- `graphAsOf` string, date-time
- `graphRelationshipType` string[]
- `personId` string
- `ownership` 'person' | 'company'
- `grain` 'company' | 'person'

## Response `200`

Event sequences matching the criteria

- object
  - `data` object[], required
    - `entityId` unknown, required
    - `entityName` unknown, required
    - `daysBetween` number, required: Days between the two events.
    - `firstEvent` AckdbEntityEvent, required: Immutable company or human activity. Sole-person events have null entityId/contactId and a non-null personId, even when the human has employers.
      - `id` string, required: ULID identifier for the event.
      - `entityId` unknown, required
      - `source` string, required: Source system that produced this event.
      - `eventType` string, required: Type of event (e.g. message, payment, subscription_change).
      - `summary` string, required: Human-readable summary of the event.
      - `metadata` object, required: Source-specific event metadata.
      - `timestamp` string, date-time, required: When this event occurred in the source system.
      - `createdAt` string, date-time, required: When this event record was created in ackDB.
      - `contactId` unknown, required
      - `personId` unknown, required
    - `secondEvent` AckdbEntityEvent, required: Immutable company or human activity. Sole-person events have null entityId/contactId and a non-null personId, even when the human has employers.
      - `id` string, required: ULID identifier for the event.
      - `entityId` unknown, required
      - `source` string, required: Source system that produced this event.
      - `eventType` string, required: Type of event (e.g. message, payment, subscription_change).
      - `summary` string, required: Human-readable summary of the event.
      - `metadata` object, required: Source-specific event metadata.
      - `timestamp` string, date-time, required: When this event occurred in the source system.
      - `createdAt` string, date-time, required: When this event record was created in ackDB.
      - `contactId` unknown, required
      - `personId` unknown, required
    - `grain` 'company' | 'person'
    - `personId` unknown
    - `personName` unknown
  - `pagination` AckdbPaginationMeta, required: Pagination metadata included in paginated responses.
    - `total` integer, required: Total number of records matching the query.
    - `limit` integer, required: Maximum number of records returned in this response.
    - `offset` integer, required: Number of records skipped.
    - `totalIsLowerBound` boolean: When true, `total` is a lower bound rather than an exact count. The Observe company query returns this when the count query was rejected or timed out and the result count was clamped (e.g. total=1000, totalIsLowerBound=true).

## Other responses

- `422`: Missing required parameters (firstEventType and secondEventType)

---

[API](https://skmtc.dev/floqer/apis/floqer-public-api.md) - [All operations](https://skmtc.dev/floqer/apis/floqer-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/floqer/apis/floqer-public-api/revisions/fce50dc07b20?raw)
