Skip to main content
POST
/
api-keys
JavaScript
import Nuntly from '@nuntly/sdk';

const client = new Nuntly({
  apiKey: process.env['NUNTLY_API_KEY'], // This is the default and can be omitted
});

const apiKey = await client.apiKeys.create();

console.log(apiKey.id);
{
  "data": {
    "id": "<string>",
    "apiKey": "<string>",
    "shortToken": "<string>",
    "status": "enabled",
    "name": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>

Body

application/json
name
string

The name of the api key

status
enum<string>

The status for the api key

Available options:
enabled,
disabled,
revoked

Response

200 response

data
object
required