Skip to content

Write-only secrets, the HTTPS secret injections that reference them, and the preset catalog

Resource, request and plan limits are listed on Limits.

Download OpenAPI specification · Version 0.1.0

List the secret injection presets

GET
/secret-injection-presets

Returns the shared catalog of prepared HTTPS secret injections for common API providers; a client picks a secret and sends the explicit rules of a preset. The catalog is not a destination allowlist, and later edits never change an existing SVM.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Response Body

The shared preset catalog, in display order; a client adds the secret that the user picks to each rule.

application/json
  1. response

The shared preset catalog, in display order; a client adds the secret that the user picks to each rule.

[index: integer]?

One prepared secret injection: the user picks the secret, and the client submits explicit rules and the preset environment.

Example Request
curl -X GET 'https://api.slashinfra.com/secret-injection-presets'
Example Response
[  {    "env": {      "DEBUG": "1"    },    "id": "openai",    "rules": [      {        "domain": "api.openai.com",        "header": "authorization",        "placeholder": "__TELEGRAM_BOT_TOKEN__",        "value_format": "raw",        "value_prefix": "Bearer "      }    ],    "service": "OpenAI"  }]

List secrets

GET
/secrets

Returns the metadata of every write-only secret of one project, by name. project is an id or name and defaults to default. The value is never part of an answer: send a new value to PUT /secrets/:ref to replace it.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Query Parameters

project?string

The project id or name, default when omitted; an unknown project answers 404 project_not_found.

Response Body

Every secret of the project, by name; [] when the project has none.

application/json
  1. response

Every secret of the project, by name; [] when the project has none.

[index: integer]?

One write-only secret of the organization; answers never include its value.

Example Request
curl -X GET 'https://api.slashinfra.com/secrets'
Example Response
[  {    "created_ms": 1767225600000,    "description": "production OpenAI key",    "id": "sec_6f1c0f0e8a",    "name": "openai",    "project": "proj_6f1c0f0e8a",    "updated_ms": 1767225600000,    "version": 2  }]

Create a secret

POST
/secrets

Stores a secret value in the vault Worker, which encrypts it with AES-256-GCM under one key; control keeps only the name and metadata. An SVM or a profile references the secret by id, and the value reaches only the nodes that serve a referencing SVM.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Request Body

The name, value and optional description of the new secret.

  1. body

The name, value and optional description of the new secret.

description?|

An optional note about the secret: trimmed, empty becomes null, at most 200 code points and no control character.

name*string

The name of the secret, unique in its project: ^[a-z][a-z0-9-]{0,31}$; an existing name answers 409 name_taken.

project?string

The project id or name of the secret; default when omitted, and an unknown project answers 404 project_not_found.

value*string

The secret value, write-only: the vault Worker encrypts it and control never stores it; the CLI reads it from standard input (secrets).

Response Body

One write-only secret of the organization; answers never include its value.

application/json
  1. response

One write-only secret of the organization; answers never include its value.

created_ms*integer

The creation time in milliseconds since the Unix epoch.

description*|

An optional note about the secret: trimmed, at most 200 code points, no control character, and never the value.

id*string

The secret id: sec_ and ten symbols of the SVM id alphabet.

name*string

The name of the secret, unique in its project.

project*string

The id of the project of the secret.

updated_ms*integer

The time of the last change, in milliseconds since the Unix epoch.

version*integer

The version of the stored value, from 1; every replacement increments it.

Example Request
curl -X POST 'https://api.slashinfra.com/secrets' \  -H 'Content-Type: application/json' \  -d '{  "name": "openai",  "value": "sk-..."}'
Example Response
{  "created_ms": 1767225600000,  "description": "production OpenAI key",  "id": "sec_6f1c0f0e8a",  "name": "openai",  "project": "proj_6f1c0f0e8a",  "updated_ms": 1767225600000,  "version": 2}

Delete a secret

DELETE
/secrets/{ref}

Deletes a secret that no SVM or profile references; a referenced one answers 409 secret_in_use, so remove the rules that name it first. A rule that names a deleted secret can never be created.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The secret id (sec_ and ten id symbols), or its name in the project query; an id resolves in every project.

Length1 <= length

Query Parameters

project?string

The project id or name, default when omitted; an unknown project answers 404 project_not_found.

Response Body

The secret is deleted, with no body.

response?stringtext/plain

The secret is deleted, with no body.

Example Request
curl -X DELETE 'https://api.slashinfra.com/secrets/openai'
Example Response
"string"

Describe a secret

PATCH
/secrets/{ref}

Changes only the description of a secret; the value, its version and every node stay untouched, and empty text clears it. The secret.update audit row omits the text.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The secret id (sec_ and ten id symbols), or its name in the project query; an id resolves in every project.

Length1 <= length

Query Parameters

project?string

The project id or name, default when omitted; an unknown project answers 404 project_not_found.

Request Body

The new description of the secret.

  1. body

The new description of the secret.

description*|

The new description: trimmed, empty becomes null, at most 200 code points and no control character.

Response Body

One write-only secret of the organization; answers never include its value.

application/json
  1. response

One write-only secret of the organization; answers never include its value.

created_ms*integer

The creation time in milliseconds since the Unix epoch.

description*|

An optional note about the secret: trimmed, at most 200 code points, no control character, and never the value.

id*string

The secret id: sec_ and ten symbols of the SVM id alphabet.

name*string

The name of the secret, unique in its project.

project*string

The id of the project of the secret.

updated_ms*integer

The time of the last change, in milliseconds since the Unix epoch.

version*integer

The version of the stored value, from 1; every replacement increments it.

Example Request
curl -X PATCH 'https://api.slashinfra.com/secrets/openai' \  -H 'Content-Type: application/json' \  -d '{  "description": "production OpenAI key"}'
Example Response
{  "created_ms": 1767225600000,  "description": "production OpenAI key",  "id": "sec_6f1c0f0e8a",  "name": "openai",  "project": "proj_6f1c0f0e8a",  "updated_ms": 1767225600000,  "version": 2}

Replace the value of a secret

PUT
/secrets/{ref}

The vault Worker seals the new value as the next version, and every node that serves a referencing SVM must cache it before the answer; a timeout answers 503 and keeps the new version. A node that misses the value stops injecting the old one; see secrets for the rotation rules.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.

Path Parameters

ref*string

The secret id (sec_ and ten id symbols), or its name in the project query; an id resolves in every project.

Length1 <= length

Query Parameters

project?string

The project id or name, default when omitted; an unknown project answers 404 project_not_found.

Request Body

The new value of the secret.

  1. body

The new value of the secret.

value*string

The new value, encrypted and never returned.

Response Body

One write-only secret of the organization; answers never include its value.

application/json
  1. response

One write-only secret of the organization; answers never include its value.

created_ms*integer

The creation time in milliseconds since the Unix epoch.

description*|

An optional note about the secret: trimmed, at most 200 code points, no control character, and never the value.

id*string

The secret id: sec_ and ten symbols of the SVM id alphabet.

name*string

The name of the secret, unique in its project.

project*string

The id of the project of the secret.

updated_ms*integer

The time of the last change, in milliseconds since the Unix epoch.

version*integer

The version of the stored value, from 1; every replacement increments it.

Example Request
curl -X PUT 'https://api.slashinfra.com/secrets/openai' \  -H 'Content-Type: application/json' \  -d '{  "value": "sk-..."}'
Example Response
{  "created_ms": 1767225600000,  "description": "production OpenAI key",  "id": "sec_6f1c0f0e8a",  "name": "openai",  "project": "proj_6f1c0f0e8a",  "updated_ms": 1767225600000,  "version": 2}