Create key

View .md

Create an API key. The full secret is shown once.


The full secret is returned once in this response and never again. Store it securely.

POST/v1/api-keys
Dashboard JWT only

Create an API key. The full secret is shown once in the response and never again.

Body & query parameters

namestringrequired

1 to 80 chars.

environmentstring

live | test (default live).

const response = await fetch("https://api.dravo.dev/v1/api-keys", {  method: "POST",  headers: {  "Authorization": "Bearer " + process.env.DRAVO_API_KEY,  "Content-Type": "application/json",},  body: JSON.stringify({  "name": "Production",  "environment": "live"})});const data = await response.json();console.log(data);
{  "id": "key_1",  "name": "Production",  "key": "dra_live_8f2c…",  "environment": "live"}