Validate a license key
Checks if a given license key and instance ID pair represents a valid, active license activation. This is the primary endpoint to use within your application to verify a user's license status periodically.
Checks if a given license key and instance ID pair represents a valid, active license activation. This is the primary endpoint to use within your application to verify a user's license status periodically.
Validation checks if:
- The license key exists.
- The license key is currently
active. - The license key has not expired (
expires_at). - The provided
instance_idmatches an existing activation for that license key.
Authorization
bearerAuth Provide your SellApp API key as a bearer token.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://sell.app/api/v2/licenses/validate" \ -H "Content-Type: application/json" \ -d '{ "license_key": "string" }'{
"data": {
"valid": true,
"license_key": {
"id": 1,
"key": "01965f1d-f038-7116-b57f-9e7ecb4e7b8f",
"limit": 4,
"active": 1,
"status": "ACTIVE",
"expires_at": "2025-05-22T20:08:39.000000Z",
"is_expired": 0,
"store_id": 1,
"order_id": 1,
"invoice_id": 1,
"product_id": 218,
"variant_id": 228,
"customer_id": 1,
"subscription_id": null,
"created_at": "2025-04-22T20:08:39.000000Z",
"updated_at": "2025-04-22T20:08:39.000000Z",
"instances_count": 4
},
"instance": {
"id": "9ebd3be0-de72-4da7-805e-bc99d1ac1186",
"license_key_id": 1,
"name": "zezima@osrs.com",
"store_id": 1,
"created_at": "2025-04-22T21:05:06.000000Z",
"updated_at": "2025-04-22T21:05:06.000000Z"
}
}
}Activate a license key POST
This endpoint activates a given license key and creates an instance of the license key. Activation registers a unique identifier (instance name) against the license key. If the activation is successful, it returns the details of the newly created LicenseKeyInstance, including its unique id which should be stored by the client/application for future validation.
List all license keys GET
Retrieves a paginated list of all license keys associated with your store. Standard pagination parameters (limit, page) can be used.