Skip to content

Validate License

Validate a license key and retrieve its current status, expiry, and entitlements.

Endpoint

POST /api/v1/integration/licenses/{licenseKey}/validate

Headers

HeaderRequiredValue
X-API-KeyYesYour API key
Content-TypeYesapplication/json
X-Request-IDRecommendedUUID for tracing

Path Parameters

ParameterTypeDescription
licenseKeystringThe license key to validate

Response (200 OK)

json
{
  "data": {
    "valid": true,
    "license": {
      "id": 42,
      "key": "VX-ACME-abc123def456",
      "type": "subscription",
      "status": "active",
      "expires_at": "2027-03-30T00:00:00.000000Z",
      "entitlements": {
        "plan": "pro"
      }
    }
  },
  "meta": {
    "request_id": "uuid",
    "api_version": "1"
  }
}

The valid field is true when the license exists, is active, and has not expired.

The entitlements field is a flexible key-value object containing the license's granted entitlements (e.g., {"plan": "pro"}, {"plan": "enterprise", "domains": 5}). Returns an empty object {} if no entitlements are set.

Error Responses

CodeHTTPDescription
LICENSE.NOT_FOUND404License key does not exist for this tenant
LICENSE.REVOKED403License has been revoked
AUTH.INVALID_API_KEY401Invalid or missing API key
TENANT.STATUS.SUSPENDED403Tenant is suspended
RATE_LIMIT.EXCEEDED429Rate limit exceeded

Notes

  • The license's last_used_at timestamp is updated on each validation
  • A license with status: "expired" returns valid: false but does not throw an error
  • The license must belong to the tenant associated with the API key

Built by Veltara Works