Skip to main content
GET
/
user
/
my
/
contacts
Get Contacts
curl --request GET \
  --url https://api.example.com/user/my/contacts \
  --header 'Authorization: <authorization>'
{
  "500": {},
  "code": "<string>",
  "message": "<string>",
  "results": {
    "data": [
      {
        "jid": "<string>",
        "name": "<string>"
      }
    ]
  }
}
Get a complete list of all contacts saved in your WhatsApp account.

Authentication

Authorization
string
required
Basic authentication credentials (username:password in base64)

Headers

X-Device-Id
string
Device identifier for multi-device support. Required when multiple devices are registered. If only one device is registered, it will be used as the default.

Response

code
string
Response code indicating success or failureExample: SUCCESS
message
string
Human-readable response messageExample: Success get list contacts
results
object
Contacts data
data
array
Array of contact objects
jid
string
Contact’s WhatsApp JID (identifier)Example: [email protected]
name
string
Contact’s saved nameExample: Aldino Kemal

Example Request

curl -X GET 'http://localhost:3000/user/my/contacts' \
  -u 'username:password' \
  -H 'X-Device-Id: my-device-id'

Response Example

{
  "code": "SUCCESS",
  "message": "Success get list contacts",
  "results": {
    "data": [
      {
        "jid": "[email protected]",
        "name": "Aldino Kemal"
      },
      {
        "jid": "[email protected]",
        "name": "John Doe"
      },
      {
        "jid": "[email protected]",
        "name": "Jane Smith"
      }
    ]
  }
}

Error Responses

500
object
Internal Server Error
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Failed to fetch contacts",
  "results": null
}

Usage Notes

  • This endpoint returns all contacts synchronized with your WhatsApp account
  • The name field shows the name you’ve saved for each contact
  • The jid is the unique WhatsApp identifier for each contact
  • Contacts are returned in no particular order
  • The list includes only contacts who have WhatsApp accounts
  • To check if a specific number is on WhatsApp, use the /user/check endpoint instead

Build docs developers (and LLMs) love