API Documentation
Contacts
Use contact APIs to fetch contacts, check whether a phone number is available, read contact pictures, and map linked contact identifiers. These endpoints require a connected dashboard session owned by the API key account.
Common rules
Authentication
Send Authorization: Bearer YOUR_API_KEY with every request.
Session
Use the dashboard session name, such as {session}, or the session ID.
Contact ID
Use a phone number, {number}@c.us, or a linked contact ID.
Endpoints
https://chatflow.zeltacode.com/api/v1/contacts
Return contacts for a connected session.
https://chatflow.zeltacode.com/api/v1/contacts/{contact_id}
Return one contact by phone number, chat ID, or linked contact ID.
https://chatflow.zeltacode.com/api/v1/contacts/check-exists
Check whether a phone number can be used as a chat contact.
https://chatflow.zeltacode.com/api/v1/contacts/profile-picture
Return the profile picture URL for one contact.
https://chatflow.zeltacode.com/api/v1/contacts/lids
Return known linked contact ID to phone number mappings for a session.
https://chatflow.zeltacode.com/api/v1/contacts/lids/count
Return the number of known linked contact ID mappings for a session.
https://chatflow.zeltacode.com/api/v1/contacts/lids/{lid}
Return the phone chat ID mapped to a linked contact ID.
https://chatflow.zeltacode.com/api/v1/contacts/lids/pn/{phone_number}
Return the linked contact ID mapped to a phone chat ID.
1. Get all contacts
Return contacts for a connected session.
API name
Get all contacts
Purpose
Return contacts for a connected session. Use this when your application needs contact identity, availability, picture data, or linked ID mapping without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/contacts
curl -X GET "https://chatflow.zeltacode.com/api/v1/contacts?session={session}&limit=100&offset=0&sortBy=id&sortOrder=asc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}",
"limit": 100,
"offset": 0,
"sortBy": "id",
"sortOrder": "asc"
}
{
"success": true,
"message": "Contact action completed.",
"data": {
"action": "list",
"session": "{session}",
"contact_id": null,
"contact_response": [
{
"id": "{number}@c.us",
"number": "{number}",
"name": "Test Contact",
"chat_id": "{number}@c.us",
"pushname": "Test Contact",
"isGroup": false,
"isBlocked": false
},
{
"id": "100189004115993@lid",
"lid": "100189004115993@lid",
"pn": "{number}@c.us",
"number": "{number}",
"chat_id": "{number}@c.us",
"name": "",
"pushname": "Test Business"
}
]
}
}
2. Get one contact
Return one contact by phone number, chat ID, or linked contact ID.
API name
Get one contact
Purpose
Return one contact by phone number, chat ID, or linked contact ID. Use this when your application needs contact identity, availability, picture data, or linked ID mapping without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/contacts/{contact_id}
curl -X GET "https://chatflow.zeltacode.com/api/v1/contacts/{number}@c.us?session={session}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}"
}
{
"success": true,
"message": "Contact action completed.",
"data": {
"action": "get",
"session": "{session}",
"contact_id": null,
"contact_response": {
"id": "{number}@c.us",
"number": "{number}",
"name": "Test Contact",
"isGroup": false,
"isBlocked": false
}
}
}
3. Check phone exists
Check whether a phone number can be used as a chat contact.
API name
Check phone exists
Purpose
Check whether a phone number can be used as a chat contact. Use this when your application needs contact identity, availability, picture data, or linked ID mapping without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/contacts/check-exists
curl -X GET "https://chatflow.zeltacode.com/api/v1/contacts/check-exists?session={session}&phone={number}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}",
"phone": "{number}"
}
{
"success": true,
"message": "Contact action completed.",
"data": {
"action": "check-exists",
"session": "{session}",
"contact_id": null,
"contact_response": {
"numberExists": true,
"chatId": "{number}@c.us"
}
}
}
4. Get contact profile picture
Return the profile picture URL for one contact.
API name
Get contact profile picture
Purpose
Return the profile picture URL for one contact. Use this when your application needs contact identity, availability, picture data, or linked ID mapping without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/contacts/profile-picture
curl -X GET "https://chatflow.zeltacode.com/api/v1/contacts/profile-picture?session={session}&contact_id={number}@c.us&refresh=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}",
"contact_id": "{number}@c.us",
"refresh": false
}
{
"success": true,
"message": "Contact action completed.",
"data": {
"action": "profile-picture",
"session": "{session}",
"contact_id": "{number}@c.us",
"contact_response": {
"profilePictureURL": "https://example.com/profile.jpg"
}
}
}
5. Get all linked IDs
Return known linked contact ID to phone number mappings for a session.
API name
Get all linked IDs
Purpose
Return known linked contact ID to phone number mappings for a session. Use this when your application needs contact identity, availability, picture data, or linked ID mapping without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/contacts/lids
curl -X GET "https://chatflow.zeltacode.com/api/v1/contacts/lids?session={session}&limit=100&offset=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}",
"limit": 100,
"offset": 0
}
{
"success": true,
"message": "Contact action completed.",
"data": {
"action": "lids",
"session": "{session}",
"contact_id": null,
"contact_response": [
{
"lid": "123456789@lid",
"pn": "{number}@c.us"
}
]
}
}
6. Get linked ID count
Return the number of known linked contact ID mappings for a session.
API name
Get linked ID count
Purpose
Return the number of known linked contact ID mappings for a session. Use this when your application needs contact identity, availability, picture data, or linked ID mapping without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/contacts/lids/count
curl -X GET "https://chatflow.zeltacode.com/api/v1/contacts/lids/count?session={session}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}"
}
{
"success": true,
"message": "Contact action completed.",
"data": {
"action": "lids-count",
"session": "{session}",
"contact_id": null,
"contact_response": {
"count": 123
}
}
}
7. Get phone by linked ID
Return the phone chat ID mapped to a linked contact ID.
API name
Get phone by linked ID
Purpose
Return the phone chat ID mapped to a linked contact ID. Use this when your application needs contact identity, availability, picture data, or linked ID mapping without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/contacts/lids/{lid}
curl -X GET "https://chatflow.zeltacode.com/api/v1/contacts/lids/123456789@lid?session={session}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}"
}
{
"success": true,
"message": "Contact action completed.",
"data": {
"action": "lid-to-phone",
"session": "{session}",
"contact_id": null,
"contact_response": {
"lid": "123456789@lid",
"pn": "{number}@c.us"
}
}
}
8. Get linked ID by phone
Return the linked contact ID mapped to a phone chat ID.
API name
Get linked ID by phone
Purpose
Return the linked contact ID mapped to a phone chat ID. Use this when your application needs contact identity, availability, picture data, or linked ID mapping without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/contacts/lids/pn/{phone_number}
curl -X GET "https://chatflow.zeltacode.com/api/v1/contacts/lids/pn/{number}@c.us?session={session}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}"
}
{
"success": true,
"message": "Contact action completed.",
"data": {
"action": "phone-to-lid",
"session": "{session}",
"contact_id": null,
"contact_response": {
"lid": "123456789@lid",
"pn": "{number}@c.us"
}
}
}