> ## Documentation Index > Fetch the complete documentation index at: https://docs.britive.com/llms.txt > Use this file to discover all available pages before exploring further. # Create a vault for the Secrets Manager > This operation should be called only by administrator and only once per tenant. ## OpenAPI ````json POST /api/v1/secretmanager/vault { "openapi": "3.0.1", "info": { "title": "Secret Manager APIs", "version": "v1", "description": "API documentation for Secret Manager, Policy Administration, Notifications, Approval service, etc." }, "servers": [ { "url": "https://{tenantURL}", "description": "The primary server", "variables": { "tenantURL": { "default": "test.britive-app.com", "description": "The host of the server" } } } ], "security": [ { "bearerAuth": [] } ], "tags": [ { "name": "Approvals" }, { "name": "Notification Service" }, { "name": "Policy Administration" }, { "name": "Secrets Manager" }, { "name": "Secret Rotation" } ], "paths": { "/api/v1/secretmanager/vault": { "post": { "tags": [ "Secrets Manager" ], "summary": "Create a vault for the Secrets Manager", "description": "This operation should be called only by administrator and only once per tenant.", "operationId": "initializeVault", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VaultDTO" }, "example": { "name": "my-vault", "description": "Production secrets vault", "rotationTime": "90", "encryptionAlgorithm": "AES", "defaultNotificationMediumId": "01d4b73e-46b3-4347-842d-6b556dc7f9b2", "keyRotationScheduleTime": "04:00", "staticExpiryReminderFrequency": "Daily", "staticExpiryReminderTime": "04:00", "dynamicRotationScheduleTime": "04:30", "dynamicRotationIntervalHours": "24", "verificationScheduleTime": "05:00", "verificationIntervalHours": "24", "recipients": { "userIds": [ "g1bfrv2idml7sxfb5q70" ], "tags": [], "channelIds": null } } } }, "required": "false" }, "responses": { "201": { "description": "successful operation", "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "description": "Bad request. Returned for the following violations:\n- `SM-0174` — `keyRotationScheduleTime` and `dynamicRotationScheduleTime` are less than 30 minutes apart. Both fields are validated against their resolved values; omitted fields are replaced by their defaults (`04:00` and `04:30`) before the check runs.\n- `SM-0175` — `staticExpiryReminderFrequency` is not one of `Daily`, `Weekly`, or `Off`.\n- `SM-0176` — `staticExpiryReminderDay` is missing or not in range 1–7 when `staticExpiryReminderFrequency` is `Weekly`.\n- `SM-0177` — `dynamicRotationIntervalHours` is not one of `4`, `8`, `12`, or `24`.\n- `SM-0178` — `keyRotationScheduleTime`, `staticExpiryReminderTime`, or `dynamicRotationScheduleTime` is not in `HH:mm` format. Message: `Invalid schedule time format. Expected HH:mm (e.g. 14:30).`\n- `SM-0181` — `verificationIntervalHours` is not one of `4`, `8`, `12`, or `24`.\n" } } } } }, "components": { "schemas": { "VaultDTO": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "maxLength": "30", "minLength": "1", "pattern": "^[a-zA-Z0-9-_\\s]{1,30}$", "type": "string" }, "description": { "maxLength": "255", "minLength": "0", "type": "string" }, "lastRotation": { "type": "string" }, "nextRotation": { "type": "string" }, "status": { "type": "string" }, "encryptionAlgorithm": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": { "type": "string", "enum": [ "Allow", "Deny", "Pending", "Timeout", "Rejected", "ApprovalRequired" ] } }, "defaultNotificationMediumId": { "type": "string" }, "recipients": { "$ref": "#/components/schemas/Recipients" }, "maxSecretRotationInterval": { "type": "integer", "format": "int32" }, "rotationTime": { "type": "integer", "format": "int32" }, "keyRotationScheduleTime": { "type": "string", "description": "Time of day (HH:mm, 24-hour) at which the daily vault key rotation task runs. Must be at least 30 minutes apart from `dynamicRotationScheduleTime` (SM-0174). Invalid format returns SM-0178. Defaults to `04:00` if not provided.\n", "default": "04:00", "example": "02:00" }, "staticExpiryReminderFrequency": { "type": "string", "description": "Frequency for sending static secret expiry reminders. Allowed values: `Daily`, `Weekly`, `Off` (SM-0175). Defaults to `Daily` if not provided.\n", "enum": [ "Daily", "Weekly", "Off" ], "default": "Daily", "example": "Weekly" }, "staticExpiryReminderTime": { "type": "string", "description": "Time of day (HH:mm, 24-hour) at which expiry reminder notifications are sent. Invalid format returns SM-0178. Defaults to `04:00` if not provided.\n", "default": "04:00", "example": "09:00" }, "staticExpiryReminderDay": { "type": "integer", "format": "int32", "description": "Day of week for weekly expiry reminders (1=Monday, 7=Sunday). Required when `staticExpiryReminderFrequency` is `Weekly` (SM-0176).\n", "minimum": "1", "maximum": "7", "example": "1" }, "dynamicRotationScheduleTime": { "type": "string", "description": "Start time (HH:mm, 24-hour) for the bulk dynamic secret rotation task. Must be at least 30 minutes apart from `keyRotationScheduleTime` (SM-0174). Invalid format returns SM-0178. Defaults to `04:30` if not provided.\n", "default": "04:30", "example": "03:00" }, "dynamicRotationIntervalHours": { "type": "integer", "format": "int32", "description": "How often (in hours) to run the bulk dynamic secret rotation task. Allowed values: `4`, `8`, `12`, `24` (SM-0177). Defaults to `24` if not provided.\n", "enum": [ "4", "8", "12", "24" ], "default": "24", "example": "24" }, "verificationScheduleTime": { "type": "string", "description": "Start time (HH:mm, 24-hour) for the secret verification task. Verification runs on its own independent schedule, decoupled from rotation; whether an individual secret is actually verified is a per-secret setting, not vault-level. Invalid format returns SM-0178. Defaults to `05:00` if not provided (30 minutes after the default `dynamicRotationScheduleTime`; verification then runs independently thereafter).\n", "default": "05:00", "example": "05:00" }, "verificationIntervalHours": { "type": "integer", "format": "int32", "description": "How often (in hours) to run the secret verification task. Allowed values: `4`, `8`, `12`, `24` (SM-0181). Defaults to `24` if not provided.\n", "enum": [ "4", "8", "12", "24" ], "default": "24", "example": "24" } } }, "Recipients": { "type": "object", "properties": { "userIds": { "uniqueItems": "true", "type": "array", "items": { "type": "string" } }, "tags": { "uniqueItems": "true", "type": "array", "items": { "type": "string" } }, "approverGroups": { "uniqueItems": "true", "type": "array", "items": { "type": "string" } }, "channelIds": { "uniqueItems": "true", "type": "array", "items": { "type": "string" } }, "slackAppChannels": { "uniqueItems": "true", "type": "array", "items": { "type": "string" } }, "teamsAppChannels": { "type": "array", "items": { "$ref": "#/components/schemas/TeamsAppChannels" } } } }, "TeamsAppChannels": { "type": "object", "properties": { "team": { "type": "string" }, "channels": { "uniqueItems": "true", "type": "array", "items": { "type": "string" } } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer" } } } } ````