Block License Key

Deactivate a specific license key (licenseKey) by marking it as inactive (blocked). Blocked keys cannot be activated, making this feature ideal for addressing payment issues, policy violations, or other concerns.

Endpoint

POST /block-key

Base URL: https://docs/api.keymint.dev

Request Overview

To block a license key, send a POST request with a JSON body and Content-Type: application/json. Include the access token as a Bearer token in the Authorization header.

Headers

HeaderValueRequiredDescription
AuthorizationBearer <accessToken>YesAPI access token for authentication.

Body Parameters

ParameterTypeRequiredDescription
productIdstringYesUnique product identifier (e.g., product_id_123...).
licenseKeystringYesLicense key string to block (e.g., lk_...).

Example Request

POST /block-key HTTP/1.1
Host: api.keymint.dev
Content-Type: application/json
Authorization: Bearer at_verylongaccesstokenstringgeneratedforyourapplication12345678

{
  "productId": "your_product_id_123",
  "licenseKey": "xxxxx-xxxxx-xxxxx-xxxxx"
}

Response Details

The API will return a JSON object confirming the key has been successfully blocked.

Success Response (200 OK)

{
  "message": "Key blocked",
  "code": 0
}

Error Responses

Status CodeCodeDescriptionExample Response Body
4001Missing required parameters (productId, licenseKey).{"message": "Missing required params", "code": 1}
4011Invalid or missing Authorization header.{"message": "Invalid access token", "code": 1}
4041productId or licenseKey not found, or product is inactive.{"message": "Invalid license key", "code": 1}
5001Internal server error during the blocking process.{"message": "Server error", "code": 1}