Skip to content

Instantly share code, notes, and snippets.

@sam-heller
Created March 24, 2021 16:00
Show Gist options
  • Save sam-heller/52045d9ba5355f64eb8db09c7a11bdcf to your computer and use it in GitHub Desktop.
Save sam-heller/52045d9ba5355f64eb8db09c7a11bdcf to your computer and use it in GitHub Desktop.
Update Cloudflare KV Secret Via REST
curl --request PUT \
--url https://api.cloudflare.com/client/v4/accounts/***ACCOUNT_ID***/workers/scripts/***KV-NAMESPACE-SLUG***/secrets \
--header 'Content-Type: application/json' \
--header 'X-Auth-Email: ***AUTH-EMAIL***' \
--header 'X-Auth-Key: ***AUTH-TOKEN***' \
--data '{
"name" : "secret-key",
"text" : "secret-value",
"type" : "secret_text"
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment