---
title: "Creategiftcardconsent"
method: POST
path: "/v2/giftcards/gdpr/consent"
tags: ["Gift Cards"]
---

# Creategiftcardconsent

`POST /v2/giftcards/gdpr/consent`

## Request

- Base URL: `https://api.loyalty.dog`
- URL: `https://api.loyalty.dog/v2/giftcards/gdpr/consent`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/loyalty/apis/loyaltydog/docs/v2/giftcards/gdpr/consent/post.ts> (a function with typed inputs; its response is checked against the schema)

Create or update GDPR consent for a customer identified by email or phone.

Use this endpoint when saving consent without a known customerId.
Requires customerEmail or customerPhone in the request body.

## Query parameters

- `programId` string
- `cardId` string

## Headers

- `X-Eposn-Customer-Token` string, nullable
- `X-Eposn-Merchant-Token` string, nullable

## Request body

- ConsentRequest
  - `purposes` string[]
  - `ipAddress` string, nullable
  - `customerEmail` string, nullable
  - `customerPhone` string, nullable

## Response `200`

Successful Response

- ConsentRecordResponse
  - `customerId` string, required
  - `purposes` string[], required
  - `consentedAt` string, date-time, required
  - `ipAddress` string, nullable, required
  - `expiresAt` string, date-time, nullable, required
  - `updatedAt` string, date-time, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/loyalty/apis/loyaltydog.md) - [All operations](https://skmtc.dev/loyalty/apis/loyaltydog/llms.txt) - [OpenAPI document](https://skmtc.dev/loyalty/apis/loyaltydog/revisions/5803242b0551?raw)
