# Secrets Store # Stores ## List account stores `client.secretsStore.stores.list(StoreListParamsparams, RequestOptionsoptions?): V4PagePaginationArray` **get** `/accounts/{account_id}/secrets_store/stores` Lists all the stores in an account ### Parameters - `params: StoreListParams` - `account_id: string` Path param: Account Identifier - `direction?: "asc" | "desc"` Query param: Direction to sort objects - `"asc"` - `"desc"` - `order?: "name" | "comment" | "created" | 2 more` Query param: Order secrets by values in the given field - `"name"` - `"comment"` - `"created"` - `"modified"` - `"status"` - `page?: number` Query param: Page number - `per_page?: number` Query param: Number of objects to return per page ### Returns - `StoreListResponse` - `id: string` Store Identifier - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the store ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const storeListResponse of client.secretsStore.stores.list({ account_id: '985e105f4ecef8ad9ca31a8372d0c353', })) { console.log(storeListResponse.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "service_x_keys" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Create a store `client.secretsStore.stores.create(StoreCreateParamsparams, RequestOptionsoptions?): SinglePage` **post** `/accounts/{account_id}/secrets_store/stores` Creates a store in the account ### Parameters - `params: StoreCreateParams` - `account_id: string` Path param: Account Identifier - `body: Array` Body param - `name: string` The name of the store ### Returns - `StoreCreateResponse` - `id: string` Store Identifier - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the store ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const storeCreateResponse of client.secretsStore.stores.create({ account_id: '985e105f4ecef8ad9ca31a8372d0c353', body: [{ name: 'service_x_keys' }], })) { console.log(storeCreateResponse.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "service_x_keys" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Delete a store `client.secretsStore.stores.delete(stringstoreId, StoreDeleteParamsparams, RequestOptionsoptions?): StoreDeleteResponse` **delete** `/accounts/{account_id}/secrets_store/stores/{store_id}` Deletes a single store ### Parameters - `storeId: string` Store Identifier - `params: StoreDeleteParams` - `account_id: string` Account Identifier ### Returns - `StoreDeleteResponse` - `id: string` Store Identifier - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the store ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const store = await client.secretsStore.stores.delete('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '985e105f4ecef8ad9ca31a8372d0c353', }); console.log(store.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "service_x_keys" }, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Domain Types ### Store List Response - `StoreListResponse` - `id: string` Store Identifier - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the store ### Store Create Response - `StoreCreateResponse` - `id: string` Store Identifier - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the store ### Store Delete Response - `StoreDeleteResponse` - `id: string` Store Identifier - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the store # Secrets ## List store secrets `client.secretsStore.stores.secrets.list(stringstoreId, SecretListParamsparams, RequestOptionsoptions?): V4PagePaginationArray` **get** `/accounts/{account_id}/secrets_store/stores/{store_id}/secrets` Lists all store secrets ### Parameters - `storeId: string` Store Identifier - `params: SecretListParams` - `account_id: string` Path param: Account Identifier - `direction?: "asc" | "desc"` Query param: Direction to sort objects - `"asc"` - `"desc"` - `order?: "name" | "comment" | "created" | 2 more` Query param: Order secrets by values in the given field - `"name"` - `"comment"` - `"created"` - `"modified"` - `"status"` - `page?: number` Query param: Page number - `per_page?: number` Query param: Number of objects to return per page - `scopes?: Array>` Query param: Only secrets with the given scopes will be returned - `search?: string` Query param: Search secrets using a filter string, filtering across name and comment ### Returns - `SecretListResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const secretListResponse of client.secretsStore.stores.secrets.list( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '985e105f4ecef8ad9ca31a8372d0c353' }, )) { console.log(secretListResponse.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "3fd85f74b32742f1bff64a85009dda07", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "MY_API_KEY", "status": "pending", "store_id": "023e105f4ecef8ad9ca31a8372d0c353", "comment": "info about my secret" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Get a secret by ID `client.secretsStore.stores.secrets.get(stringstoreId, stringsecretId, SecretGetParamsparams, RequestOptionsoptions?): SecretGetResponse` **get** `/accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}` Returns details of a single secret ### Parameters - `storeId: string` Store Identifier - `secretId: string` Secret identifier tag. - `params: SecretGetParams` - `account_id: string` Account Identifier ### Returns - `SecretGetResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const secret = await client.secretsStore.stores.secrets.get( '023e105f4ecef8ad9ca31a8372d0c353', '3fd85f74b32742f1bff64a85009dda07', { account_id: '985e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(secret.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "3fd85f74b32742f1bff64a85009dda07", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "MY_API_KEY", "status": "pending", "store_id": "023e105f4ecef8ad9ca31a8372d0c353", "comment": "info about my secret" }, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Create a secret `client.secretsStore.stores.secrets.create(stringstoreId, SecretCreateParamsparams, RequestOptionsoptions?): SinglePage` **post** `/accounts/{account_id}/secrets_store/stores/{store_id}/secrets` Creates a secret in the account ### Parameters - `storeId: string` Store Identifier - `params: SecretCreateParams` - `account_id: string` Path param: Account Identifier - `body: Array` Body param - `name: string` The name of the secret - `scopes: Array` The list of services that can use this secret. - `value: string` The value of the secret. Note that this is 'write only' - no API reponse will provide this value, it is only used to create/modify secrets. - `comment?: string` Freeform text describing the secret ### Returns - `SecretCreateResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const secretCreateResponse of client.secretsStore.stores.secrets.create( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '985e105f4ecef8ad9ca31a8372d0c353', body: [ { name: 'MY_API_KEY', scopes: ['workers', 'ai_gateway', 'dex', 'access'], value: 'api-token-secret-123', }, ], }, )) { console.log(secretCreateResponse.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "3fd85f74b32742f1bff64a85009dda07", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "MY_API_KEY", "status": "pending", "store_id": "023e105f4ecef8ad9ca31a8372d0c353", "comment": "info about my secret" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Patch a secret `client.secretsStore.stores.secrets.edit(stringstoreId, stringsecretId, SecretEditParamsparams, RequestOptionsoptions?): SecretEditResponse` **patch** `/accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}` Updates a single secret ### Parameters - `storeId: string` Store Identifier - `secretId: string` Secret identifier tag. - `params: SecretEditParams` - `account_id: string` Path param: Account Identifier - `comment?: string` Body param: Freeform text describing the secret - `scopes?: Array` Body param: The list of services that can use this secret. ### Returns - `SecretEditResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const response = await client.secretsStore.stores.secrets.edit( '023e105f4ecef8ad9ca31a8372d0c353', '3fd85f74b32742f1bff64a85009dda07', { account_id: '985e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(response.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "3fd85f74b32742f1bff64a85009dda07", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "MY_API_KEY", "status": "pending", "store_id": "023e105f4ecef8ad9ca31a8372d0c353", "comment": "info about my secret" }, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Delete a secret `client.secretsStore.stores.secrets.delete(stringstoreId, stringsecretId, SecretDeleteParamsparams, RequestOptionsoptions?): SecretDeleteResponse` **delete** `/accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}` Deletes a single secret ### Parameters - `storeId: string` Store Identifier - `secretId: string` Secret identifier tag. - `params: SecretDeleteParams` - `account_id: string` Account Identifier ### Returns - `SecretDeleteResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const secret = await client.secretsStore.stores.secrets.delete( '023e105f4ecef8ad9ca31a8372d0c353', '3fd85f74b32742f1bff64a85009dda07', { account_id: '985e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(secret.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "3fd85f74b32742f1bff64a85009dda07", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "MY_API_KEY", "status": "pending", "store_id": "023e105f4ecef8ad9ca31a8372d0c353", "comment": "info about my secret" }, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Delete secrets `client.secretsStore.stores.secrets.bulkDelete(stringstoreId, SecretBulkDeleteParamsparams, RequestOptionsoptions?): SinglePage` **delete** `/accounts/{account_id}/secrets_store/stores/{store_id}/secrets` Deletes one or more secrets ### Parameters - `storeId: string` Store Identifier - `params: SecretBulkDeleteParams` - `account_id: string` Account Identifier ### Returns - `SecretBulkDeleteResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const secretBulkDeleteResponse of client.secretsStore.stores.secrets.bulkDelete( '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '985e105f4ecef8ad9ca31a8372d0c353' }, )) { console.log(secretBulkDeleteResponse.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "3fd85f74b32742f1bff64a85009dda07", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "MY_API_KEY", "status": "pending", "store_id": "023e105f4ecef8ad9ca31a8372d0c353", "comment": "info about my secret" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Duplicate Secret `client.secretsStore.stores.secrets.duplicate(stringstoreId, stringsecretId, SecretDuplicateParamsparams, RequestOptionsoptions?): SecretDuplicateResponse` **post** `/accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}/duplicate` Duplicates the secret, keeping the value ### Parameters - `storeId: string` Store Identifier - `secretId: string` Secret identifier tag. - `params: SecretDuplicateParams` - `account_id: string` Path param: Account Identifier - `name: string` Body param: The name of the secret - `scopes: Array` Body param: The list of services that can use this secret. - `comment?: string` Body param: Freeform text describing the secret ### Returns - `SecretDuplicateResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const response = await client.secretsStore.stores.secrets.duplicate( '023e105f4ecef8ad9ca31a8372d0c353', '3fd85f74b32742f1bff64a85009dda07', { account_id: '985e105f4ecef8ad9ca31a8372d0c353', name: 'MY_API_KEY', scopes: ['workers', 'ai_gateway', 'dex', 'access'], }, ); console.log(response.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "3fd85f74b32742f1bff64a85009dda07", "created": "2023-09-21T18:56:32.624632Z", "modified": "2023-09-21T18:56:32.624632Z", "name": "MY_API_KEY", "status": "pending", "store_id": "023e105f4ecef8ad9ca31a8372d0c353", "comment": "info about my secret" }, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Domain Types ### Secret List Response - `SecretListResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Secret Get Response - `SecretGetResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Secret Create Response - `SecretCreateResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Secret Edit Response - `SecretEditResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Secret Delete Response - `SecretDeleteResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Secret Bulk Delete Response - `SecretBulkDeleteResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret ### Secret Duplicate Response - `SecretDuplicateResponse` - `id: string` Secret identifier tag. - `created: string` Whenthe secret was created. - `modified: string` When the secret was modified. - `name: string` The name of the secret - `status: "pending" | "active" | "deleted"` - `"pending"` - `"active"` - `"deleted"` - `store_id: string` Store Identifier - `comment?: string` Freeform text describing the secret # Quota ## View secret usage `client.secretsStore.quota.get(QuotaGetParamsparams, RequestOptionsoptions?): QuotaGetResponse` **get** `/accounts/{account_id}/secrets_store/quota` Lists the number of secrets used in the account. ### Parameters - `params: QuotaGetParams` - `account_id: string` Account Identifier ### Returns - `QuotaGetResponse` - `secrets: Secrets` - `quota: number` The number of secrets the account is entitlted to use - `usage: number` The number of secrets the account is currently using ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const quota = await client.secretsStore.quota.get({ account_id: '985e105f4ecef8ad9ca31a8372d0c353', }); console.log(quota.secrets); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "secrets": { "quota": 10, "usage": 10 } }, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Domain Types ### Quota Get Response - `QuotaGetResponse` - `secrets: Secrets` - `quota: number` The number of secrets the account is entitlted to use - `usage: number` The number of secrets the account is currently using