Fetch WhatsApp Contacts
warning
Inbox management is not available on the Basic plan. Upgrade to Intermediate, Growth or Business plan to access this endpoint.
Overview
The Fetch WhatsApp Contacts endpoint returns the saved contacts for one connected WhatsApp business phone number. Get the required social_account_id from Fetch WhatsApp Accounts, then use the returned contact id as whatsapp_contact_id when you create a WhatsApp conversation.
Base URL:
https://message.oneupapp.io
Endpoint
GET /api/whatsapp/contacts
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
apiKey | Yes | string | Your personal API key generated from the API Access page. Passed as a query parameter. |
social_account_id | Yes | string | The connected WhatsApp business phone number ID returned by Fetch WhatsApp Accounts. |
Sample Request
curl --location --request GET \
"https://message.oneupapp.io/api/whatsapp/contacts?apiKey=YOUR_API_KEY&social_account_id=104040148726689"
Sample Response
{
"message": "OK",
"error": false,
"data": [
{
"id": 12,
"name": "Jane Doe",
"phone_number": "+15551234567"
}
],
"meta": []
}
Response Fields
| Field | Description |
|---|---|
id | The saved Inbox contact ID. Pass this value as whatsapp_contact_id. |
name | The contact's saved name, or null when no name is saved. |
phone_number | The contact's saved phone number. |
Only contacts belonging to the selected WhatsApp business phone number are returned.
Error Responses
| Status | When |
|---|---|
401 | Missing or invalid apiKey. |
403 | Inbox management is unavailable on the Basic plan. |
404 | The WhatsApp account was not found, is disconnected, or does not belong to the authorized user. |
422 | social_account_id is missing or invalid. |
429 | The limit of 60 requests per minute per API key was exceeded. Wait for the Retry-After interval. |
503 | API key verification is temporarily unavailable. |
✅ Result: You have the contact ID needed to create a WhatsApp conversation!