Skip to content
On this page

AssistantSession

Mint an AI Assistant session

POST /api/v1/assistant/session

Requires authentication (Bearer token) and the X-Organization-Id header.

Exchanges the caller's already-validated platform credentials for a short-lived AI Assistant session token, scoped to the active organization (X-Organization-Id). The exchange happens server-to-server between the platform and the first-party assistant service — clients cannot mint assistant sessions themselves. Re-issuable on demand: renew by calling again before expires_in elapses. Chat traffic then flows directly between the client and the assistant service using the returned session token.

Request body

Field Type Required Description
organization_id string no An explicit body organization_id must agree with the resolved org context — silently preferring one over the other would let a stale client mint a session for an org it did not intend.

Responses

Status Description
200

Example request

curl -X POST "https://app.encryptinvoice.com/api/v1/assistant/session" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "string"
}'

We use cookies and privacy-respecting analytics

We use essential cookies for authentication and privacy-respecting analytics (self-hosted, respects Do Not Track). No advertising or third-party tracking. Learn more in our Privacy Policy