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

Put Contact Card

PUT
https://api.agentphone.ai/v1/numbers/:number_id/contact-card
PUT
/v1/numbers/:number_id/contact-card
1const url = 'https://api.agentphone.ai/v1/numbers/number_id/contact-card';
2const options = {
3 method: 'PUT',
4 headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
5 body: '{"firstName":"Emily","lastName":"Johnson","avatarUrl":"https://example.com/avatars/emily_johnson.png"}'
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}
Create or replace the iMessage contact card on this number.
Was this page helpful?
Previous

Delete Contact Card

Next
Built with

Authentication

AuthorizationBearer

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

Path parameters

number_idstringRequired

Request

This endpoint expects an object.
firstNamestringRequired>=1 character
lastNamestringRequired>=1 character
avatarUrlstringRequired>=1 character
displayNamestring or nullOptional

Response

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

Errors

422
Unprocessable Entity Error