Get the profile

Works on
  • iMessage

Read the name and photo people see for your line

POST/v1/commands/profile.get

Reads the iMessage line's own Name and Photo card: the name and photo every person the line writes to sees. It is not a vCard, and it is not anyone else's contact. It messages nobody.

Honors Idempotency-Key. The 202 is followed by a command event carrying the card as namePhoto.

Target

The line itself, never a conversation or a person.

Prop

Type

Payload

None. Send {} or leave payload out. Any key in it is 422 validation_failed at payload.<key>.

Request

curl https://api.mapier.ai/v1/commands/profile.get \
  -H "Authorization: Bearer $MAPIER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: card-read-1" \
  -H "x-mapier-version: 2026-12-01" \
  -d '{
    "target": { "lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d" }
  }'

Response

202 Accepted
{
  "commandId": "cmd-5",
  "status": "queued",
  "disposition": "queued",
  "lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
  "lineSelection": "named"
}

Then, on the response stream, a succeeded event with the card:

event: command — succeeded
{
  "commandId": "cmd-5",
  "logicalActionId": "card-read-1",
  "status": "succeeded",
  "errorCode": null,
  "conversationId": null,
  "type": "name_photo.get",
  "messageId": null,
  "namePhoto": {
    "name": "Ada Lovelace",
    "firstName": "Ada",
    "lastName": "Lovelace",
    "hasPhoto": true
  },
  "failureClass": null
}

Prop

Type

The photo itself is not returned. There is no way to read it back: to change it, set a new one. namePhoto is null on every result but a succeeded get or set.

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.get is deprecated. Use profile.get. Results and events still carry type: "name_photo.get".

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_allowed for a target.lineId that is not a line of the key's project — details.reason: not_owned, details.lineId the id sent.
  • 422 validation_failed at payload.<key> for any key.
  • 404 unsupported_command with reason: not_on_channel on a line of any other channel.
  • 503 line_unavailable for a paused or released line.

Guide