Skip to content

Get the org's operational event feed (Ops Rail)

GET
/v1/operations
curl --request GET \
--url 'https://dev-api.infiniteaudience.ai/v1/operations?scope=org&limit=200&event_type=segment.build.started' \
--header 'Authorization: Bearer <token>'

Returns operational events (segment builds, refreshes, deliveries, and micro-batch matches) as a persisted, append-only log — replacing the former campaign-scoped GET /v1/campaigns/{id}/operations, which read a live snapshot of segment/delivery documents instead. Because this reads a real transition log, a single async operation (e.g. a matched-segment build) can appear as multiple events over time (started, completed or failed), each with its own timestamp and status.

Scope: Defaults to every event across the org (scope=org). Pass scope=user to see only events initiated by the caller. Optionally narrow further with event_type and campaign_id. “org” always means whichever org the caller is currently acting as — for a Parent-Org/ agency member this is the child org they’ve toggled to (x-target-org-id), not a fixed home org. Returns 400 NO_ORG_CONTEXT if the caller has no org context at all (an agency member who hasn’t toggled to a child org yet).

Window: Defaults to the last 3 hours (since omitted). Pass an explicit since/before window to look further back — this log is retained for 2 years (it also backs the org’s Admin Audit Log view).

Requires ‘discovery’ scope.

scope
string
default: org
Allowed values: org user

org returns events from every member of the caller’s org; user restricts results to events initiated by the caller.

since
string format: date-time

Only return events at or after this timestamp. Defaults to 3 hours before the request time.

before
string format: date-time

Only return events strictly before this timestamp — combine with the oldest ts from a prior page to page further back in time.

limit
integer
default: 200 <= 500
event_type

The full set of operational event types the Ops Rail / audit log can record — a superset of the four webhook event strings (segment.ready, segment.failed, delivery.completed, delivery.failed), which map onto segment.build.completed, segment.build.failed, delivery.completed, and delivery.failed respectively.

string
Allowed values: segment.build.started segment.build.progress segment.build.completed segment.build.failed segment.created segment.promoted segment.refresh.started segment.refresh.completed segment.refresh.failed audience.created audience.updated audience.build.failed delivery.started delivery.completed delivery.failed match.microbatch.completed integration.enrichment.started integration.enrichment.completed integration.enrichment.failed invoice.paid invoice.collection_failed invoice.collection_recovered billing.auto_recharge_updated billing.provisioning.started billing.provisioning.progressed billing.provisioning.completed billing.provisioning.failed subscription.tier_changed subscription.commitment_renewed subscription.cancellation_scheduled subscription.cancellation_reverted subscription.external_plan_activated subscription.external_plan_suspended org.provisioned agency.provisioned
campaign_id
string

Restrict to events associated with this campaign (most segment, audience, and micro-batch-match activity has no campaign association at all — this filter only matches events that do).

Operational events, most recent first.

Media typeapplication/json
object
events
required
Array<object>

A single, immutable status transition in the org’s operational event log. Multiple events can share the same operation_key — e.g. a matched-segment build emits a segment.build.started event and, later, a separate segment.build.completed (or .failed) event, each with its own ts.

object
event_id
required
string
org_id
required
string
type
required

The full set of operational event types the Ops Rail / audit log can record — a superset of the four webhook event strings (segment.ready, segment.failed, delivery.completed, delivery.failed), which map onto segment.build.completed, segment.build.failed, delivery.completed, and delivery.failed respectively.

string
Allowed values: segment.build.started segment.build.progress segment.build.completed segment.build.failed segment.created segment.promoted segment.refresh.started segment.refresh.completed segment.refresh.failed audience.created audience.updated audience.build.failed delivery.started delivery.completed delivery.failed match.microbatch.completed integration.enrichment.started integration.enrichment.completed integration.enrichment.failed invoice.paid invoice.collection_failed invoice.collection_recovered billing.auto_recharge_updated billing.provisioning.started billing.provisioning.progressed billing.provisioning.completed billing.provisioning.failed subscription.tier_changed subscription.commitment_renewed subscription.cancellation_scheduled subscription.cancellation_reverted subscription.external_plan_activated subscription.external_plan_suspended org.provisioned agency.provisioned
status
required

The status at this specific timestamp (e.g. pending, processing, completed, failed).

string
is_terminal
required

False means the underlying operation was still in flight as of this event — the Ops Rail renders these with a pulsing marker.

boolean
operation_key
required

Stable identifier for the underlying operation (e.g. segment:seg_123, delivery:del_456) — groups multiple events into one timeline.

string
actor_uid
required

UID of the user who initiated this specific transition.

string | null
campaign_id
required
string | null
subject
required
object
kind
required
string
Allowed values: segment audience delivery match invoice subscription org agency
id
required
string
name
required
string | null
subtype
required
string | null
Allowed values: filter matched similarity propensity
category
required
string
Allowed values: operational
payload
required

Event-type-specific extras (e.g. progress_pct, destination, failure_reason, record_count) — shape varies by type.

object
key
additional properties
any
ts
required
string format: date-time
total
required
integer
Examples
Examplemixed_events

A completed delivery and an in-progress segment build

{
"events": [
{
"event_id": "evt_abc",
"org_id": "org_789",
"type": "delivery.completed",
"status": "completed",
"is_terminal": true,
"operation_key": "delivery:del_abc",
"actor_uid": "user_123",
"campaign_id": null,
"subject": {
"kind": "delivery",
"id": "del_abc",
"name": null
},
"subtype": null,
"category": "operational",
"payload": {
"destination": "download",
"record_count": 47821
},
"ts": "2026-05-30T18:08:43Z"
},
{
"event_id": "evt_def",
"org_id": "org_789",
"type": "segment.build.started",
"status": "pending",
"is_terminal": false,
"operation_key": "segment:seg_456",
"actor_uid": "user_123",
"campaign_id": null,
"subject": {
"kind": "segment",
"id": "seg_456",
"name": "Lookalike v2"
},
"subtype": "similarity",
"category": "operational",
"payload": {},
"ts": "2026-05-30T18:10:00Z"
}
],
"total": 2
}

Invalid request — malformed body, missing required attribute, or failed validation. See error and message for details.

Media typeapplication/json
object
error
required

Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.

string
message

Human-readable explanation of the error.

string
code

Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.

string
request_id

Opaque support/debug identifier when available.

string
key
additional properties
any
Examples
Examplevalidation_error
{
"error": "Bad Request",
"code": "MISSING_SEGMENTS",
"message": "segment_ids is required for filter audiences."
}

Missing or invalid Bearer token. Obtain one via POST /v1/auth/token. When a token was supplied but rejected, code distinguishes TOKEN_EXPIRED (the token’s lifetime has passed — request a new one via POST /v1/auth/token and retry) from TOKEN_INVALID (malformed or revoked — re-authenticate).

Media typeapplication/json
object
error
required

Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.

string
message

Human-readable explanation of the error.

string
code

Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.

string
request_id

Opaque support/debug identifier when available.

string
key
additional properties
any
Examples
{
"error": "Unauthorized: Missing or invalid Authorization header"
}

Token is valid but lacks the required scope for this endpoint. Check the endpoint description for the required scope (discovery, purchase, or account).

Media typeapplication/json
object
error
required

Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.

string
message

Human-readable explanation of the error.

string
code

Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.

string
request_id

Opaque support/debug identifier when available.

string
key
additional properties
any
Examples
Examplemissing_scope
{
"error": "SCOPE_REQUIRED",
"message": "This endpoint requires the purchase scope."
}