Skip to main content
PATCH
https://api-zangtable.com
/
projects
/
{project}
/
column
/
{table}
/
{column_id_or_name}
PATCH /projects/{project}/column/{table}/{column_id_or_name}
curl --request PATCH \
  --url https://api-zangtable.com/projects/{project}/column/{table}/{column_id_or_name} \
  --header 'Authorization: <authorization>'
{
  "ok": true,
  "data": {},
  "error": {},
  "request_id": "<string>"
}
Renames or changes editable column metadata.

Endpoint details

Authorization
string
required
Bearer pat_... (Project API Token). Keep this token on your backend/server.
project
string
required
Project slug. This acts as the Project ID in API paths.
table
string
required
Table name inside the project.
column_id_or_name
string
required
Column numeric id or column name.
ok
boolean
required
true for a successful response and false for an error response.
data
object | null
Endpoint-specific response data when ok is true; null on errors.
error
object | null
Error code and message when ok is false; null on success.
request_id
string
required
Request identifier you can use when troubleshooting a specific API call.

Authentication

Project API Token.

Parameters

Path: table required; column_id_or_name required. Body fields: new_column_name, column_type, is_nullable, default_value, is_unique optional.

Notes

Primary key columns are always unique. Column type changes are only allowed before the column has saved values.

Request examples

Basic request:
curl -X PATCH "$BASE_URL/projects/{project}/column/{table}/{column_id_or_name}" \
  -H 'Authorization: Bearer pat_PROJECT_TOKEN' \
  -H 'Content-Type: application/json' \
  --data '{"new_column_name":"email_address"}'
Full request:
curl -X PATCH "$BASE_URL/projects/{project}/column/{table}/{column_id_or_name}" \
  -H 'Authorization: Bearer pat_PROJECT_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'X-Operation-Key: edit-profile-email' \
  -H 'X-Operation-Run-Id: oprun_client_20260602_001' \
  --data '{"new_column_name":"email_address","column_type":"TEXT","is_nullable":false,"default_value":null,"is_unique":true}'

Response examples

Success:
{
  "ok": true,
  "data": {
    "table": "contacts",
    "column": {
      "id": 2,
      "table_name": "contacts",
      "column_name": "email_address",
      "column_type": "TEXT",
      "is_nullable": 0,
      "default_value": null,
      "is_primary": 0,
      "is_unique": 1,
      "created_at": "2026-06-02T01:00:00Z",
      "updated_at": "2026-06-02T01:23:45Z"
    }
  },
  "error": null,
  "request_id": "req_20260602T012345_123456Z_abc123def456",
  "operation_key": "edit-profile-email",
  "operation_run_id": "oprun_20260602T012300_000000Z_a1b2c3d4e5f6",
  "operation_grouping_status": "accepted_provided_run",
  "meta": {
    "generated_at": "2026-06-02T01:23:45Z"
  }
}
Error or alternate response:
{
  "ok": false,
  "data": null,
  "error": {
    "code": "column_type_locked",
    "message": "Column type can only be changed before the column has saved values."
  },
  "request_id": "req_20260602T012345_123456Z_abc123def456",
  "meta": {
    "generated_at": "2026-06-02T01:23:45Z"
  }
}