> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Validate License
>
Validates a Rocket.Chat license against the current workspace without applying it. Use this endpoint to preview a license before applying it with the Add License endpoint. It accepts both V2 and V3 (JWT) license formats.
A valid license returns a success response. An invalid license returns a failure response with the validation behaviors that rejected it listed in the `reasons` array.
Permission required: `edit-privileged-setting`.
### Changelog
| Version | Description |
| ---------------- | ------------|
|8.7.0 | Added |
## OpenAPI
````json POST /api/v1/licenses.validate
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Miscellaneous"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Commands"
},
{
"name": "Email Inbox"
},
{
"name": "Licenses"
},
{
"name": "Mailer"
},
{
"name": "Calendar Events"
},
{
"name": "WhatsApp"
},
{
"name": "Rasa App"
},
{
"name": "Jitsi App"
}
],
"paths": {
"/api/v1/licenses.validate": {
"post": {
"tags": [
"Licenses"
],
"summary": "Validate License",
"description": "\n\nValidates a Rocket.Chat license against the current workspace without applying it. Use this endpoint to preview a license before applying it with the Add License endpoint. It accepts both V2 and V3 (JWT) license formats.\n\nA valid license returns a success response. An invalid license returns a failure response with the validation behaviors that rejected it listed in the `reasons` array.\n\nPermission required: `edit-privileged-setting`.\n### Changelog\n| Version | Description |\n| ---------------- | ------------|\n|8.7.0 | Added |",
"operationId": "post-api-v1-licenses.validate",
"parameters": [
{
"$ref": "#/components/parameters/Auth-Token"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"license": {
"type": "string",
"description": "The encrypted license string to validate."
}
},
"required": [
"license"
]
},
"examples": {
"Example": {
"value": {
"license": "VFJ0vHf3Jm9AR0minB342MLaHRlZdc3Du5nf0E5Sv0QJ4SUkEIaU2boCYaDsxQ2N1UL4uhLjCF9M7iCZ/yxafJjxbHvOu1D5rOfdgO4RKlAGE9tGHDidJR9crJyXVb16jPHHvLSkUFzb7HoIq/nUXxU8gEgT3uJ9u2+Dw5ukDLX3SG2AFq1hLoPSZqsP6g2AQo="
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/trueSuccess"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"reasons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"behavior": {
"type": "string"
},
"reason": {
"type": "string"
},
"modules": {
"type": "array",
"items": {
"type": "string"
}
},
"limit": {
"type": "string"
}
}
}
}
}
},
"examples": {
"Invalid License": {
"value": {
"success": false,
"error": "license-invalid",
"reasons": [
{
"behavior": "invalidate_license",
"reason": "url"
}
]
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
}
}
}
}
},
"components": {
"parameters": {
"Auth-Token": {
"name": "X-Auth-Token",
"in": "header",
"description": "The `authToken` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
},
"UserId": {
"name": "X-User-Id",
"in": "header",
"description": "The `userId` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "rbAXPnMktTFbNpwtJ"
}
},
"responses": {
"trueSuccess": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success": {
"value": {
"success": true
}
}
}
}
}
},
"authorizationError": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Authorization Error": {
"value": {
"success": false,
"error": "You must be logged in to do this."
}
}
}
}
}
},
"forbiddenError": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
}
}
},
"examples": {
"Permission Error": {
"value": {
"success": false,
"error": "User does not have the permissions required for this action",
"errorType": "error-forbidden"
}
}
}
}
}
}
}
}
}
````