Links

Works on
  • iMessage
  • WhatsApp

Send a link that the person's phone shows as a preview card

A link message sends one web address. The person's phone builds the preview card itself, from the title, description and image the page publishes.

curl -X POST https://api.mapier.ai/v1/commands/message.send \
  -H "Authorization: Bearer $MAPIER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-4821-link" \
  -H "x-mapier-version: 2026-12-01" \
  -d '{
    "target": { "conversationId": "a0000000-0000-4000-8000-000000000001" },
    "payload": { "kind": "link", "url": "https://example.com/orders/4821" }
  }'
202 Accepted
{
  "commandId": "0192b3e1-…",
  "status": "queued",
  "repeated": false,
  "lineId": "0192a7b0-…",
  "lineSelection": "reused_active_chat",
  "channel": "imessage"
}

Nothing goes beside kind and url.

Get a good preview

You send only the address. There is no field for a title, a description or an image. Give the page og:title, og:description and og:image tags, and the card shows all three. A page without them gets a plain card, often just the address.

On WhatsApp the link goes out as a text with WhatsApp's preview turned on.

Limits

The address is an absolute http or https link of at most 2,048 characters, with no spaces or line breaks. Shorten long tracking links rather than cutting them.

On iMessage a link goes only into a conversation the person has written in, or a group chat. To start with someone new, send a text first.

A link a person sends arrives as a message.received event with the address in text. Incoming messages shows the whole event.

Errors you may see

Each of these comes back at once, and nothing is sent.

ErrorMeansFix
422 validation_failedThe address is not an absolute http or https linkSend the full address
422 validation_failed, conversation_not_confirmedThe person has not written in this conversation yetSend a text first
404 unsupported_command, not_on_channelThe line's channel does not send link cardsSend the address in a text

Next