Skip to content

License key designs ​

Every license key SunLicense makes looks like K7QX-M2PD-9HWT-R4CN: 16 random characters from an alphabet without look-alikes (no 0/O, no 1/I/L). On Lite and Standard you can design your own, for example with your product's code in front:

ACMEEDITOR-K7QX-M2PD-9HWT-R4CN

Designs are in the dashboard under Settings → License keys. Keep as many as you like (up to 20) and pick one as the default: every new license gets a key in that design, whichever way it's issued (dashboard, API, CLI, Discord, AI assistants, and stores that don't hand out their own key). Existing keys never change and always keep validating.

Placeholders ​

A design is fixed text (letters A–Z, digits and dashes) and placeholders:

PlaceholderBecomesExample
{RANDOM:n}n random characters (1–8)K7QX for {RANDOM:4}
{PRODUCT}The product's codeACMEEDITOR
{POLICY}The policy's code, or its name if it has nonePRO
{YEAR}The year the license is issued (UTC)2026

{PRODUCT} and {POLICY} are upper-cased, keep only letters and digits, and are cut to 12 characters: a product with the code acme-editor becomes ACMEEDITOR. Give a policy a short code when you create it (or with PATCH /api/v1/policies/{id} { "code": "PRO" }) to control what {POLICY} shows.

Some designs to start from:

DesignExample key
{RANDOM:4}-{RANDOM:4}-{RANDOM:4}-{RANDOM:4} (standard)K7QX-M2PD-9HWT-R4CN
{RANDOM:5}-{RANDOM:5}-{RANDOM:5}-{RANDOM:5}-{RANDOM:5} (long)K7QXM-2PD9H-WTR4C-N8JZA-Q3VBE
{PRODUCT}-{RANDOM:4}-{RANDOM:4}-{RANDOM:4}-{RANDOM:4}ACMEEDITOR-K7QX-M2PD-9HWT-R4CN
{PRODUCT}-{POLICY}-{YEAR}-{RANDOM:4}-{RANDOM:4}-{RANDOM:4}-{RANDOM:4}ACMEEDITOR-PRO-2026-K7QX-M2PD-9HWT-R4CN

Rules ​

So every design is as hard to guess and as safe to show as the standard key:

  • At least 16 random characters in all (about 79 bits, like the standard key).
  • At most 64 characters, counting {PRODUCT} and {POLICY} as 12 each.
  • At most 5 random characters before the first dash, and at least 12 after it. The dashboard, the CLI and Discord show keys masked as their first group, e.g. ACMEEDITOR-XXXX-XXXX-XXXX-XXXX, so the hidden part is always at least as strong as the standard key's.
  • A dash at least every 8 random characters, and no dash at the start, at the end or twice in a row.

The editor shows a few sample keys as you type and says what's wrong with a design before you can save it.

Plans ​

Custom key designs are part of Lite and Standard (plans). On Free, and after a downgrade, new licenses get the standard key. Your designs are kept (you can still view and delete them) and the default applies again when you upgrade.

Good to know ​

  • Stores that give their own key keep it. Gumroad, Lemon Squeezy and other stores whose buyers already have a key from the store keep that key in SunLicense; designs apply where SunLicense makes the key.
  • Keys are case-insensitive when your app validates them, so acmeeditor-k7qx-… works too.
  • Customer data never goes into a key. There's no placeholder for emails or names on purpose: keys end up in screenshots, support chats and forum posts.

API ​

MethodPathPermission
GET/api/v1/key-designsproducts.read
POST/api/v1/key-designs/preview { template, productId?, policyId? } → { template, examples, randomCharacters, maxLength }products.read
POST/api/v1/key-designs { name, template, makeDefault? }products.write
PATCH/api/v1/key-designs/{id} { name?, template? }products.write
DELETE/api/v1/key-designs/{id}products.write
POST/api/v1/key-designs/{id}/defaultproducts.write
DELETE/api/v1/key-designs/default (back to the standard key)products.write

A design that breaks a rule is 400 with the reason. Creating, editing and choosing a default need a plan with Custom license key designs (403 with code: plan_limit otherwise); previews and deletes work on every plan.

Send feedback

Found something broken, or have an idea? It goes straight to our board.

The first line becomes the title.
Images (optional, up to 5: paste, drop or capture)
Check each image before sending, and remove any that show something private.

We also receive this page's address and your browser version.

Ctrl Enter to send