Get all contacts
Get All Contacts
Retrieve a list of all contacts in the WhatsApp instance with pagination and sorting options.
GET
Get all contacts
Retrieve a paginated list of all contacts in your WhatsApp instance.
This endpoint allows you to:
- Fetch all contacts from your WhatsApp instance
- Paginate through large contact lists
- Sort contacts by name or ID
- Control the number of contacts returned
This is useful for syncing contacts with your CRM, building contact lists, or displaying contacts in your application.
Use Cases
Contact Synchronization
Sync all your WhatsApp contacts with your CRM or external database.Contact Management
Build a contact management interface with pagination and sorting capabilities.Bulk Operations
Retrieve contact lists for bulk messaging or data analysis operations.Export Contacts
Export your WhatsApp contacts for backup or migration purposes.Query Parameters
limit
- Type: Integer
- Range: 1-1000
- Default: 100
- Description: Number of contacts to return per request
offset
- Type: Integer
- Minimum: 0
- Default: 0
- Description: Number of contacts to skip (for pagination)
sort_by
- Type: String
- Options:
id,name - Default:
name - Description: Field to sort contacts by
sort_order
- Type: String
- Options:
asc,desc - Default:
asc - Description: Sort order (ascending or descending)
Response Examples
Successful Response
When contacts are retrieved successfully:Pagination Example
To paginate through contacts, use thelimit and offset parameters:
Best Practices
The
pushname is the name the user has set in their WhatsApp profile, while name is the name saved in your phone’s contacts.Integration Example
Fetching All Contacts with Pagination
The
chatId can be in any format +20123456789, 20123456789, 0123456789, or 123456789Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
application/json
Example:
"application/json"
application/json
Example:
"application/json"
Path Parameters
Instance UUID copied from hypersender dashboard
Example:
"{{ instance_id }}"
Query Parameters
Number of contacts to return (1-1000)
Required range:
1 <= x <= 1000Example:
100
Number of contacts to skip
Required range:
x >= 0Example:
0
Sort by id or name
Available options:
id, name Example:
"name"
Sort order: asc or desc
Available options:
asc, desc Example:
"asc"