Maytapi - WhatsApp API Documentation
La API de WhatsApp de Maytapi es una API REST para el número de WhatsApp que ya usas. Vincula el número con un código QR, envía una solicitud a /sendMessage y recibe los mensajes entrantes y los acuses de entrega en un webhook. El índice de endpoints de abajo lista cada método y ruta; la referencia interactiva debajo muestra parámetros, ejemplos de solicitud y respuestas.
↓Descargar colección de Postman
Ir a la página de la colección de Postman
PDFDocumentación PDF de la WhatsApp API
Example projects
- Maytapi WhatsApp Api NodeJS Example
- Maytapi WhatsApp Api NodeJS Dialogflow Example
- Maytapi WhatsApp Api Python Example
- Maytapi WhatsApp Api Python Dialogflow Example
Authentication
You need to send 'x-maytapi-key':'YOUR_TOKEN' header with every request.
You can find your product_id and token at https://console.maytapi.com/settings/token
You can find message examples under /sendMessage in the API reference below.
Supported features
| Feature | Status | Description |
|---|---|---|
| Receive message | ✅ | You need to set your webhook with /setWebhook endpoint. |
| Receive media | ✅ | Image, Video, Docs/File, Audio, Location, vCard supported. |
| Send Text Message | ✅ | Send message works with queue. Message id and success response states that message added to sending queue. If a message isn't sent, check your instance status for connection or login problems. You can also check /logs endpoint or Developer Logs Page for error messages; if the request format is wrong, the error is logged there. You can also check your queue status in Developer Webhook Page or with /{phone_id}/queue endpoint. |
| Send Media | ✅ | Image, Audio (OGG/Opus or MP3), Video, Docs(pdf,docx,etc.) supported. |
| Send vCard | ✅ | You can find the example in /sendMessage → Examples → vCard Message. |
| Send Contact | ✅ | You can find the example in /sendMessage → Examples → Contact Message. |
| Send Location | ✅ | You can find the example in /sendMessage → Examples → Location Message. |
| Send Product | ✅ | You can find the example in /sendMessage → Examples → Product Message (Beta). Create products in the WhatsApp Business app or with the /catalog/addProduct endpoint. You can find Product Ids from the new /catalog endpoint. |
| Forward Messages | ✅ | You can find the example in /sendMessage → Examples → Forward Message. |
| Reply to Messages | ✅ | You can find the example in /sendMessage → Examples → Reply Message. |
| Delete Messages | ✅ | You can find the example in /sendMessage → Examples → Delete Message. |
| Reaction Message | ✅ | You can find the example in /sendMessage → Examples → Reaction Message. |
| Edit Message | ✅ | You can find the example in /sendMessage → Examples → Edit Message. |
| Buttons Message | ✅ | Send button messages with quick reply (id), URL, phone number, and copy code buttons. Supports media attachments. You can find the example in /sendMessage → Examples → Buttons Message. |
| List Message | ✅ | Send list messages with sections and selectable rows. You can find the example in /sendMessage → Examples → List Message. |
| Carousel Message | ✅ | Send carousel messages with up to 10 cards. Each card requires media and supports title, body, footer, and up to 5 buttons. You can find the example in /sendMessage → Examples → Carousel Message. |
| Create Groups | ✅ | You can find the example in /{phone_id}/createGroup. |
| Get groups | ✅ | You can find the example in /{phone_id}/getGroups. |
| Mention Message for Groups | ✅ | You can find the example in /sendMessage → Examples → Group Mention Message. |
| Leave Group | ✅ | You can find the example in /leaveGroup. |
| New Spam Filter | ✅ | A duplicate filter stops the same message from being sent to the same chat again and again: each of the last 3 unique messages in a conversation can be sent at most 3 times. Sending the same message to different numbers is not filtered. To send a message without this check, add "skip_filter": true to the request; see the /sendMessage examples. |
| Listen to Read Receipts | ✅ | You need to enable this with /setAckPreference endpoint. |
| Webhook examples | ✅ | You can find webhook examples in Callbacks tab of /setWebhook endpoint definition. |
| WhatsApp Channel Example | ✅ | You can find the channel endpoints under Channel Chat Operations in the API reference below. |
| WhatsApp Story Example | ✅ | You can find the story endpoints under Story Operations (Beta) in the API reference below. |
Contact: Maytapi Support
Version: 1.9.1
Índice de endpoints
Base URL: https://api.maytapi.com/api/{product_id} · OpenAPI 3.0.1
Message Operations
| Method | Path | Description |
|---|---|---|
| POST | /{phone_id}/sendMessage | Sends a text, media, poll, vcard, contact, forward, delete, reaction, edit, sticker, location, link, product, buttons,carousel messages, also supports channel operations |
| POST | /{phone_id}/sendMessage | Sends interactive messages: buttons (id, url, phoneNumber, code), list, and carousel |
| GET | /{phone_id}/getMessage/{msgId} | Retrieves specific message |
| GET | /{phone_id}/getMessages/{conversation_id} | Retrieves chat messages |
Group Chat Operations
| Method | Path | Description |
|---|---|---|
| POST | /{phone_id}/createGroup | Creates a group |
| GET | /{phone_id}/getGroups | Lists all groups |
| GET | /{phone_id}/getGroups/{conversation_id} | Gets specific group |
| POST | /{phone_id}/group/setProfileImage | Sets group image |
| POST | /{phone_id}/group/deleteProfileImage | Delete group image |
| POST | /{phone_id}/group/config | Configures group settings |
| POST | /{phone_id}/group/add | Adds group participants |
| POST | /{phone_id}/group/remove | Removes group participant |
| POST | /{phone_id}/group/promote | Promotes group admin |
| POST | /{phone_id}/group/demote | Demotes group admin |
| POST | /{phone_id}/group/acceptInvite | Accepts group invite |
| POST | /{phone_id}/group/acceptInviteV4 | Accepts group invite (V4) |
| POST | /{phone_id}/group/revokeInvite | Revokes group invite |
| GET | /{phone_id}/group/approvalRequestList/{conversation_id} | Lists join requests |
| POST | /{phone_id}/group/approvalRequest/Approve | Approves join requests |
| POST | /{phone_id}/group/approvalRequest/Reject | Rejects join requests |
| GET | /{phone_id}/group/getGroupInfoByInviteCode/{inviteCode} | Gets group info |
| POST | /{phone_id}/leaveGroup | Leaves the group |
Account Information Retrieval
| Method | Path | Description |
|---|---|---|
| GET | /product | Returns product information |
| POST | /addPhone | Adds new phone |
| GET | /listPhones | Lists registered phones |
| POST | /setWebhook | Sets webhook address |
| POST | /setAckPreference | Sets acknowledgment preference |
| GET | /logs | Returns all phones logs |
| GET | /{phone_id}/logs | Returns specific phone logs |
Session Information Getters
| Method | Path | Description |
|---|---|---|
| GET | /{phone_id}/screen | Gets session screen |
| GET | /{phone_id}/status | Gets session status |
| GET | /{phone_id}/logout | Logs out user |
| POST | /{phone_id}/connectWithPhoneNumber | Connects with phone number |
| GET | /{phone_id}/qrCode | Gets QR code |
| GET | /{phone_id}/getNewChatLimit | Get new chat limit |
Contact Operations
| Method | Path | Description |
|---|---|---|
| GET | /{phone_id}/getContacts | Lists all contacts |
| GET | /{phone_id}/getContacts/{conversation_id} | Gets specific contact |
| GET | /{phone_id}/getContacts/lidToPhone/{lid} | Resolves a LID to phone number |
| GET | /{phone_id}/getContacts/phoneToLid/{number} | Resolves a phone number to LID |
| GET | /{phone_id}/getContacts/usernameToPhone/{username} | Resolves a username to phone number |
| GET | /{phone_id}/getContacts/phoneToUsername/{number} | Resolves a phone number to username |
| POST | /{phone_id}/checkPhones | Checks phone numbers |
| POST | /{phone_id}/blockContact/{conversation_id} | Blocks, Unblocks a contact |
| GET | /{phone_id}/getProfileImage | Get chat image. |
| POST | /{phone_id}/setProfileImage | Set account profile image |
| POST | /{phone_id}/deleteProfileImage | Delete account profile image |
| GET | /{phone_id}/getProfileName | Gets account profile name |
| POST | /{phone_id}/setProfileName | Set account profile name |
| GET | /{phone_id}/getProfileAbout | Get account about text |
| GET | /{phone_id}/getProfileAbout/{conversation_id} | Get contact about text |
| POST | /{phone_id}/setProfileAbout | Set account about text |
| GET | /{phone_id}/getBlockContacts | Lists blocked contacts |
| GET | /{phone_id}/getProfileUsername | Get account username |
| POST | /{phone_id}/setProfileUsername | Set account username |
| POST | /{phone_id}/contact/add | Adds a contact |
| POST | /{phone_id}/contact/edit | Edits a contact |
| POST | /{phone_id}/contact/remove | Removes a contact |
Chat Operations
| Method | Path | Description |
|---|---|---|
| GET | /{phone_id}/getConversations | Lists all chats |
| GET | /{phone_id}/getConversations/{conversation_id} | Gets specific chat |
| POST | /{phone_id}/favoriteConversations/{conversation_id} | Favorites a chat |
| POST | /{phone_id}/pinConversations/{conversation_id} | Pins a chat |
| POST | /{phone_id}/archiveConversations/{conversation_id} | Archives a chat |
| POST | /{phone_id}/muteConversations/{conversation_id} | Mutes a chat |
| POST | /{phone_id}/clearConversations/{conversation_id} | Clears a chat |
| POST | /{phone_id}/disappearingConversations/{conversation_id} | Sets disappearing messages timer |
Channel Chat Operations
| Method | Path | Description |
|---|---|---|
| POST | /{phone_id}/createChannel | Creates a channel |
| GET | /{phone_id}/getChannels | Lists all channels |
| GET | /{phone_id}/getChannels/{conversation_id} | Gets specific channel |
| POST | /{phone_id}/deleteChannel | Deletes a channel |
| POST | /{phone_id}/channel/config | Configures channel settings |
| POST | /{phone_id}/channel/inviteCode | Generates invite code |
| GET | /{phone_id}/channel/searchByCountry/{countryCode} | Searches channels by country |
| POST | /{phone_id}/channel/search | Searches channels by text |
| GET | /{phone_id}/channel/getMessages/{conversation_id} | Gets specific channel |
| POST | /{phone_id}/channel/subscribe | Subscribes to channel |
| POST | /{phone_id}/channel/unsubscribe | Unsubscribes from channel |
| POST | /{phone_id}/channel/subscribeByInviteCode | Subscribes using invite code |
| POST | /{phone_id}/channel/unsubscribeByInviteCode | Unsubscribes using invite code |
| GET | /{phone_id}/channel/getInfoByInviteCode/{inviteCode} | Gets channel info |
| GET | /{phone_id}/channel/statistics/{conversation_id} | Gets channel statistics |
| POST | /{phone_id}/channel/demote | Demotes channel admin |
| POST | /{phone_id}/channel/acceptAdminInvite | Accepts channel admin invite |
| POST | /{phone_id}/channel/revokeAdminInvite | Revoke admin request |
Community Chat Operations
| Method | Path | Description |
|---|---|---|
| POST | /{phone_id}/createCommunity | Creates a community |
| GET | /{phone_id}/getCommunities | Lists all communities |
| GET | /{phone_id}/getCommunities/{conversation_id} | Get community details |
| POST | /{phone_id}/community/add | Adds community participants |
| POST | /{phone_id}/community/remove | Removes community participant |
| POST | /{phone_id}/community/promote | Promotes community admin |
| POST | /{phone_id}/community/demote | Demotes community admin |
| POST | /{phone_id}/community/addSubGroup | Adds subgroups to community |
| POST | /{phone_id}/community/removeSubGroup | Removes subgroups from community |
| POST | /{phone_id}/community/revokeInvite | Revokes community invite |
| GET | /{phone_id}/community/unjoinedSubGroups/{conversation_id} | Lists unjoined community sub-groups |
| POST | /{phone_id}/community/joinSubGroup | Joins a community sub-group |
| POST | /{phone_id}/deactiveCommunity | Deactivates the community |
Call Operations
| Method | Path | Description |
|---|---|---|
| GET | /{phone_id}/getCalls | Lists call history |
| GET | /{phone_id}/getCalls/{callId} | Gets call information |
| POST | /{phone_id}/call/start | Starts an outgoing call |
| POST | /{phone_id}/call/reject | Rejects the incoming call |
| POST | /{phone_id}/call/createCallLink | Creates a call link for voice or video calls |
Story Operations (Beta)
| Method | Path | Description |
|---|---|---|
| POST | /{phone_id}/createStory | Creates a story |
| GET | /{phone_id}/getStories | Gets user's stories |
| GET | /{phone_id}/contactsStories | Gets contacts stories |
| GET | /{phone_id}/contactsStories/{conversation_id} | Gets contact's stories |
| GET | /{phone_id}/getStoryPrivacy | Get story privacy |
| POST | /{phone_id}/setStoryPrivacy | Set story privacy |
Queue Operations
| Method | Path | Description |
|---|---|---|
| GET | /queues | Lists all queues |
| GET | /{phone_id}/queue | Gets phone's queue |
| GET | /{phone_id}/purgeQueue | Clears message queue |
Session Controlling Operations
| Method | Path | Description |
|---|---|---|
| GET | /{phone_id}/redeploy | Redeploys phone instance |
| GET | /{phone_id}/factoryreset | Resets phone instance |
| GET | /{phone_id}/config | Gets phone config |
| POST | /{phone_id}/config | Set phone config |
Labels
| Method | Path | Description |
|---|---|---|
| POST | /{phone_id}/createLabel | Creates a new label |
| GET | /{phone_id}/getLabels | Lists all labels |
| GET | /{phone_id}/getLabels/{label_id} | gets labeled chats |
| GET | /{phone_id}/label/getlabelColors | Gets all available label colors |
| POST | /{phone_id}/label/edit | Edits a label |
| POST | /{phone_id}/label/remove | Deletes labels from the WhatsApp |
| POST | /{phone_id}/addLabel | Adds a label |
| POST | /{phone_id}/removeLabel | Removes a label from a chat |
Presences
| Method | Path | Description |
|---|---|---|
| GET | /{phone_id}/getPresences/{conversation_id} | Gets presence status |
| GET | /{phone_id}/subscribePresences/{conversation_id} | Subscribes to presence |
| POST | /{phone_id}/sendPresences | Sends presence status |
Business Catalog
| Method | Path | Description |
|---|---|---|
| GET | /{phone_id}/catalog/getProducts | Lists catalog products |
| GET | /{phone_id}/catalog/getProduct/{product_id} | Gets specific product |
| POST | /{phone_id}/catalog/addProduct | Adds a product |
| POST | /{phone_id}/catalog/editProduct | Edits a product |
| POST | /{phone_id}/catalog/removeProduct | Removes a product |
| POST | /{phone_id}/catalog/addProductImage | Adds product image |
| POST | /{phone_id}/catalog/removeProductImage | Removes product image |
| GET | /{phone_id}/catalog/getProducts/{conversation_id} | Gets products by contact |
| GET | /{phone_id}/catalog/getCollections | Lists product collections |
| GET | /{phone_id}/catalog/getCollection/{collection_id} | Gets specific collection |
| POST | /{phone_id}/catalog/addCollection | Adds a collection |
| POST | /{phone_id}/catalog/editCollection | Edits a collection |
| POST | /{phone_id}/catalog/removeCollection | Removes a collection |
| POST | /{phone_id}/catalog/addCollectionProducts | Adds product to collection |
| POST | /{phone_id}/catalog/removeCollectionProduct | Removes product from collection |
| GET | /{phone_id}/catalog/getOrders | Lists orders from memory |
| GET | /{phone_id}/catalog/getOrders/{orderId} | Gets order details |
| GET | /{phone_id}/catalog | Gets catalog products |
| GET | /{phone_id}/getBusinessProfile | Get business profile |
| GET | /{phone_id}/getBusinessProfile/{conversation_id} | Get contact business profile |
| POST | /{phone_id}/setBusinessProfile | Set business profile |