List contacts
curl --request GET \
--url https://{host}/api/public/v1/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/api/public/v1/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/public/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/public/v1/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/public/v1/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/public/v1/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/public/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"contact_number": "<string>",
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"lifecycle_stage": "lead",
"status": "<string>",
"status_name": "<string>",
"user": {
"id": 123,
"name": "<string>",
"email": "<string>"
},
"groups": [
{}
],
"primary_address": {
"id": 123,
"name": "<string>",
"attention": "<string>",
"email": "<string>",
"company_name": "<string>",
"mobile_no": "<string>",
"office_no": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>",
"country_name": "<string>",
"zone_id": 123,
"is_primary": true
},
"works_count": 123,
"quotations_count": 123,
"invoices_count": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"current_page": 123,
"last_page": 123,
"per_page": 123,
"from": 123,
"to": 123,
"total": 123
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is invalid, revoked, or expired."
}
}{
"error": {
"code": "insufficient_scope",
"message": "This API key does not have the required scope."
}
}Contacts
List contacts
Returns the contacts your key can see, newest first. Requires the contacts:read scope.
GET
/
contacts
List contacts
curl --request GET \
--url https://{host}/api/public/v1/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/api/public/v1/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/public/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/public/v1/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/public/v1/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/public/v1/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/public/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"contact_number": "<string>",
"company_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"lifecycle_stage": "lead",
"status": "<string>",
"status_name": "<string>",
"user": {
"id": 123,
"name": "<string>",
"email": "<string>"
},
"groups": [
{}
],
"primary_address": {
"id": 123,
"name": "<string>",
"attention": "<string>",
"email": "<string>",
"company_name": "<string>",
"mobile_no": "<string>",
"office_no": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>",
"country_name": "<string>",
"zone_id": 123,
"is_primary": true
},
"works_count": 123,
"quotations_count": 123,
"invoices_count": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"current_page": 123,
"last_page": 123,
"per_page": 123,
"from": 123,
"to": 123,
"total": 123
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is invalid, revoked, or expired."
}
}{
"error": {
"code": "insufficient_scope",
"message": "This API key does not have the required scope."
}
}Authorizations
An API key created in BeanRails, for example brk_live_....
Query Parameters
Records per page. Defaults to 10, capped at 100.
Required range:
1 <= x <= 100Page number, starting at 1.
Required range:
x >= 1Free-text search across the record's main fields, such as its number, name or email.
Filter by lifecycle stage.
Available options:
lead, customer Filter by contact status value.
Filter by assigned user ID.
