Skip to content

Transfer Secret

POST
/secrets/{secret_name}/transfer
curl --request POST \
--url https://api.mengi.cloud/secrets/example/transfer \
--header 'Content-Type: application/json' \
--data '{ "target_organization_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

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.

secret_name
required
Secret Name
string
deployment_id
Any of:
string format: uuid
organization_id
Any of:
string format: uuid
Media typeapplication/json
SecretTransferRequest
object
target_organization_id
required
Target Organization Id
string format: uuid
Examplegenerated
{
"target_organization_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Successful Response

Media typeapplication/json
SecretResponse
object
name
required
Name
string
key
required
Key
string
deployment_id
Any of:
string
database_id
Any of:
string
organization_id
Any of:
string
Examplegenerated
{
"name": "example",
"key": "example",
"deployment_id": "example",
"database_id": "example",
"organization_id": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}