---
search:
  tags:
    - Secret stores
    - POST
seo:
  description: >-
    Enterprise. Add an AWS Secrets Manager or HashiCorp Vault (KV version 2)
    store to… Reference for the POST /api/v2/secret-stores endpoint in the
    Anlyon API.
sidebar:
  label: Add a secret store
  badge: POST
title: Add a secret store
type: openapi-operation
---
Enterprise. Add an AWS Secrets Manager or HashiCorp Vault (KV version 2) store to the environment. Anlyon authenticates to it first, without reading any secret (STS GetCallerIdentity, or Vault `auth/token/lookup-self`); if that fails nothing is saved and the request answers `SECRET_STORE_CHECK_FAILED`. The credential is encrypted and never returned. Requests to the store go through the same address checks as action dispatch, so a store on a private address is refused, unless a workspace admin allowed it in the secret store settings on a self-hosted edition.

`POST /api/v2/secret-stores`
