Contacts
List a contact's messages
GET
/contacts/{phone}/messagesScope messages:readReturns messages to and from a contact, newest first. To page back, pass the nextBefore value from the last response as before.
Path parameters
phonestringrequiredThe contact's phone number with country code. Anything other than digits is ignored, so
+91 98765 43210works.
Query parameters
beforestringOnly messages older than this ISO 8601 time.
limitintegerUp to 100. Defaults to 50.
Good to know
statusisreceivedfor messages they sent you, andsent,delivered,readorfailedfor yours.nextBeforeisnullon the last page.
Errors
Plus the errors any endpoint can return, such as a missing key or scope. See Errors.
Request
# macOS, Linux or Git Bash, with WAMAFY_API_KEY set. The quoting does not work in Windows cmd or PowerShell.
curl "https://api.wamafy.com/api/v1/public/contacts/919876543210/messages?limit=20" \
-H "Authorization: Bearer $WAMAFY_API_KEY"Response 200
{
"success": true,
"data": [
{
"id": "5e2a7c91-3b4d-4f6e-8a1c-9d0b2e4f6a73",
"direction": "inbound",
"type": "text",
"text": "Is the blue one in stock?",
"mediaMimeType": null,
"mediaCaption": null,
"messageId": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAEhgUM0E",
"status": "received",
"sentAt": "2026-10-07T09:58:12.000Z"
}
],
"pagination": {
"limit": 20,
"nextBefore": null
}
}Base URL https://api.wamafy.com/api/v1/public