name_photo.get

Read this line's own Messages name and photo — the card share later offers.

POST /v1/commands/name_photo.get

Reads this line's own Messages name and photo. That is the card name_photo.share later offers in a direct message. It is not a vCard, and it is not someone else's nickname.

The target is the line itself, not a chat. Omit target, or send { "kind": "connector" }.

Honours Idempotency-Key.

Payload

Empty — the key is still required:

{}

Request

curl https://api.mapier.ai/v1/commands/name_photo.get \
  -H "Authorization: Bearer $MAPIER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: name-photo-read-1" \
  -d '{ "payload": {} }'

Passing the line explicitly is the same read:

{ "target": { "kind": "connector" }, "payload": {} }

Response

202 Accepted
{ "commandId": "cmd-5", "status": "queued", "disposition": "queued" }

A proved read settles succeeded with outcome: "read". The card rides namePhoto on that command event, and on POST /v1/replay for the same commandId. A proved name_photo.set carries the same snapshot. No other verb returns namePhoto.

wallpaper is always null. This read never reports one, and name_photo.set never writes one.

namePhoto on the succeeded command event
{
  "hasPersonalNickname": true,
  "firstName": "Ada",
  "lastName": "Lovelace",
  "displayName": "Ada Lovelace",
  "hasAvatar": true,
  "wallpaper": null
}

Prop

Type

When the Mac cannot read it

A Mac that has not been updated to this read refuses the command. It settles failed with a capability errorCode and changes nothing. There is no discovery call that tells you beforehand.

Any authenticated caller for the account may post this. Which Mac answers is the account's connector.

Errors

StatusCodeCause
400bad_requestThe body is not a JSON object
400invalid_targetThe target is not a connector target. The body carries issues
401invalid_credentialsNo key, or one that is unknown, revoked or expired
422invalid_payloadThe payload is not an empty object
503no_line · line_unavailable · upstream_unavailableNo active line, the pinned line paused/released/down, or the transport did not answer — see Error codes

On this page