Add API Key
POST/sites/:siteId/apiKeys
Creates an API key for the specified site. Supply an optional roleType to select a predefined role, or CUSTOM with a nonempty permissions array. When roleType is omitted and a nonempty permissions array is supplied, that array is treated as an explicit CUSTOM grant without adding inherited role permissions. If roleType and permissions are both omitted, or permissions is empty with no roleType, the legacy READ, WRITE and DELETE grants apply. For predefined role types, omit permissions or supply an empty array; nonempty permissions are rejected. ADMIN roles and ADMIN permission grants are not allowed, even for administrators.
Request
Responses
- 200
200 OK
Response Headers
Access-Control-Allow-Origin
Access-Control-Allow-Methods
Access-Control-Allow-Headers