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 a union
Message Reply
Returned when there is a reply fetched from the copilot.
OR
Message Blocked
Returned when Credal detects possible infosec violations and blocks the message.
POST
$curl -X POST https://api.credal.ai/api/v0/copilots/sendMessage \
> -H "Authorization: Bearer <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "message": "Is Credal SOC 2 compliant?",
> "userEmail": "ravin@credal.ai"
>}'
Response
1{
2 "type": "messageReply",
3 "activitySourceIdsForAudit": [],
4 "inserted_audit_log": {
5 "id": "5842804e-ffbe-4f8d-873e-f007fff93440"
6 },
7 "parallelConversationContexts": [],
8 "policy_triggers": [],
9 "responseChunks": [
10 {
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 ],
15 "warnings": []
16}