---
title: "Validate License Key"
method: POST
path: "/v1/customer-portal/license-keys/validate"
tags: ["customer_portal", "license_keys", "public"]
---

# Validate License Key

`POST /v1/customer-portal/license-keys/validate`

## Request

- Base URL: `https://api.polar.sh`
- URL: `https://api.polar.sh/v1/customer-portal/license-keys/validate`
- Auth: none declared

Validate a license key.

> This endpoint doesn't require authentication and can be safely used on a public
> client, like a desktop application or a mobile app.
> If you plan to validate a license key on a server, use the `/v1/license-keys/validate`
> endpoint instead.

## Request body

- LicenseKeyValidate
  - `key` string, required
  - `organization_id` string, uuid4, required
  - `activation_id` string, uuid4, nullable
  - `benefit_id` string, uuid4, nullable: The benefit ID.
  - `customer_id` string, uuid4, nullable
  - `increment_usage` integer, nullable
  - `conditions` object: Key-value object allowing you to set conditions that must match when validating the license key. The key must be a string with a maximum length of **40 characters**. The value must be either: * A string with a maximum length of **500 characters** * An integer * A floating-point number * A boolean You can store up to **50 key-value pairs**.

## Response `200`

Successful Response

- ValidatedLicenseKey (unresolved $ref)

## Other responses

- `404`: License key not found.
- `422`: Validation Error

## Changes

- **2026-08-10** `f9688fd328d6`: 1 info
  - added the required property `customer/first_user_event_at` to the response with the `200` status

[Operation history](https://skmtc.dev/polar/apis/polar-api/changes/v1/customer-portal/license-keys/validate/post.md)

---

[API](https://skmtc.dev/polar/apis/polar-api.md) - [All operations](https://skmtc.dev/polar/apis/polar-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polar/apis/polar-api/revisions/77e4ef94fcc3?raw)
