Read a Contact
GET /v1/contacts/{contact_id}
| Property | Value |
|---|---|
| Operation | get_contact |
| Group | Contacts |
| Scope | contacts:read |
Scopes of include values | profile needs contacts:content |
| Route class | read |
| Idempotency | No Idempotency-Key |
| Audit | An audited content read contacts.contact.read, when the request names an include value |
| Released in | 1.61.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Answers a Contact (1.61.0); its profile only when the read names include=profile, which needs contacts:content and is an audited content read (section 5, rule 5). A merged Contact answers its tombstone with merged_into_id.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the contacts:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl "$VOCAL_API/v1/contacts/ctc_..." \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/contacts/ctc_...`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/contacts/ctc_...",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contact_id | path | ContactId | yes | The id of a Contact: ctc_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
include | query | array of ContactInclude | no | profile adds the content (contacts:content). |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | Contact | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden |
404 | application/json | ErrorEnvelope | not_found |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is Contact.
| Field | Type | Required | Description |
|---|---|---|---|
consent | ContactConsentSummary | yes | |
created_at | Timestamp | yes | |
delete_after | Timestamp or null | yes | When a deleted Contact is purged; null otherwise. |
environment | Environment | yes | |
id | ContactId | yes | |
last_activity_at | Timestamp or null | yes | The last Call, message or API write, from which contact_inactivity_days counts. |
merged_into_id | ContactId or null | yes | The survivor of a merged one. |
object | "contact" | yes | |
profile | ContactProfile or null | yes | The content; null unless the read names include=profile. |
revision | integer | yes | |
source | ContactSource | yes | |
status | ContactStatus | yes | |
updated_at | Timestamp | yes |