Skip to content
Oclavex is in private preview, open to existing MonetizeIt users. New users who would like to evaluate Oclavex before the public launch can request access at info@revenusion.com.

Activation key formats & batches

By default Oclavex issues an activation code as a random string. A key format replaces that with a format you choose: your prefix, a running number, the issue date, a check character. The same format also lets you generate codes in batches ahead of time, for a campaign or a reseller order, and to import codes you generated elsewhere.

The format belongs to an entitlement, and applies to every code issued from it. Codes issued before you set a format keep working unchanged.

ACME - 2607 - 000042 - 7Q4K9 literal text your prefix DATE:yyMM July 2026 SEQ:6 42nd code issued RAND:4 + CHK random + typo check ACME-{DATE:yyMM}-{SEQ:6}-{RAND:4}{CHK}
Token Produces
{RAND:n} n random characters from the alphabet
{SEQ:n} the next number, zero-padded to n digits
{DATE:fmt} the issue date in UTC — yyyy, yy, MM, dd, HH, mm
{CHK} a check character over everything before it; must come last

Anything outside braces is literal text. Write {{ or }} for a literal brace.

The portal shows example codes as you type, so you can see the format before you save it. Those examples come from the same generator that issues real codes, so what you see is what customers get.

When a license’s authentication requirement is Anonymous, a code is all anyone needs to activate it, so its codes must be hard to guess. A format for such a license needs at least 50 random bits: 10 random characters ({RAND:10}) from Crockford Base32 or uppercase alphanumeric, 13 from hexadecimal, 16 from digits. A counter adds nothing here, because the next number is easy to work out. The portal and the API refuse a weaker format for that license, refuse to switch a license to Anonymous while its format is weaker, and refuse to generate a batch from one.

A license whose codes need a signed-in user or a confirmed email can use any format; a guessed code gets nowhere without the sign-in.

The default alphabet is Crockford Base32, which leaves out I, L, O and U. That is not arbitrary: it removes the characters people misread when copying a code off a printed card or reading one out over the phone. 0 and O can no longer be confused because O is never issued.

You can also pick digits only, hexadecimal, uppercase alphanumeric, or supply your own set.

Because the ambiguity is designed out, Oclavex can also be tolerant about it at redemption: if a customer types O where the code has 0, the code still resolves. You can turn that off per format.

{SEQ} draws from a counter you can scope to the entitlement, the product, or everything you issue. Two properties to know before you rely on it:

  • Numbers can have gaps. They are handed out in blocks, so a batch that fails or is abandoned leaves its numbers unused. The alternative would mean pausing all issuance while any one batch is being generated.
  • A lower number does not mean an earlier code. Two batches generated at once finish independently. If you need issue order, put {DATE} in the template — that is the clock.

The counter makes codes readable and traceable. It is not what keeps them unique: that is enforced separately, so a code is never issued twice even if the counter is restored from a backup.

Generate creates codes from the format and hands you the list once, as a CSV download. Oclavex makes every batch in the background, so a large one does not hold up the page; the list appears when the batch is ready. Save the file at that moment — the list is not shown again, though the codes stay listed on the entitlement and are tagged with the batch label you gave.

Each code becomes an ordinary activation code, so nothing about redemption changes: a customer activates a pre-generated code just as they would one you issued to them directly.

In the API, POST …/entitlements/{entitlementId}/activation-codes/batch/generate answers 202 Accepted with an operation. Read the operation at the Location the answer gives until its status is Succeeded; the finished operation holds the codes. Send an Idempotency-Key header, and a retry answers with the same operation instead of making a second batch. To list one batch’s codes later, filter the activation code list with BatchId==<batchId>, using the batchId the finished operation gives.

Import registers codes you generated somewhere else — carrying over an existing scheme, or migrating from another system.

Run it as a preview first. The preview reports exactly what a real run would do — how many would be registered, which repeat within your file, which already exist — without saving anything.

Case and separators are still ignored for every code, imported or generated — acme f001 and ACME-F001 are the same code. Only the look-alike substitution is skipped for imported codes.

An imported code that anyone can redeem needs at least 10 letters or digits, and the import skips a shorter one. A code that asks for a signed-in user or a confirmed email may be shorter, such as the four-character codes printed on a box: a guessed code gets nowhere without the sign-in. Keep those codes at their sign-in level, because a short code can’t be opened to anyone later (see below).

A code keeps the sign-in requirement it was issued with. Changing the entitlement’s Activation security level later applies to codes issued after the change, not to the ones already sent: a code issued under Identify (log in) still asks its customer to sign in after you switch the entitlement to Anonymous. To change an issued code, open it from the Activation codes list and set Who can redeem the code (Anyone with the code for no sign-in), or issue the customer a new code.

A code with fewer than 10 letters or digits keeps its sign-in level: setting it to Anyone with the code is refused, and the code stays as it was. Issue a longer code for customers who activate without signing in.

In the portal, open an entitlement:

  • Rules tab → Activation key format to set or change the template.
  • Access tab, Activation codes section → Generate batch or Import codes.

On a published entitlement, a format change goes into a draft revision, like a change to its other policies. An offer’s format can be changed at any time. Already-issued codes stay valid, but the format still sets how they are matched at redemption — the look-alike tolerance above — so a change is not confined to future codes.