Create a key
A project key, as the console's API Keys page creates one. The secret is in this response only.
Headers
- Idempotency-Keystringoptional
Optional, up to 255 visible characters (a UUID). A retry with the same key and body within 24 hours makes nothing new; see Idempotent retries.
Body
application/json; unknown fields refused- namestringrequired
The service, agent or customer that will hold it. Spaces become dashes; unique among the project's active keys.
- projectstringrequired
Project id or slug.
- environmentstringrequired
Environment id or name in that project.
productionkeys startib_live_, othersib_test_. - expires_atstring | nulloptional
ISO 8601 time after which the key stops working, at most five years ahead. Null or left out: no expiry.
- directivesobjectoptional
This key's own Directives, tightening its environment's, such as a per-customer budget. Validated as in the console; change later with Update Directives.
- permissionsstring[]optional
Permissions beyond inference.
content:readlets the key read its project's logged content; it is the only one the API grants, and off when left out. Shown on the key aspermissions.
Response
- secretstringrequired
The key. Store it now: it is not shown again.