Minderblock API Documentation
Welcome to the Minderblock API documentation. Our API is designed to be predictable and developer-friendly, allowing you to integrate our powerful AI chat and customer support features directly into your applications.
Whether you're building a custom dashboard, integrating with your CRM, or creating a unique customer experience, our RESTful API provides the tools you need. All API requests are made over HTTPS and responses are returned in JSON format.
Authentication
To use the Minderblock API, you need to include an API key in your requests. You can generate and manage your API keys from your Minderblock dashboard under Settings > API Keys.
Authenticate your API requests by providing your key in the Authorization
header with the Bearer
scheme.
Authorization: Bearer YOUR_API_KEY
Important: Keep your API keys secure! Do not expose them in client-side code. All API requests should be made from a secure server environment.
Your First Request
Let's make a simple request to verify your setup. We'll fetch a list of your conversations. Replace YOUR_API_KEY
with the key you generated.
Using cURL:
curl https://api.minderblock.com/v1/conversations \
-H "Authorization: Bearer YOUR_API_KEY"
Using JavaScript Fetch:
fetch('https://api.minderblock.com/v1/conversations', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));
If successful, you'll receive a JSON response with a list of conversation objects, which might be empty if you haven't had any chats yet.
Conversations
List all conversations
Retrieves a paginated list of all conversations associated with your account.
GET /v1/conversations
Example Response:
{
"data": [
{
"id": "conv_12345",
"customerName": "John Doe",
"lastMessage": "Thanks for your help!",
"createdAt": "2025-08-15T10:30:00Z"
}
],
"hasMore": false
}
Messages
Send a message
Sends a new message from an agent to an existing conversation.
POST /v1/conversations/{conversationId}/messages
Body Parameters:
text
(string, required): The content of the message.agentId
(string, required): The ID of the agent sending the message.
Example Request:
fetch('https://api.minderblock.com/v1/conversations/conv_12345/messages', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'Hello! How can I assist you further?',
agentId: 'agent_abc'
})
});
Widget
Update widget settings
Updates the appearance and behavior of the chat widget on your website.
POST /v1/widget/settings
Body Parameters:
primaryColor
(string, optional): Hex code for the widget's main color (e.g., "#4F46E5").welcomeMessage
(string, optional): The initial greeting message shown to visitors.