> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thanks.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Giftcard Order

> Giftcards can be sent to recipients via the API.

Giftcards offer extension features to end users, including gating and scan tracking - for more info visit [https://help.thanks.io/sending-mail/mailer-types/gift-cards](https://help.thanks.io/sending-mail/mailer-types/gift-cards)

## Send a Creative (Recommended)

Design the gift card once as a creative in your [dashboard](https://dashboard.thanks.io/app/creatives). A gift card creative's message carries the gift card brand and amount along with the message and handwriting, so the send only needs the creative's ID and your audience. Don't pass `giftcard_brand` or `giftcard_amount_in_cents`: a creative send that includes either is rejected with a `422`. To send a different brand or amount, save it as its own creative.

**1. Find the Creative**

List your complete gift card creatives and note the `id` of the one you want to send. You can also copy the ID from the creative's card menu (**Copy creative ID**) in the dashboard.

See [List Creatives](https://docs.thanks.io/api-reference/endpoint/creatives-library/list-all-creatives.md) for more info.

```bash theme={null}
curl -X GET "https://api.thanks.io/api/v2/creatives?mailer_type=giftcard&complete_only=1" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**2. Send the Creative**

Pass the ID as `creative_id` with your recipients, as a number. Replace `501` below with the ID from the previous step. The account is charged for the mailing and for the face value of each gift card.

```bash theme={null}
curl -X POST "https://api.thanks.io/api/v2/send/giftcard" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "creative_id": 501,
    "recipients": [
      {
        "name": "Jane Doe",
        "address": "456 Another St",
        "city": "Fake City",
        "province": "NY",
        "postal_code": "55555",
        "country": "US"
      }
    ]
  }'
```

To check the total first, post the same body to [`POST /estimate/giftcard`](https://docs.thanks.io/api-reference/endpoint/estimate/estimate-giftcard). A creative sends exactly as saved, so leave out the image, message, handwriting, and background parameters. See [Send a Creative](https://docs.thanks.io/api-reference/send-mailer-usage.md#send-a-creative) for the full rules.

## Choose a Brand and Amount per Request

To pick the brand and amount in the request instead, query the available options and pass them with the front image and message:

**1. Query the available giftcard brands and amounts**

See [giftcard brands](https://docs.thanks.io/api-reference/endpoint/giftcards/list-brands.md) for more info.

```bash theme={null}
curl -X GET "https://api.thanks.io/api/v2/giftcard-brands" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**2. Select Giftcard Brand and Amount**

After querying the available giftcard brands and amounts, select the desired brand and amount for your giftcard.

**3. Send Giftcard**

Send a giftcard to a recipient via the API.

See [send-giftcard](https://docs.thanks.io/api-reference/endpoint/send-mailer/send-giftcard.md) for more info.

```bash theme={null}
curl -X POST "https://api.thanks.io/api/v2/send/giftcard" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "giftcard_brand": "GIFT_CARD_BRAND_ID_FROM_PREVIOUS_STEP",
    "giftcard_amount_in_cents": "GIFT_CARD_AMOUNT_IN_CENTS_FROM_PREVIOUS_STEP",
    "front_image_url": "https://cdn.thanks.io/notecard-inspirations/note1.png",
    "message": "Hey %FIRST_NAME%!,\n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!",
    "recipients": [
      {
        "name": "Jane Doe",
        "address": "456 Another St",
        "city": "Fake City",
        "province": "NY",
        "postal_code": "55555",
        "country": "US"
      }
    ]
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.