---
title: "Capture session"
method: POST
path: "/api/v1/capture-session"
tags: ["SDK"]
---

# Capture session

`POST /api/v1/capture-session`

Start a session. Call once per conversation; reuse `session_id` on every event.

## Headers

- `x-org-id` string, required

## Request body

- object
  - `session_id` string, uuid, required — Session UUID. Reuse on every event in this conversation.
  - `user_data` object, required — End-user identity. `user_id` is required; other traits are supported for analytics. The example shows shape, but production integrations should prefer a stable pseudonymous ID and avoid raw email, name, phone, or other personal data unless explicitly approved.
    - `user_id` string, required
  - `metadata` object — Free-form session metadata. Prefer allowlisted operational fields; do not send secrets or sensitive personal data.
  - `timestamp` integer — Unix time in **ms** when the session began. Defaults to server time.
  - `client_config` string — Free-form client/SDK label.

## Response `200`

Session created

- object
  - `session_id` string

## Other responses

- `400` — Invalid request body

---

[API](https://skmtc.dev/agnost/apis/agnost-ai-api.md) · [All operations](https://skmtc.dev/agnost/apis/agnost-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agnost/agnost-ai-api/revisions/ef28b0025c0d/schema)
