API Reference
Interactive reference for all 34 VelaFlows microservices. Each service exposes REST endpoints through the API gateway.
Base URL
All API requests go through the gateway:
https://api.velaflows.com/api/v1For local development, the gateway runs on port 4000:
http://localhost:4000/api/v1Authentication
Every authenticated request requires two headers:
| Header | Description | Example |
|---|---|---|
Authorization | Bearer token from login or API token | Bearer eyJhbGciOiJIUzI1NiIs... |
x-workspace-id | The workspace to operate in | 6612a1b2c3d4e5f6a7b8c9d0 |
Obtain tokens via the Auth API login endpoint, or create long-lived API tokens in Settings > API Tokens in the dashboard.
Response Format
Success Response
All successful responses follow this envelope:
{
"success": true,
"data": {
"user": { "_id": "abc123", "email": "john@example.com" }
}
}Paginated Response
List endpoints return paginated results:
{
"success": true,
"data": {
"items": [
{ "_id": "abc123", "name": "Item 1" },
{ "_id": "def456", "name": "Item 2" }
],
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"totalPages": 5
}
}
}Query parameters for pagination:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-indexed) |
limit | integer | 20 | Items per page (max 100) |
search | string | — | Full-text search query |
sortBy | string | createdAt | Field to sort by |
sortOrder | string | desc | Sort direction: asc or desc |
Error Response
Errors return a structured error object:
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": {
"resourceId": "abc123"
}
}
}Common error codes:
| HTTP Status | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Invalid request body or parameters |
| 401 | UNAUTHORIZED | Missing or invalid authentication token |
| 403 | FORBIDDEN | Insufficient permissions for this action |
| 404 | NOT_FOUND | Resource does not exist |
| 409 | CONFLICT | Resource already exists or state conflict |
| 422 | VALIDATION_ERROR | Request body failed validation |
| 429 | TOO_MANY_REQUESTS | Rate limit exceeded |
| 500 | INTERNAL_ERROR | Server error |
Validation Errors
When request validation fails (422), the details object contains field-level errors:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"errors": [
{ "path": "email", "message": "Invalid email address" },
{ "path": "password", "message": "Must be at least 8 characters" }
]
}
}
}Rate Limits
Rate limiting is applied at the gateway level. Default limits:
| Scope | Limit | Window |
|---|---|---|
| General API | 100 requests | 15 seconds |
| Authentication | 5 requests | 15 minutes |
| File uploads | 10 requests | 1 minute |
When rate-limited, the response includes a 429 status code. Wait and retry after the window resets.
Services
| Service | Base Path | Endpoints | Description |
|---|---|---|---|
| Auth | /auth | 90 | Authentication, workspaces, members, roles, permissions |
| API Tokens | /api-tokens | 11 | API token management |
| Custom Properties | /custom-properties | 17 | Custom fields for entities |
| Tags | /tags | 20 | Entity tagging system |
| Macros | /macros | 8 | Quick reply templates |
| Inbox | /inbox | 68 | Conversations, messages, assignments, SLA |
| Channels | /channels | 138 | WhatsApp, Telegram, Instagram, Messenger |
| Broadcast | /broadcast | 23 | WhatsApp bulk messaging |
/mail | 13 | Email integration via Unipile | |
| Live Chat | /live-chat | 28 | Live chat widget management |
| Widget Gateway | /widget-gateway | 1 | WebSocket gateway for chat widgets |
| Telegram Bot | /telegram-bot | 19 | Native Telegram bot management |
| CRM | /crm | 51 | Pipelines, leads, activities, tasks |
| Customer | /customers | 29 | Contact management |
| Registration | /registrations | 15 | Lead registrations |
| Broker | /brokers | 18 | Broker management |
| FTD Tiers | /ftd-tiers | 11 | FTD tier configuration |
| Bonus | /bonus | 7 | Bonus scheme management |
| Postback | /postback | 14 | Postback handling |
| AI Assistant | /ai-assistant | 111 | AI features, knowledge base, RAG |
| Data Enrichment | /data-enrichment | 26 | Apollo.io, ZeroBounce, Lusha |
| Analytics | /analytics | 26 | Aggregated analytics |
| Stripe Accounts | /stripe-accounts | 41 | Stripe integration and payments |
| Shopify | /shopify | 26 | Shopify store integration |
| Scheduling | /scheduling | 32 | Cal.com scheduling integration |
| Meta Ad Accounts | /meta-ad-accounts | 18 | Facebook/Instagram ad accounts |
| LinkedIn Prospecting | /linkedin-prospecting | 99 | LinkedIn outreach and campaigns |
| X (Twitter) | /x-integration | 37 | X DMs, mentions, content scheduling |
/reddit | 8 | Reddit social listening | |
| Notion | /notion | 17 | Notion workspace integration |
| Forms | /forms | 16 | Typeform and JotForm integration |
| Tracking | /tracking | 21 | Meta Pixel CAPI and GA4 tracking |
| Integrations | /integrations | 11 | Zapier and Make.com webhooks |
| Workflows | /workflows | 11 | Workflow automation engine |