import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: 'My API Key',
});
const apiKey = await client.apiKeys.create();
console.log(apiKey.id);
{
"data": {
"id": "apk_01jnx372zj49s3zqnn7ew8hzpk",
"org_id": "org_01jh6jk82zjq9deye73h0mzcaq",
"apikey": "ntly_****_***************",
"apikey_truncated": "GGvLoL",
"name": "My API key",
"status": "enabled",
"user_id": "user_01jh6jk831bzen14edngw38we9",
"created_at": "2025-03-09T09:19:13.394Z",
"modified_at": "2025-03-09T09:19:13.394Z",
"region": "eu-west-1",
"kind": "api-key"
}
}
Create a new api key
import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: 'My API Key',
});
const apiKey = await client.apiKeys.create();
console.log(apiKey.id);
{
"data": {
"id": "apk_01jnx372zj49s3zqnn7ew8hzpk",
"org_id": "org_01jh6jk82zjq9deye73h0mzcaq",
"apikey": "ntly_****_***************",
"apikey_truncated": "GGvLoL",
"name": "My API key",
"status": "enabled",
"user_id": "user_01jh6jk831bzen14edngw38we9",
"created_at": "2025-03-09T09:19:13.394Z",
"modified_at": "2025-03-09T09:19:13.394Z",
"region": "eu-west-1",
"kind": "api-key"
}
}
Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>
A successful response
The response is of type object
.