Skip to content
Livstick Developers

Prerequisites

An access token provided by the Livstick team, and a point in your gift-card issuance flow where you can call the API server-side. If you don’t have a token yet, request developer access.

Create the container for the gift card

Use the gift card’s own code as crid, so the container and the card stay tied to the same reference. Leaving mode unset keeps it at the default: single, one message. Capture editKey from the response now — it is returned only at creation.

POST /containers
curl -X POST https://client-api.v5.livstick.com/api/v3/containers \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{ "crid": "GIFTCARD-4821", "language": "en_us" }'

Let the buyer record the message

Mount the Recorder where the buyer completes their gift card purchase, passing the urid and editKey from the container you just created.

HTML gift card checkout page
<livstick-widget-v2
  uid="{urid from step 1}"
  domain="example.com"
></livstick-widget-v2>
<script>
  const widget = document.querySelector("livstick-widget-v2");
  widget.editKey = "{editKey from step 1}";
</script>

Retrieve the URL for your gift-card email

Unlike a scenario where Livstick sends the delivery email, here it is your own gift-card email that carries the link — so there is no notify call. Retrieve the URL and place it in the e-card or gift-card email you send yourself.

GET /containers/{crid}/url
curl https://client-api.v5.livstick.com/api/v3/containers/GIFTCARD-4821/url \
  -H "Authorization: Bearer {ACCESS_TOKEN}"

Where this differs from other scenarios

Because your own email carries the link, you never call notify or unlock for this scenario — those exist for cases where Livstick owns the delivery, or where the message needs to stay locked until you release it. If you would rather skip mounting the Recorder in your own pages entirely, see the hosted journey, which needs no front-end integration at all.