Contacts and Chats API Reference #
Comprehensive API documentation for managing contacts and chat conversations in Flowmatix. Build powerful integrations with our RESTful API endpoints.
Authentication #
All API requests require authentication using API keys:
Authorization: Bearer YOUR_API_KEY
API keys can be generated in your Flowmatix account settings under API Management.
Contacts API #
Create Contact #
POST /api/v1/contacts
{
"name": "John Doe",
"phone": "+1234567890",
"email": "john@example.com",
"tags": ["customer", "vip"],
"custom_fields": {
"company": "Acme Corp",
"source": "website"
}
}
Get Contact #
GET /api/v1/contacts/{contact_id}
Retrieve detailed information about a specific contact including conversation history and custom fields.
Update Contact #
PUT /api/v1/contacts/{contact_id}
Update contact information, tags, and custom fields. Only provided fields will be updated.
List Contacts #
GET /api/v1/contacts
Parameters:
limit– Number of contacts to return (max 100)offset– Pagination offsetsearch– Search by name, phone, or emailtags– Filter by tags
Chats API #
Send Message #
POST /api/v1/chats/send
{
"contact_id": "contact_123",
"message": "Hello! How can I help you today?",
"type": "text",
"channel": "whatsapp"
}
Get Conversation #
GET /api/v1/chats/{contact_id}/messages
Retrieve message history for a specific contact with pagination support.
Send Media Message #
POST /api/v1/chats/send-media
{
"contact_id": "contact_123",
"media_url": "https://example.com/image.jpg",
"type": "image",
"caption": "Check out our latest product!"
}
Webhooks #
Configure webhooks to receive real-time notifications:
- message.received – New incoming message
- message.delivered – Message delivery confirmation
- contact.created – New contact added
- contact.updated – Contact information changed
Rate Limits #
- Standard Plan: 1,000 requests per hour
- Pro Plan: 5,000 requests per hour
- Enterprise Plan: 10,000 requests per hour
Error Handling #
API returns standard HTTP status codes with detailed error messages in JSON format.
