Secrets
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
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
apiKeyAuthorizationBearer <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- 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.
curl -X GET 'https://api.slashinfra.com/secret-injection-presets'[ { "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
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
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Query Parameters
project?stringThe 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- 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.
curl -X GET 'https://api.slashinfra.com/secrets'[ { "created_ms": 1767225600000, "description": "production OpenAI key", "id": "sec_6f1c0f0e8a", "name": "openai", "project": "proj_6f1c0f0e8a", "updated_ms": 1767225600000, "version": 2 }]Create a secret
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
apiKeyAuthorizationBearer <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.
- 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*stringThe name of the secret, unique in its project: ^[a-z][a-z0-9-]{0,31}$; an existing name answers 409 name_taken.
project?stringThe project id or name of the secret; default when omitted, and an unknown project answers 404 project_not_found.
value*stringThe 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- response
One write-only secret of the organization; answers never include its value.
created_ms*integerThe 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*stringThe secret id: sec_ and ten symbols of the SVM id alphabet.
name*stringThe name of the secret, unique in its project.
project*stringThe id of the project of the secret.
updated_ms*integerThe time of the last change, in milliseconds since the Unix epoch.
version*integerThe version of the stored value, from 1; every replacement increments it.
curl -X POST 'https://api.slashinfra.com/secrets' \ -H 'Content-Type: application/json' \ -d '{ "name": "openai", "value": "sk-..."}'{ "created_ms": 1767225600000, "description": "production OpenAI key", "id": "sec_6f1c0f0e8a", "name": "openai", "project": "proj_6f1c0f0e8a", "updated_ms": 1767225600000, "version": 2}Delete a secret
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
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe secret id (sec_ and ten id symbols), or its name in the project query; an id resolves in every project.
1 <= lengthQuery Parameters
project?stringThe 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/plainThe secret is deleted, with no body.
curl -X DELETE 'https://api.slashinfra.com/secrets/openai'"string"Describe a secret
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
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe secret id (sec_ and ten id symbols), or its name in the project query; an id resolves in every project.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Request Body
The new description of the secret.
- 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- response
One write-only secret of the organization; answers never include its value.
created_ms*integerThe 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*stringThe secret id: sec_ and ten symbols of the SVM id alphabet.
name*stringThe name of the secret, unique in its project.
project*stringThe id of the project of the secret.
updated_ms*integerThe time of the last change, in milliseconds since the Unix epoch.
version*integerThe version of the stored value, from 1; every replacement increments it.
curl -X PATCH 'https://api.slashinfra.com/secrets/openai' \ -H 'Content-Type: application/json' \ -d '{ "description": "production OpenAI key"}'{ "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
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
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe secret id (sec_ and ten id symbols), or its name in the project query; an id resolves in every project.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Request Body
The new value of the secret.
- body
The new value of the secret.
value*stringThe new value, encrypted and never returned.
Response Body
One write-only secret of the organization; answers never include its value.
application/json- response
One write-only secret of the organization; answers never include its value.
created_ms*integerThe 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*stringThe secret id: sec_ and ten symbols of the SVM id alphabet.
name*stringThe name of the secret, unique in its project.
project*stringThe id of the project of the secret.
updated_ms*integerThe time of the last change, in milliseconds since the Unix epoch.
version*integerThe version of the stored value, from 1; every replacement increments it.
curl -X PUT 'https://api.slashinfra.com/secrets/openai' \ -H 'Content-Type: application/json' \ -d '{ "value": "sk-..."}'{ "created_ms": 1767225600000, "description": "production OpenAI key", "id": "sec_6f1c0f0e8a", "name": "openai", "project": "proj_6f1c0f0e8a", "updated_ms": 1767225600000, "version": 2}curl -X GET 'https://api.slashinfra.com/secret-injection-presets'[
{
"env": {
"DEBUG": "1"
},
"id": "openai",
"rules": [
{
"domain": "api.openai.com",
"header": "authorization",
"placeholder": "__TELEGRAM_BOT_TOKEN__",
"value_format": "raw",
"value_prefix": "Bearer "
}
],
"service": "OpenAI"
}
]curl -X GET 'https://api.slashinfra.com/secrets'[
{
"created_ms": 1767225600000,
"description": "production OpenAI key",
"id": "sec_6f1c0f0e8a",
"name": "openai",
"project": "proj_6f1c0f0e8a",
"updated_ms": 1767225600000,
"version": 2
}
]curl -X POST 'https://api.slashinfra.com/secrets' \
-H 'Content-Type: application/json' \
-d '{
"name": "openai",
"value": "sk-..."
}'{
"created_ms": 1767225600000,
"description": "production OpenAI key",
"id": "sec_6f1c0f0e8a",
"name": "openai",
"project": "proj_6f1c0f0e8a",
"updated_ms": 1767225600000,
"version": 2
}curl -X DELETE 'https://api.slashinfra.com/secrets/openai'"string"curl -X PATCH 'https://api.slashinfra.com/secrets/openai' \
-H 'Content-Type: application/json' \
-d '{
"description": "production OpenAI key"
}'{
"created_ms": 1767225600000,
"description": "production OpenAI key",
"id": "sec_6f1c0f0e8a",
"name": "openai",
"project": "proj_6f1c0f0e8a",
"updated_ms": 1767225600000,
"version": 2
}curl -X PUT 'https://api.slashinfra.com/secrets/openai' \
-H 'Content-Type: application/json' \
-d '{
"value": "sk-..."
}'{
"created_ms": 1767225600000,
"description": "production OpenAI key",
"id": "sec_6f1c0f0e8a",
"name": "openai",
"project": "proj_6f1c0f0e8a",
"updated_ms": 1767225600000,
"version": 2
}