Connect your product to Vaiket.
One documentation home for WhatsApp messaging and CRM lead capture. Keep credentials server-side.
Quick start
Discover an account, then read its contacts and conversations. Follow a conversation ID to retrieve message history. Existing template sending remains available.
curl https://app.vaiket.com/api/v1/whatsapp/accounts -H "Authorization: Bearer YOUR_VAIKET_API_KEY"Authentication
Every WhatsApp API request uses a Vaiket Bearer API key. Keys must stay in server-side secret storage. Keys currently authorize the tenant-wide developer API surface rather than individual endpoint scopes. The API enforces tenant/account ownership and returns no Meta credentials.
Authorization: Bearer YOUR_VAIKET_API_KEYWhatsApp API
Vaiket resolves the connected WhatsApp account, Phone Number ID, WABA ID, and Meta credentials server-side. Read APIs use tenant-owned persisted WhatsApp data.
Accounts
/api/v1/whatsapp/accountsReturns safe account fields for the authenticated tenant. accounts[].id is the Vaiket account ID, not a Meta ID.
Read contacts
/api/v1/whatsapp/accounts/{account_id}/contactsOptional search, limit (default 50, max 100), and cursor. Search matches name or phone digits. Returns contact ID, name, phone, opt-in state, last message time, and account conversation count. Contact email, address, tags, and provider data are omitted.
curl "https://app.vaiket.com/api/v1/whatsapp/accounts/ACCOUNT_ID/contacts?search=415555&limit=50" -H "Authorization: Bearer YOUR_VAIKET_API_KEY"{
"success": true,
"contacts": [{ "id": "CONTACT_ID", "name": "CUSTOMER_NAME", "phone": "PHONE_DIGITS", "optedIn": true, "lastMessageAt": "2026-01-15T12:00:00.000Z", "conversation_count": 1 }],
"next_cursor": null,
"request_id": "req_PLACEHOLDER"
}Read conversations
/api/v1/whatsapp/accounts/{account_id}/conversationsOptional status (open, active, closed), search, date_from, date_to, limit, and cursor. Date filters use last activity; both dates are inclusive UTC calendar dates. Results use immutable creation-time ordering with ID tie-breaking so activity changes do not move the cursor anchor. Rows include unread count, safe contact summary, and latest message preview.
{
"success": true,
"conversations": [{ "id": "CONVERSATION_ID", "status": "open", "unreadCount": 1, "lastMessageAt": "2026-01-15T12:00:00.000Z", "contact": { "id": "CONTACT_ID", "name": "CUSTOMER_NAME", "phone": "PHONE_DIGITS" }, "latest_message": { "text": "MESSAGE_TEXT", "messageType": "text", "direction": "inbound", "createdAt": "2026-01-15T12:00:00.000Z" } }],
"next_cursor": null,
"request_id": "req_PLACEHOLDER"
}Read message history
/api/v1/whatsapp/conversations/{conversation_id}/messagesOptional date_from, date_to, limit, and cursor. Both inbound (customer) and outbound (business) messages are returned chronologically within each page, with direction, type, text, status, timestamps, and media URL only for the platform's webhook-managed /uploads/wa-inbox/ path. All absolute URLs and other hosts are omitted. Raw provider payloads and internal metadata are excluded. Media bytes are not proxied.
{
"success": true,
"messages": [{ "id": "MESSAGE_ID", "direction": "inbound", "messageType": "text", "text": "MESSAGE_TEXT", "mediaUrl": null, "status": "received", "createdAt": "2026-01-15T12:00:00.000Z", "deliveredAt": null, "readAt": null }],
"next_cursor": null,
"request_id": "req_PLACEHOLDER"
}Account analytics
/api/v1/whatsapp/accounts/{account_id}/analyticsOptional paired date_from and date_to use inclusive UTC dates. Conversations are selected by creation time; open/unread reflect current state for that cohort. Message totals and current status counts use message creation time. Only stored sent, delivered, read, and failed status categories are reported.
{
"success": true,
"analytics": { "timezone": "UTC", "interval": { "date_from": "2026-01-01", "date_to": "2026-01-31", "boundary": "inclusive calendar dates in UTC" }, "conversation_counts": { "total": 10, "open": 4, "unread": 2, "semantics": "Current state for conversations created during the interval." }, "message_counts": { "inbound": 20, "outbound": 15, "by_status": { "sent": 8, "delivered": 4, "read": 2, "failed": 1 }, "semantics": "Current status for messages created during the interval." } },
"request_id": "req_PLACEHOLDER"
}Templates
/api/v1/whatsapp/accounts/{account_id}/templatesTemplates are tenant- and account-scoped. Use an APPROVED template and its exact name and language.
Send messages
/api/v1/whatsapp/messagesSend an approved template with the existing template object, or send free-form text with type: "text" and text.body (1–4096 characters). Text requires explicit stored opt-in and an inbound customer message within the preceding 24 hours; outbound templates never open or extend that window. If eligibility cannot be verified, use an approved template. Link previews default to disabled and are enabled only by text.preview_url: true.
curl -X POST "https://app.vaiket.com/api/v1/whatsapp/messages" \
-H "Authorization: Bearer YOUR_VAIKET_API_KEY" \
-H "Idempotency-Key: YOUR_STABLE_REQUEST_KEY" \
-H "Content-Type: application/json" \
-d '{"whatsapp_account_id":"ACCOUNT_ID","to":"RECIPIENT_PHONE_DIGITS","type":"text","text":{"body":"Hello from Vaiket","preview_url":false}}'Idempotency
Use a stable Idempotency-Key. Reusing the same key and payload replays the logical request; an active request returns request_in_flight. For provider_outcome_uncertain, do not retry with a new key because the first attempt may have reached Meta.
Errors and pagination
Responses include request_id. Errors use a sanitized code/message. Paginated read limits default to 50 and accept 1–100. Pass next_cursor unchanged until it is null. Invalid or incompatible cursors return 400; missing or foreign IDs return 404. All reads are limited to 600 per minute per endpoint and observed IP; authenticated reads also have a 120 per minute per key and endpoint limit. Sends additionally use a database-backed 120 per minute API-key/IP limit and fail closed with rate_limit_unavailable when it cannot be enforced. The in-memory limits are per app process; 429 includes Retry-After.
{ "success": false, "error": { "code": "invalid_query", "message": "Query parameters are invalid.", "request_id": "req_PLACEHOLDER" } }Message lifecycle
sent confirms provider acceptance, not delivery. Later processing may record delivered, read, or failed.
Webhooks
The existing Meta webhook processes inbound messages and delivery status events internally. A customer-configurable external WhatsApp status webhook is not exposed by this API.
Vaiket AI integration walkthrough
Use a server-side secret for the API key. Discover the tenant account, page through contacts and conversations, retrieve each conversation’s messages, then query analytics. All IDs and data in this example are placeholders.
const base = "https://app.vaiket.com/api/v1/whatsapp";\nconst headers = { Authorization: `Bearer ${process.env.VAIKET_API_KEY}` };\nconst { accounts } = await fetch(`${base}/accounts`, { headers }).then(r => r.json());\nconst accountId = accounts[0].id;\nconst contacts = await fetch(`${base}/accounts/${accountId}/contacts?limit=50`, { headers }).then(r => r.json());\nconst chats = await fetch(`${base}/accounts/${accountId}/conversations?limit=50`, { headers }).then(r => r.json());\nconst conversationId = chats.conversations[0]?.id;\nif (conversationId) {\n const history = await fetch(`${base}/conversations/${conversationId}/messages?limit=50`, { headers }).then(r => r.json());\n}\nconst analytics = await fetch(`${base}/accounts/${accountId}/analytics?date_from=2026-01-01&date_to=2026-01-31`, { headers }).then(r => r.json());CRM API
This segment is separate from WhatsApp. Use the CRM base URL https://api.vaiket.com/v1 for lead and form integrations.
Create CRM leads
/v1/crm/leads/createCreate a lead from your website, application, or advertising workflow using the Vaiket Bearer API key.
curl -X POST "https://api.vaiket.com/v1/crm/leads/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"CUSTOMER_NAME","phone":"RECIPIENT_PHONE","email":"CUSTOMER_EMAIL","source":"website"}'Web form submissions
/v1/forms/submitSubmit a configured form using its form ID. The form endpoint accepts a public form payload and applies server-side validation and rate limiting.
curl -X POST "https://api.vaiket.com/v1/forms/submit" \
-H "Content-Type: application/json" \
-d '{"form_id":"FORM_ID","name":"CUSTOMER_NAME","phone":"RECIPIENT_PHONE","email":"CUSTOMER_EMAIL"}'API reference
WhatsApp: /api/v1/whatsapp/accounts, /accounts/{account_id}/contacts, /accounts/{account_id}/conversations, /accounts/{account_id}/analytics, /conversations/{conversation_id}/messages, account templates, and /api/v1/whatsapp/messages.
The complete contract is maintained in docs/whatsapp-external-api.md.
Never put API keys or Meta credentials in client applications.