> For the complete documentation index, see [llms.txt](https://docs.giftcardfactory.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giftcardfactory.app/integrations/gift-card-api/endpoints-and-requests/creates-a-gift-card.md).

# Creates a gift card

```
POST https://{store_name}.myshopify.com/apps/gcf/api/gift_card
```

There are additional optional parameters that can be specified in the body of the request when creating a gift card:

* `initial_value` - value of the gift card
* `expires_on` - gift card expiry date
* `email` - email of the customer. This customer will be assigned to gift card customer field. If email does not exist in Shopify backend - app will create one
* `recipient_email` - email of the recipient. This recipient will be assigned to gift card recipitn field. If email does not exist in Shopify backend - app will create one
* `note` - internal note, not visible to customers
* `message` - message sent in gift card email

{% hint style="info" %}
Only initial\_value parameter is required.
{% endhint %}

Response:

```json
HTTP/1.1 201 Created
{
  "gift_card": {
    "id": 634370326821,
    "balance": "4.0",
    "created_at": "2025-08-15T12:37:38Z",
    "currency": "AUD",
    "initial_value": "15.00",
    "disabled_at": null,
    "line_item_id": null,
    "api_client_id": null,
    "user_id": null,
    "customer_id": 9042221203749,
    "customer_email": "customer@test.com",
    "recipient_id": null,
    "recipient_email": null,
    "note": null,
    "expires_on": "2025-10-10",
    "message": null,
    "last_characters": "262f",
    "order_id": null,
    "code": "awap262f"
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.giftcardfactory.app/integrations/gift-card-api/endpoints-and-requests/creates-a-gift-card.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
