---
title: "Create Managed Secret"
method: POST
path: "/v0/azure-key-vault/accounts/{account-id}/secrets"
tags: ["Azure Key Vault Secrets"]
---

# Create Managed Secret

`POST /v0/azure-key-vault/accounts/{account-id}/secrets`

Create a new managed secret reference within an Azure Key Vault account.

## Path parameters

- `account-id` integer, required

## Request body

- AzureManagedSecretPostRequest
  - `name` string, required — A descriptive label for this secret reference
  - `secret_identifier` string, required — The name of the secret in the vault (e.g. my-gpg-key)
  - `vault` string, required — The full Azure Key Vault URL (e.g. https://myvault.vault.azure.net)
  - `description` string, nullable — An optional description
  - `secret_version` string, nullable — A specific version (omit to always retrieve the latest version)

## Response `201`

Created

- AzureManagedSecretResource
  - `id` integer — The unique identifier of the managed secret
  - `name` string — The name of the managed secret
  - `description` string, nullable — An optional description
  - `account_id` integer — The account this secret belongs to
  - `secret_identifier` string — The identifier used to fetch the secret from the vault
  - `secret_version` string, nullable
  - `vault` string — The Azure Key Vault URL
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — Validation error
- `401` — Unauthorized (missing or invalid API key)
- `403` — Forbidden
- `404` — Not found

---

[API](https://skmtc.net/oneschema/apis/templates.md) · [All operations](https://skmtc.net/oneschema/apis/templates/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneschema/templates/revisions/40674aa6d4d9/schema)
