v5

latestOpenAPI 3.1.02026-08-025631,1012.8 MB
Organization Secrets

Create Secret

Create a new secret in organization vault.

Security:

  • Secret value is encrypted at rest using Fernet encryption
  • Encrypted using ENCRYPTION_KEY from environment
  • Decrypted value is NEVER returned in API responses
  • Only secret names are exposed in list operations

Use Cases:

  • Store API keys for external services (Stripe, GitHub, etc.)
  • Store authentication tokens for api_call retriever stage
  • Store credentials for third-party integrations

Important:

  • Secret names must be unique within organization
  • Use update endpoint to modify existing secrets
  • Delete and recreate if you forget the value
post/v1/organizations/secrets

Request body

secret_namestring required

REQUIRED. Name/key for the secret. Use descriptive names that indicate the service and purpose. Must be unique within the organization. Format: lowercase with underscores (e.g., 'stripe_api_key'). Common patterns: '{service}{type}{environment}' like 'stripe_api_key_prod'. This name is used to reference the secret in api_call stage configuration. Examples: 'stripe_api_key', 'github_token', 'openai_api_key', 'weather_api_key'.

secret_valuestring required

REQUIRED. Plaintext secret value to encrypt and store. This value will be encrypted at rest using Fernet encryption. The encrypted value is stored in MongoDB with the organization document. The plaintext value is NEVER logged or exposed in API responses. Only the secret name is visible when listing secrets. Use this field to store: API keys, tokens, passwords, credentials. Format: any string (will be encrypted as-is). For Basic auth, use format 'username:password'.

Example request

{
  "description": "Store Stripe API key for payment processing",
  "secret_name": "stripe_api_key",
  "secret_value": "YOUR_STRIPE_API_KEY"
}

Response

Successful Response

secret_namestring required

Name of the secret that was operated on. This is the same name provided in the request. Use this name to reference the secret in api_call stage configuration.

createdboolean nullable

True if this secret was created, null otherwise. Only set for POST /secrets operations.

updatedboolean nullable

True if this secret was updated, null otherwise. Only set for PUT /secrets/{name} operations.

deletedboolean nullable

True if this secret was deleted, null otherwise. Only set for DELETE /secrets/{name} operations.

Example response

{
  "created": true,
  "description": "Secret created successfully",
  "secret_name": "stripe_api_key"
}