Add a secret to a site
Changed onEncrypts 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. Called by Crevio's agent, a script or an MCP client, value is null. Names must be valid environment-variable identifiers and may not use the reserved CREVIO_ prefix.
Request
- Base URLhttps://api.crevio.co/v1
- AuthAPI key in header Authorization
Path parameters
The resource's ID, as returned in its id field
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
Environment-variable name (e.g. STRIPE_SECRET_KEY). Uppercase letters, digits, and underscores; cannot start with a digit or use the reserved CREVIO_ prefix.
The secret value to encrypt and inject.
Optional human-readable note about what this secret is for.
Response
Secret created (includes the decrypted value)
Changes
- breaking
the
site_idsresponse's property type changed fromobjecttoarrayfor status
- breaking
- warning
added the new
idempotency_errorenum value to theerror/typeresponse property for the response status - warning
added the new
idempotency_errorenum value to theerror/typeresponse property for the response status
3 more changes in this revision
- warning