### Start Local Application Source: https://github.com/kasperip/lukittu/blob/main/README.md Starts the development servers for all workspaces simultaneously. This command should be run after dependencies are installed, databases are running, and migrations are complete. ```bash pnpm dev ``` -------------------------------- ### Get License by Key - cURL Example Source: https://context7.com/kasperip/lukittu/llms.txt Retrieve full license details by providing the license key string directly. The key must be in the format XXXXX-XXXXX-XXXXX-XXXXX-XXXXX. Replace placeholders as needed. ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/ABCD1-EFGH2-IJKL3-MNOP4-QRST5" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/kasperip/lukittu/blob/main/README.md Installs all necessary dependencies for all workspaces in the monorepo. Ensure Node.js, Docker, and pnpm are installed first. ```bash pnpm install ``` -------------------------------- ### Start Local Databases with Docker Compose Source: https://github.com/kasperip/lukittu/blob/main/README.md Starts the PostgreSQL and Redis database containers using Docker Compose. This is required before running database migrations or starting the application. ```bash docker compose -f docker-compose-local.yml up ``` -------------------------------- ### Update Release - Promote and Mark as Latest Source: https://context7.com/kasperip/lukittu/llms.txt This example shows how to update an existing release. It promotes a draft release to 'PUBLISHED' and sets it as the latest version using `keepExistingFile: true`. ```bash curl -X PUT "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/releases/456e7890-e89b-12d3-a456-426614174111" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F 'data={"version":"1.2.1","productId":"789e0123-e89b-12d3-a456-426614174222","status":"PUBLISHED","setAsLatest":true,"keepExistingFile":true,"branchId":null,"metadata":[{"key":"changelog","value":"Hotfix for crash","locked":false}],"licenseIds":[]}' ``` -------------------------------- ### Client API - Verify License (Python) Source: https://context7.com/kasperip/lukittu/llms.txt Provides a Python example for verifying a license key and hardware identifier using the Lukittu client API. Handles success and failure responses. ```python import requests TEAM_ID = "123e4567-e89b-12d3-a456-426614174000" def verify_license(license_key: str, hwid: str) -> bool: resp = requests.post( f"https://app.lukittu.com/api/v1/client/teams/{TEAM_ID}/verification/verify", json={ "licenseKey": license_key, "hardwareIdentifier": hwid, "productId": "789e0123-e89b-12d3-a456-426614174222", }, ) body = resp.json() if not body["result"]["valid"]: print(f"License rejected: {body['result']['code']}") return False return True ``` -------------------------------- ### Get License by ID - cURL Example Source: https://context7.com/kasperip/lukittu/llms.txt Use this endpoint to retrieve full details for a single license using its unique identifier. Ensure you replace placeholder IDs and tokens with your actual values. ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/id/456e7890-e89b-12d3-a456-426614174111" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Get License by Key Source: https://context7.com/kasperip/lukittu/llms.txt Retrieves full license details using the license key string directly. ```APIDOC ## GET /api/v1/dev/teams/{teamId}/licenses/{licenseKey} ### Description Retrieves full license details using the license key string directly (format: `XXXXX-XXXXX-XXXXX-XXXXX-XXXXX`). ### Method GET ### Endpoint /api/v1/dev/teams/{teamId}/licenses/{licenseKey} ### Parameters #### Path Parameters - **teamId** (string) - Required - The unique identifier for the team. - **licenseKey** (string) - Required - The license key string. ### Request Example ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/ABCD1-EFGH2-IJKL3-MNOP4-QRST5" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ``` -------------------------------- ### Run Specific Workspace Command (Next.js Dev) Source: https://github.com/kasperip/lukittu/blob/main/README.md Starts only the Next.js development server for the web application. Use the `--filter` flag to target specific workspaces. ```bash pnpm --filter lukittu-web dev ``` -------------------------------- ### Get Customer Source: https://context7.com/kasperip/lukittu/llms.txt Retrieves a specific customer record by their UUID. Ensure the customer ID is correct. ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/customers/789e0123-e89b-12d3-a456-426614174222" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### List HWIDs for a License - cURL Example Source: https://context7.com/kasperip/lukittu/llms.txt Retrieve a list of all hardware identifiers bound to a specific license, including their active/inactive status. You can filter and sort the results. Use the `showForgotten=true` parameter to include forgotten HWIDs. ```bash # List HWIDs for a license curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/id/456e7890-e89b-12d3-a456-426614174111/hwid?sortColumn=lastSeenAt&sortDirection=desc&showForgotten=false" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Update License - cURL Example Source: https://context7.com/kasperip/lukittu/llms.txt Update mutable properties of a license, such as its key, expiration, suspension state, product/customer associations, and limits. This example demonstrates suspending a license and setting a fixed expiration date. ```bash # Suspend a license and update its expiration to a fixed date curl -X PUT "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/id/456e7890-e89b-12d3-a456-426614174111" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "licenseKey": "ABCD1-EFGH2-IJKL3-MNOP4-QRST5", "expirationType": "DATE", "expirationDate": "2025-12-31T23:59:59Z", "suspended": true, "productIds": ["789e0123-e89b-12d3-a456-426614174222"], "customerIds": ["456e7890-e89b-12d3-a456-426614174111"], "hwidLimit": 1, "ipLimit": null, "metadata": [{ "key": "reason", "value": "payment_overdue", "locked": true }] }' ``` -------------------------------- ### Generate Prisma Client Source: https://github.com/kasperip/lukittu/blob/main/README.md Generates the Prisma client for the shared package. This is typically run after schema changes or during the initial setup. ```bash pnpm --filter @lukittu/shared generate ``` -------------------------------- ### Developer API Authentication Header Source: https://context7.com/kasperip/lukittu/llms.txt Example of the required Authorization header for all Developer API endpoints. Replace 'YOUR_API_KEY' with your actual API key. ```bash curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://app.lukittu.com/api/v1/dev/teams/{teamId}/..." ``` -------------------------------- ### Start Scheduled Heartbeat (Node.js) Source: https://context7.com/kasperip/lukittu/llms.txt Initiates a recurring heartbeat to verify license validity. Terminates the process if the license becomes invalid. Requires `fetch` API. ```javascript const TEAM_ID = "123e4567-e89b-12d3-a456-426614174000"; async function startHeartbeat(licenseKey, hwid) { const beat = async () => { const res = await fetch( `https://app.lukittu.com/api/v1/client/teams/${TEAM_ID}/verification/heartbeat`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ licenseKey, hardwareIdentifier: hwid }), } ); const body = await res.json(); if (!body.result.valid) { console.error("Heartbeat failed:", body.result.code); process.exit(1); // terminate if license becomes invalid } }; await beat(); setInterval(beat, 30 * 60 * 1000); // every 30 minutes } ``` -------------------------------- ### List IPs for a License - cURL Example Source: https://context7.com/kasperip/lukittu/llms.txt Retrieve a list of IP addresses that have been used with a specific license. The response includes geo-location data and active/inactive status for each IP. Pagination parameters `page` and `pageSize` can be used to control the results. ```bash # List IPs for a license curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/id/456e7890-e89b-12d3-a456-426614174111/ip-address?page=1&pageSize=10" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### API Response Format Examples Source: https://context7.com/kasperip/lukittu/llms.txt Illustrates the success and error response structures for Lukittu API calls, including data, result, timestamp, validity, details, and error codes. ```json { "data": { /* endpoint-specific payload */ }, "result": { "timestamp": "2024-03-01T12:00:00Z", "valid": true, "details": "Human-readable message" } } ``` ```json { "data": null, "result": { "timestamp": "2024-03-01T12:00:00Z", "valid": false, "details": "License not found", "code": "LICENSE_NOT_FOUND" } } ``` -------------------------------- ### Get Team Statistics Source: https://context7.com/kasperip/lukittu/llms.txt Retrieves aggregated usage analytics for a team, including license counts, request statistics, and top countries/products. Results are cached for 15 minutes. ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/statistics" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Forget a HWID - cURL Example Source: https://context7.com/kasperip/lukittu/llms.txt Mark a specific hardware identifier as 'forgotten'. This is useful for allowing a user to re-bind the license to new hardware. The `forgotten` field in the request body should be set to `true`. ```bash # Forget a HWID (allow user to re-bind to new hardware) curl -X PATCH "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/id/456e7890-e89b-12d3-a456-426614174111/hwid/789e0123-e89b-12d3-a456-426614174333" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "forgotten": true }' ``` -------------------------------- ### Java Example: Load Decrypted JAR via URLClassLoader Source: https://context7.com/kasperip/lukittu/llms.txt Illustrates how to load a decrypted JAR file into memory using URLClassLoader in Java. Requires AES decryption and access to response headers for main class information. ```java // Decrypt bytes with sessionKey using AES, then load: // byte[] encryptedBytes = Files.readAllBytes(downloadedPath); // byte[] decryptedBytes = AESUtil.decrypt(encryptedBytes, sessionKey); // URLClassLoader loader = new URLClassLoader(new URL[]{ tempJarUrl }); // Class mainClass = loader.loadClass(xMainClassHeader); ``` -------------------------------- ### Create Release with JAR File Source: https://context7.com/kasperip/lukittu/llms.txt This command demonstrates creating a release and attaching a JAR file, which is necessary for the classloader feature. The file is uploaded using the `-F 'file=@...'` option. ```bash curl -X POST "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/releases" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F 'data={"version":"1.2.0","productId":"789e0123-e89b-12d3-a456-426614174222","status":"PUBLISHED","setAsLatest":true,"branchId":null,"metadata":[],"licenseIds":[]}' \ -F 'file=@./build/myplugin-1.2.0.jar' ``` -------------------------------- ### Client API - Verify License (cURL) Source: https://context7.com/kasperip/lukittu/llms.txt Demonstrates how to perform a basic license verification using cURL, including optional hardware identifier, product, and customer scoping. ```bash curl -X POST "https://app.lukittu.com/api/v1/client/teams/123e4567-e89b-12d3-a456-426614174000/verification/verify" \ -H "Content-Type: application/json" \ -d '{ "licenseKey": "ABCD1-EFGH2-IJKL3-MNOP4-QRST5", "hardwareIdentifier": "cpu-mb-abc123xyz789", "productId": "789e0123-e89b-12d3-a456-426614174222", "customerId": "456e7890-e89b-12d3-a456-426614174111", "version": "1.2.3", "challenge": "rand0mStr1ng" }' ``` -------------------------------- ### Create Customer Source: https://context7.com/kasperip/lukittu/llms.txt Creates a new customer record. Supports email, name, username, address, custom metadata, and optional Discord account linkage. Ensure all required fields are provided. ```bash curl -X POST "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/customers" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "email": "customer@example.com", "fullName": "John Doe", "username": "johndoe", "discordId": "123456789012345678", "metadata": [ { "key": "plan", "value": "pro", "locked": false } ], "address": { "street": "123 Main St", "city": "Anytown", "state": "CA", "country": "US", "postalCode": "12345" } }' ``` -------------------------------- ### Get License by ID Source: https://context7.com/kasperip/lukittu/llms.txt Retrieves full details for a single license using its unique identifier. ```APIDOC ## GET /api/v1/dev/teams/{teamId}/licenses/id/{licenseId} ### Description Retrieves full details for a single license including associated customers and products. ### Method GET ### Endpoint /api/v1/dev/teams/{teamId}/licenses/id/{licenseId} ### Parameters #### Path Parameters - **teamId** (string) - Required - The unique identifier for the team. - **licenseId** (string) - Required - The unique identifier for the license. ### Request Example ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/id/456e7890-e89b-12d3-a456-426614174111" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ``` -------------------------------- ### Get / Update / Delete Customer Source: https://context7.com/kasperip/lukittu/llms.txt Retrieve, update, or permanently delete a customer record by UUID. ```APIDOC ## Get / Update / Delete Customer `GET /api/v1/dev/teams/{teamId}/customers/{customerId}` `PUT /api/v1/dev/teams/{teamId}/customers/{customerId}` `DELETE /api/v1/dev/teams/{teamId}/customers/{customerId}` Retrieve, update, or permanently delete a customer record by UUID. ### Method GET, PUT, DELETE ### Endpoint `/api/v1/dev/teams/{teamId}/customers/{customerId}` ### Parameters #### Path Parameters - **teamId** (string) - Required - The unique identifier for the team. - **customerId** (string) - Required - The unique identifier for the customer. #### Request Body (for PUT) - **email** (string) - Optional - The customer's email address. - **fullName** (string) - Optional - The customer's full name. - **username** (string) - Optional - The customer's username. - **metadata** (array) - Optional - An array of key-value pairs for custom metadata. - **key** (string) - Required - The metadata key. - **value** (string) - Required - The metadata value. - **locked** (boolean) - Required - Indicates if the metadata is locked. - **address** (object) - Optional - The customer's address details. - **city** (string) - Optional - The city. - **country** (string) - Optional - The country (e.g., 'US'). ### Request Example ```bash # Get customer curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/customers/789e0123-e89b-12d3-a456-426614174222" \ -H "Authorization: Bearer YOUR_API_KEY" # Update customer curl -X PUT "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/customers/789e0123-e89b-12d3-a456-426614174222" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ \ "email": "newemail@example.com", \ "fullName": "John Updated", \ "username": "johnupdated", \ "metadata": [{ "key": "tier", "value": "enterprise", "locked": true }], \ "address": { "city": "New City", "country": "US" } \ }' # Delete customer (permanent, cannot be undone) curl -X DELETE "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/customers/789e0123-e89b-12d3-a456-426614174222" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### Response #### Success Response (for DELETE) - **data** (object) - **customerId** (string) - The ID of the deleted customer. - **deleted** (boolean) - Indicates if the customer was deleted. - **result** (object) - **valid** (boolean) - Indicates if the operation was valid. - **details** (string) - Details about the operation result. #### Response Example (for DELETE) ```json { "data": { "customerId": "789e0123-...", "deleted": true }, "result": { "valid": true, "details": "Customer deleted successfully" } } ``` ``` -------------------------------- ### Create Release Source: https://context7.com/kasperip/lukittu/llms.txt Creates a new product release. This endpoint supports `multipart/form-data` for sending JSON data and optionally a binary file. File uploads require a paid subscription. ```bash curl -X POST "https://app.lukittu.com/api/v1/dev/teams/{teamId}/releases" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F 'data={"version": "1.0.0", "status": "PUBLISHED"}' \ -F 'file=@/path/to/your/release.zip' ``` -------------------------------- ### List Releases for a Product Source: https://context7.com/kasperip/lukittu/llms.txt Retrieves a paginated list of releases for a specific product. You can filter by version and status, and sort the results. The response includes release details and pagination information. ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/releases?productId=789e0123-e89b-12d3-a456-426614174222&status=PUBLISHED&sortColumn=createdAt&sortDirection=desc&page=1&pageSize=10" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Create Release without File Source: https://context7.com/kasperip/lukittu/llms.txt Use this endpoint to create a new release without attaching any files. Ensure your API key is valid and the team/product IDs are correct. ```bash curl -X POST "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/releases" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F 'data={"version":"1.2.0","productId":"789e0123-e89b-12d3-a456-426614174222","status":"PUBLISHED","setAsLatest":true,"branchId":null,"metadata":[{"key":"changelog","value":"Bug fixes","locked":false}],"licenseIds":[]}' ``` -------------------------------- ### Client API - License Heartbeat (cURL) Source: https://context7.com/kasperip/lukittu/llms.txt Shows how to send a license heartbeat request using cURL to confirm a device's active status and re-validate the license. Requires hardwareIdentifier. ```bash curl -X POST "https://app.lukittu.com/api/v1/client/teams/123e4567-e89b-12d3-a456-426614174000/verification/heartbeat" \ -H "Content-Type: application/json" \ -d '{ "licenseKey": "ABCD1-EFGH2-IJKL3-MNOP4-QRST5", "hardwareIdentifier": "cpu-mb-abc123xyz789", "productId": "789e0123-e89b-12d3-a456-426614174222", "version": "1.2.3" }' ``` -------------------------------- ### Run Database Migrations Source: https://github.com/kasperip/lukittu/blob/main/README.md Applies database migrations to set up the schema for the shared package. This command requires the local databases to be running. ```bash pnpm --filter @lukittu/shared migrate ``` -------------------------------- ### Client API — Verify License Source: https://context7.com/kasperip/lukittu/llms.txt Validates a license key against the Lukittu backend. This endpoint is called at application startup and supports optional hardware identifier binding, product/customer scoping, and a challenge string for signed response verification. No authentication is required. ```APIDOC ## POST /api/v1/client/teams/{teamId}/verification/verify ### Description Validates a license key against the Lukittu backend. Call this at application startup. Supports optional hardware identifier binding, product/customer scoping, and a challenge string for signed response verification. No authentication required. ### Method POST ### Endpoint `https://app.lukittu.com/api/v1/client/teams/{teamId}/verification/verify` ### Parameters #### Path Parameters - **teamId** (string) - Required - The unique identifier for the team. #### Request Body - **licenseKey** (string) - Required - The license key to verify. - **hardwareIdentifier** (string) - Optional - A unique identifier for the hardware. - **productId** (string) - Optional - The identifier for the product. - **customerId** (string) - Optional - The identifier for the customer. - **version** (string) - Optional - The version of the software. - **challenge** (string) - Optional - A challenge string for signed response verification. ### Request Example ```json { "licenseKey": "ABCD1-EFGH2-IJKL3-MNOP4-QRST5", "hardwareIdentifier": "cpu-mb-abc123xyz789", "productId": "789e0123-e89b-12d3-a456-426614174222", "customerId": "456e7890-e89b-12d3-a456-426614174111", "version": "1.2.3", "challenge": "rand0mStr1ng" } ``` ### Response #### Success Response (200) - **data** (object) - Endpoint-specific payload containing license, customer, and product details. - **license** (object) - License details. - **expirationType** (string) - Type of expiration (e.g., DATE, NEVER). - **expirationDate** (string) - The expiration date if expirationType is DATE. - **ipLimit** (integer) - The limit for IP addresses. - **hwidLimit** (integer) - The limit for hardware identifiers. - **metadata** (array) - Array of key-value pairs for additional metadata. - **customers** (array) - Array of customer objects. - **products** (array) - Array of product objects. - **result** (object) - Result object. - **timestamp** (string) - Timestamp of the response. - **valid** (boolean) - Indicates if the operation was successful. - **details** (string) - Human-readable message. - **code** (string) - Machine-readable code (e.g., "VALID"). - **challengeResponse** (string) - Signed challenge response if a challenge was provided. ### Response Example ```json { "data": { "license": { "expirationType": "DATE", "expirationDate": "2025-01-01T00:00:00Z", "ipLimit": 5, "hwidLimit": 2, "metadata": [{ "key": "tier", "value": "pro" }] }, "customers": [{ "email": "user@example.com", "username": "user1" }], "products": [{ "name": "My Plugin" }] }, "result": { "timestamp": "2024-03-01T12:00:00Z", "valid": true, "details": "License verified successfully", "code": "VALID", "challengeResponse": "" } } ``` ``` -------------------------------- ### Get Team Statistics Source: https://context7.com/kasperip/lukittu/llms.txt Returns aggregated usage analytics for the team, including license/customer/product totals, request counts, success rates, and top countries/products. Results are cached for 15 minutes. ```APIDOC ## GET /api/v1/dev/teams/{teamId}/statistics ### Description Returns aggregated usage analytics for the team: license/customer/product totals, request counts by type, success rate, top 10 countries by traffic, top 5 products by license count, and recent activity windows. Results are cached for 15 minutes. ### Method GET ### Endpoint /api/v1/dev/teams/{teamId}/statistics ### Parameters #### Path Parameters - **teamId** (string) - Required - The ID of the team. ### Request Example ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/statistics" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### Response #### Success Response (200) - **data** (object) - Contains various statistics for the team. - **overview** (object) - General overview statistics. - **totalLicenses** (integer) - Total number of licenses. - **totalCustomers** (integer) - Total number of customers. - **totalProducts** (integer) - Total number of products. - **activeLicenses** (integer) - Number of active licenses. - **totalRequests** (integer) - Total number of requests. - **requests** (object) - Statistics related to API requests. - **total** (integer) - Total requests. - **successful** (integer) - Successful requests. - **failed** (integer) - Failed requests. - **successRate** (number) - Success rate percentage. - **byType** (object) - Request counts by type (e.g., VERIFY, HEARTBEAT, DOWNLOAD). - **topCountries** (array of objects) - Top countries by traffic. - **country** (string) - Country name. - **alpha2** (string) - ISO 3166-1 alpha-2 country code. - **alpha3** (string) - ISO 3166-1 alpha-3 country code. - **requests** (integer) - Number of requests from the country. - **topProducts** (array of objects) - Top products by license count. - **id** (string) - Product ID. - **name** (string) - Product name. - **licenses** (integer) - Number of licenses. - **recentActivity** (object) - Recent activity metrics. - **last24h** (integer) - Activity in the last 24 hours. - **last7d** (integer) - Activity in the last 7 days. - **last30d** (integer) - Activity in the last 30 days. - **result** (object) - The result of the operation. - **valid** (boolean) - Indicates if the operation was valid. - **details** (string) - Details about the operation result. #### Response Example ```json { "data": { "overview": { "totalLicenses": 150, "totalCustomers": 45, "totalProducts": 8, "activeLicenses": 32, "totalRequests": 12450 }, "requests": { "total": 12450, "successful": 11200, "failed": 1250, "successRate": 89.96, "byType": { "VERIFY": 8500, "HEARTBEAT": 3200, "DOWNLOAD": 750 } }, "topCountries": [ { "country": "United States of America", "alpha2": "US", "alpha3": "USA", "requests": 5200 }, { "country": "Germany", "alpha2": "DE", "alpha3": "DEU", "requests": 2100 } ], "topProducts": [ { "id": "789e0123-e89b-12d3-a456-426614174222", "name": "My Plugin", "licenses": 50 } ], "recentActivity": { "last24h": 850, "last7d": 4200, "last30d": 12450 } }, "result": { "valid": true, "details": "Statistics retrieved" } } ``` ``` -------------------------------- ### Create License using cURL Source: https://context7.com/kasperip/lukittu/llms.txt Creates a new license with specified expiration, product/customer scope, and limits. Supports email delivery of the license. Requires Developer API authentication. ```bash curl -X POST "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "expirationType": "DURATION", "expirationStart": "ACTIVATION", "expirationDays": 30, "suspended": false, "sendEmailDelivery": true, "productIds": ["789e0123-e89b-12d3-a456-426614174222"], "customerIds": ["456e7890-e89b-12d3-a456-426614174111"], "ipLimit": 3, "hwidLimit": 2, "metadata": [ { "key": "tier", "value": "pro", "locked": true }, { "key": "seats", "value": "5", "locked": false } ] }' ``` -------------------------------- ### Delete License by ID or Key - cURL Examples Source: https://context7.com/kasperip/lukittu/llms.txt Permanently delete a license. This operation is irreversible. You can delete by either the license's UUID or its license key. Ensure you use the correct endpoint for your chosen identifier. ```bash # Delete by ID curl -X DELETE "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/id/456e7890-e89b-12d3-a456-426614174111" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ```bash # Delete by key curl -X DELETE "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses/ABCD1-EFGH2-IJKL3-MNOP4-QRST5" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Create Release Source: https://context7.com/kasperip/lukittu/llms.txt Creates a new release for a product. This can be done with or without attaching a file. The `data` parameter is a JSON string containing release details. ```APIDOC ## POST /api/v1/dev/teams/{teamId}/releases ### Description Creates a new release for a product. This can be done with or without attaching a file. The `data` parameter is a JSON string containing release details. ### Method POST ### Endpoint /api/v1/dev/teams/{teamId}/releases ### Parameters #### Path Parameters - **teamId** (string) - Required - The ID of the team. #### Request Body - **data** (string) - Required - A JSON string containing release details. Fields include: - **version** (string) - Required - The version of the release. - **productId** (string) - Required - The ID of the product. - **status** (string) - Required - The status of the release (e.g., "PUBLISHED"). - **setAsLatest** (boolean) - Required - Whether to set this release as the latest. - **branchId** (string or null) - Optional - The ID of the branch. - **metadata** (array of objects) - Optional - Metadata for the release. Each object has: - **key** (string) - Required - The metadata key. - **value** (string) - Required - The metadata value. - **locked** (boolean) - Required - Whether the metadata is locked. - **licenseIds** (array of strings) - Optional - A list of license IDs. - **file** (file) - Optional - The release file (e.g., a JAR file). ### Request Example ```bash curl -X POST "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/releases" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F 'data={"version":"1.2.0","productId":"789e0123-e89b-12d3-a456-426614174222","status":"PUBLISHED","setAsLatest":true,"branchId":null,"metadata":[{"key":"changelog","value":"Bug fixes","locked":false}],"licenseIds":[]}' ``` ### Response #### Success Response (201) - **data** (object) - The created release details. - **id** (string) - The ID of the release. - **version** (string) - The version of the release. - **status** (string) - The status of the release. - **latest** (boolean) - Whether this is the latest release. - **productId** (string) - The ID of the product. - **product** (object) - Details of the product. - **file** (string or null) - The file associated with the release. - **createdAt** (string) - The creation timestamp. - **result** (object) - The result of the operation. - **valid** (boolean) - Indicates if the operation was valid. - **details** (string) - Details about the operation result. #### Response Example ```json { "data": { "id": "456e7890-e89b-12d3-a456-426614174111", "version": "1.2.0", "status": "PUBLISHED", "latest": true, "productId": "789e0123-e89b-12d3-a456-426614174222", "product": { "id": "789e0123-...", "name": "My Plugin" }, "file": null, "createdAt": "2024-03-01T12:00:00Z" }, "result": { "valid": true, "details": "Release created" } } ``` ``` -------------------------------- ### Create Customer Source: https://context7.com/kasperip/lukittu/llms.txt Creates a customer record that can be associated with licenses. Supports email, name, username, address, custom metadata, and optional Discord account linkage by Discord snowflake ID. ```APIDOC ## Create Customer `POST /api/v1/dev/teams/{teamId}/customers` Creates a customer record that can be associated with licenses. Supports email, name, username, address, custom metadata, and optional Discord account linkage by Discord snowflake ID. ### Method POST ### Endpoint `/api/v1/dev/teams/{teamId}/customers` ### Parameters #### Path Parameters - **teamId** (string) - Required - The unique identifier for the team. #### Request Body - **email** (string) - Required - The customer's email address. - **fullName** (string) - Required - The customer's full name. - **username** (string) - Optional - The customer's username. - **discordId** (string) - Optional - The customer's Discord snowflake ID. - **metadata** (array) - Optional - An array of key-value pairs for custom metadata. - **key** (string) - Required - The metadata key. - **value** (string) - Required - The metadata value. - **locked** (boolean) - Required - Indicates if the metadata is locked. - **address** (object) - Optional - The customer's address details. - **street** (string) - Optional - The street address. - **city** (string) - Optional - The city. - **state** (string) - Optional - The state or province. - **country** (string) - Optional - The country (e.g., 'US'). - **postalCode** (string) - Optional - The postal code. ### Request Example ```bash curl -X POST "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/customers" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ \ "email": "customer@example.com", \ "fullName": "John Doe", \ "username": "johndoe", \ "discordId": "123456789012345678", \ "metadata": [ \ { "key": "plan", "value": "pro", "locked": false } \ ], \ "address": { \ "street": "123 Main St", \ "city": "Anytown", \ "state": "CA", \ "country": "US", \ "postalCode": "12345" \ } \ }' ``` ### Response #### Success Response (201) - **data** (object) - The created customer object. - **id** (string) - The unique identifier for the customer. - **email** (string) - The customer's email address. - **fullName** (string) - The customer's full name. - **username** (string) - The customer's username. - **discordAccount** (object) - Information about the linked Discord account. - **discordId** (string) - The Discord snowflake ID. - **username** (string) - The Discord username. - **globalName** (string) - The Discord global name. - **metadata** (array) - The customer's metadata. - **createdAt** (string) - The timestamp when the customer was created. - **result** (object) - The result of the operation. - **valid** (boolean) - Indicates if the operation was valid. - **details** (string) - Details about the operation result. #### Response Example ```json { "data": { "id": "789e0123-e89b-12d3-a456-426614174222", "email": "customer@example.com", "fullName": "John Doe", "username": "johndoe", "discordAccount": { "discordId": "123456789012345678", "username": "johndoe_discord", "globalName": "JohnD" }, "metadata": [{ "key": "plan", "value": "pro", "locked": false }], "createdAt": "2024-03-01T12:00:00Z" }, "result": { "valid": true, "details": "Customer created" } } ``` ``` -------------------------------- ### Create Release Source: https://context7.com/kasperip/lukittu/llms.txt Creates a new product release. Sent as `multipart/form-data` with a JSON `data` field (required) and an optional binary `file` field (max 10 MB, requires paid subscription for file uploads). Release statuses: `PUBLISHED`, `DRAFT`, `DEPRECATED`, `ARCHIVED`. ```APIDOC ## Create Release `POST /api/v1/dev/teams/{teamId}/releases` Creates a new product release. Sent as `multipart/form-data` with a JSON `data` field (required) and an optional binary `file` field (max 10 MB, requires paid subscription for file uploads). Release statuses: `PUBLISHED`, `DRAFT`, `DEPRECATED`, `ARCHIVED`. ### Method POST ### Endpoint `/api/v1/dev/teams/{teamId}/releases` ### Parameters #### Path Parameters - **teamId** (string) - Required - The unique identifier for the team. #### Request Body - **data** (JSON object) - Required - Contains release details. - **version** (string) - Required - The release version number. - **notes** (string) - Optional - Release notes. - **status** (string) - Optional - The release status (e.g., 'PUBLISHED', 'DRAFT'). Defaults to 'DRAFT'. - **file** (binary) - Optional - The release file (max 10 MB). ### Request Example ```bash curl -X POST "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/releases" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F 'data={"version": "1.0.0", "notes": "Initial release"}' \ -F 'file=@/path/to/your/release.zip' ``` ``` -------------------------------- ### List Customers Source: https://context7.com/kasperip/lukittu/llms.txt Retrieves a paginated and searchable list of customers. You can filter by email, full name, or username. Specify pagination and sorting parameters as needed. ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/customers?page=1&pageSize=20&search=john&sortColumn=createdAt&sortDirection=desc" \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### List Licenses using cURL Source: https://context7.com/kasperip/lukittu/llms.txt Retrieves a paginated and sortable list of licenses. Supports filtering by product and customer IDs. Requires Developer API authentication. ```bash curl "https://app.lukittu.com/api/v1/dev/teams/123e4567-e89b-12d3-a456-426614174000/licenses?page=1&pageSize=25&sortColumn=createdAt&sortDirection=desc&productIds=789e0123-e89b-12d3-a456-426614174222" \ -H "Authorization: Bearer YOUR_API_KEY" ```