API Reference
The Dexra API allows you to programmatically manage conversations, users, and messages. All requests use standard HTTP methods and return JSON responses.
Base URL
https://api.dexra.net/v1Headers
Authorization: Bearer <YOUR_API_KEY>
Content-Type: application/json
Authentication
Dexra uses API keys to authenticate requests. You can view and manage your API keys in theDeveloper Settingsof your dashboard.
Security Notice
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Conversations
Create, retrieve, and update conversation threads.
/conversationsList all conversations
Returns a paginated list of conversations for the authenticated workspace.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Max number of results (default 20, max 100). |
| cursor | string | Pagination cursor for the next page. |
| status | string | Filter by status: "open", "closed", "snoozed". |
curl -X GET https://api.dexra.net/v1/conversations?limit=10&status=open \
-H "Authorization: Bearer YOUR_API_KEY"{
"data": [
{
"id": "conv_892ns",
"status": "open",
"subject": "Billing Question",
"created_at": "2023-10-25T10:00:00Z",
"last_message": {
"id": "msg_123",
"text": "Hello, I need help..."
}
}
],
"meta": {
"total": 154,
"next_cursor": "dXNlcXHJfaWQ9MTI"
}
}/conversationsCreate a conversation
Initiates a new conversation thread with a user.
Parameters
| Name | Type | Description |
|---|---|---|
| user_idREQ | string | The unique ID of the user in your system. |
| subject | string | Initial subject line for the thread. |
| tags | array | Array of tag strings to apply. |
curl -X POST https://api.dexra.net/v1/conversations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": "u_9921",
"subject": "Login Issue",
"tags": ["support", "urgent"]
}'{
"id": "conv_991ms",
"status": "open",
"created_at": "2023-10-25T10:05:00Z"
}/conversations/:idRetrieve a conversation
Get details of a specific conversation by ID.
Parameters
| Name | Type | Description |
|---|---|---|
| idREQ | string | The conversation ID. |
curl -X GET https://api.dexra.net/v1/conversations/conv_991ms \
-H "Authorization: Bearer YOUR_API_KEY"{
"id": "conv_991ms",
"status": "open",
"participants": [...]
}Messages
Send and receive messages.
/messagesSend a message
Post a new message to a specific conversation.
Parameters
| Name | Type | Description |
|---|---|---|
| conversation_idREQ | string | Target conversation ID. |
| contentREQ | string | Message body (Markdown supported). |
| type | string | "text" (default) or "private_note". |
curl -X POST https://api.dexra.net/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"conversation_id": "conv_892ns",
"content": "We have processed your refund.",
"type": "text"
}'{
"id": "msg_772ks",
"conversation_id": "conv_892ns",
"status": "sent",
"timestamp": 1698228000
}Users
Manage customer profiles and attributes.
/users/:idUpdate user attributes
Update custom traits for a user (e.g., plan, location).
Parameters
| Name | Type | Description |
|---|---|---|
| idREQ | string | User ID. |
| string | New email address. | |
| custom_attributes | object | Key-value pairs of custom data. |
curl -X PATCH https://api.dexra.net/v1/users/u_9921 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"custom_attributes": {
"plan": "enterprise",
"ltv": 1200
}
}'{
"id": "u_9921",
"email": "jane@example.com",
"custom_attributes": {
"plan": "enterprise",
"ltv": 1200
}
}