Create an API key
POST
/api-keys
const url = 'https://api.engram.page/api-keys';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"CI pipeline"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.engram.page/api-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "CI pipeline" }'The raw key is returned once in this response and never again.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Key name
Media typeapplication/json
CreateApiKeyRequest
object
name
required
string
Example
{ "name": "CI pipeline"}Responses
Section titled “Responses”Created (raw key)
Media typeapplication/json
ApiKeyCreated
object
id
required
string format: uuid
key
required
Raw secret — store it now; never shown again.
string
name
required
string
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "key": "example", "name": "example"}Validation error