You need to do it by API, but as Walshy said we should add an namespace option to wrangler similar t

You need to do it by API, but as Walshy said we should add an namespace option to wrangler similar to the deploy script
Here's an example of the API method
PUT https://api.cloudflare.com/client/v4/accounts/{account_id}/workers/dispatch/namespaces/{namespace}/scripts/{script_name}/secrets
Content-Type: application/json
X-Auth-Key: YOUR-API-KEY

{
  "name": "DB_PASSWORD",
  "text":  "secretPassword123",
  "type": "secret_text"
}
Was this page helpful?