AI observability
dataset_items

Create an item and its first immutable version. An identical client item ID retry returns the existing item. A different payload or an archived match returns a conflict.

post/api/projects/{project_id}/dataset_items/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/dataset_items/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

datasetstring uuid required

Dataset that will own the item.

client_item_idstring nullable

Optional case-sensitive stable key used for idempotent creates. It cannot be changed.

metadataobject

Optional JSON object with item metadata.

source_trace_idstring nullable

Trace ID copied from the source event.

source_event_idstring nullable

Event ID copied from the source trace.

source_timestampstring date-time nullable

Timestamp needed to retrieve the event-backed source trace.

Response

idstring uuid required

Stable dataset item ID shared by every version.

datasetstring uuid required

Dataset that owns the item.

client_item_idstring nullable required

Optional caller-owned stable key that cannot be changed.

versioninteger required
version_idstring uuid required

ID of this immutable item version.

dataset_revisioninteger required

Dataset revision that introduced this item version.

dataset_revision_idstring uuid required

ID of the dataset revision that introduced this item version.

archivedboolean required
metadataobject required

JSON object with item metadata.

source_trace_idstring nullable required
source_event_idstring nullable required
source_timestampstring date-time nullable required
created_atstring date-time required

When the stable item was created.

updated_atstring date-time nullable required

When the item last received a new version.

version_created_atstring date-time required

When this immutable version was created.

team_idinteger required

Project that owns the item.

Changes

No recorded changes to this operation across all 1 revision of this API.