PgBeam Docs
Projects

Delete a custom domain

Removes a custom domain from the project and revokes its TLS certificate.

Feature flag: custom-domains

This endpoint is currently under a feature flag and available only to select testers. It may change or be removed before general availability.

At a glance

ItemValue
MethodDELETE
Path/v1/projects/{project_id}/domains/{domain_id}
AuthAuthorization: Bearer <token-or-api-key>

Quick request

Use this as a starting point. Replace the placeholder IDs and set PGBEAM_TOKEN if the endpoint requires auth.

curl -X DELETE \
  "$PGBEAM_API_URL/v1/projects/<project_id>/domains/<domain_id>" \
  -H "Authorization: Bearer $PGBEAM_TOKEN"
DELETE
/v1/projects/{project_id}/domains/{domain_id}
AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Path Parameters

project_id*string

Unique project identifier (prefixed, e.g. prj_xxx).

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

Unique custom domain identifier (prefixed, e.g. dom_xxx).

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

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://api.pgbeam.com/v1/projects/string/domains/string"
Empty
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}