Documentation

Developers

Featured Endpoints

Checkouts

Customer Portal

Customer-Sessions

Customers

Discounts

License Keys

Oauth2

Organizations

Products

Issue Funding Endpoints

External Organizations

Repositories

Other Endpoints

Advertisements

Benefits

Checkout-Links

Checkouts

Custom-Fields

Customer Portal

Files

Metrics

Oauth2

Orders

Subscriptions

customer_portal

Validate License Key

post
/v1/customer-portal/license-keys/validate
Validate a license key.
Successful Response
curl -X POST \
    'https://api.polar.sh/v1/customer-portal/license-keys/validate' \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{
  "key": "string",
  "organization_id": "00000000-0000-0000-0000-000000000000"
}'
Responses
{
  "id": "00000000-0000-0000-0000-000000000000",
  "organization_id": "00000000-0000-0000-0000-000000000000",
  "user_id": "00000000-0000-0000-0000-000000000000",
  "customer_id": "00000000-0000-0000-0000-000000000000",
  "user": {
    "id": "00000000-0000-0000-0000-000000000000",
    "email": "string",
    "public_name": "string",
    "avatar_url": "string"
  },
  "customer": {
    "created_at": "2025-01-07T00:00:00.000Z",
    "modified_at": "2025-01-07T00:00:00.000Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "metadata": {},
    "email": "string",
    "email_verified": false,
    "name": "string",
    "billing_address": {
      "line1": "string",
      "line2": "string",
      "postal_code": "string",
      "city": "string",
      "state": "string",
      "country": "string"
    },
    "tax_id": [
      "string",
      "ad_nrt"
    ],
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "avatar_url": "string"
  },
  "benefit_id": "00000000-0000-0000-0000-000000000000",
  "key": "string",
  "display_key": "string",
  "status": "granted",
  "limit_activations": 0,
  "usage": 0,
  "limit_usage": 0,
  "validations": 0,
  "last_validated_at": "2025-01-07T00:00:00.000Z",
  "expires_at": "2025-01-07T00:00:00.000Z",
  "activation": {
    "id": "00000000-0000-0000-0000-000000000000",
    "license_key_id": "00000000-0000-0000-0000-000000000000",
    "label": "string",
    "meta": {},
    "created_at": "2025-01-07T00:00:00.000Z",
    "modified_at": "2025-01-07T00:00:00.000Z"
  }
}