Add a secret to a site
Encrypts and stores a new secret on this site, then injects it into the live site as an environment variable (asynchronously, if the site is deployed). The decrypted value is returned only in this response — store it if you need it, as later list responses expose just last4. Names must be valid environment-variable identifiers and may not use the reserved CREVIO_ prefix.
Request
- Base URL: https://api.crevio.co/v1
- URL: https://api.crevio.co/v1/sites/{id}/secrets
- Auth: API key in header Authorization
Path parameters
The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
Headers
Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.
Request body
Response
Secret created (includes the decrypted value)
Changes
No recorded changes to this operation across all 2 revisions of this API.