Skip to main content
PUT
/
api-keys
/
{id}
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.update('apk_01ka8k8s80gvx9604cn9am5st4', {
  permission: 'fullAccess',
});

console.log(apiKey.id);
{
  "data": {
    "id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

The id of the api key

Example:

"apk_01ka8k8s80gvx9604cn9am5st4"

Body

application/json

Updated API key name, permissions, and domain restrictions.

permission
enum<string>
required

The permission type for the api key

Available options:
fullAccess,
sendingAccess
name
string

The name of the api key

status
enum<string>
Available options:
enabled,
disabled
domainIds
string[]

The domain ids to restrict the api key to (only for sendingAccess)

Response

Successful response.

data
object
required