Share the profile

Works on
  • iMessage

Offer your line's name and photo in a direct message

POST/v1/commands/profile.share

Offers your iMessage name and photo to the other person in a direct message, the same prompt Messages shows when you share your contact card.

Honors Idempotency-Key.

Target

Prop

Type

On an iMessage line, target.conversationId must be a conversation the person has already written in. A share addressed by a phone number or an email instead, or into a conversation the person has not written in, is 422 validation_failed at target.conversationId, and nothing is sent.

If the person first wrote from a group, the conversation is the group's, and a share into it is refused with 400 bad_request and details.reason: "invalid_target". A share goes to one person.

Payload

Empty — but the key is still required:

{}

Request

curl https://api.mapier.ai/v1/commands/profile.share \
  -H "Authorization: Bearer $MAPIER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: share-card-a0000000" \
  -H "x-mapier-version: 2026-12-01" \
  -d '{
    "target": {
      "kind": "conversation",
      "conversationId": "a0000000-0000-4000-8000-000000000001"
    },
    "payload": {}
  }'

Response

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

The command ends succeeded both when the card was offered and when iMessage declined to show the prompt — usually because the recipient already has the card — and the result does not tell the two apart. This result does not carry namePhoto; profile.get and profile.set do.

name_photo.share is deprecated. Use profile.share. Results and events still carry type: "name_photo.share".

Errors

A command answers the one set of HTTP refusals POST /v1/commands/{type} publishes — every type the same codes, service_busy and capacity_exhausted among them — so that table is the one to handle. What is particular to this type:

  • 422 validation_failed at target.conversationId, and 400 bad_request with details.reason: "invalid_target" for a group's conversation (above), both before anything is sent.

A share the line could not offer ends on the stream, not as an HTTP refusal.

Guide