Skip to main content

Endpoint

PUT https://api.gumroad.com/v2/licenses/enable
Enables a license key that was previously disabled. This removes the disabled_at timestamp, allowing the license to be verified again.
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 enable
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

Enable a license

curl -X PUT https://api.gumroad.com/v2/licenses/enable \
  -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

Restore Customer Access

If you previously disabled a customer’s license (for example, due to a payment issue or policy violation) and the issue has been resolved, use this endpoint to restore their access.

Undo Accidental Disabling

If you accidentally disabled a license, you can quickly re-enable it with this endpoint.
Only the product owner can enable licenses for their products. You must authenticate with an access token from the product owner’s account.

Build docs developers (and LLMs) love