Who can open Developer settings
Go to Settings → Developer.Create a key
1
Open Developer settings
In Lunacal, open Settings → Developer.
2
Name the key and choose when it expires
Click Create an API key.Name this key is a label for your list, such as “Billing sync”. It is not part of the secret. The field placeholder is “E.g. Development”.Expiration date offers 7 days, 30 days, 3 months, and 1 year. 30 days is selected when the dialog opens. Turn on Never expires if the key should stay valid until you delete it.You can rename a key later. You cannot change its expiration after you save it.
3
Copy the key before you close the dialog
Lunacal shows API key created successfully and the text “Save this API key before closing this window.” Click Copy.When you close the dialog, the full key is gone. If you did not save it, delete that row and create a new key.
lunacal_. Send the whole value, including that prefix.
Send the key
Add this header to every request:Content-Type: application/json. Every route uses POST.
401. Lunacal uses the same message for all of those cases, so you cannot tell from the response which one it was. Check the key in Developer settings, then create a new one if you are unsure. The exact messages are on Errors.
After a successful call, Last used on that row updates to a relative time such as “a few seconds ago”. A failed call does not update it.
Read the key list
Each key is one row.- The title is the name you entered. A blank name shows as Nameless API key.
- Under the name, a masked preview starts with
lunacal_and then hides the rest. That preview is not the secret, and it is not the last characters of the secret. You cannot rebuild the key from it. - Created, Last used, and Expires sit on the same row. Last used says Never until the first successful call. Expires is a date, or Never expires.
- A key past its date is marked Expired. A key that expires within 14 days is marked as expiring soon.
Rename or delete a key
Edit opens Edit API key. Change the name and save. The expiration stays as it was. Delete opens Delete this API key permanently? The explanation on that dialog is Revoke this API key. Confirming removes the key. Anything still sending it receives401.
There is no second “revoke” button, and there is no way to turn a key off without deleting it.