Skip to main content
POST
Create a chat session

Authorizations

API-Token
string
header
required

16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.

Body

application/json
agent_uuid
string
required

Unique identifier of the OSVI agent to chat with. Must be an active, non-archived agent belonging to the account that owns the API token.

Example:

"agent_IsZ3Q6Sf_60Eh26XQMGbz-R_og"

customer_id
string
required

Your identifier for the customer on the other side of the conversation — typically a phone number, but any stable string works. Used to resolve the active session on subsequent messages.

Example:

"+15551112222"

input_fields
object

Arbitrary key-value object describing the customer, made available to the agent at runtime (e.g. name, account tier).

Example:
context
string[]

Initial free-text context entries for the session. Only the most recent 5 non-empty strings are retained (FIFO). Append more later with the inject-context endpoint.

Example:

Response

Session created successfully

success
boolean
Example:

true

data
object

A chat session record.