Base URL
All API requests use this base URL:Authentication
All API requests require authentication using your access token as a Bearer token in the Authorization header.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:HTTP Status Codes
200 OK
- Request succeeded400 Bad Request
- Invalid request parameters401 Unauthorized
- Invalid or missing access token403 Forbidden
- Insufficient permissions404 Not Found
- Resource not found429 Too Many Requests
- Rate limit exceeded500 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
- Create Customer → Get
customerId
- Create License Key using
productId
andcustomerId
→ GetlicenseKey
- Activate License using
licenseKey
andhostId
- Verify License as needed in your application
Managing License Lifecycle
- Check License Status - Verify if license is valid and active
- Block/Unblock Licenses - Control access for refunds or violations
- Deactivate Devices - Free up activation slots when devices change
- Monitor Usage - Track activations and customer activity
Error Handling
The API returns detailed error information to help you handle different scenarios:Common Error Codes
0
- Success1
- Validation error (invalid parameters)2
- Activation limit reached3
- License key not found or invalid4
- Product not found5
- 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 a429 Too Many Requests
response. Implement exponential backoff to handle rate limiting gracefully.