API reference

Messages API

Send text, images, video, documents, voice notes, polls, locations, contacts, lists and buttons, and react to, edit, pin, star or delete messages. Paths and payloads follow Whapi conventions.

DELETE /messages/{id}

Delete a messages. Authenticate with your channel token.

FieldInTypeRequiredNotes
idpathstringYes
curl -X DELETE https://agakural.online/messages/{id} \
  -H "Authorization: Bearer $TOKEN"

GET /messages/{id}

Get one message. Authenticate with your channel token.

FieldInTypeRequiredNotes
idpathstringYes
curl -X GET https://agakural.online/messages/{id} \
  -H "Authorization: Bearer $TOKEN"

POST /messages/{id}

Create a messages. Authenticate with your channel token.

FieldInTypeRequiredNotes
idpathstringYes
tobodystringYes
curl -X POST https://agakural.online/messages/{id} \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210"}'

PUT /messages/{id}

Update a messages. Authenticate with your channel token.

FieldInTypeRequiredNotes
idpathstringYes
curl -X PUT https://agakural.online/messages/{id} \
  -H "Authorization: Bearer $TOKEN"

DELETE /messages/{id}/pin

Delete messages pin. Authenticate with your channel token.

FieldInTypeRequiredNotes
idpathstringYes
curl -X DELETE https://agakural.online/messages/{id}/pin \
  -H "Authorization: Bearer $TOKEN"

POST /messages/{id}/pin

Create messages pin. Authenticate with your channel token.

FieldInTypeRequiredNotes
idpathstringYes
timebodyobjectNoOne of: day, week, month
curl -X POST https://agakural.online/messages/{id}/pin \
  -H "Authorization: Bearer $TOKEN"

PUT /messages/{id}/reaction

Update messages reaction. Authenticate with your channel token.

FieldInTypeRequiredNotes
idpathstringYes
emojibodystringYesUp to 16 characters
curl -X PUT https://agakural.online/messages/{id}/reaction \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"emoji": "emoji"}'

DELETE /messages/{id}/star

Delete messages star. Authenticate with your channel token.

FieldInTypeRequiredNotes
idpathstringYes
curl -X DELETE https://agakural.online/messages/{id}/star \
  -H "Authorization: Bearer $TOKEN"

PUT /messages/{id}/star

Update messages star. Authenticate with your channel token.

FieldInTypeRequiredNotes
idpathstringYes
curl -X PUT https://agakural.online/messages/{id}/star \
  -H "Authorization: Bearer $TOKEN"

POST /messages/audio

Send a audio message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
mediabodystringYes
captionbodystringNo
filenamebodystringNo
mimetypebodystringNo
voicebodybooleanNo
curl -X POST https://agakural.online/messages/audio \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "media": "media"}'

POST /messages/contact

Send a contact message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
namebodystringYesUp to 100 characters
phonebodystringYesUp to 20 characters
curl -X POST https://agakural.online/messages/contact \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "name": "name", "phone": "phone"}'

POST /messages/document

Send a document message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
mediabodystringYes
captionbodystringNo
filenamebodystringNo
mimetypebodystringNo
voicebodybooleanNo
curl -X POST https://agakural.online/messages/document \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "media": "media"}'

POST /messages/event

Send a event message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
namebodystringYesUp to 200 characters
descriptionbodystringNoUp to 2048 characters
start_timebodyintegerYesRange 0–
end_timebodyintegerNoRange 0–
callbodyobjectNoOne of: audio, video
locationbodyobjectNo
curl -X POST https://agakural.online/messages/event \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "name": "name", "start_time": 1}'

POST /messages/image

Send a image message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
mediabodystringYes
captionbodystringNo
filenamebodystringNo
mimetypebodystringNo
voicebodybooleanNo
curl -X POST https://agakural.online/messages/image \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "media": "media"}'

POST /messages/interactive

Send a interactive message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
typebodyobjectYesOne of: button, list
headerbodystringNoUp to 60 characters
bodybodystringYesUp to 1024 characters
footerbodystringNoUp to 60 characters
buttonsbodyarray of objectNo
listbodyobjectNo
curl -X POST https://agakural.online/messages/interactive \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "type": "type", "body": "body"}'

POST /messages/link_preview

Send a link preview message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
bodybodystringYesUp to 4096 characters
urlbodystringYes
titlebodystringNoUp to 200 characters
descriptionbodystringNoUp to 500 characters
previewbodystringNo
curl -X POST https://agakural.online/messages/link_preview \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "body": "body", "url": "url"}'

GET /messages/list

Get messages list. Authenticate with your channel token.

FieldInTypeRequiredNotes
countqueryintegerNoRange –500
offsetqueryintegerNo
chat_idquerystringNo
curl -X GET https://agakural.online/messages/list \
  -H "Authorization: Bearer $TOKEN"

POST /messages/location

Send a location message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
latitudebodynumberYes
longitudebodynumberYes
namebodystringNo
addressbodystringNo
curl -X POST https://agakural.online/messages/location \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "latitude": 1, "longitude": 1}'

POST /messages/media/{type}

Create a messages media. Authenticate with your channel token.

FieldInTypeRequiredNotes
toquerystringNo
typepathstringYes
tobodystringNo
quotedbodystringNo
typing_timebodynumberNoRange 0–60
mediabodystringYes
captionbodystringNo
filenamebodystringNo
mimetypebodystringNo
curl -X POST https://agakural.online/messages/media/{type} \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"media": "media"}'

POST /messages/poll

Send a poll message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
titlebodystringYesUp to 255 characters
optionsbodyarray of stringYes
countbodyintegerNoRange 1–12
curl -X POST https://agakural.online/messages/poll \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "title": "title", "options": []}'

POST /messages/sticker

Send a sticker message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
mediabodystringYes
curl -X POST https://agakural.online/messages/sticker \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "media": "media"}'

POST /messages/text

Send a text message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
bodybodystringYesUp to 4096 characters
mentionsbodyarray of stringNo
editbodystringNo
curl -X POST https://agakural.online/messages/text \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "body": "body"}'

POST /messages/video

Send a video message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
mediabodystringYes
captionbodystringNo
filenamebodystringNo
mimetypebodystringNo
voicebodybooleanNo
curl -X POST https://agakural.online/messages/video \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "media": "media"}'

POST /messages/voice

Send a voice message. Authenticate with your channel token.

FieldInTypeRequiredNotes
tobodystringYes
quotedbodystringNo
typing_timebodynumberNoRange 0–60
mediabodystringYes
curl -X POST https://agakural.online/messages/voice \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to": "919876543210", "media": "media"}'