Skip to content
Get Started

Contact Sharing API

Configure Name & Photo Sharing profiles for your Sendblue numbers

Configure Name & Photo Sharing profiles on your Sendblue numbers. When enabled, recipients see your contact card (name, photo, display name) when they receive messages.

Base URL: https://api.sendblue.co/api/v2/contact-sharing


Check whether a phone number has a Name & Photo Sharing profile configured.

GET /api/v2/contact-sharing/state
ParameterTypeRequiredDescription
fromNumberstringYesYour Sendblue number (E.164 format)
Terminal window
curl -X GET "https://api.sendblue.co/api/v2/contact-sharing/state?fromNumber=%2B14155551234" \
-H "sb-api-key-id: YOUR_API_KEY" \
-H "sb-api-secret-key: YOUR_API_SECRET"
{
"status": "OK",
"data": {
"hasProfile": true,
"firstName": "Jane",
"lastName": "Smith",
"displayName": "Jane at Acme"
}
}
FieldTypeDescription
hasProfilebooleantrue if name & photo sharing is active
firstNamestring | nullFirst name configured on the profile
lastNamestring | nullLast name configured on the profile
displayNamestring | nullOptional display name shown to recipients

Set up a Name & Photo Sharing profile on a phone number. If a profile exists, it will be overwritten.

POST /api/v2/contact-sharing/profile
ParameterTypeRequiredDescription
fromNumberstringYesYour Sendblue number (E.164 format)
firstNamestringYesFirst name displayed on the contact card
lastNamestringYesLast name displayed on the contact card
photoUrlstringYesPublic URL to profile photo (JPEG or PNG)
displayNamestringNoOptional display name shown alongside the contact card
Terminal window
curl -X POST "https://api.sendblue.co/api/v2/contact-sharing/profile" \
-H "sb-api-key-id: YOUR_API_KEY" \
-H "sb-api-secret-key: YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"fromNumber": "+14155551234",
"firstName": "Jane",
"lastName": "Smith",
"photoUrl": "https://example.com/team/jane-smith.jpg",
"displayName": "Jane at Acme"
}'
{
"status": "OK",
"data": {
"hasProfile": true,
"firstName": "Jane",
"lastName": "Smith",
"displayName": "Jane at Acme"
}
}

Remove the Name & Photo Sharing profile from a phone number.

DELETE /api/v2/contact-sharing/profile
ParameterTypeRequiredDescription
fromNumberstringYesYour Sendblue number (E.164 format)
Terminal window
curl -X DELETE "https://api.sendblue.co/api/v2/contact-sharing/profile" \
-H "sb-api-key-id: YOUR_API_KEY" \
-H "sb-api-secret-key: YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"fromNumber": "+14155551234"
}'
{
"status": "OK",
"data": {
"hasProfile": false
}
}

HTTP StatusDescription
400Missing or invalid parameters
401Invalid or missing API credentials
403Your account does not own this phone number
404No active Sendblue number found for the given fromNumber
500Operation failed on the device (see message for details)
503The phone number’s device is temporarily unavailable
{
"status": "ERROR",
"message": "Description of what went wrong"
}

  • Photo requirements: photoUrl must be a publicly accessible direct link to an image. The image is downloaded and applied to the device at the time of request. If unreachable or invalid, the request fails with a 500 error.

  • Propagation: After creating or updating a profile, the name and photo will be shared with contacts on subsequent iMessage conversations. Existing conversations may take some time to reflect the update.

  • Rate of change: Frequent updates are supported, but each update fully replaces the previous one.