Replace License Settings

Replaces the current license key with a new one.

Request

Property Value
Method PUT
URL /api/license/settings
Content-Type application/json
Authentication Bearer Token

Request Body

Parameter Type Required Description
data.attributes.licenseKey string Yes The license key

Example Request

{
  "data": {
    "attributes": {
      "licenseKey": "XXXX-XXXX-XXXX-XXXX"
    }
  }
}

Response

Status Codes

Code Description
200 Success - License key updated
400 Bad Request - Invalid or missing parameters
401 Unauthorized - Invalid or missing token
403 Forbidden - Field cannot be overridden
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error

Successful Response (200)

{
  "data": {
    "attributes": {
      "licenseKey": {
        "value": "XXXX-XXXX-XXXX-XXXX",
        "editable": true,
        "masked": true
      }
    }
  },
  "meta": {
    "executionTime": 15,
    "generatedAt": 1764238672624
  },
  "message": "License settings updated successfully"
}

Response Body

Parameter Type Description
data.attributes.licenseKey.value string The license key (may be masked)
data.attributes.licenseKey.editable boolean Indicates if the license key can be modified
data.attributes.licenseKey.masked boolean Indicates if the license key value is masked
meta.executionTime integer Request processing time in milliseconds
meta.generatedAt integer Response generation timestamp (Unix timestamp in ms)
message string Main response status message

Error Responses

Validation Error (400)

{
  "message": "Validation failed",
  "errors": {
    "attributes": {
      "licenseKey": [
        "License Key is required"
      ]
    }
  }
}

Field Not Overridable (409)

Returned when the license key is defined by an environment variable and cannot be changed via API.

{
  "message": "Field licenseKey cannot be overridden because it is defined by an environment variable.",
  "errors": {
    "attributes": {
      "licenseKey": [
        "Field is not overridable"
      ]
    }
  }
}

Error Response Body

Parameter Type Description
message string Human-readable error message
errors.attributes.licenseKey string[] Array of validation errors for licenseKey field