Magic Links

Magic Links provide secure, one-time URLs to hosted services such as gift card purchasing. When a Magic Link is requested, an email is sent to the customer which contains the Magic Link. The customer is instructed to click on the link to complete the action.

POST/v1/magic-links

This endpoint allows you to create a new magic link.

Required attributes

  • Name
    pot
    Type
    string
    Description

    The unique identifier of the pot that will be used to pay for the gift card.

  • Name
    type
    Type
    enum
    Description

    The type of magic link you wish to send, current options are gift_card.

  • Name
    delivery
    Type
    enum
    Description

    Indicates whether the magic link should be sent to the customer by Collctiv. Set to manual if you plan on sending the link to the customer yourself. Options are automatic, manual.

Request

POST
/v1/magic-links
curl -X POST https://api.collctiv.com/v1/magic-links \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d "{'pot':'2b2423401-f2fb-4355-8cff-4456c88a962', 'type':'gift_card', 'delivery': 'automatic'}"

Response

{
    "pot":"2b2423401-f2fb-4355-8cff-4456c88a962",
    "customer": "0d474b37-00ae-4ca3-afad-bf80a824616f",
    "type": "gift_card",
    "delivery": "automatic",
    "url": "https://store.collctiv.com/031bcb99-886d-4840-b6ec-7863965a776e"
}

Was this page helpful?