secrets_put
const url = 'https://api.canopyhq.dev/secrets/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"value":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.canopyhq.dev/secrets/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "value": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A secret’s identifier within its owning tenant, never its value.
The name the tenant gives the secret; options and connections name it by this.
Request Bodyrequired
Section titled “Request Bodyrequired”The value on its way in. It appears in no response and no log.
object
Examplegenerated
{ "value": "example"}Responses
Section titled “Responses”The secret is sealed again and the outcome is replaced; no secret value is returned.
The result of writing a named resource, without returning its value.
object
The result of applying a resource write at the door.
Example
{ "outcome": "created"}The secret now exists under this tenant.
The result of writing a named resource, without returning its value.
object
The result of applying a resource write at the door.
Example
{ "outcome": "created"}An invalid body or empty value; the response names the value field without exposing its contents.
No console token, or one that did not verify.
Only an owner of the tenant may configure it.