Rotate under the tenant owner's console token or this install's current key.
POST
/installs/{id}/key
const url = 'https://api.canopyhq.dev/installs/example/key';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.canopyhq.dev/installs/example/key \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
Opaque; never the key, never anything the vendor chose.
string
The install whose key changes.
Responses
Section titled “Responses”The tenant owner or vendor holding the current install key receives a new key once. The old key stops resolving immediately.
Media typeapplication/json
A freshly issued key, returned once and never stored in plain text.
object
key
required
string
Examplegenerated
{ "key": "example"}Only the tenant owner or this install’s current key may rotate.
The tenant has no such install, or it was deleted.
Another key-management operation won; the owner may retry.