Skip to main content

Endpoint

PUT https://api.gumroad.com/v2/licenses/disable
Disables a license key, preventing it from being verified. When disabled, any attempt to verify the license will return an error indicating that it has been disabled. This does not delete the license - it can be re-enabled later using the enable endpoint.
This endpoint requires authentication with the edit_products scope.

Authentication

This endpoint requires an OAuth access token with the edit_products scope. Include your access token in the request:
?access_token=YOUR_ACCESS_TOKEN

Request Parameters

access_token
string
required
Your OAuth access token with edit_products scope
license_key
string
required
The license key to disable
product_id
string
The unique identifier for your product (recommended)
The product’s permalink (either unique or custom). Can be used instead of product_id.

Response Fields

success
boolean
Whether the operation was successful
uses
integer
The current usage count for this license
purchase
object
Complete purchase information associated with this license (same structure as the verify endpoint)

Examples

Disable a license

curl -X PUT https://api.gumroad.com/v2/licenses/disable \
  -d "access_token=YOUR_ACCESS_TOKEN" \
  -d "product_id=your-product-id" \
  -d "license_key=ABCD1234-EFGH5678-IJKL9012-MNOP3456"

Success Response

{
  "success": true,
  "uses": 5,
  "purchase": {
    "id": "encrypted_purchase_id",
    "product_name": "My Software",
    "product_id": "encrypted_product_id",
    "product_permalink": "https://gumroad.com/l/my-software",
    "short_product_id": "my-software",
    "email": "[email protected]",
    "price": 2999,
    "currency": "usd",
    "quantity": 1,
    "created_at": "2024-01-15T10:30:00Z",
    "sale_timestamp": "2024-01-15T10:30:00Z",
    "order_number": 123456,
    "license_key": "ABCD1234-EFGH5678-IJKL9012-MNOP3456",
    "variants": "",
    "custom_fields": [],
    "refunded": false,
    "chargebacked": false,
    "subscription_ended_at": null,
    "subscription_cancelled_at": null,
    "subscription_failed_at": null,
    "can_contact": true
  }
}

Error Responses

Unauthorized (401)

{
  "error": "The access token is invalid"
}

Forbidden (403)

Returned when the access token doesn’t have the edit_products scope.
{
  "error": "Forbidden"
}

Not Found (404)

Returned when the license doesn’t exist or doesn’t belong to your product.
{
  "success": false,
  "message": "That license does not exist for the provided product."
}

Common Use Cases

Revoke Access for Policy Violations

If a customer violates your terms of service or shares their license key publicly, you can disable their license to prevent unauthorized use.

Handle Chargebacks or Refunds

When a purchase is refunded or charged back, you may want to disable the associated license key to prevent continued access to your product.

Enforce License Limits

If you discover that a license is being used beyond its allowed scope (e.g., on too many devices), you can disable it until the customer contacts you.
Only the product owner can disable licenses for their products. You must authenticate with an access token from the product owner’s account.
Disabling a license does not delete it. The license can be re-enabled at any time using the enable endpoint.

Build docs developers (and LLMs) love