---
title: "POST /create-secret"
method: POST
path: "/create-secret"
tags: ["v2"]
---

# POST /create-secret

`POST /create-secret`

## Request body

- CreateSecret
  - `accessibility` string — for personal password manager
  - `change-event` string — Trigger an event when a secret value changed [true/false] (Relevant only for Static Secret)
  - `custom-field` object — For Password Management use, additional fields
  - `delete_protection` string — Protection from accidental deletion of this object [true/false]
  - `description` string — Description of the object
  - `format` string — Secret format [text/json/key-value] (relevant only for type 'generic')
  - `inject-url` string[] — For Password Management use, reflect the website context
  - `input-rule` string[] — Agentic input rule in name=...,rule=... format (e.g. name=rule1,rule=Sanitize input)
  - `item-custom-fields` object — Additional custom fields to associate with the item
  - `json` boolean — Set output format to JSON
  - `lock-during-sra-session` string — Lock this secret for read/update while an SRA session is active
  - `max-versions` string — Set the maximum number of versions, limited by the account settings defaults.
  - `metadata` string — Deprecated - use description
  - `multiline_value` boolean — The provided value is a multiline value (separated by '\n')
  - `name` string, required — Secret name
  - `output-rule` string[] — Agentic output rule in name=...,rule=... format (e.g. name=rule1,rule=Mask secrets)
  - `password` string — For Password Management use, additional fields
  - `protection_key` string — The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
  - `secure-access-bastion-issuer` string — Deprecated. use secure-access-certificate-issuer
  - `secure-access-certificate-issuer` string — Path to the SSH Certificate Issuer for your Akeyless Secure Access
  - `secure-access-enable` string — Enable/Disable secure remote access [true/false]
  - `secure-access-gateway` string
  - `secure-access-host` string[] — Target servers for connections (In case of Linked Target association, host(s) will inherit Linked Target hosts - Relevant only for Dynamic Secrets/producers)
  - `secure-access-rdp-user` string — Remote Desktop Username
  - `secure-access-ssh-creds` string — Static-Secret values contains SSH Credentials, either Private Key or Password [password/private-key]
  - `secure-access-ssh-user` string — Override the SSH username as indicated in SSH Certificate Issuer
  - `secure-access-url` string — Destination URL to inject secrets
  - `secure-access-web-browsing` boolean — Secure browser via Akeyless's Secure Remote Access (SRA)
  - `secure-access-web-proxy` boolean — Web-Proxy via Akeyless's Secure Remote Access (SRA)
  - `tags` string[] — Add tags attached to this object
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `type` string — The secret sub type [generic/password]
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication
  - `username` string — For Password Management use
  - `value` string, required — The secret value (relevant only for type 'generic')

## Response `200`

createSecretResponse wraps response body.

- CreateSecretOutput
  - `name` string

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

[API](https://skmtc.net/akeyless/apis/akeyless-api.md) · [All operations](https://skmtc.net/akeyless/apis/akeyless-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeyless/akeyless-api/versions/0ceb25634501/schema)
