# Create a secret

Collection: api
Human docs: https://zei.sh/docs/api

Store a provider-backed plaintext or JSON secret.

POST /public/secrets
Permission: ORG_MANAGE.
The current deployment uses Vault. Other provider values require that provider to be configured.
Request body: {"name":"github-token","provider":"vault","providerReference":"secret/data/ci/github","providerKey":"token","format":"plaintext","value":"replace-me"}
Response: The secret metadata.
Values are audited when viewed or edited. Keep provider credentials out of sandbox records.

Example:

```
curl -X POST https://api.zei.sh/api/v1/public/secrets \
  -H "X-API-Key: $ZEISH_API_KEY"
  -H "Content-Type: application/json" \
  -d '{"name":"github-token","provider":"vault","providerReference":"secret/data/ci/github","providerKey":"token","format":"plaintext","value":"replace-me"}'
```
