PgBeam Docs
Platform

Issue a self-host enrollment token

POST
/v1/organizations/{org_id}/self-host-enrollments

Issues an enrollment token a self-hosted (BYOC) proxy uses to authenticate to the control plane's config/audit gRPC stream. The token is returned once and cannot be retrieved again. Requires the Scale or enterprise plan.

Authorization

AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Path Parameters

org_id*string

Unique organization identifier.

Match^[a-zA-Z0-9_.-]+$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for issuing a self-host enrollment token.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/organizations/org_abc123/self-host-enrollments" \  -H "Content-Type: application/json" \  -d '{}'
{  "enrollment": {    "id": "she_01h455vb4pex5vsknk084sn02q",    "org_id": "org_abc123",    "region_label": "customer-vpc-us-east",    "description": "prod cluster",    "created_by": "string",    "created_at": "2019-08-24T14:15:22Z",    "last_seen_at": "2019-08-24T14:15:22Z",    "revoked_at": "2019-08-24T14:15:22Z"  },  "token": "pbh_01h455vb4pex5vsknk084sn02q9zk3m7"}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}