Skip to main content

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​

ParameterRequiredTypeDescription
apiKeyYesstringYour personal API key generated from the API Access page. Passed as a query parameter.
social_account_idYesstringThe 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​

FieldDescription
idThe saved Inbox contact ID. Pass this value as whatsapp_contact_id.
nameThe contact's saved name, or null when no name is saved.
phone_numberThe contact's saved phone number.

Only contacts belonging to the selected WhatsApp business phone number are returned.

Error Responses​

StatusWhen
401Missing or invalid apiKey.
403Inbox management is unavailable on the Basic plan.
404The WhatsApp account was not found, is disconnected, or does not belong to the authorized user.
422social_account_id is missing or invalid.
429The limit of 60 requests per minute per API key was exceeded. Wait for the Retry-After interval.
503API key verification is temporarily unavailable.

✅ Result: You have the contact ID needed to create a WhatsApp conversation!