cURL
curl --request POST \ --url https://api.duohub.ai/sessions/create \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data ' { "sessionID": "123e4567-e89b-12d3-a456-426614174000", "customerUserID": "cust-123", "metadata": [ { "key": "source", "value": "web" } ] } '
{ "status": "success", "data": { "id": "123e4567-e89b-12d3-a456-426614174000", "userID": "d99e7428-40e1-7073-aa50-94cee086b518", "customerUserID": "cust-123", "metadata": [ { "key": "source", "value": "web" } ], "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-01T00:00:00.000Z", "deletedAt": null, "endedAt": null } }
Create a new session
Your duohub API key. Type: str
Unique identifier for the session
Optional ID of the customer user
Optional metadata for the session
Show child attributes
Metadata key
Metadata value
Session created successfully
success
Session unique identifier
User ID
Customer user ID
Creation timestamp
Last update timestamp