Create an Luckey API Key for integrations

API Keys allow an authorized user of the Luckey backoffice to generate personal credentials to call the Luckey APIs from scripts, services or custom integrations, without reusing a username and password and without keeping a browser session open.

Each key is bound to the user who creates it and operates with the permissions of the role selected at creation time. From Settings you can name your keys, set an optional expiration date, view the list of existing keys (prefix and metadata only) and revoke the keys that are no longer needed.

The full secret value is shown only once, when the key is created: copy it and store it securely right away, as it cannot be retrieved from the interface afterwards.

Note: Luckey API Keys must not be confused with the API keys of third-party integrations, which are configured in their respective integration pages.

Where to find API Keys

1.  Log in to the Luckey backoffice with your credentials.

2. Open Settings.

3. Select the API Keys entry (key icon).

4. The dedicated side panel opens.

Who can manage API Keys

The API Keys entry is visible only to users who are authorized to manage them:

User roleAPI Keys entry visible
ManagerYes
Guest, InstallerNo

The final authorization is enforced by the server: even if the entry were visible by mistake, the operations can be rejected with the message “You cannot manage API keys.”

Create an API Key

To create a new key, fill in the following fields:

FieldRequiredRules
NameYesFree text, max 255 characters (leading and trailing spaces are ignored). It identifies the key in the list (e.g. “Monthly report script”, “CRM integration”).
RoleYesSelected from the company roles. Guest, Installer and Gateway are not available. The Manager role is proposed by default if present, otherwise the first allowed role. The key inherits the permissions of that role.
ExpirationNoA future date (past dates cannot be selected). If set, the key is valid until the end of the selected day. If left empty, the key is marked as Never expires.

Then click Create key. Once the key is created:

1.  A box appears with the message “Copy this key now. It will not be shown again.”

2. The full secret of the key is displayed.

3. Copy it immediately with the Copy key button and store it in a secure place (password manager, CI/CD secret, company vault).

4. Hide key closes the box: the secret can no longer be retrieved from the interface.

5. The list is updated: for that key, only the prefix is shown, not the full secret.

Existing API Keys

For each key, the list shows (without the secret):

■      Name

■      Prefix (visible identifying portion of the key)

■      Associated Role

■      Creation date and time

■      Expiration date, or the Never expires label

■      Revoke button

If no key has been created, the message “No API keys.” is shown.

Revoke an API Key

1.  Click Revoke on the row of the key.

2. Confirm the message “Revoke this API key? Requests using it will stop working.” (the key name is shown).

3. Yes: the key is deleted on the server, the message “API key revoked” is shown and the key disappears from the list.

4. No: no changes are made.

Revocation is immediate and irreversible: a revoked key cannot be reactivated, a new key has to be created.

Authenticate API calls with an API Key

Every request must include the following HTTP header:

X-Api-Key: jago_{{api_key_secret}}

■      The value is the full string copied at creation time: it starts with jago_ followed by 43 base64url characters.

■      The OAuth flow (/oauth/token with username and password) is not required for automated calls authenticated with an API Key.

■      Do not send the key secret in the Authorization: Bearer header: the Bearer header is reserved for the login JWT. If both a JWT and the X-Api-Key header are sent, the JWT wins and the key is ignored.

■      Send Content-Type: application/json where required by the endpoint.

Use the same BaseURL of your system (see Base URL and API calls). The endpoints are the REST v2 ones documented in the Swagger UI, typically with the /api/v2/… prefix. Example:

curl -sS -X GET ‘https://api-{{jago_location_name}}.jago.cloud/api/v2/{{resource}}’ \  -H “X-Api-Key: jago_{{api_key_secret}}” \  -H “Accept: application/json”

Replace host, path and method with the operation you need. In the Swagger UI the API Key is described by the apiKeyAuth security scheme (header X-Api-Key): “API key (jago_…). If a JWT is also set, the JWT wins”.

Permissions, errors and limitations

■      The key acts as the user who created it (same company and context), but only with the permissions of the role selected at creation time.

■      Operation not allowed for the role: 403 Forbidden.

■      Wrong, revoked or expired key: 401 Unauthorized.

■      API Keys cannot be used to manage other API Keys: creation, listing and revocation are only available from Settings → API Keys, logged in to the backoffice.

■      With API Key authentication, account modification operations (/api/v2/users/me, except explicitly allowed GET requests) and the generation of user JWTs are not available: a regular user session is required.

■      After a revocation, in multi-instance architectures there may be a short delay (server-side cache, a few minutes) before all the nodes reject the key.

The following errors can be shown in the backoffice while managing API Keys:

CodeMessageTypical meaning
13504Check name, role and expiration.Name empty or too long, role missing, or expiration date in the past.
13502This role cannot be used for an API key.The role cannot be assigned to a key (server-side edge case).
13501You cannot manage API keys.The user is not authorized.
13503This API key no longer exists.The key has already been revoked or removed (e.g. from another browser).

API Keys endpoints

For reference, API Keys are managed through the following endpoints, which require a logged-in user session and cannot be called with an API Key:

OperationMethodEndpoint
ListGET/api/v2/users/me/apiKeys
CreatePOST/api/v2/users/me/apiKeys
RevokeDELETE/api/v2/users/me/apiKeys/{id}

The input payload of the creation request is shown below. The expiresAt attribute is a timestamp in milliseconds, or null for keys that never expire. The response includes the key field with the secret: it is returned only in this response.

{  “name”: “CRM integration”,  “roleId”: {{role_id}},  “expiresAt”: null}

Best practices

■      One key per use (script, integration, environment): use a meaningful name and the minimum role required (least privilege principle).

■      The secret can be copied only once: if it is lost, revoke the key and create a new one.

■      Revoke obsolete or compromised keys.

■      Set an expiration date for temporary or test keys.

■      Keep Luckey API Keys (Settings → API Keys) separate from the keys of PMS integrations, configured in their respective integration pages.