Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.knoxcall.com/llms.txt

Use this file to discover all available pages before exploring further.

Create Secret

POST /v1/secrets
Creates a new encrypted secret. Pass secret_type to choose the variant — the default is string. For type-specific convenience endpoints see Create OAuth2 Secret and Create Certificate Secret.
Secret names are normalized: spaces are replaced with underscores. For example, "Stripe API Key" becomes STRIPE_API_KEY. The normalized name is returned as both name and shortcode_name.

String Secret

FieldTypeRequiredDescription
namestringYesDisplay name for the secret (spaces → underscores)
valuestringYesThe secret value to encrypt and store
collection_iduuidNoAssign to a collection
expires_atstringNoISO-8601 datetime after which the secret is considered expired
strict_expiry_enforcementbooleanNoIf true, injection is blocked when the secret is expired. Defaults to false (warn-only)

Response

{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "STRIPE_API_KEY",
    "shortcode_name": "STRIPE_API_KEY",
    "base_environment": "production",
    "environment_count": 1,
    "secret_type": "string",
    "collection_id": null,
    "expires_at": null,
    "strict_expiry_enforcement": false
  },
  "meta": { "request_id": "550e8400-e29b-41d4-a716-446655440000" }
}
curl -X POST https://api.knoxcall.com/v1/secrets \
  -H "Authorization: Bearer tk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "STRIPE_API_KEY",
    "value": "sk_live_..."
  }'

Errors

StatusTypeDescription
400validation_errorMissing required fields or invalid collection
403plan_limitSecret limit reached for your subscription plan
409conflictA secret with this name already exists