# WSAPI Docs > Documentation for WSAPI - Open-Source WhatsApp API ## Docs - [Create instance](https://docs.wsapi.chat/api-reference/account/create-instance.md): Creates a new instance on the subscription. Reseller customers only. - [Delete instance](https://docs.wsapi.chat/api-reference/account/delete-instance.md): Expires an instance on the subscription. Reseller customers only. - [Get instance defaults](https://docs.wsapi.chat/api-reference/account/get-instance-defaults.md): Returns customer-level default settings applied to instances with UseCustomDefaults enabled. - [Get instance detail](https://docs.wsapi.chat/api-reference/account/get-instance-detail.md): Returns full instance information including settings. - [List all instances](https://docs.wsapi.chat/api-reference/account/list-all-instances.md): Returns a paginated list of all customer instances with optional filtering. - [List subscription instances](https://docs.wsapi.chat/api-reference/account/list-subscription-instances.md): Returns instances belonging to a specific subscription. - [List subscriptions](https://docs.wsapi.chat/api-reference/account/list-subscriptions.md): Returns a paginated list of customer subscriptions. - [Regenerate instance API key](https://docs.wsapi.chat/api-reference/account/regenerate-instance-api-key.md): Generates a new API key for the instance. Previous key is immediately invalidated. - [Restart instance](https://docs.wsapi.chat/api-reference/account/restart-instance.md) - [Subscription change audit log](https://docs.wsapi.chat/api-reference/account/subscription-change-audit-log.md): Returns a paginated, filterable log of subscription changes. - [Update instance defaults](https://docs.wsapi.chat/api-reference/account/update-instance-defaults.md): Updates customer-level default settings. - [Update instance name](https://docs.wsapi.chat/api-reference/account/update-instance-name.md) - [Update instance settings](https://docs.wsapi.chat/api-reference/account/update-instance-settings.md) - [Call accept event](https://docs.wsapi.chat/api-reference/calls/call-accept-event.md): Event emitted when a call is accepted - [Call offer event](https://docs.wsapi.chat/api-reference/calls/call-offer-event.md): Event emitted when a call offer is received - [Call terminate event](https://docs.wsapi.chat/api-reference/calls/call-terminate-event.md): Event emitted when a call is terminated - [Reject an incoming call](https://docs.wsapi.chat/api-reference/calls/reject-an-incoming-call.md) - [Archive or unarchive a chat](https://docs.wsapi.chat/api-reference/chats/archive-or-unarchive-a-chat.md) - [Chat picture event](https://docs.wsapi.chat/api-reference/chats/chat-picture-event.md): Event for chat picture updates - [Chat presence event](https://docs.wsapi.chat/api-reference/chats/chat-presence-event.md): Event for chat presence updates (typing, recording, paused) - [Chat push name event](https://docs.wsapi.chat/api-reference/chats/chat-push-name-event.md): Event for chat push name updates - [Chat setting event](https://docs.wsapi.chat/api-reference/chats/chat-setting-event.md): Event for chat settings changes (mute, pin, read, archive, ephemeral) - [Chat status event](https://docs.wsapi.chat/api-reference/chats/chat-status-event.md): Event for chat about/status text updates - [Clear all messages from a chat](https://docs.wsapi.chat/api-reference/chats/clear-all-messages-from-a-chat.md) - [Delete a chat](https://docs.wsapi.chat/api-reference/chats/delete-a-chat.md) - [Get business profile for a chat](https://docs.wsapi.chat/api-reference/chats/get-business-profile-for-a-chat.md) - [Get chat info](https://docs.wsapi.chat/api-reference/chats/get-chat-info.md): Returns details for a single chat, enriched with contact info and chat settings. - [Get chat profile picture](https://docs.wsapi.chat/api-reference/chats/get-chat-profile-picture.md) - [List all known chats](https://docs.wsapi.chat/api-reference/chats/list-all-known-chats.md): Returns all known chats for the instance, enriched with contact info (pushName, businessName, fullName) and chat settings (pinned, archived, muted). Sorted by last activity descending. - [Mark a chat as read or unread](https://docs.wsapi.chat/api-reference/chats/mark-a-chat-as-read-or-unread.md) - [Mute or unmute a chat](https://docs.wsapi.chat/api-reference/chats/mute-or-unmute-a-chat.md) - [Pin or unpin a chat](https://docs.wsapi.chat/api-reference/chats/pin-or-unpin-a-chat.md) - [Request on-demand message history](https://docs.wsapi.chat/api-reference/chats/request-on-demand-message-history.md): Triggers an on-demand history sync request for the given chat. The response arrives asynchronously as a `message_history_sync` event via the configured publisher. - [Send chat presence (typing, paused, recording)](https://docs.wsapi.chat/api-reference/chats/send-chat-presence-typing-paused-recording.md) - [Set disappearing messages timer](https://docs.wsapi.chat/api-reference/chats/set-disappearing-messages-timer.md) - [Subscribe to presence updates for a chat](https://docs.wsapi.chat/api-reference/chats/subscribe-to-presence-updates-for-a-chat.md) - [Create a group within a community](https://docs.wsapi.chat/api-reference/communities/create-a-group-within-a-community.md): Create a new sub-group inside a community. Requires admin privileges. - [Create a new community](https://docs.wsapi.chat/api-reference/communities/create-a-new-community.md): Create a new WhatsApp community with the specified name and optional participants. - [Get community info](https://docs.wsapi.chat/api-reference/communities/get-community-info.md): Retrieve detailed information about a specific community. - [Get community invite link](https://docs.wsapi.chat/api-reference/communities/get-community-invite-link.md): Get the current invite link for a community. Requires admin privileges. - [Get community participants](https://docs.wsapi.chat/api-reference/communities/get-community-participants.md): Retrieve the list of all participants in a community. - [Get community sub-groups](https://docs.wsapi.chat/api-reference/communities/get-community-sub-groups.md): Retrieve the list of all sub-groups linked to a community. - [Leave a community](https://docs.wsapi.chat/api-reference/communities/leave-a-community.md): Leave a community. This will remove the current user from the community. - [Link an existing group to a community](https://docs.wsapi.chat/api-reference/communities/link-an-existing-group-to-a-community.md): Link an existing group as a sub-group of a community. Requires admin privileges in both the group and community. - [List joined communities](https://docs.wsapi.chat/api-reference/communities/list-joined-communities.md): Retrieve a list of all communities the current user is a member of. - [Reset community invite link](https://docs.wsapi.chat/api-reference/communities/reset-community-invite-link.md): Reset and generate a new invite link. The old link will no longer work. Requires admin privileges. - [Set community description](https://docs.wsapi.chat/api-reference/communities/set-community-description.md): Update the description of a community. Requires admin privileges. - [Set community locked mode](https://docs.wsapi.chat/api-reference/communities/set-community-locked-mode.md): When enabled, only admins can edit community info. - [Set community name](https://docs.wsapi.chat/api-reference/communities/set-community-name.md): Update the name of a community. Requires admin privileges. - [Set community picture](https://docs.wsapi.chat/api-reference/communities/set-community-picture.md): Update the profile picture of a community. Requires admin privileges. - [Unlink a group from a community](https://docs.wsapi.chat/api-reference/communities/unlink-a-group-from-a-community.md): Remove a sub-group from a community. The group itself is not deleted. Requires admin privileges. - [Update community participants](https://docs.wsapi.chat/api-reference/communities/update-community-participants.md): Add, remove, promote, or demote participants. Requires admin privileges. - [Block a contact](https://docs.wsapi.chat/api-reference/contacts/block-a-contact.md): Block a contact by their JID. The contact will no longer be able to send you messages. - [Contact event](https://docs.wsapi.chat/api-reference/contacts/contact-event.md): Event for contact updates - [Create or update a contact](https://docs.wsapi.chat/api-reference/contacts/create-or-update-a-contact.md): Creates or updates a contact via WhatsApp app state sync. - [Get a specific contact](https://docs.wsapi.chat/api-reference/contacts/get-a-specific-contact.md) - [Get blocked contacts](https://docs.wsapi.chat/api-reference/contacts/get-blocked-contacts.md): Returns the list of all blocked contacts. - [List all contacts](https://docs.wsapi.chat/api-reference/contacts/list-all-contacts.md) - [Sync contacts from WhatsApp](https://docs.wsapi.chat/api-reference/contacts/sync-contacts-from-whatsapp.md): Triggers a full contact sync from the WhatsApp server. This fetches the complete contact list from the server and updates the local contact store, replacing any stale data. - [Unblock a contact](https://docs.wsapi.chat/api-reference/contacts/unblock-a-contact.md): Unblock a previously blocked contact. - [Approve or reject join requests](https://docs.wsapi.chat/api-reference/groups/approve-or-reject-join-requests.md): Approve or reject pending join requests for a group. Only available when join approval mode is enabled. Requires admin privileges. - [Create a new group](https://docs.wsapi.chat/api-reference/groups/create-a-new-group.md): Create a new WhatsApp group with the specified name and initial participants. - [Get group info](https://docs.wsapi.chat/api-reference/groups/get-group-info.md): Retrieve detailed information about a specific group, including participants, admins, and settings. - [Get group info from invite code](https://docs.wsapi.chat/api-reference/groups/get-group-info-from-invite-code.md): Preview group information from an invite code without joining the group. - [Get group invite link](https://docs.wsapi.chat/api-reference/groups/get-group-invite-link.md): Get the current invite link for a group. Requires admin privileges. - [Get group participants](https://docs.wsapi.chat/api-reference/groups/get-group-participants.md): Retrieve the list of all participants in a group. - [Get pending join requests](https://docs.wsapi.chat/api-reference/groups/get-pending-join-requests.md): Get the list of pending join requests for a group. Only available when join approval mode is enabled. - [Group event](https://docs.wsapi.chat/api-reference/groups/group-event.md): Event for group and community updates (name/topic changes, members join/leave, admin changes, community linking) - [Join a group via invite link](https://docs.wsapi.chat/api-reference/groups/join-a-group-via-invite-link.md): Join a group using an invite link code (the part after `https://chat.whatsapp.com/`). - [Join a group via invite message](https://docs.wsapi.chat/api-reference/groups/join-a-group-via-invite-message.md): Accept a group invite received via a direct message. Requires the group JID, inviter JID, and invite code. - [Leave a group](https://docs.wsapi.chat/api-reference/groups/leave-a-group.md): Leave the specified group. You will no longer receive messages from this group. - [List joined groups](https://docs.wsapi.chat/api-reference/groups/list-joined-groups.md): Retrieve a list of all groups the current user is a member of. - [Reset group invite link](https://docs.wsapi.chat/api-reference/groups/reset-group-invite-link.md): Reset and generate a new invite link for a group. The old link will no longer work. Requires admin privileges. - [Set group announce mode](https://docs.wsapi.chat/api-reference/groups/set-group-announce-mode.md): When enabled, only admins can send messages. - [Set group description](https://docs.wsapi.chat/api-reference/groups/set-group-description.md): Update the description of a group. Requires admin privileges. - [Set group join approval mode](https://docs.wsapi.chat/api-reference/groups/set-group-join-approval-mode.md): When enabled, new members require admin approval. - [Set group locked mode](https://docs.wsapi.chat/api-reference/groups/set-group-locked-mode.md): When enabled, only admins can edit group info. - [Set group name](https://docs.wsapi.chat/api-reference/groups/set-group-name.md): Update the name of a group. Requires admin privileges. - [Set group picture](https://docs.wsapi.chat/api-reference/groups/set-group-picture.md): Update the profile picture of a group. Requires admin privileges. - [Set member add mode](https://docs.wsapi.chat/api-reference/groups/set-member-add-mode.md): Control whether only admins can add members. - [Update group participants](https://docs.wsapi.chat/api-reference/groups/update-group-participants.md): Add, remove, promote, or demote participants. Requires admin privileges. - [Download media by ID](https://docs.wsapi.chat/api-reference/media/download-media-by-id.md): Returns the raw media file as a binary download with Content-Disposition header. Use the `media.id` field from incoming message webhook events as the `id` query parameter. - [Delete a message for everyone](https://docs.wsapi.chat/api-reference/messages/delete-a-message-for-everyone.md): Delete a message for all chat participants. Only your own sent messages can be deleted for everyone. - [Delete a message for me only](https://docs.wsapi.chat/api-reference/messages/delete-a-message-for-me-only.md): Delete a message only from your own chat. The message remains visible to other participants. - [Edit a sent message](https://docs.wsapi.chat/api-reference/messages/edit-a-sent-message.md): Edit the text of a previously sent message. Only your own messages can be edited. - [Mark a message as read](https://docs.wsapi.chat/api-reference/messages/mark-a-message-as-read.md): Mark a message as read with the specified receipt type. - [Message delete event](https://docs.wsapi.chat/api-reference/messages/message-delete-event.md): Event for message deletions - [Message event](https://docs.wsapi.chat/api-reference/messages/message-event.md): Event for new messages (text, media, reaction, contact, etc.) - [Message history sync event](https://docs.wsapi.chat/api-reference/messages/message-history-sync-event.md): Event sent for on-demand history sync requests, containing messages for the requested chat. - [Message read event](https://docs.wsapi.chat/api-reference/messages/message-read-event.md): Event for message read/delivery receipts - [Message star event](https://docs.wsapi.chat/api-reference/messages/message-star-event.md): Event for message star/unstar actions - [Pin or unpin a message](https://docs.wsapi.chat/api-reference/messages/pin-or-unpin-a-message.md): Pin or unpin a message in a chat. Set `pinned` to true to pin, false to unpin. Optionally specify a pin expiration duration. - [React to a message](https://docs.wsapi.chat/api-reference/messages/react-to-a-message.md): Send an emoji reaction to a message. Send an empty string as the reaction to remove a previous reaction. - [Send a contact card](https://docs.wsapi.chat/api-reference/messages/send-a-contact-card.md): Send a contact card via display name (auto-generated vCard) or a raw vCard string. The response contains the message ID. - [Send a document message](https://docs.wsapi.chat/api-reference/messages/send-a-document-message.md): Send a document via URL or base64-encoded data. The `filename` field is required. The response contains the message ID. - [Send a link preview message](https://docs.wsapi.chat/api-reference/messages/send-a-link-preview-message.md): Send a link message with an optional preview (title, description, and JPEG thumbnail). The response contains the message ID. - [Send a location message](https://docs.wsapi.chat/api-reference/messages/send-a-location-message.md): Send a location with coordinates and optional name, address, and URL details. The response contains the message ID. - [Send a sticker message](https://docs.wsapi.chat/api-reference/messages/send-a-sticker-message.md): Send a sticker (WebP format) via URL or base64-encoded data. Use `isAnimated` for animated stickers. The response contains the message ID. - [Send a text message](https://docs.wsapi.chat/api-reference/messages/send-a-text-message.md): Send a text message to a WhatsApp contact or group. The response contains the message ID, which can be used later for reply, edit, delete, star, and other actions. - [Send a video message](https://docs.wsapi.chat/api-reference/messages/send-a-video-message.md): Send a video message via URL or base64-encoded data. The response contains the message ID. - [Send a voice message](https://docs.wsapi.chat/api-reference/messages/send-a-voice-message.md): Send a voice (push-to-talk) message via URL or base64-encoded data. The response contains the message ID. - [Send an audio message](https://docs.wsapi.chat/api-reference/messages/send-an-audio-message.md): Send an audio message via URL or base64-encoded data. The response contains the message ID. - [Send an image message](https://docs.wsapi.chat/api-reference/messages/send-an-image-message.md): Send an image message via URL or base64-encoded data. The response contains the message ID. - [Star or unstar a message](https://docs.wsapi.chat/api-reference/messages/star-or-unstar-a-message.md): Star or unstar a message. Set `starred` to true to star, false to unstar. - [Create a newsletter](https://docs.wsapi.chat/api-reference/newsletters/create-a-newsletter.md): Create a new newsletter/channel with the specified name, description, and optional picture. - [Get newsletter info](https://docs.wsapi.chat/api-reference/newsletters/get-newsletter-info.md): Retrieve detailed information about a specific newsletter. - [Get newsletter info by invite code](https://docs.wsapi.chat/api-reference/newsletters/get-newsletter-info-by-invite-code.md): Look up newsletter information using an invite code. - [List subscribed newsletters](https://docs.wsapi.chat/api-reference/newsletters/list-subscribed-newsletters.md): Returns all newsletters the current user is subscribed to. - [Mute or unmute a newsletter](https://docs.wsapi.chat/api-reference/newsletters/mute-or-unmute-a-newsletter.md): Toggle mute state for a newsletter. Muted newsletters do not send notifications. - [Newsletter event](https://docs.wsapi.chat/api-reference/newsletters/newsletter-event.md): Event for newsletter (channel) subscription and mute changes - [Subscribe or unsubscribe from a newsletter](https://docs.wsapi.chat/api-reference/newsletters/subscribe-or-unsubscribe-from-a-newsletter.md): Set the subscription state for a newsletter. Set `subscribed` to true to follow/subscribe, or false to unfollow/unsubscribe. - [API Reference](https://docs.wsapi.chat/api-reference/overview.md): Overview of the WSAPI HTTP REST API - [Flush cached history sync messages](https://docs.wsapi.chat/api-reference/session/flush-cached-history-sync-messages.md): Returns 202 Accepted immediately, then asynchronously publishes cached history sync messages as `message_history_sync` events (one per chat, chunked at 500 messages). The consumer should call this endpoint after receiving the `initial_sync_finished` event, which is only emitted when `historySync` is… - [Get pair code for phone number](https://docs.wsapi.chat/api-reference/session/get-pair-code-for-phone-number.md) - [Get QR code as text](https://docs.wsapi.chat/api-reference/session/get-qr-code-as-text.md): Returns the raw QR code string for clients that want to render the QR code themselves. - [Get QR code for pairing](https://docs.wsapi.chat/api-reference/session/get-qr-code-for-pairing.md): Returns a PNG image of the QR code to scan with WhatsApp. - [Get session status](https://docs.wsapi.chat/api-reference/session/get-session-status.md) - [Initial sync finished event](https://docs.wsapi.chat/api-reference/session/initial-sync-finished-event.md): System event emitted when the initial history sync has completed (only when historySync is enabled). Fires after the RECENT sync finishes. This is a system event — it is always delivered regardless of event filter configuration and cannot be opted out of. - [Logged in event](https://docs.wsapi.chat/api-reference/session/logged-in-event.md): System event emitted when the user is logged in (pair success). This is a system event — it is always delivered regardless of event filter configuration and cannot be opted out of. - [Logged out event](https://docs.wsapi.chat/api-reference/session/logged-out-event.md): System event emitted when the user is logged out. This event is guaranteed to be published under all logout circumstances: WhatsApp server-side logout (e.g. 401 on connect), API logout (`POST /session/logout`, reason `api_logout`), and instance deletion (`DELETE /instances/{id}`, reason `instance_de… - [Login error event](https://docs.wsapi.chat/api-reference/session/login-error-event.md): System event emitted when a pairing error occurs. This is a system event — it is always delivered regardless of event filter configuration and cannot be opted out of. - [Logout from WhatsApp](https://docs.wsapi.chat/api-reference/session/logout-from-whatsapp.md) - [Delete a status update](https://docs.wsapi.chat/api-reference/status/delete-a-status-update.md): Delete (revoke) a previously posted status update so it is no longer visible to your contacts. - [Get status privacy settings](https://docs.wsapi.chat/api-reference/status/get-status-privacy-settings.md): Returns the status broadcast privacy settings for the logged-in account. - [Post a text status](https://docs.wsapi.chat/api-reference/status/post-a-text-status.md): Post a text status update (story) visible to your contacts. - [Post a video status](https://docs.wsapi.chat/api-reference/status/post-a-video-status.md): Post a video status update (story) via URL or base64-encoded data. - [Post an image status](https://docs.wsapi.chat/api-reference/status/post-an-image-status.md): Post an image status update (story) via URL or base64-encoded data. - [Bulk check phone numbers on WhatsApp](https://docs.wsapi.chat/api-reference/users/bulk-check-phone-numbers-on-whatsapp.md): Check multiple phone numbers at once to see if they are registered on WhatsApp. - [Check if a phone number is on WhatsApp](https://docs.wsapi.chat/api-reference/users/check-if-a-phone-number-is-on-whatsapp.md) - [Get own profile info](https://docs.wsapi.chat/api-reference/users/get-own-profile-info.md) - [Get privacy settings](https://docs.wsapi.chat/api-reference/users/get-privacy-settings.md): Returns the current privacy settings for the account. - [Get user profile info](https://docs.wsapi.chat/api-reference/users/get-user-profile-info.md) - [Set presence state](https://docs.wsapi.chat/api-reference/users/set-presence-state.md): Set the account's presence to available or unavailable. This is a transient action (not persisted in the profile). - [Update a privacy setting](https://docs.wsapi.chat/api-reference/users/update-a-privacy-setting.md): Update a single privacy setting. Returns the full updated privacy settings. - [Update own profile](https://docs.wsapi.chat/api-reference/users/update-own-profile.md): Update name, status, and/or picture. All fields are optional. - [User presence event](https://docs.wsapi.chat/api-reference/users/user-presence-event.md): Event for user presence updates - [API Key](https://docs.wsapi.chat/basics/api-key.md): Manage your API key for authenticating with the WSAPI - [Configuring Event Delivery](https://docs.wsapi.chat/basics/configuring-instance.md): Set up Webhook or SSE event delivery for your WSAPI Cloud instances - [Event Filtering](https://docs.wsapi.chat/basics/event-filtering.md): Control which events your instance receives - [Free Trial](https://docs.wsapi.chat/basics/free-trial.md): Get started with WSAPI for free — no credit card required - [Initial Sync](https://docs.wsapi.chat/basics/initial-sync.md): Understand how WSAPI synchronizes data when an instance first connects - [Pairing Your Instance](https://docs.wsapi.chat/basics/pairing-instance.md): Connect your WhatsApp account to a WSAPI instance - [Events Reference](https://docs.wsapi.chat/events/overview.md): Real-time WhatsApp events delivered via Webhooks or SSE - [Quickstart](https://docs.wsapi.chat/getting-started/quickstart.md): Get up and running with WSAPI in under 5 minutes - [CLI](https://docs.wsapi.chat/integrations/cli.md): Drive WSAPI from your terminal — built for shell pipelines and AI agents - [MCP Server](https://docs.wsapi.chat/integrations/mcp-server.md): Bring WhatsApp automation to any MCP-compatible AI assistant - [Chatwoot Bridge (n8n)](https://docs.wsapi.chat/integrations/n8n-chatwoot.md): Connect Chatwoot customer service with WhatsApp via WSAPI and n8n - [n8n Community Node](https://docs.wsapi.chat/integrations/n8n-wsapi.md): WhatsApp automation for n8n workflows with the WSAPI community node - [.NET SDK](https://docs.wsapi.chat/sdks/dotnet.md): .NET SDK for integrating WSAPI into C# applications - [Node.js / TypeScript SDK](https://docs.wsapi.chat/sdks/nodejs.md): TypeScript/JavaScript SDK for integrating WSAPI into Node.js applications - [SDKs & Libraries](https://docs.wsapi.chat/sdks/overview.md): Official SDKs and community libraries for popular programming languages - [Python SDK](https://docs.wsapi.chat/sdks/python.md): Python SDK for integrating WSAPI into Python applications ## OpenAPI Specs - [wsapi-api](https://docs.wsapi.chat/openapi/wsapi-api.yaml) - [wsapi-events](https://docs.wsapi.chat/openapi/wsapi-events.yaml) - [openapi](https://docs.wsapi.chat/api-reference/openapi.yaml)