Remove sessions from an Agent Analytics dataset

Removes sessions from a dataset. The sessions themselves are untouched;
only their dataset membership is removed. Sessions that are not in the
dataset are ignored, so the call is safe to repeat.

Takes the same body as the add operation, so an add is undone in one call
rather than one call per session. dry_run=true validates the dataset and
the session ids without mutating, returning 204 on a hit and 404 if the
dataset does not exist.

delete/v1/projects/{project_id}/agent-analytics/datasets/{dataset_id}/sessions

Authorizations

Authorizationstringrequired

http

Path parameters

project_idstringrequired

Amplitude project identifier, backed by the canonical app ID.

Example:12345
Constraints:pattern: ^[0-9]+$
dataset_idstringrequired

Stable dataset identifier, returned by create or by the Agent Analytics read surface.

Query parameters

dry_runboolean

Validate request without performing mutation.

Default:false

Header parameters

Idempotency-Keystringrequired

Required on write operations. Keys aren't stored yet, so retrying a write with the same key performs it again; a retried create makes another resource. Check whether the first attempt succeeded before you retry.

Constraints:min length: 8max length: 255

Body

application/json
session_idsstring[]required

Session identifiers. All must belong to the path project.

Response

application/json

Was this helpful?

For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.