Create Token

Mint a lum_ token. The secret is returned once.

MethodPOST
/api/v2/tokens

Mints a lum_ token. The secret is returned once. Permission: tokens.

Use either preset or permissions, not both. reuseIfExists defaults to true.

Body Parameters

NameTypeDescription
namestringRequired. Token label. Min 1, max 100.
reuseIfExistsbooleanReturn an existing token with the same name instead of minting. Default true.
permissionsstring[]Explicit scopes: subscribers, audience, campaigns, send, workflows, emails, analytics, settings, domains, tokens, or *.
preset"app" | "marketing" | "sender" | "full"Permission preset. Do not combine with permissions.

Presets: app = subscribers + emails + audience. marketing adds campaigns, analytics, workflows. sender adds send. full is *.

Response Fields

FieldTypeDescription
idstringToken id.
namestringToken label.
tokenstringFull lum_... secret. Returned once.
permissionsstring[]Granted scopes.
createdAtstringISO 8601 created timestamp.
reusedbooleantrue when an existing token was returned.

Errors

StatusnameWhen
401missing_api_keyMissing or invalid bearer token
403missing_permissionToken lacks the tokens permission, or cannot mint the requested scopes
422validation_errorInvalid name, or both preset and permissions