Secrets

Create a secret

Encrypts and stores a secret. Pass site_id to make one site own it, or omit it for a shared secret and list the sites it applies to in site_ids. The decrypted value comes back in this response only — later reads expose just last4.

post/secrets

Request

  • Base URL: https://api.crevio.co/v1
  • URL: https://api.crevio.co/v1/secrets
  • Auth: API key in header Authorization

Headers

Idempotency-Keystring

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

namestring required

Environment-variable name (e.g. STRIPE_SECRET_KEY). Uppercase letters, digits and underscores; cannot start with a digit or use the reserved CREVIO_ prefix.

valuestring required

The secret value to encrypt.

site_idstring

Site that owns the secret. Omit for a shared, account-level secret.

target'preview' | 'production'

Deployment target the secret applies to. Defaults to production.

descriptionstring

Human-readable note about what this secret is for.

site_idsstring[]

Sites a shared secret applies to. Empty leaves it dormant — stored, but injected nowhere.

egress_hoststring

Host the in-chat agent may call with this secret injected server-side. The value itself is never exposed to the model.

egress_headerstring

Header the secret rides in when calling egress_host (e.g. Authorization).

Response

The secret, including its decrypted value

objectstring required
idstring required
namestring required
targetstring required
scopestring required
site_idstring nullable required
site_idsobject required
descriptionstring nullable required
egress_hoststring nullable required
egress_headerstring nullable required
egress_placementstring required
egress_signingobject required
egress_default_headersobject required
last4string required
valuestring nullable required
created_atstring required

Changes

No recorded changes to this operation across all 2 revisions of this API.