For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGet API key
DocumentationIntegrationsAPI Reference
DocumentationIntegrationsAPI Reference
  • API Reference
      • GETGet Contact Card
      • PUTPut Contact Card
      • DELDelete Contact Card
LogoLogo
HomeGet API key
API ReferenceContact Cards

Get Contact Card

GET
https://api.agentphone.ai/v1/numbers/:number_id/contact-card
GET
/v1/numbers/:number_id/contact-card
1const url = 'https://api.agentphone.ai/v1/numbers/number_id/contact-card';
2const options = {
3 method: 'GET',
4 headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
5 body: '{}'
6};
7
8try {
9 const response = await fetch(url, options);
10 const data = await response.json();
11 console.log(data);
12} catch (error) {
13 console.error(error);
14}
1{
2 "firstName": "Emily",
3 "lastName": "Johnson",
4 "displayName": "Emily J.",
5 "hasAvatar": true
6}
Fetch the iMessage contact card set on this number.
Was this page helpful?
Previous

Put Contact Card

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

number_idstringRequired

Response

Successful Response
firstNamestring or null
lastNamestring or null
displayNamestring or null
hasAvatarbooleanDefaults to false

Errors

422
Unprocessable Entity Error