Store or replace an egress secret
const url = 'https://api.runta.me/v2/secrets/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"cache_ttl_secs":0,"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://api.runta.me/v2/secrets/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "cache_ttl_secs": 0, "value": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Secret UUID or display name.
Secret UUID or display name.
Request Bodyrequired
Section titled “Request Bodyrequired”Secret set request.
Secret set request.
object
Worker-side cache TTL in seconds.
Secret value.
Responses
Section titled “Responses”Response envelope.
Response envelope.
object
Secret response object.
object
Worker-side cache TTL in seconds.
User-chosen display name.
Stable secret UUID.
Server-masked preview (first and last chars) of the value, for display only. Never the full value.
Examplegenerated
{ "data": { "cache_ttl_secs": 1, "display_name": "example", "id": "example", "value_preview": "example" }}Missing, malformed, or rejected bearer token
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}The bearer token is not allowed to perform this action
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}The requested resource was not found
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}The request conflicts with current resource state
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Validation or application error
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Rate limit exceeded
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Operation is not implemented
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Upstream service is unavailable
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}Upstream request timed out
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}default
Section titled “default”Error response
object
object
UUID v7 correlation ID shared with the X-Request-Id response header.
Example
{ "error": { "code": "already_exists" }}