Documentation
Everything you need to integrate Wazen into your application.
Complete reference for the Wazen REST API v1.
Authentication
All API requests require an API key passed in the Authorization header:
Authorization: Bearer wz_your_api_keyCreate API keys in your Dashboard. Base URL: https://wazen.dev/api/v1
Navigate Endpoints
POST
/api/v1/api-keysCreate API key
Generate a new API key for authenticating requests. The raw key is returned only once in the response — store it securely. All subsequent requests use this key in the Authorization header.
Parameters
namerequiredstringin body
A descriptive name for the key (1-255 characters)
Request Body
{
"name": "production-key"
}Response
The raw key is included only in the creation response. Store it immediately.
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "production-key",
"key": "wz_a1b2c3d4e5f6...",
"created_at": "2026-03-21T12:00:00Z"
}
}Code Examples
curl -X POST https://wazen.dev/api/v1/api-keys \
-H "Authorization: Bearer wz_your_key" \
-H "Content-Type: application/json" \
-d '{"name": "production-key"}'All endpoints
Every endpoint in the API. Pick one to see its parameters, responses and code examples.
API Keys
- POST
/api/v1/api-keysCreate API keyGenerate a new API key for authenticating requests. The raw key is returned only once in the response — store it securely. All subsequent requests use this key in the Authorization header. - GET
/api/v1/api-keysList API keysRetrieve all API keys for your account. Keys are returned with metadata only — the raw key value is never shown after creation. - DELETE
/api/v1/api-keys/:idRevoke API keyPermanently revoke an API key. Any applications using this key will immediately lose access. This action cannot be undone.
Sessions
- POST
/api/v1/sessionsCreate sessionCreate a new WhatsApp session. After creation, the session will be in 'pending' status. Use the QR code endpoint to pair with a phone. - GET
/api/v1/sessionsList sessionsList all WhatsApp sessions for your account with their current status, phone numbers, and connection timestamps. - GET
/api/v1/sessions/:idGet session detailsGet detailed information about a specific session including status, phone number, connection time, and QR code availability. - DELETE
/api/v1/sessions/:idDelete sessionPermanently delete a session. This disconnects the WhatsApp connection, removes stored auth state, and deletes all associated message history. - POST
/api/v1/sessions/:id/restartRestart sessionRestart a session connection. Useful when the connection is stale or in a disconnected state. The session will attempt to reconnect using stored auth state. - GET
/api/v1/sessions/:id/qrGet QR codeGet the current QR code for pairing a phone. The QR code is only available when the session is in 'pending' or 'connecting' status. Scan it with WhatsApp > Settings > Linked Devices. - POST
/api/v1/sessions/:id/factory-resetFactory reset sessionCompletely reset a session — clears auth state, removes stored credentials, and resets the session to a fresh 'pending' state. You will need to scan a new QR code.
Messages
- POST
/api/v1/sessions/:id/messagesSend messageSend a WhatsApp message to a phone number. Supports text, image, video, audio, and document types. Text messages require the content field; media messages require either media_url or media_base64. Messages are queued and delivered with smart pacing. The status then moves on its own: "sent" means WhatsApp accepted the message, "delivered" that it reached the recipient's phone, "read" that they opened it. A send that fails is retried up to 4 more times over about 30 seconds; the message stays "queued" until then, and message.failed fires once, after the last attempt. A number that isn't on WhatsApp fails at once with error "not_on_whatsapp". - GET
/api/v1/sessions/:id/messagesGet message historyRetrieve message history for a session. Results are paginated and can be filtered by direction (incoming/outgoing) and message type. A failed outgoing message carries its reason in error, such as "not_on_whatsapp" or "whatsapp_463" (WhatsApp's own code). - GET
/api/v1/sessions/:id/messages/:msgIdGet single messageRetrieve details of a specific message by its ID, including delivery status, timestamps, and content. - GET
/api/v1/sessions/:id/messages/:msgId/mediaDownload message mediaDownload the raw bytes of an inbound media message (image, video, audio, or document). Returns the file with its original Content-Type. The URL is stable for the lifetime of the message — store it and re-fetch any time. For outbound messages or text messages, this endpoint returns 404. Media is retained per your account's retention policy.
Groups
- GET
/api/v1/sessions/:id/groupsList groupsList all WhatsApp groups the session is part of, including group metadata like subject, description, and participant count. - POST
/api/v1/sessions/:id/groupsCreate groupCreate a new WhatsApp group with specified participants. You must provide at least one participant phone number. - GET
/api/v1/sessions/:id/groups/:groupIdGet group detailsGet detailed metadata for a specific WhatsApp group including subject, description, owner, and full participant list. - PUT
/api/v1/sessions/:id/groups/:groupIdUpdate groupUpdate group subject or description. At least one field must be provided. - DELETE
/api/v1/sessions/:id/groups/:groupIdLeave groupLeave a WhatsApp group. The session will no longer be a member of this group. - POST
/api/v1/sessions/:id/groups/:groupId/participantsManage participantsAdd, remove, promote, or demote group participants. You must be a group admin for most operations. - POST
/api/v1/sessions/:id/groups/:groupId/messagesSend group messageSend a message to a WhatsApp group. Supports text and media types just like direct messages, with the same retries. Group messages stay at "sent": WhatsApp reports delivery per member, not per message. - GET
/api/v1/sessions/:id/groups/:groupId/inviteGet group invite codeGet the invite code and link for a WhatsApp group. - DELETE
/api/v1/sessions/:id/groups/:groupId/inviteRevoke group inviteRevoke the current invite code and generate a new one. - GET
/api/v1/sessions/:id/groups/:groupId/requestsList join requestsList pending join requests for a group that requires admin approval. - POST
/api/v1/sessions/:id/groups/:groupId/requestsHandle join requestsApprove or reject pending join requests for a group. - PUT
/api/v1/sessions/:id/groups/:groupId/settingsUpdate group settingsUpdate group settings like announcements mode, lock, ephemeral messages, member add permissions, and join approval. - GET
/api/v1/sessions/:id/groups/invite-infoGet group info from invite codeLook up group metadata using an invite code without joining the group. - POST
/api/v1/sessions/:id/groups/joinJoin group via inviteJoin a WhatsApp group using an invite code.
Channels
- POST
/api/v1/sessions/:id/channelsCreate channelCreate a new WhatsApp channel (newsletter). Channels allow you to broadcast messages to followers. - GET
/api/v1/sessions/:id/channelsLook up channelLook up a WhatsApp channel by its JID or invite code. Provide exactly one of ?jid= or ?invite= as a query parameter. - POST
/api/v1/sessions/:id/channels/:chId/messagesSend to channelSend a message to a WhatsApp channel. Only channel admins can send messages. Supports text and media types, with the same retries as direct messages. Channel messages stay at "sent": channels have no delivery receipts. - GET
/api/v1/sessions/:id/channels/:chId/messagesGet channel messagesFetch recent messages from a WhatsApp channel. Control pagination with count, since, and after query parameters. - GET
/api/v1/sessions/:id/channels/:chIdGet channel detailsGet metadata for a specific WhatsApp channel by its JID. - PUT
/api/v1/sessions/:id/channels/:chIdUpdate channelUpdate a channel's name or description. - DELETE
/api/v1/sessions/:id/channels/:chIdDelete channelDelete a WhatsApp channel you own. - POST
/api/v1/sessions/:id/channels/:chId/followFollow channelFollow a WhatsApp channel to receive its updates. - DELETE
/api/v1/sessions/:id/channels/:chId/followUnfollow channelUnfollow a WhatsApp channel. - POST
/api/v1/sessions/:id/channels/:chId/muteMute channelMute notifications from a WhatsApp channel. - DELETE
/api/v1/sessions/:id/channels/:chId/muteUnmute channelUnmute notifications from a WhatsApp channel. - POST
/api/v1/sessions/:id/channels/:chId/messages/:msgId/reactReact to channel messageReact to a message in a WhatsApp channel with an emoji. Send without reaction to remove.
Contacts
- POST
/api/v1/sessions/:id/contacts/checkCheck contactCheck if a phone number is registered on WhatsApp. Returns the WhatsApp JID if the number is registered. - POST
/api/v1/sessions/:id/contacts/bulk-checkBulk check contactsCheck multiple phone numbers at once (up to 500). Returns which numbers are registered on WhatsApp.
Warming
- POST
/api/v1/sessions/:id/warmingStart warmingStart the 14-day warming program for a session. Provide 3-50 real contacts who will receive natural-looking messages to build sender reputation. The warming module automatically ramps volume over 14 days. - GET
/api/v1/sessions/:id/warmingGet warming statusGet the current warming status including day progress, messages sent today, and overall warming health. - POST
/api/v1/sessions/:id/warming/pausePause warmingTemporarily pause the warming program. The day counter is preserved and resumes from where it stopped. - POST
/api/v1/sessions/:id/warming/resumeResume warmingResume a paused warming program from where it left off. - DELETE
/api/v1/sessions/:id/warmingCancel warmingPermanently cancel the warming program. This cannot be undone — you would need to start a new warming program.
Webhooks
- POST
/api/v1/webhooksCreate webhookRegister a webhook URL to receive real-time notifications. Subscribe to specific event types and optionally filter by session. Webhook payloads are signed with HMAC-SHA256. - GET
/api/v1/webhooksList webhooksList all registered webhooks with their event subscriptions and enabled status. - PUT
/api/v1/webhooks/:idUpdate webhookUpdate webhook URL, events, enabled status, or retry configuration. All fields are optional — only provided fields are updated. - DELETE
/api/v1/webhooks/:idDelete webhookPermanently delete a webhook. You will stop receiving notifications at this endpoint. - POST
/api/v1/webhooks/:id/testTest webhookSend a test event to your webhook endpoint to verify it's receiving and processing events correctly. - GET
/api/v1/webhooks/:id/logsGet webhook delivery logsGet the delivery history for a specific webhook. Returns the most recent 50 delivery attempts with status codes and payloads.