Secrets
User secrets are owned by the authenticated user and follow them across execution environments. They are the REST equivalent of fused.user_secrets.
Values are stored encrypted and are only returned to the owning user. For how secrets work and when to use user secrets versus team secrets, see Secrets management.
All endpoints on this page are user-scoped — they require a Bearer token and reject service account tokens. User secrets require a paid plan; on the basic tier these endpoints return 403 Forbidden.
List secret keys
GET /secrets/self/user
Returns the keys only — never the values.
{ "secrets": ["OPENAI_API_KEY", "DB_PASSWORD"] }
Get a secret value
GET /secrets/self/user/{key}
{ "key": "OPENAI_API_KEY", "value": "sk-..." }
Returns 404 Not Found if the key does not exist.
Create a secret
POST /secrets/self/user
Body
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Secret name |
value | string | Yes | Secret value |
curl -X POST \
-H "Authorization: Bearer $FUSED_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "OPENAI_API_KEY", "value": "sk-..."}' \
"https://www.fused.io/server/v1/secrets/self/user"
Returns 201 Created with {"key": "OPENAI_API_KEY"}. If the key already exists, returns 409 Conflict — use Create or update instead.
Create or update a secret
PUT /secrets/self/user/{key}
Body
| Field | Type | Required | Description |
|---|---|---|---|
value | string | Yes | Secret value |
Upserts the key, whether or not it already exists.
curl -X PUT \
-H "Authorization: Bearer $FUSED_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"value": "sk-new-value"}' \
"https://www.fused.io/server/v1/secrets/self/user/OPENAI_API_KEY"
Returns {"key": "OPENAI_API_KEY"}.
Delete a secret
DELETE /secrets/self/user/{key}
Returns {"ok": true}.
See also
- Secrets management — user secrets vs team secrets, and how they are secured
fused.user_secrets— the Python equivalentfused secrets— the CLI equivalent