curl --request POST \
--url http://localhost:3000/api/messaging/sessions \
--header 'Content-Type: application/json' \
--data '{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"platform": "<string>",
"username": "<string>",
"discriminator": "<string>",
"avatar": "<string>"
}
}'
{
"sessionId": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"metadata": {}
}
Create a new conversation session with an agent
curl --request POST \
--url http://localhost:3000/api/messaging/sessions \
--header 'Content-Type: application/json' \
--data '{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"platform": "<string>",
"username": "<string>",
"discriminator": "<string>",
"avatar": "<string>"
}
}'
{
"sessionId": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"metadata": {}
}
Session created successfully
The response is of type object
.
Was this page helpful?