Contacts

List a contact's messages

GET/contacts/{phone}/messagesScope messages:read

Returns messages to and from a contact, newest first. To page back, pass the nextBefore value from the last response as before.

Path parameters

  • phonestringrequired

    The contact's phone number with country code. Anything other than digits is ignored, so +91 98765 43210 works.

Query parameters

  • beforestring

    Only messages older than this ISO 8601 time.

  • limitinteger

    Up to 100. Defaults to 50.

Good to know

  • status is received for messages they sent you, and sent, delivered, read or failed for yours.
  • nextBefore is null on the last page.

Errors

Plus the errors any endpoint can return, such as a missing key or scope. See Errors.

# 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

    List a contact's messages - Wamafy API