Skip to main content

Get or create episodes

Request

Create new episodes, or return existing ones. An existing episode is returned when the time range, member recordings, and custom properties of its latest version exactly match the request. A request without custom properties matches only an episode whose latest version has none.

An episode's time range is a closed window from startTime to endTime, at nanosecond precision. Equal times describe a single instant.

Omit startTime and endTime to infer the time range from the recordings. Alternatively, provide eventId to snapshot the event's time range, including an instant event, and the completed recordings overlapping its device and time range. Event inputs in one request can resolve at most 10,000 recording memberships.

Across all episodes[].recordings lists, a request may contain at most 100,000 recording memberships. Duplicate recording IDs within an episode count once; a recording listed in multiple episodes counts once per episode.

Event edits and later imports do not change existing episodes.

Security
ApiKey(Required scopes: episodes.create)
Bodyapplication/jsonrequired
projectIdstring, non-emptyrequired

ID of the project the episodes belong to.

episodesArray of objects, <= 2000 itemsrequired

The episodes to get or create. Must contain at least one episode.

Payload
{ "projectId": "string", "episodes": [ { … } ] }

Responses

The existing or newly created episodes

Bodyapplication/json
episodesArray of objectsrequired

The existing or newly created episodes, in request order.

Response
{ "episodes": [ { … } ] }