SynapSynapDocs
Hub REST API

Vault

The Vault operations of the Hub REST API (6 operations).

For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)
POST
/vault/request

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
workspaceId?string
agentUserId?string
channelId?string
sourceMessageId?string
secretType*string

Secret class (e.g. api_key, oauth_token).

service*string

Service the secret unlocks (e.g. github).

purpose*string

Human-readable rationale shown to the user.

accessLevel?string

Defaults to 'read'.

ttl?number

Minutes the grant lives. Defaults to 60.

Response Body

Pending proposal id

application/json
  1. response
status*"pending"
Value in"pending"
proposalId*string
message*string
Example Request
curl -X POST 'https://pod.example.com/api/hub/vault/request' \  -H 'Content-Type: application/json' \  -d '{  "secretType": "string",  "service": "string",  "purpose": "string"}'
Example Response
{  "status": "pending",  "proposalId": "string",  "message": "string"}
GET
/vault/request/{proposalId}

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

proposalId*string

Response Body

Request outcome

application/json
  1. response
status*string
vaultRef*string|null
scope*string|null
expiresAt*string|null
Example Request
curl -X GET 'https://pod.example.com/api/hub/vault/request/string'
Example Response
{  "status": "string",  "vaultRef": "string",  "scope": "string",  "expiresAt": "string"}
POST
/vault/redeem

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
ref*string

Response Body

Resolved secret value

application/json
  1. response
value*string
Example Request
curl -X POST 'https://pod.example.com/api/hub/vault/redeem' \  -H 'Content-Type: application/json' \  -d '{  "ref": "string"}'
Example Response
{  "value": "string"}

List credential metadata

GET
/vault/secrets

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Query Parameters

workspaceId?string
Formatuuid

Response Body

Secret metadata list

application/json
  1. response
secrets*array<>
Example Request
curl -X GET 'https://pod.example.com/api/hub/vault/secrets'
Example Response
{  "secrets": [    {      "id": "string",      "name": "string",      "type": "string",      "service": "string",      "url": "string",      "category": "string",      "createdAt": "string"    }  ]}
POST
/vault/secrets

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
workspaceId?string
Formatuuid
name*string
Length1 <= length <= 255
type?string
Value in"password""api_key""credential""note""card""identity""ssh_key""certificate""env_variable""database""oauth"
service?string
value*string|
description?string
Lengthlength <= 1000
url?string
agentUserId?string

Response Body

Stored secret metadata

application/json
  1. response
id*string
name*string
type*string
vaultRef*string
Example Request
curl -X POST 'https://pod.example.com/api/hub/vault/secrets' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "value": "string"}'
Example Response
{  "id": "string",  "name": "string",  "type": "string",  "vaultRef": "string"}

Soft-delete a credential

DELETE
/vault/secrets/{id}

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

id*string
Formatuuid

Response Body

Soft-deleted

application/json
  1. response
success*boolean
Example Request
curl -X DELETE 'https://pod.example.com/api/hub/vault/secrets/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "success": true}