Get Stored Contacts (CRM Database)

Retrieve paginated, searchable contacts stored in your Wawp cloud database without querying the live WhatsApp device.

GET
https://api.wawp.net/v2/contacts/stored?access_token=YOUR_ACCESS_TOKEN&instance_id=123456789&limit=50&page=1&search=2010&session_name=default&workspace_id=1

Authentication Required

Login to swap the placeholders with your real Instance ID and Access Token.

Log In
Test /v2/contacts/stored endpoint
GETPOST

No query parameters required

This endpoint doesn't expect data in the URL.

Best practices

  • Use this endpoint to power CRM contact tables and search bars.

  • Pass page and limit parameters for smooth pagination.

Cloud-Stored Contacts Directory

The /v2/contacts/stored endpoint queries your indexed Wawp database (wawp_contacts) directly. Unlike /v2/contacts/all, it has zero impact on your WhatsApp session rate limits and supports instant pagination and keyword search across phone numbers, names, pushnames, and LIDs.

Request Parameters

Configure the parameters required to interact with this endpoint. All query and body arguments are listed below with their details.

Query Parameters & Request Body

Supported in URL Query String or JSON Body
string

Your unique WhatsApp Instance ID.

Example:
string

Your API Access Token.

Example:
string—

Optional session name (alternative to instance_id).

Example:
number—

Optional workspace ID filter.

Example:
number—

Page number for pagination (starts at 1).

Default: 1Example:
number—

Number of contacts per page (1–100).

Default: 50Example:
string—

Search term matching phone, name, pushname, or LID.

Example:

Build with AI using Wawp MCP

MCP READY

Connect Wawp API directly to Cursor, Windsurf, or Claude Desktop. Let AI write, test, and execute your WhatsApp integration code automatically!

How to Connect

Request Samples

Use these ready-to-go code snippets to integrate our API into your project quickly and efficiently. Choose your preferred language and library.

1const baseUrl = "https://api.wawp.net";
2const endpoint = "/v2/contacts/stored";
3const params = new URLSearchParams({
4 "instance_id": "123456789",
5 "access_token": "YOUR_ACCESS_TOKEN",
6 "session_name": "default",
7 "workspace_id": "1",
8 "page": "1",
9 "limit": "50",
10 "search": "2010"
11}).toString();
12
13
14fetch(`${baseUrl}${endpoint}${params ? '?' + params : ''}`, {
15 method: "GET",
16 headers: { "Content-Type": "application/json" },
17
18})
19 .then(async (response) => {
20 if (response.ok) {
21 const data = await response.json();
22 console.log("Success:", data);
23 return data;
24 }
25
26 // Error Handling
27 if (response.status === 400) {
28 console.error("Error 400: Bad Request - Missing Required Parameter(s)");
29 }
30 if (response.status === 401) {
31 console.error("Error 401: Unauthorized - Invalid or Missing Access Token");
32 }
33 if (response.status === 404) {
34 console.error("Error 404: Not Found - Session Does Not Exist");
35 }
36 if (response.status === 500) {
37 console.error("Error 500: Internal Server Error - Unexpected Failure");
38 }
39
40 const errorText = await response.text();
41 console.error(`Error ${response.status}: ${errorText}`);
42 })
43 .catch((error) => console.error("Network Error:", error));
Interactive Samples
Ln 43, Col 1javascript

Expected Responses

Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.

Stored contacts retrieved successfully
application/json
string *
number *
number *
number *
number *
array *

Example

{
"status": "success",
"total": 1,
"page": 1,
"limit": 50,
"totalPages": 1,
"data": {
  "0": {
    "id": 101,
    "phone": "201012345678",
    "lid": "123456789@lid",
    "name": "Ahmed Ali",
    "pushname": "Ahmed",
    "on_whatsapp": 1,
    "status": "active"
    }
  }
}
Bad Request - Missing Required Parameter(s)
Unauthorized - Invalid or Missing Access Token
Not Found - Session Does Not Exist
Internal Server Error - Unexpected Failure
Previous TopicGet All Contacts
Next TopicPurge Stored Contacts

Command Palette

Search for a command to run...