Messaging · iMessage

Create a tracked iMessage opt-in link

Creates a tracked iMessage opt-in link.

POSThttps://api.pozy.ai/v1/imessage/senders/{senderId}/opt-in-links
createImessageOptInLink

Guide: iMessage

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Authentication

Path parameters

NameTypeNotes
senderIdrequiredstring

Request body

application/json, required

  • bodystringrequired

    Up to 500 characters.

  • parametersmap of string
  • optInCodestring

    3 to 8 characters.

Example

curl -X POST "https://api.pozy.ai/v1/imessage/senders/68ef6f94df13738fb25f1e94/opt-in-links" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "body": "string"
}'

Response

200 on success

  • successboolean
  • linkobject
    • idstring
    • imessagestring
    • smsstring

      Can be null.

    • whatsappstring

      Can be null.

    • urlstring
200 response
{
  "success": true,
  "link": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "imessage": "Hello from Pozy",
    "sms": "string",
    "whatsapp": "string",
    "url": "https://pozy.ai/media/example-1.jpg"
  }
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is read-only, scoped to other profiles, or has this resource group disabled.
404not_foundNothing with that id exists in your workspace.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in iMessage