---
title: "Apply code"
method: POST
path: "/api/v4/main-account/codes/apply"
tags: ["Codes"]
---

# Apply code

`POST /api/v4/main-account/codes/apply`

The endpoint applies [WhiteBIT code](/glossary#whitebit-codes).

<Warning>
Rate limit: 60 requests/1 sec.
</Warning>

<Note>
The API does not cache the response.
</Note>

<Note>
To avoid leaking whether a code exists, most failure modes — invalid format, expired,
non-existent, or wrong passphrase — collapse to one generic rejection on field `code`.
Only two cases are distinguishable at the API surface: a code that has already been
applied, and a code created by the same account.
</Note>

## Request body

- object
  - `code` string, required — [Code](/glossary#whitebit-codes) that will be applied.
  - `passphrase` string — Should be provided if the [code](/glossary#whitebit-codes) was created with passphrase. Max: 25 symbols.
  - `request` string, required — Request signature
  - `nonce` integer, required — Unique request identifier

## Response `201`

All validations succeeded and creating transaction is started

- object
  - `message` string
  - `ticker` string
  - `amount` string
  - `external_id` string

## Other responses

- `400` — Request validation failed
- `422` — Inner validation failed. Returned with `code: 0`; the message is localized, so match on the condition rather than the exact string.

---

[API](https://skmtc.net/whitebit/apis/whitebit-private-http-api-v4.md) · [All operations](https://skmtc.net/whitebit/apis/whitebit-private-http-api-v4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whitebit/whitebit-private-http-api-v4/revisions/76c9def9942f/schema)
