Documentation Index
Fetch the complete documentation index at: https://mintlify.com/InsForge/InsForge/llms.txt
Use this file to discover all available pages before exploring further.
The Secrets API provides secure encrypted storage for sensitive data like API keys, tokens, and credentials. All values are encrypted at rest and can only be accessed by admin users. Use secrets to store third-party API keys that your serverless functions need to access.
List All Secrets
Retrieve metadata for all secrets without exposing their values. Use this endpoint to list available secrets and check their status.Authentication
Requires:- Bearer Token: Admin JWT token in
Authorization: Bearer <token>header
Response
Array of secret metadata objects (values are not included)
Unique UUID identifier for the secret
Unique key identifier (uppercase with underscores, e.g.,
STRIPE_API_KEY)Whether the secret is currently active
Whether the secret is protected from deletion
When the secret was created (ISO 8601 format)
When the secret was last updated (ISO 8601 format)
When the secret expires (null if no expiration)
Example Request
Example Response
Create a Secret
Create a new encrypted secret with a unique key identifier. The value will be encrypted before storage.Authentication
Requires:- Bearer Token: Admin JWT token in
Authorization: Bearer <token>header
Request Body
Unique key identifier. Must contain only uppercase letters, numbers, and underscores (e.g.,
STRIPE_API_KEY, OAUTH_CLIENT_SECRET).Pattern: ^[A-Z0-9_]+$Secret value to be encrypted and stored securely
Whether the secret is protected from deletion. Reserved secrets cannot be deleted via the API.
Optional expiration date for the secret (ISO 8601 format). After this date, the secret may be considered invalid.
Response
Whether the secret was created successfully
Success message confirming creation
UUID of the newly created secret
Example Request
Example Response
Error Responses
400 Bad Request - Missing required fields:Get Secret Value
Retrieve the decrypted value of a specific secret by its key identifier.Authentication
Requires:- Bearer Token: Admin JWT token in
Authorization: Bearer <token>header
Path Parameters
Secret key identifier (e.g.,
STRIPE_API_KEY)Pattern: ^[A-Z0-9_]+$Response
Secret key identifier
Decrypted secret value
Example Request
Example Response
Error Responses
404 Not Found - Secret doesn’t exist:Update Secret
Update an existing secret’s value or metadata. The new value will be encrypted before storage.Authentication
Requires:- Bearer Token: Admin JWT token in
Authorization: Bearer <token>header
Path Parameters
Secret key identifier (e.g.,
STRIPE_API_KEY)Pattern: ^[A-Z0-9_]+$Request Body
New secret value (will be encrypted)
Whether the secret is active. Set to
false to temporarily disable a secret without deleting it.Whether the secret is protected from deletion
Expiration date (ISO 8601 format). Set to
null to remove expiration.Response
Whether the update was successful
Success message confirming update
Example Request
Example Response
Error Responses
404 Not Found - Secret doesn’t exist:Delete Secret
Mark a secret as inactive (soft delete). This operation cannot be performed on reserved secrets.Authentication
Requires:- Bearer Token: Admin JWT token in
Authorization: Bearer <token>header
Path Parameters
Secret key identifier (e.g.,
STRIPE_API_KEY)Pattern: ^[A-Z0-9_]+$Response
Whether the deletion was successful
Success message confirming deletion
Example Request
Example Response
Error Responses
403 Forbidden - Cannot delete reserved secret:When to Use Secrets Management
Use the Secrets API to:
- Store API keys: Securely store third-party service credentials (Stripe, SendGrid, etc.)
- Manage tokens: Store OAuth tokens, JWT secrets, and authentication credentials
- Configuration management: Store sensitive configuration that serverless functions need
- Security best practices: Avoid hardcoding sensitive values in your application code
- Rotation: Update expired or compromised credentials without code changes
Common Use Cases
- Serverless Functions: Store API keys that your functions access via environment variables
- Payment Processing: Store Stripe, PayPal, or other payment gateway credentials
- Email Services: Store SendGrid, Mailgun, or SMTP credentials
- OAuth Integration: Store client secrets for Google, GitHub, or other OAuth providers
- Third-party APIs: Store credentials for any external service your backend integrates with
Security Best Practices
- Never expose secrets: Don’t include secret values in client-side code or logs
- Use reserved flag: Mark critical secrets as reserved to prevent accidental deletion
- Set expiration dates: Use
expiresAtfor time-limited credentials - Rotate regularly: Update secret values periodically for enhanced security
- Admin-only access: Only admin users can create, read, update, or delete secrets