Skip to content

`POST /api/v1/secrets` — create a new secret.

POST
/api/v1/secrets
curl --request POST \
--url https://example.com/api/v1/secrets \
--header 'Content-Type: application/json' \
--data '{ "description": "example", "expires_at": "example", "name": "example", "restriction": { "node_ids": [ "example" ], "tags": "example" }, "value": "example" }'
Media type application/json

Request body for POST /api/v1/secrets.

object
description

Human-readable description.

string | null
expires_at

Optional expiry date (RFC 3339 timestamp).

string | null
name
required

Secret name.

string
restriction
One of:
null
value
required

Secret value (plaintext).

string
Example generated
{
"description": "example",
"expires_at": "example",
"name": "example",
"restriction": {
"node_ids": [
"example"
],
"tags": "example"
},
"value": "example"
}

Secret created

Media type application/json

Response body for a single secret (never includes value).

object
created_at
required
string
created_by
required
string
description
string | null
expires_at
string | null
name
required
string
restriction
updated_at
required
string
updated_by
required
string
Example generated
{
"created_at": "example",
"created_by": "example",
"description": "example",
"expires_at": "example",
"name": "example",
"restriction": "example",
"updated_at": "example",
"updated_by": "example"
}

Invalid request body or restriction

Secret already exists