PgBeam
PgBeam Docs

Create or replace a schema annotation

PUT
/v1/projects/{project_id}/schema-annotations

Attaches an operator-written description to a table (omit column_name) or a column. Keyed by (schema_name, table_name, column_name); an existing annotation with the same key is replaced.

Authorization

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_.-]+$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for creating or replacing a schema annotation. Keyed by (schema_name, table_name, column_name); an existing annotation with the same key is replaced.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/projects/string/schema-annotations" \  -H "Content-Type: application/json" \  -d '{    "table_name": "users",    "description": "Primary customer account. One row per signed-up user."  }'
{  "id": "sca_01j9x8y7z6w5v4u3t2s1r0q9p8",  "project_id": "prj_01j9x8y7z6w5v4u3t2s1r0q9p8",  "schema_name": "public",  "table_name": "users",  "column_name": "email",  "description": "Primary customer account. One row per signed-up user.",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
{  "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"  }}