Copilots

Send Message

POST

Request

This endpoint expects an object.
message
stringRequired
The message you want to send to your copilot.
userEmail
stringRequired
The user profile you want to use when sending the message.
conversationId
UUIDOptional
Credal-generated conversation ID for sending follow up messages. Conversation ID is returned after initial message. Optional, to be left off for first messages on new conversations.

Response

This endpoint returns an object
sendChatResult
union
POST
1curl -X POST https://api.credal.ai/api/v0/copilots/sendMessage \
2 -H "Authorization: Bearer <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "message": "Is Credal SOC 2 compliant?",
6 "userEmail": "ravin@credal.ai"
7}'
200
Successful
1{
2 "sendChatResult": {
3 "type": "ai_response_result",
4 "activitySourceIdsForAudit": [],
5 "conversationId": "fc938005-92db-411a-88eb-32ca50d5f744",
6 "inserted_audit_log": {
7 "id": "5842804e-ffbe-4f8d-873e-f007fff93440"
8 },
9 "policy_triggers": [],
10 "response": {
11 "message": "Based on the context provided, Credal is SOC 2 compliant...",
12 "dataChunk": "...SOC 2 is a technical audit that requires companies to establish and follow strict information security policies and procedures. Credal's SOC 2 report is available upon request..."
13 },
14 "warnings": []
15 }
16}