Create an API key and return its secret once.
Arguments
inputCreateApiKeyInput!requiredinput.projectReferenceStringProject ID or slug. Creating a project-scoped key requires project.api_keys.manage. Omit for a user-level key; a project-scoped API-key caller retains its enforced project when this field is omitted.
input.nameString!requiredinput.scopes[String!]input.expiresAtString
Responses
mutation CreateApiKey($input: CreateApiKeyInput!) { createApiKey(input: $input) { id projectId userId accountId name key keyPrefix expiresAt createdAt scopes scope }}{ "data": { "createApiKey": { "id": "string", "projectId": "string", "userId": "string", "accountId": "string", "name": "string", "key": "string", "keyPrefix": "string", "expiresAt": "string", "createdAt": "string", "scopes": [ "string" ], "scope": "string" } }}The CreateApiKeyPayload! in data.createApiKey.