GET /contacts
List all contacts belonging to the account. A filter can be specified in order to get more specific results.
Optional Parameters
Parameter | Type | Description |
---|---|---|
page | Integer | The page of contacts. If not specified it will default to page 1. |
source | Source | The integration type (e.g. whatsapp ) |
tags | string[] | The matching tags, comma-separated (e.g. sales,lead ). Tags are case-insentive. |
Example Request
- cURL
- Node
- Ruby
- Go
- PHP
- Python
curl -X GET "https://api.callbell.eu/v1/contacts" \
-H "Authorization: Bearer test_gshuPaZoeEG6ovbc8M79w0QyM" \
-H "Content-Type: application/json"
import axios from 'axios';
const response = await axios.get('https://api.callbell.eu/v1/contacts', {
headers: {
'Authorization': 'Bearer test_gshuPaZoeEG6ovbc8M79w0QyM',
'Content-Type': 'application/json'
}
});
require 'net/http'
uri = URI('https://api.callbell.eu/v1/contacts')
req = Net::HTTP::Get.new(uri)
req.content_type = 'application/json'
req['Authorization'] = 'Bearer test_gshuPaZoeEG6ovbc8M79w0QyM'
req_options = {
use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(req)
end
package main
import (
"fmt"
"io"
"log"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.callbell.eu/v1/contacts", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer test_gshuPaZoeEG6ovbc8M79w0QyM")
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
bodyText, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.callbell.eu/v1/contacts');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer test_gshuPaZoeEG6ovbc8M79w0QyM',
'Content-Type: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
import requests
headers = {
'Authorization': 'Bearer test_gshuPaZoeEG6ovbc8M79w0QyM',
'Content-Type': 'application/json',
}
response = requests.get('https://api.callbell.eu/v1/contacts', headers=headers)
Response
Parameter | Type | Description |
---|---|---|
contacts | Contact[] | A list of contacts. |
Example Response
response.json
{
"contacts": [
{
"uuid": "414a6d692bd645ed803f2e7ce360d4c8",
"name": "John Doe",
"phoneNumber": "+123 456 789",
"avatarUrl": null,
"createdAt": "2020-11-13T21:08:53Z",
"source": "whatsapp",
"href": "https://dash.callbell.eu/contacts/414a6d692bd645ed803f2e7ce360d4c8",
"assignedUser": "john.doe@email.com",
"tags": [
"sales",
"lead"
],
"customFields":{
"Stripe link": "https://stripe.com/contacts/cus1234567",
"Billing Address": "3 Abbey Rd, London"
}
},
...
{
"uuid": "ff8bec9363bc4c29b8b044eabf2afebd",
"name": "Mario Rossi",
"phoneNumber": "+33 11 22 33 44",
"avatarUrl": null,
"createdAt": "2021-02-24T20:33:06Z",
"source": "whatsapp",
"href": "https://dash.callbell.eu/contacts/ff8bec9363bc4c29b8b044eabf2afebd",
"assignedUser": null,
"tags": [
"sales",
"lead",
"hot"
],
"customFields":{
"Stripe link": "https://stripe.com/contacts/cus124124153"
}
}
]
}