Skip to content

Mints a batch of activation codes from the entitlement's key-issuance policy.

POST
/api/v1/provision/admin/entitlements/{entitlementId}/activation-workflow/batch/generate
curl --request POST \
--url https://example.com/api/v1/provision/admin/entitlements/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/activation-workflow/batch/generate \
--header 'Content-Type: application/json' \
--data '{ "count": 1, "policyOverride": { "enabled": true, "template": "example", "alphabet": "CrockfordBase32", "customAlphabet": "example", "caseStyle": "Upper", "checksum": "None", "sequenceScope": "Entitlement", "sequenceStart": 1, "collisionRetryLimit": 1, "normalizeStripSeparators": true, "normalizeCaseInsensitive": true, "normalizeMapConfusables": true, "sequenceCurrent": 1 }, "workflowDefaults": { "requiredAuthenticationLevel": "Default", "preAuthorizedDevices": [ "example" ], "fingerprint": "example", "maxDeviceActivations": 1, "useEntitlementMaxActivations": true, "activationCode": "example", "email": "example", "isTrialActivation": true, "requiresUserConsent": true, "sendUserNotification": true, "organizationGroupId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "requiredUserId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "expirationTimeStamp": "2026-04-15T12:00:00Z" }, "batchLabel": "example" }'
entitlementId
required
string format: uuid

Target entitlement.

How many codes to cut, an optional policy override, and the limits copied onto each one.

Admin request to mint a batch of activation codes on an entitlement. Each code becomes an ordinary activation workflow, so a pre-registered code is redeemed through the normal activation pipeline.

object
count

How many codes to mint.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
policyOverride
One of:
null
workflowDefaults
One of:
null
batchLabel

Vendor’s own label for the batch, e.g. a campaign or reseller order it was cut for.

null | string

The issued codes and the batch they are tagged with.

Outcome of a batch generate call.

object
batchId

Identifier the created workflows are tagged with, for later filtering and export.

string format: uuid
batchLabel

Label echoed from the request.

null | string
requestedCount

Codes asked for.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
createdCount

Codes actually created.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
codes

The issued codes, in generation order. Large batches may return this empty and expose the codes through the batch export endpoint instead; read int ActivationCodeBatchResultDto.CreatedCount for the tally.

Array<string>
errors

Items that could not be minted, e.g. after exhausting the collision retry limit.

Array<object>

Why one item of a batch was rejected.

object
index

Zero-based position of the item in the submitted list.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
code

The offending code, when reporting it is meaningful.

null | string
reason

Human-readable explanation, e.g. a duplicate or a policy mismatch.

string

No usable key-issuance policy, or the template could not yield enough unique codes.

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string

No such entitlement.

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string