---
title: "Transfer Secret"
method: POST
path: "/api/v1/secrets/{secret_name}/transfer"
tags: ["secrets"]
---

# Transfer Secret

`POST /api/v1/secrets/{secret_name}/transfer`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/api/v1/secrets/{secret_name}/transfer`
- Auth: none declared

Move a secret from the active org's namespace to another org's namespace.

`organization_id` (or the deployment's org) is the source; the caller must be
a member of both source and target orgs. The OpenBao value is copied to the
target namespace and deleted from the source.

## Path parameters

- `secret_name` string, required

## Query parameters

- `deployment_id` string, nullable
- `organization_id` string, uuid, nullable

## Request body

- SecretTransferRequest
  - `target_organization_id` string, uuid, required

## Response `200`

Successful Response

- SecretResponse
  - `name` string, required
  - `key` string, required
  - `deployment_id` string, nullable
  - `database_id` string, nullable
  - `organization_id` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
