Chats
Create Chat
Creates a new chat, or optionally opens an existing one.
AuthorizationBearer <token>
All the DevRev APIs require a token to authenticate the user. Provide Authorization: Bearer <TOKEN>
as a header to every API request.
How do I find my token?
In: header
is_default?boolean
Whether this is the default DM for messaging the constituent users. If true, then this DM is always returned when opening a DM for the users. Note only one DM may be the default for a given set of users. By Default, this is true.
records?array<string>
The associated records for this DM.
Items
items <= 16
usersarray<string>
The users to send direct messages to. The authenticated user must be included in this list.
Items
1 <= items <= 16
Response Body
curl -X POST "https://api.devrev.ai/chats.create" \ -H "Content-Type: application/json" \ -d '{ "type": "string", "users": [ "DEVU-12345" ] }'
{
"chat": {
"type": "string"
}
}
{
"detail": "string",
"message": "string",
"type": "artifact_already_attached_to_a_parent",
"existing_parent": "string",
"is_same": true
}
{
"detail": "string",
"message": "string",
"type": "unauthenticated"
}
{
"detail": "string",
"message": "string",
"type": "forbidden"
}
{
"detail": "string",
"message": "string",
"type": "too_many_requests",
"retry_after": 0
}
{
"detail": "string",
"message": "string",
"type": "internal_error",
"reference_id": "string"
}
{
"detail": "string",
"message": "string",
"type": "service_unavailable"
}