PgBeam Docs
Platform

createSelfHostEnrollment

Issue a self-host enrollment token

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.

Usage

const result = await api.platform.createSelfHostEnrollment({
    pathParams: { org_id: "org_abc123" },
    body: {
      ,
    },
  });

Parameters

ParameterTypeRequiredDescription
pathParams.org_idstringYesUnique organization identifier.
body.region_labelstringNoOperator-supplied label for where the proxy runs.
body.descriptionstringNoOptional human-readable note.

Response

Promise<SelfHostEnrollmentSecret>: enrollment created. token shown once.

Example

import { PgBeamClient } from "pgbeam";

const client = new PgBeamClient({
  token: "pbk_...",
  baseUrl: "https://api.pgbeam.com",
});

const result = await client.api.platform.createSelfHostEnrollment({
  pathParams: { org_id: "org_abc123" },
  body: {
      ,
    },
});

Errors

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403The organization's plan is not entitled to self-host.
429Rate limited. Try again later.

On this page