Skip to content

APIKey.issue

POST /{namespace}/api-keys/issue

Issue creates an API Key for one Customer and returns its secret once; afterwards only the prefix shows.

Mode
do
Event
APIKey.issued

Inputs

InputTypeRequiredDescription
customerCustomerrequiredThe Customer whose calls it signs.
namestringrequiredWhat the key is for.
environmentstringrequiredOne of test or live.
verbslist of VerbThe Verbs it may call; unset reaches every Verb the Customer’s Entitlements grant.
expiresAtdatetimeWhen it stops working on its own.

Outputs

OutputTypeRequiredDescription
apiKeyAPI KeyrequiredThe API Key, with its prefix.
secretstringrequiredThe full secret. It is returned here once and never again.

Effects

  • Emits APIKey.issued.
  • Two-way: it runs at once, in the try, send and do modes.
  • Lists the key in the Customer’s Portal, with its prefix, scope and last use.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.APIKey.issue

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.