Skip to content
On this page

Compatibility

Vault

Host-bound secrets for a workspace and for individual interns. Values are encrypted at rest and never returned.

A secret is released only to the exact hostnames it is bound to. Responses carry metadata — name, hosts, and an HMAC fingerprint — never the value. The fingerprint is keyed per vault, so equal fingerprints in one vault mean equal values, and the same value in two vaults is not comparable.

Workspace secrets

GET/vault/secretsAPI key
PUT/vault/secrets/{name}API key

Listing is paginated with limit (1–100, default 50) and offset; the response carries has_more.

curl -X PUT https://api.relayrouter.org/vault/secrets/github_token \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H 'content-type: application/json' \
-d '{
"value": "ghp_exampleTokenValue",
"hosts": ["api.github.com"]
}'
FieldTypeDescription
valuerequiredstring1–65,536 characters. Encrypted at rest and never returned.
hostsrequiredstring[]1–100 exact DNS hostnames. Lowercased, trailing dot removed; schemes, ports, paths and wildcards are rejected.
{
"data": {
"name": "github_token",
"hosts": ["api.github.com"],
"fingerprint": "sha256:9df9594d2eb5e22c5dd7c1970d838a17261ee07635334f3d51df716bddef99f7",
"created_at": 1793232064,
"updated_at": 1793232064
}
}

Secret names

Names follow OpenRouter's rule: lowercase, digits and single underscores, starting with a letter and not ending with an underscore.__ is rejected.

Intern secrets

Interns get their own scope. When a name exists in both, the intern copy wins over the workspace copy.

EndpointMethodWhat it does
/vault/interns/{internId}/secretsGETSecrets stored for this intern only.
/vault/interns/{internId}/secrets/{name}PUT/DELETEStore or remove one intern secret.
/vault/interns/{internId}/effective-secretsGETThe resolved set the intern receives, one entry per name, each tagged with its scope (intern or workspace).
/vault/interns/{internId}/connectionsGETConnections derived from the bound hosts (github, slack, google, or mcp:<host>).
/vault/interns/{internId}/secrets/copyPOSTAtomically copy named workspace secrets into the intern scope. Fails with 404 if any name is missing and 409 if a source has no host bindings; nothing is copied on failure.
curl -X POST https://api.relayrouter.org/vault/interns/intern1/secrets/copy \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H 'content-type: application/json' \
-d '{ "names": ["github_token"] }'