Nuevo Safe Mode calienta los números nuevos para reducir el riesgo de bloqueo en WhatsApp. Más información →

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.

Example projects

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.

Terms of Service

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

MethodPathDescription
POST/{phone_id}/sendMessageSends a text, media, poll, vcard, contact, forward, delete, reaction, edit, sticker, location, link, product, buttons,carousel messages, also supports channel operations
POST/{phone_id}/sendMessageSends 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

MethodPathDescription
POST/{phone_id}/createGroupCreates a group
GET/{phone_id}/getGroupsLists all groups
GET/{phone_id}/getGroups/{conversation_id}Gets specific group
POST/{phone_id}/group/setProfileImageSets group image
POST/{phone_id}/group/deleteProfileImageDelete group image
POST/{phone_id}/group/configConfigures group settings
POST/{phone_id}/group/addAdds group participants
POST/{phone_id}/group/removeRemoves group participant
POST/{phone_id}/group/promotePromotes group admin
POST/{phone_id}/group/demoteDemotes group admin
POST/{phone_id}/group/acceptInviteAccepts group invite
POST/{phone_id}/group/acceptInviteV4Accepts group invite (V4)
POST/{phone_id}/group/revokeInviteRevokes group invite
GET/{phone_id}/group/approvalRequestList/{conversation_id}Lists join requests
POST/{phone_id}/group/approvalRequest/ApproveApproves join requests
POST/{phone_id}/group/approvalRequest/RejectRejects join requests
GET/{phone_id}/group/getGroupInfoByInviteCode/{inviteCode}Gets group info
POST/{phone_id}/leaveGroupLeaves the group

Account Information Retrieval

MethodPathDescription
GET/productReturns product information
POST/addPhoneAdds new phone
GET/listPhonesLists registered phones
POST/setWebhookSets webhook address
POST/setAckPreferenceSets acknowledgment preference
GET/logsReturns all phones logs
GET/{phone_id}/logsReturns specific phone logs

Session Information Getters

MethodPathDescription
GET/{phone_id}/screenGets session screen
GET/{phone_id}/statusGets session status
GET/{phone_id}/logoutLogs out user
POST/{phone_id}/connectWithPhoneNumberConnects with phone number
GET/{phone_id}/qrCodeGets QR code
GET/{phone_id}/getNewChatLimitGet new chat limit

Contact Operations

MethodPathDescription
GET/{phone_id}/getContactsLists 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}/checkPhonesChecks phone numbers
POST/{phone_id}/blockContact/{conversation_id}Blocks, Unblocks a contact
GET/{phone_id}/getProfileImageGet chat image.
POST/{phone_id}/setProfileImageSet account profile image
POST/{phone_id}/deleteProfileImageDelete account profile image
GET/{phone_id}/getProfileNameGets account profile name
POST/{phone_id}/setProfileNameSet account profile name
GET/{phone_id}/getProfileAboutGet account about text
GET/{phone_id}/getProfileAbout/{conversation_id}Get contact about text
POST/{phone_id}/setProfileAboutSet account about text
GET/{phone_id}/getBlockContactsLists blocked contacts
GET/{phone_id}/getProfileUsernameGet account username
POST/{phone_id}/setProfileUsernameSet account username
POST/{phone_id}/contact/addAdds a contact
POST/{phone_id}/contact/editEdits a contact
POST/{phone_id}/contact/removeRemoves a contact

Chat Operations

MethodPathDescription
GET/{phone_id}/getConversationsLists 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

MethodPathDescription
POST/{phone_id}/createChannelCreates a channel
GET/{phone_id}/getChannelsLists all channels
GET/{phone_id}/getChannels/{conversation_id}Gets specific channel
POST/{phone_id}/deleteChannelDeletes a channel
POST/{phone_id}/channel/configConfigures channel settings
POST/{phone_id}/channel/inviteCodeGenerates invite code
GET/{phone_id}/channel/searchByCountry/{countryCode}Searches channels by country
POST/{phone_id}/channel/searchSearches channels by text
GET/{phone_id}/channel/getMessages/{conversation_id}Gets specific channel
POST/{phone_id}/channel/subscribeSubscribes to channel
POST/{phone_id}/channel/unsubscribeUnsubscribes from channel
POST/{phone_id}/channel/subscribeByInviteCodeSubscribes using invite code
POST/{phone_id}/channel/unsubscribeByInviteCodeUnsubscribes 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/demoteDemotes channel admin
POST/{phone_id}/channel/acceptAdminInviteAccepts channel admin invite
POST/{phone_id}/channel/revokeAdminInviteRevoke admin request

