---
title: "Decrypts a secret"
method: POST
path: "/secret/decrypt"
---

# Decrypts a secret

`POST /secret/decrypt`

## Request

- Base URL: `http://localhost:21721`
- URL: `http://localhost:21721/secret/decrypt`
- Auth: HTTP bearer

For stores, the secrets are encrypted in json form.

When creating stores in an automated fashion, secrets have to be first converted into the proper representation. This endpoint can be used to obtain the representation of a secret of an existing store.

A vault secret can be decrypted as long as you have access to at least principal

## Request body

- SecretDecryptRequest
  - `encrypted` object, required: The internal encrypted representation of the secret

## Response `200`

The request was successful. The secret was decrypted.

- SecretDecryptResponse
  - `decrypted` string: The decrypted secret

## Other responses

- `400`: Bad request. Please check error message and your parameters.
- `401`: Authorization failed. Please supply a `Bearer` token via the `Authorization` header.
- `403`: Authorization failed. Please supply a valid `Bearer` token via the `Authorization` header.
- `500`: Internal error.

---

[API](https://skmtc.dev/xpipe/apis/xpipe-api-documentation.md) - [All operations](https://skmtc.dev/xpipe/apis/xpipe-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/xpipe/apis/xpipe-api-documentation/revisions/cc0e84caab21?raw)
