Create (201) or rotate (200, version++) a secret.
const url = 'https://infra-hyphae.run/v0/projects/example/functions/secrets/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"value":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://infra-hyphae.run/v0/projects/example/functions/secrets/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "value": "example" }'The value (UTF-8, ≤ 4 KiB, no NUL) is encrypted at rest in the control
store with cloudd’s process key (CLOUDD_SECRETS_KEY; XChaCha20-Poly1305,
bound to project and name) and injected as NAME=value into the
environment of every subsequent invoke of this project’s functions
— for owner and project-key invokes alike. Running workers are not
touched; the next invoke sees the new set. Owner session only.
Receipted with the name; the value appears in no receipt, log, or
response. PROJECT_ID, FUNCTION_NAME, and CLOUD_ORIGIN cannot be
shadowed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
UTF-8, no NUL. Never returned.
Examplegenerated
{ "value": "example"}Responses
Section titled “ Responses ”Rotated.
There is deliberately no value field.
object
RFC 3339, UTC.
RFC 3339, UTC.
Examplegenerated
{ "project": "example", "name": "example", "version": 1, "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z"}Created.
There is deliberately no value field.
object
RFC 3339, UTC.
RFC 3339, UTC.
Examplegenerated
{ "project": "example", "name": "example", "version": 1, "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z"}Malformed or out-of-bounds input (invalid_request).
object
object
Example
{ "error": { "code": "invalid_request" }}Missing, malformed, duplicate, or unknown credential (authentication_required).
object
object
Example
{ "error": { "code": "invalid_request" }}Headers
Section titled “Headers”Unknown route, or a project the caller does not own (not_found).
object
object
Example
{ "error": { "code": "invalid_request" }}