Vault

Create or update a vault secret

POST
/api/vault/upsert

Idempotent variant of secret creation - updates the value when name already exists, otherwise creates it. Used by automated flows where the caller does not know whether the secret already exists.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/vault/upsert" \  -H "Content-Type: application/json" \  -d '{    "name": "OPENAI_API_KEY",    "value": "sk-REDACTED",    "workosOrganizationId": "org_01HXYZ123ABCDEFG"  }'
{  "success": true,  "message": "Secret created successfully",  "data": {    "name": "TWILIO_AUTH_TOKEN"  }}