Skip to main content

Messages

Chats

Commandchats.aspx
MethodGET
Response

SUCCESS → List containing the latest chats visible to the user:

[
{
"jid": "5511987654321@s.whatsapp.net",
"name": "",
"spam": false,
"count": 0,
"mute": "",
"t": 1602182138,
"archive": false,
"modify_tag": "761618",
"picture": "",
"Lastupdate": "0001-01-01T02:00:00Z"
},
...

ERROR → Returns empty

Send Message

Commandsend_message.aspx
MethodPOST
Body
{ 
"number": "5511987654321@s.whatsapp.net",
"message": "Hello"
}

Text formatting

EffectDescriptionExample
BoldText between asterisks*Bold*
StrikethroughText between two tilde characters~Strikethrough~
ItalicText between two underline characters_Italic_
MonospaceText in monospace format```Monospace```
New
line
To break a line use the character \nNew\nline
Response
{
{
"success": true,
"message": {
"Id": "61C14232F8748A08677DF4775ECBBE33"
}
}
}

Id Unique message ID

Send Image

Commandsend_message_file.aspx
MethodPOST
Body

From a URL

{ 
"number": "5511987654321@s.whatsapp.net",
"caption": "Image Description",
"url": "https://images.pexels.com/photos/4627455/pexels-photo-4627455.jpeg",
"type": "image/jpeg",
"filename": "" // optional
}

In base64

{ 
"number": "5511987654321@s.whatsapp.net",
"caption": "Image Description",
"mimetype": "image/jpeg",
"base64": "JVBERi0xLjYNJeLjz9MNCjM3IDAgb2JqIDw8L..." // raw file content converted to base64
}
Response
{
"success": true,
"message": {
"MessageID": "6AFCFEAB7FC3ECA3753F1C8AB86ADF15",
"Url": "https://api.witi.me/static/6D6307C3-2973-4468-85FA-D047CB8E1F2B/media/6AFCFEAB7FC3ECA3753F1C8AB86ADF15",
"jpegThumbnail": ""
}
}

ERROR:

{
"success": false,
"message": null
}

Send File

Commandsend_message_file.aspx
MethodPOST
Body

From a URL

{ 
"number": "5511987654321@s.whatsapp.net",
"caption": "Document Description",
"url": "https://filesamples.com/samples/document/txt/sample1.txt",
"type": "file",
}

In base64

{ 
"number": "5511987654321@s.whatsapp.net",
"caption": "Document Description",
"mimetype": "text/plain",
"base64": "JVBERi0xLjYNJeLjz9MNCjM3IDAgb2JqIDw8L..." // raw file content converted to base64
}
Response
{
"success": true,
"message": {
"MessageID": "6AFCFEAB7FC3ECA3753F1C8AB86ADF15",
"Url": "https://api.witi.me/static/6D6307C3-2973-4468-85FA-D047CB8E1F2B/media/6AFCFEAB7FC3ECA3753F1C8AB86ADF15",
"jpegThumbnail": ""
}
}

Send Audio

Commandsend_message_file.aspx
MethodPOST
Body
{ 
"number": "5511987654321@s.whatsapp.net",
"caption": "audio.wav",
"type": "audio",
"mimetype": "audio/wav",
"base64": "GkXfo59ChoEBQveBAULy...",
}
Warning

The audio file must be in wav format

Send Contact

Sends a contact message using the vcard format.

Commandsend_contact.aspx
MethodPOST
Body
{ 
"jid": "5511987654321@s.whatsapp.net",
"vcard": "BEGIN:VCARD\nVERSION:3.0\nN:;Fulano da Silva;;\nFN:Fulano da Silva\nitem1.TEL;waid=5511987654321@s.whatsapp.net:+5511987654321@s.whatsapp.net\nitem1.X-ABLabel:Mobile\nEND:VCARD"
}
Result
{
"success": true,
"message": {
"Id": "3EB06E1CAC62CAEB8219"
}
}

Subscribe

Indicates that the conversation has started with the contact.

Commandsubscribe.aspx
MethodPOST
Body
{ 
"number": "5511987654321@s.whatsapp.net",
}
Result
{
"success": true
}

Send Presence

Commandsend_presence.aspx
MethodPOST
Body
{ 
"jid": "5511987654321@s.whatsapp.net",
"status": "composing", // composing | available | unavailable | recording
}
Warning

To send the presence command to a contact, you must first send the subscribe.aspx command.

Information

For the contact to receive events, WhatsApp sometimes requires an initial exchange of messages between the parties.

Result
{
"success": true
}

Mark as Read

Marks the received message as read so the contact receives this information.

Commandmark_read.aspx
MethodPOST
Body
{ 
"jid": "5511987654321@s.whatsapp.net",
"messageid": "0272351687E8BA60700B8C6C400E05A6"
}
Result
{
"success": true
}