Copilots

Create Conversation

POST
OPTIONAL. Create a new conversation with the Copilot. The conversation ID can be used in the sendMessage endpoint. The sendMessage endpoint automatically creates new conversations upon first request, but calling this endpoint can simplify certain use cases where it is helpful for the application to have the conversation ID before the first message is sent.

Request

This endpoint expects an object.
userEmail
stringRequired
End-user for the conversation.

Response

This endpoint returns an object
conversationId
UUID
POST
1curl -X POST https://api.credal.ai/api/v0/copilots/createConversation \
2 -H "Authorization: Bearer <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "userEmail": "ravin@credal.ai"
6}'
200Successful
1{
2 "conversationId": "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
3}