---
title: "Use a gift code"
method: POST
path: "/account/v1alpha1/gift-code/use"
tags: ["UseGiftCode"]
---

# Use a gift code

`POST /account/v1alpha1/gift-code/use`

## Request

- Base URL: `https://localhost:2333`
- URL: `https://localhost:2333/account/v1alpha1/gift-code/use`
- Auth: none declared

Redeem a gift code and apply the credit to the user's account

## Request body

- HelperUseGiftCodeReq
  - `code` string, required: @Summary Gift code to be used @Description The code of the gift card to be redeemed @JSONSchema required
  - `kubeConfig` string
  - `owner` string
  - `token` string
  - `userID` string
  - `userUID` string

## Response `200`

Successfully redeemed gift code

- HelperUseGiftCodeResp
  - `data` HelperUseGiftCodeRespData
    - `userID` string
  - `message` string

## Other responses

- `400`: Failed to parse use gift code request
- `401`: Authentication error
- `500`: Failed to redeem gift code

## Changes

- **2024-08-30** `4f451499c24a`: 1 info
  - endpoint added
- **2023-12-13** `ac0fa9d94489`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/labring/apis/sealos-account-service/changes/account/v1alpha1/gift-code/use/post.md)

---

[API](https://skmtc.dev/labring/apis/sealos-account-service.md) - [All operations](https://skmtc.dev/labring/apis/sealos-account-service/llms.txt) - [OpenAPI document](https://skmtc.dev/labring/apis/sealos-account-service/revisions/acd38d9540d3?raw)
