Skip to main content
POST
Node.js

Headers

X-Api-Key
string
required

Path Parameters

domain
string
required

Body

application/json
selector
string
required

Selector for the new key pair

Required string length: 1 - 63
algorithm
enum<string>
default:rsa

Algorithm used for the new key pair Currently, only RSA is supported.

Available options:
rsa
key_length
integer
default:2048

Key length in bits. For RSA, must be a multiple of 1024. Common values: 1024 or 2048. Defaults to 2048 bits.

Required range: 1024 <= x <= 4096

Response

Key pair created successfully

algorithm
string
required

Algorithm used for the key pair

domain
string
required

Domain associated with the key pair

public_key
string
required
selector
string
required

Selector assigned to the key pair

status
enum<string>
required
Available options:
active,
retired,
revoked,
rotated
created_at
string<date-time> | null

Timestamp when the key pair was created

dkim_dns_records
(object | null)[]

Suggested DNS records for the DKIM key

Suggested DNS record for the DKIM key

gracePeriodExpiresAt
string<date-time> | null

UTC timestamp after which you can no longer use the rotated key for signing

key_length
integer

Key length in bits

retiresAt
string<date-time> | null

UTC timestamp when a rotated key pair is retired

status_modified_at
string<date-time> | null

Timestamp when the key was last modified