---
title: "Store a vault secret"
method: POST
path: "/vapi/project/{projectId}/secrets"
tags: ["Vault"]
---

# Store a vault secret

`POST /vapi/project/{projectId}/secrets`

## Request

- Base URL: `https://api.websitepublisher.ai`
- URL: `https://api.websitepublisher.ai/vapi/project/{projectId}/secrets`
- Auth: OAuth 2 (authorization code, authorization URL `https://api.websitepublisher.ai/dapi/oauth/authorize`, token URL `https://api.websitepublisher.ai/dapi/oauth/token`, scopes: `read`, `write`)

Store or replace a secret. Encrypted with AES-256-GCM, can never be read back.

## Path parameters

- `projectId` integer, required

## Request body

- VaultSecretStore
  - `key_name` string, required: Unique identifier (lowercase, underscores)
  - `value` string, required: The secret value to encrypt and store
  - `service_type` string: Service label (e.g. resend, mollie)
  - `description` string: Human-readable description

## Response `201`

Secret stored

## Other responses

- `429`: Secret limit reached (upgrade plan)

---

[API](https://skmtc.dev/websitepublisher/apis/websitepublisher-ai-api.md) · [All operations](https://skmtc.dev/websitepublisher/apis/websitepublisher-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/websitepublisher/apis/websitepublisher-ai-api/revisions/e9df1ef10551?raw)
