The Keymint API provides a comprehensive RESTful interface for managing software licenses, customers, and activations. This guide covers the essential concepts and patterns you’ll need to integrate Keymint into your software.

Base URL

All API requests use this base URL:
https://api.keymint.dev

Authentication

All API requests require authentication using your access token as a Bearer token in the Authorization header.
curl -X GET https://api.keymint.dev/customer \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json"
Keep your access token secure. Never expose it in client-side code, public repositories, or logs.

Request & Response Format

Request Format

  • All requests use JSON format for request bodies
  • Include Content-Type: application/json header for POST/PUT requests
  • Use proper HTTP methods: GET (retrieve), POST (create), PUT (update), DELETE (remove)

Response Format

All API responses follow a consistent structure:
{
  "action": "getCustomers",
  "status": true,
  "data": [...],
  "code": 0
}

HTTP Status Codes

  • 200 OK - Request succeeded
  • 400 Bad Request - Invalid request parameters
  • 401 Unauthorized - Invalid or missing access token
  • 403 Forbidden - Insufficient permissions
  • 404 Not Found - Resource not found
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Server error

Core Concepts

Understanding these key concepts will help you work effectively with the Keymint API:

Products

Product ID: Unique identifier for your software or service being licensed. Each product can have multiple license keys.

Customers

Customer: End users or organizations who purchase and use your licenses. Customers can have multiple license keys.

License Keys

License Key: Unique alphanumeric string that grants usage rights to your software. Can be activated on devices.

Activations

Activation: Links a license key to a specific device using a Host ID. Tracks where licenses are being used.

Key Relationships

  • One Product can have many License Keys
  • One Customer can own multiple License Keys
  • One License Key can have multiple Activations (up to the limit)
  • Each Activation is tied to a unique device Host ID

Common Workflows

Creating a Complete License Setup

  1. Create Customer → Get customerId
  2. Create License Key using productId and customerId → Get licenseKey
  3. Activate License using licenseKey and hostId
  4. Verify License as needed in your application

Managing License Lifecycle

  1. Check License Status - Verify if license is valid and active
  2. Block/Unblock Licenses - Control access for refunds or violations
  3. Deactivate Devices - Free up activation slots when devices change
  4. Monitor Usage - Track activations and customer activity

Error Handling

The API returns detailed error information to help you handle different scenarios:
{
  "message": "Activation limit reached",
  "code": 2
}

Common Error Codes

  • 0 - Success
  • 1 - Validation error (invalid parameters)
  • 2 - Activation limit reached
  • 3 - License key not found or invalid
  • 4 - Product not found
  • 5 - Customer not found
Always implement proper error handling in your application to gracefully handle API errors and provide meaningful feedback to users.

Rate Limits

When you hit the rate limit, you’ll receive a 429 Too Many Requests response. Implement exponential backoff to handle rate limiting gracefully.

Next Steps