Skip to content
API Reference

Secrets

Create
client.zones.secrets.create(stringzoneID, SecretCreateParams { data, entity_id, name, 4 more } params, RequestOptionsoptions?): Secret { id, created_at, entity_id, 7 more }
POST/zones/{zone_id}/secrets
List
client.zones.secrets.list(stringzoneID, SecretListParams { entity_id, type, xClientRequestID } params?, RequestOptionsoptions?): SecretListResponse { id, created_at, entity_id, 7 more }
GET/zones/{zone_id}/secrets
Delete
client.zones.secrets.delete(stringid, SecretDeleteParams { zone_id, xClientRequestID } params, RequestOptionsoptions?): void
DELETE/zones/{zone_id}/secrets/{id}
Update
client.zones.secrets.update(stringid, SecretUpdateParams { zone_id, data, description, 3 more } params, RequestOptionsoptions?): Secret { id, created_at, entity_id, 7 more }
PATCH/zones/{zone_id}/secrets/{id}
Retrieve
client.zones.secrets.retrieve(stringid, SecretRetrieveParams { zone_id, xClientRequestID } params, RequestOptionsoptions?): SecretRetrieveResponse { id, created_at, data, 7 more }
GET/zones/{zone_id}/secrets/{id}
ModelsExpand Collapse
Secret { id, created_at, entity_id, 7 more }
id: string

A globally unique opaque identifier

minLength1
created_at: string
formatdate-time
entity_id: string

A globally unique opaque identifier

minLength1
name: string

A name for the entity to be displayed in UI

type: "token" | "password"
Accepts one of the following:
"token"
"password"
updated_at: string
formatdate-time
version: number
minimum1
zone_id: string

A globally unique opaque identifier

minLength1
description?: string

A description of the entity

maxLength128
metadata?: unknown

A JSON object containing arbitrary metadata. Metadata will not be encrypted.

SecretPasswordFields { password, type, username }
password: string
type: "password"
username: string
SecretTokenFields { token, type }
token: string
type: "token"