Community Chat Operations

MethodPathDescription
POST/{phone_id}/createCommunityCreates a community
GET/{phone_id}/getCommunitiesLists all communities
GET/{phone_id}/getCommunities/{conversation_id}Get community details
POST/{phone_id}/community/addAdds community participants
POST/{phone_id}/community/removeRemoves community participant
POST/{phone_id}/community/promotePromotes community admin
POST/{phone_id}/community/demoteDemotes community admin
POST/{phone_id}/community/addSubGroupAdds subgroups to community
POST/{phone_id}/community/removeSubGroupRemoves subgroups from community
POST/{phone_id}/community/revokeInviteRevokes community invite
GET/{phone_id}/community/unjoinedSubGroups/{conversation_id}Lists unjoined community sub-groups
POST/{phone_id}/community/joinSubGroupJoins a community sub-group
POST/{phone_id}/deactiveCommunityDeactivates the community

Call Operations

MethodPathDescription
GET/{phone_id}/getCallsLists call history
GET/{phone_id}/getCalls/{callId}Gets call information
POST/{phone_id}/call/startStarts an outgoing call
POST/{phone_id}/call/rejectRejects the incoming call
POST/{phone_id}/call/createCallLinkCreates a call link for voice or video calls

Story Operations (Beta)

MethodPathDescription
POST/{phone_id}/createStoryCreates a story
GET/{phone_id}/getStoriesGets user's stories
GET/{phone_id}/contactsStoriesGets contacts stories
GET/{phone_id}/contactsStories/{conversation_id}Gets contact's stories
GET/{phone_id}/getStoryPrivacyGet story privacy
POST/{phone_id}/setStoryPrivacySet story privacy

Queue Operations

MethodPathDescription
GET/queuesLists all queues
GET/{phone_id}/queueGets phone's queue
GET/{phone_id}/purgeQueueClears message queue

Session Controlling Operations

MethodPathDescription
GET/{phone_id}/redeployRedeploys phone instance
GET/{phone_id}/factoryresetResets phone instance
GET/{phone_id}/configGets phone config
POST/{phone_id}/configSet phone config

Labels

MethodPathDescription
POST/{phone_id}/createLabelCreates a new label
GET/{phone_id}/getLabelsLists all labels
GET/{phone_id}/getLabels/{label_id}gets labeled chats
GET/{phone_id}/label/getlabelColorsGets all available label colors
POST/{phone_id}/label/editEdits a label
POST/{phone_id}/label/removeDeletes labels from the WhatsApp
POST/{phone_id}/addLabelAdds a label
POST/{phone_id}/removeLabelRemoves a label from a chat

Presences

MethodPathDescription
GET/{phone_id}/getPresences/{conversation_id}Gets presence status
GET/{phone_id}/subscribePresences/{conversation_id}Subscribes to presence
POST/{phone_id}/sendPresencesSends presence status

Business Catalog

MethodPathDescription
GET/{phone_id}/catalog/getProductsLists catalog products
GET/{phone_id}/catalog/getProduct/{product_id}Gets specific product
POST/{phone_id}/catalog/addProductAdds a product
POST/{phone_id}/catalog/editProductEdits a product
POST/{phone_id}/catalog/removeProductRemoves a product
POST/{phone_id}/catalog/addProductImageAdds product image
POST/{phone_id}/catalog/removeProductImageRemoves product image
GET/{phone_id}/catalog/getProducts/{conversation_id}Gets products by contact
GET/{phone_id}/catalog/getCollectionsLists product collections
GET/{phone_id}/catalog/getCollection/{collection_id}Gets specific collection
POST/{phone_id}/catalog/addCollectionAdds a collection
POST/{phone_id}/catalog/editCollectionEdits a collection
POST/{phone_id}/catalog/removeCollectionRemoves a collection
POST/{phone_id}/catalog/addCollectionProductsAdds product to collection
POST/{phone_id}/catalog/removeCollectionProductRemoves product from collection
GET/{phone_id}/catalog/getOrdersLists orders from memory
GET/{phone_id}/catalog/getOrders/{orderId}Gets order details
GET/{phone_id}/catalogGets catalog products
GET/{phone_id}/getBusinessProfileGet business profile
GET/{phone_id}/getBusinessProfile/{conversation_id}Get contact business profile
POST/{phone_id}/setBusinessProfileSet business profile

API reference

Empezar ahora