Contacts
Get a contact
One customer with their details and their 10 most recent conversations. Customer API.
GET
/
contacts
/
{contact_id}
Get a contact
curl --request GET \
--url https://answeringagent.com/api/v1/contacts/{contact_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://answeringagent.com/api/v1/contacts/{contact_id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://answeringagent.com/api/v1/contacts/{contact_id}', 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://answeringagent.com/api/v1/contacts/{contact_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://answeringagent.com/api/v1/contacts/{contact_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://answeringagent.com/api/v1/contacts/{contact_id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/contacts/{contact_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 77310,
"url": "https://answeringagent.com/dashboard/contacts/77310",
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"company": "<string>",
"stage": "<string>",
"tags": [
"<string>"
],
"notes": "<string>",
"blocked": true,
"phone_call_count": 123,
"first_contact_at": "2023-11-07T05:31:56Z",
"last_call_at": "2023-11-07T05:31:56Z",
"recent_conversations": [
{
"id": 184532,
"url": "https://answeringagent.com/dashboard/conversations/184532",
"channel": "phone",
"channels": [
"phone"
],
"started_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z",
"title": "Cancel monthly membership",
"summary": "<string>",
"category": "cancellation",
"customer": {
"name": "Dana Ruiz",
"phone": "+15125550118",
"email": "dana.ruiz@example.com"
},
"phone_line": {
"id": 2181,
"name": "Westside Wash",
"phone_number": "+15125550142"
},
"duration_seconds": 214,
"has_recording": true
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "This endpoint accepts GET.",
"code": "method_not_allowed"
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}Authorizations
Path Parameters
The contact ID.
Required range:
x >= 1Response
The contact.
Example:
77310
Example:
"https://answeringagent.com/dashboard/contacts/77310"
Phone calls with this contact that the key can see. Texts, chats, and emails that started on their own are not counted.
When the contact record was created. Not always the first conversation.
When the contact's latest phone call or website chat handoff started. Null when the key cannot see it.
Maximum array length:
10Show child attributes
Show child attributes
⌘I
Get a contact
curl --request GET \
--url https://answeringagent.com/api/v1/contacts/{contact_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://answeringagent.com/api/v1/contacts/{contact_id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://answeringagent.com/api/v1/contacts/{contact_id}', 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://answeringagent.com/api/v1/contacts/{contact_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://answeringagent.com/api/v1/contacts/{contact_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://answeringagent.com/api/v1/contacts/{contact_id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/contacts/{contact_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 77310,
"url": "https://answeringagent.com/dashboard/contacts/77310",
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"company": "<string>",
"stage": "<string>",
"tags": [
"<string>"
],
"notes": "<string>",
"blocked": true,
"phone_call_count": 123,
"first_contact_at": "2023-11-07T05:31:56Z",
"last_call_at": "2023-11-07T05:31:56Z",
"recent_conversations": [
{
"id": 184532,
"url": "https://answeringagent.com/dashboard/conversations/184532",
"channel": "phone",
"channels": [
"phone"
],
"started_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z",
"title": "Cancel monthly membership",
"summary": "<string>",
"category": "cancellation",
"customer": {
"name": "Dana Ruiz",
"phone": "+15125550118",
"email": "dana.ruiz@example.com"
},
"phone_line": {
"id": 2181,
"name": "Westside Wash",
"phone_number": "+15125550142"
},
"duration_seconds": 214,
"has_recording": true
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "This endpoint accepts GET.",
"code": "method_not_allowed"
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}