Create an API key
Creates an API key that authenticates as its own principal within the organization. access grants either one organization-wide role (admin, full_editor, or content_editor) or one role (full_editor or content_editor) on at least one website in the organization; the owner role can never be granted, and website ids outside the organization fail with 400. name is 1–200 characters and expiresAt is an ISO 8601 timestamp or null for a key that never expires. The response contains the plaintext secret exactly once — only a SHA-256 hash is stored, so it cannot be retrieved again.
Authorizations
Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.
Body
11 - 200^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Access configuration of an API key: either one organization-wide role, or one role across an explicit set of websites. The owner role can never be granted to an API key.
- Option 1
- Option 2
Response
The created key and its plaintextKey secret. Store the secret now; it is never shown again.