Set the profile
- iMessage
Change the name and photo people see for your line
Sets the iMessage line's own Name and Photo card — what every person the line writes to sees. It does not edit a vCard, and it does not change anyone else's contact.
Honors Idempotency-Key: a retry under the same key returns the first command
without fetching the link again.
While the line's sending is paused a set is refused at once,
503 upstream_unavailable with reason: outbound_paused, and nothing is
queued.
Target
The line itself, as on profile.get.
Prop
Type
Payload
At least one of these. A set naming nothing to change is 422 validation_failed at payload.
Prop
Type
Each of these is 422 validation_failed before anything is sent:
- any other key, a blank or over-long name, or a link that is not https, at
payload.<key>; - a link that cannot be fetched, or a file that is not such an image or is
over 8 MiB, at
payload.photoUrl, itsreasonone of the link refusals a media send meets:media_fetch_refused,media_fetch_failed,media_too_largeorunsupported_media_type. If the line rejects an image Mapier accepted, thereasonisimage_too_largeorunreadable_image.
A target.lineId that is not a line of this project is 403 line_not_allowed,
with details.lineId naming the id sent.
Request
curl https://api.mapier.ai/v1/commands/profile.set \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: card-set-2026-09-30" \
-H "x-mapier-version: 2026-12-01" \
-d '{
"target": { "lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d" },
"payload": {
"name": "Northwind Support",
"photoUrl": "https://example.com/brand/avatar.png"
}
}'Response
{
"commandId": "cmd-6",
"status": "queued",
"disposition": "queued",
"lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
"lineSelection": "named"
}The set ends succeeded once the line has read the change back, and its
command event carries the card as read: namePhoto, with name, firstName,
lastName and hasPhoto, as on profile.get.
The photo itself is never returned.
{
"commandId": "cmd-6",
"status": "succeeded",
"type": "name_photo.set",
"namePhoto": {
"name": "Northwind Support",
"firstName": null,
"lastName": null,
"hasPhoto": true
},
"failureClass": null
}A set the line could not confirm ends ambiguous: the card may or may not have
changed. Read it with profile.get before you set
it again — and check a new photo on a phone, since hasPhoto is true for
the old photo and the new one alike.
On a line that cannot read or set its Name and Photo card, the command ends
failed with a capability errorCode and failureClass: capability, and
nothing changes.
name_photo.set is deprecated. Use profile.set. Results and events still carry type: "name_photo.set".
Errors
A command answers the one set of HTTP refusals
POST /v1/commands/{type} publishes, so that table
is the one to handle. What is particular to this type:
403 line_not_allowedfor atarget.lineIdthat is not a line of the key's project —details.reason: not_owned,details.lineIdthe id sent.422 validation_failedatpayload,payload.<key>orpayload.photoUrl, as above.404 unsupported_commandwithreason: not_on_channelon a line of any other channel.503 line_unavailablefor a paused or released line, and503 upstream_unavailablewithreason: outbound_pausedwhile the line's sending is paused.