apicheats.dev Cheat sheet Raw .md
PUT

Try PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name} — GitHub API

GitHub playground

Create or update an environment secret

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

2 body fields
  • encrypted_value · required · string — Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/actions/secrets#get-an-environment-public-key) endpoint.
  • key_id · required · string — ID of the key you used to encrypt the secret.