---
title: Secrets Store
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Secrets Store

#### Secrets StoreStores

##### [List account stores](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/methods/list)

client.secretsStore.stores.list(StoreListParams { account\_id, direction, order, 2 more } params, RequestOptionsoptions?): V4PagePaginationArray<[StoreListResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores%20%3E%20%28model%29%20store%5Flist%5Fresponse%20%3E%20%28schema%29) { id, created, modified, 2 more } \>

GET/accounts/{account\_id}/secrets\_store/stores

##### [Get a store by ID](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/methods/get)

client.secretsStore.stores.get(stringstoreID, StoreGetParams { account\_id } params, RequestOptionsoptions?): [StoreGetResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores%20%3E%20%28model%29%20store%5Fget%5Fresponse%20%3E%20%28schema%29) { id, created, modified, 2 more } 

GET/accounts/{account\_id}/secrets\_store/stores/{store\_id}

##### [Create a store](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/methods/create)

client.secretsStore.stores.create(StoreCreateParams { account\_id, name } params, RequestOptionsoptions?): [StoreCreateResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores%20%3E%20%28model%29%20store%5Fcreate%5Fresponse%20%3E%20%28schema%29) { id, created, modified, 2 more } 

POST/accounts/{account\_id}/secrets\_store/stores

##### [Delete a store](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/methods/delete)

client.secretsStore.stores.delete(stringstoreID, StoreDeleteParams { account\_id, force } params, RequestOptionsoptions?): [StoreDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores%20%3E%20%28model%29%20store%5Fdelete%5Fresponse%20%3E%20%28schema%29) | null

DELETE/accounts/{account\_id}/secrets\_store/stores/{store\_id}

##### ModelsExpand Collapse 

StoreListResponse { id, created, modified, 2 more } 

id: string

Store Identifier.

maxLength32

created: string

When the secret was created.

formatdate-time

modified: string

When the secret was modified.

formatdate-time

name: string

The name of the store.

account\_id?: string

Account Identifier.

maxLength32

StoreGetResponse { id, created, modified, 2 more } 

id: string

Store Identifier.

maxLength32

created: string

When the secret was created.

formatdate-time

modified: string

When the secret was modified.

formatdate-time

name: string

The name of the store.

account\_id?: string

Account Identifier.

maxLength32

StoreCreateResponse { id, created, modified, 2 more } 

id: string

Store Identifier.

maxLength32

created: string

When the secret was created.

formatdate-time

modified: string

When the secret was modified.

formatdate-time

name: string

The name of the store.

account\_id?: string

Account Identifier.

maxLength32

StoreDeleteResponse \= unknown

Result is null for delete operations.

#### Secrets StoreStoresSecrets

##### [List store secrets](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/subresources/secrets/methods/list)

client.secretsStore.stores.secrets.list(stringstoreID, SecretListParams { account\_id, direction, order, 4 more } params, RequestOptionsoptions?): V4PagePaginationArray<[SecretListResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores.secrets%20%3E%20%28model%29%20secret%5Flist%5Fresponse%20%3E%20%28schema%29) { id, created, modified, 5 more } \>

GET/accounts/{account\_id}/secrets\_store/stores/{store\_id}/secrets

##### [Get a secret by ID](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/subresources/secrets/methods/get)

client.secretsStore.stores.secrets.get(stringsecretID, SecretGetParams { account\_id, store\_id } params, RequestOptionsoptions?): [SecretGetResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores.secrets%20%3E%20%28model%29%20secret%5Fget%5Fresponse%20%3E%20%28schema%29) { id, created, modified, 5 more } 

GET/accounts/{account\_id}/secrets\_store/stores/{store\_id}/secrets/{secret\_id}

##### [Create a secret](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/subresources/secrets/methods/create)

client.secretsStore.stores.secrets.create(stringstoreID, SecretCreateParams { account\_id, body } params, RequestOptionsoptions?): SinglePage<[SecretCreateResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores.secrets%20%3E%20%28model%29%20secret%5Fcreate%5Fresponse%20%3E%20%28schema%29) { id, created, modified, 5 more } \>

POST/accounts/{account\_id}/secrets\_store/stores/{store\_id}/secrets

##### [Patch a secret](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/subresources/secrets/methods/edit)

client.secretsStore.stores.secrets.edit(stringsecretID, SecretEditParams { account\_id, store\_id, comment, 2 more } params, RequestOptionsoptions?): [SecretEditResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores.secrets%20%3E%20%28model%29%20secret%5Fedit%5Fresponse%20%3E%20%28schema%29) { id, created, modified, 5 more } 

PATCH/accounts/{account\_id}/secrets\_store/stores/{store\_id}/secrets/{secret\_id}

##### [Delete a secret](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/subresources/secrets/methods/delete)

client.secretsStore.stores.secrets.delete(stringsecretID, SecretDeleteParams { account\_id, store\_id } params, RequestOptionsoptions?): [SecretDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores.secrets%20%3E%20%28model%29%20secret%5Fdelete%5Fresponse%20%3E%20%28schema%29) | null

DELETE/accounts/{account\_id}/secrets\_store/stores/{store\_id}/secrets/{secret\_id}

##### [Delete secrets](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/subresources/secrets/methods/bulk%5Fdelete)

client.secretsStore.stores.secrets.bulkDelete(stringstoreID, SecretBulkDeleteParams { account\_id } params, RequestOptionsoptions?): [SecretBulkDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores.secrets%20%3E%20%28model%29%20secret%5Fbulk%5Fdelete%5Fresponse%20%3E%20%28schema%29) | null

DELETE/accounts/{account\_id}/secrets\_store/stores/{store\_id}/secrets

##### [Duplicate Secret](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/stores/subresources/secrets/methods/duplicate)

client.secretsStore.stores.secrets.duplicate(stringsecretID, SecretDuplicateParams { account\_id, store\_id, name, 2 more } params, RequestOptionsoptions?): [SecretDuplicateResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.stores.secrets%20%3E%20%28model%29%20secret%5Fduplicate%5Fresponse%20%3E%20%28schema%29) { id, created, modified, 5 more } 

POST/accounts/{account\_id}/secrets\_store/stores/{store\_id}/secrets/{secret\_id}/duplicate

##### ModelsExpand Collapse 

SecretListResponse { id, created, modified, 5 more } 

id: string

Secret identifier tag.

maxLength32

created: string

When the secret was created.

formatdate-time

modified: string

When the secret was modified.

formatdate-time

name: string

The name of the secret.

status: "pending" | "active" | "deleted"

One of the following:

"pending"

"active"

"deleted"

store\_id: string

Store Identifier.

maxLength32

comment?: string

Freeform text describing the secret.

scopes?: Array<"workers" | "ai\_gateway" | "dex" | 3 more\>

The list of services that can use this secret.

One of the following:

"workers"

"ai\_gateway"

"dex"

"access"

"containers"

"websearch"

SecretGetResponse { id, created, modified, 5 more } 

id: string

Secret identifier tag.

maxLength32

created: string

When the secret was created.

formatdate-time

modified: string

When the secret was modified.

formatdate-time

name: string

The name of the secret.

status: "pending" | "active" | "deleted"

One of the following:

"pending"

"active"

"deleted"

store\_id: string

Store Identifier.

maxLength32

comment?: string

Freeform text describing the secret.

scopes?: Array<"workers" | "ai\_gateway" | "dex" | 3 more\>

The list of services that can use this secret.

One of the following:

"workers"

"ai\_gateway"

"dex"

"access"

"containers"

"websearch"

SecretCreateResponse { id, created, modified, 5 more } 

id: string

Secret identifier tag.

maxLength32

created: string

When the secret was created.

formatdate-time

modified: string

When the secret was modified.

formatdate-time

name: string

The name of the secret.

status: "pending" | "active" | "deleted"

One of the following:

"pending"

"active"

"deleted"

store\_id: string

Store Identifier.

maxLength32

comment?: string

Freeform text describing the secret.

scopes?: Array<"workers" | "ai\_gateway" | "dex" | 3 more\>

The list of services that can use this secret.

One of the following:

"workers"

"ai\_gateway"

"dex"

"access"

"containers"

"websearch"

SecretEditResponse { id, created, modified, 5 more } 

id: string

Secret identifier tag.

maxLength32

created: string

When the secret was created.

formatdate-time

modified: string

When the secret was modified.

formatdate-time

name: string

The name of the secret.

status: "pending" | "active" | "deleted"

One of the following:

"pending"

"active"

"deleted"

store\_id: string

Store Identifier.

maxLength32

comment?: string

Freeform text describing the secret.

scopes?: Array<"workers" | "ai\_gateway" | "dex" | 3 more\>

The list of services that can use this secret.

One of the following:

"workers"

"ai\_gateway"

"dex"

"access"

"containers"

"websearch"

SecretDeleteResponse \= unknown

Result is null for delete operations.

SecretBulkDeleteResponse \= unknown

Result is null for delete operations.

SecretDuplicateResponse { id, created, modified, 5 more } 

id: string

Secret identifier tag.

maxLength32

created: string

When the secret was created.

formatdate-time

modified: string

When the secret was modified.

formatdate-time

name: string

The name of the secret.

status: "pending" | "active" | "deleted"

One of the following:

"pending"

"active"

"deleted"

store\_id: string

Store Identifier.

maxLength32

comment?: string

Freeform text describing the secret.

scopes?: Array<"workers" | "ai\_gateway" | "dex" | 3 more\>

The list of services that can use this secret.

One of the following:

"workers"

"ai\_gateway"

"dex"

"access"

"containers"

"websearch"

#### Secrets StoreQuota

##### [View secret usage](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore/subresources/quota/methods/get)

client.secretsStore.quota.get(QuotaGetParams { account\_id } params, RequestOptionsoptions?): [QuotaGetResponse](https://developers.cloudflare.com/api/typescript/resources/secrets%5Fstore#%28resource%29%20secrets%5Fstore.quota%20%3E%20%28model%29%20quota%5Fget%5Fresponse%20%3E%20%28schema%29) { secrets } 

GET/accounts/{account\_id}/secrets\_store/quota

##### ModelsExpand Collapse 

QuotaGetResponse { secrets } 

secrets: Secrets { quota, usage } 

quota: number

The number of secrets the account is entitled to use.

usage: number

The number of secrets the account is currently using.