Tensile Docs

POST /capture-session

Open a conversation in Tensile. Call once per conversation with a session_id you reuse on every event that follows.

Registers a conversation (session) in Tensile. Send this once when a conversation begins, then reference the same session_id on every event you capture for it.

POST https://ingest-production-9936.up.railway.app/api/v1/capture-session

Headers

HeaderValueRequired
x-api-keyYour API key, sk_...Yes
Content-Typeapplication/jsonYes

Body

FieldTypeRequiredDescription
session_idUUIDYesIdentifier for this conversation. Reuse it on every event in the conversation.
user_dataobjectYesDetails about the end user. Must contain user_id. Additional traits are allowed (keep them pseudonymous).
metadataobjectNoFree-form session-level metadata. Allowlist the keys you send.
timestampinteger (ms)NoEpoch milliseconds for when the session started. Defaults to server time.
client_configstringNoA label for the client or SDK that produced the session.

user_data

user_data must include a user_id. Any further keys are stored as traits on the user profile and become filterable dimensions in the dashboard.

FieldTypeRequiredDescription
user_idstringYesPseudonymous end-user identifier.
...traitsanyNoExtra attributes such as plan or region.

Request

curl https://ingest-production-9936.up.railway.app/api/v1/capture-session \
  -H "x-api-key: sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "6f9c1b8e-3d2a-4a1f-9c7b-2e5d0a4b1c33",
    "user_data": {
      "user_id": "user_8f21",
      "plan": "enterprise",
      "region": "eu-west"
    },
    "metadata": {
      "source": "web-widget"
    },
    "client_config": "support-bot/1.4.0"
  }'

Response

{
  "session_id": "6f9c1b8e-3d2a-4a1f-9c7b-2e5d0a4b1c33"
}

On this page