Skip to content

Names and ids: what a rename breaks, and how to avoid it

Every field has an editable name and a permanent fld_ id. Which to use where, shown by renaming a field: a request by name breaks, one by id works.

Updated November 2026

A field in Tabla has two references. One is its name, such as Price, which you can edit any time and which is unique within its table. The other is a stable id, fld_ plus twelve characters, which is created once and never changes. Tables (tbl_…) and databases (db_…) have both as well, and records have only the id (rec_…). The API takes either one everywhere a field can be named: filters, sorts, fields=, merge_on and cell keys on writes. Tabla tries the id first, then the name. A name that matches two fields is refused with a message asking for the id.

Cells come back keyed by name by default, because a person can debug a payload that reads "Price": 45. Every records response also includes a map between the two (field_ids, name → id, or field_names when you ask for key_by=id), so switching from one to the other never takes a second request.

Renaming a field

We ran this against the demo database's Suppliers table. It has a field named Region, and a filter by name works:

curl -G "https://tabladb.com/api/tables/tbl_6fn9jer8qrwu/records" \
  -H "Authorization: Bearer key_xxxx.your-secret" \
  --data-urlencode 'filter={"conditions":[{"field":"Region","op":"is","value":"Fayoum"}]}'
# → {"records":[{"id":"rec_d35xp96bgbup","fields":{"Name":"Fayoum Greens","Region":"Fayoum"}}], …}

Then rename the field over the same API. Its id is fld_vtpy8fte9xs3:

curl -X PATCH "https://tabladb.com/api/fields/fld_vtpy8fte9xs3" \
  -H "Authorization: Bearer key_xxxx.your-secret" \
  -H "Content-Type: application/json" -d '{"name":"Area"}'

The request by name now fails with an error, not an empty page:

{"error":{"code":"bad_request","message":"Unknown field \"Region\"."}}

The request by id still works:

--data-urlencode 'filter={"conditions":[{"field":"fld_vtpy8fte9xs3","op":"is","value":"Fayoum"}]}'
# → {"records":[{"id":"rec_d35xp96bgbup","fields":{"Name":"Fayoum Greens","Area":"Fayoum"}}], …}

It returns the same record with the same value under the new name, and the request didn't need an edit. Add key_by=id and the cells come back keyed "fld_vtpy8fte9xs3": "Fayoum", so a rename can't break the response either.

key_by works on writes as well as reads. POST, PATCH and PUT all take it, and all three key their reply and include the companion map the same way a read does. So an automation can write by field id and read its own result back by field id, and nothing in the round trip depends on a name. Unlike a read, a write has no fields= projection, so its map covers every field on the table.

Where to find ids

  • The fields endpoint: GET /api/tables/:id/fields lists every field with its id, type and the filter operators it accepts. Add ?writable=true and it returns only the fields a write can touch, with each select choice carrying label/value aliases for building a dropdown.
  • Every records response: the field_ids / field_names companion map, on writes as well as reads.
  • The record panel: its ⋯ menu has Copy record ID (and Copy record link) for the record you have open (the record panel).
  • The address bar: the table id is in the URL, as in /tables/tbl_….

Names or ids

A name is easy to read, but it breaks the moment someone renames the field. An id stays the same for as long as the field exists. When you're exploring in a terminal, debugging a payload or writing a one-off script, use names, since they're easier to work with. For anything that runs unattended, such as an automation, a scheduled sync, a webhook consumer or code with a mapping table, use ids and key_by=id. Sooner or later someone will rename Region to Area, and an integration keyed by id won't notice.

We built it so that a rename never breaks the screen or the data, because values and choice ids are stored in a form a rename doesn't touch. An integration that chose names gets a 400 naming the missing field, never a silent empty result it would go on to process as "nothing today." That is why filters are compiled strictly (filtering, writing). The promise that ids are opaque and permanent is written into /docs/api.

About Tabla

Tabla is a no-code database with Postgres underneath. Every feature is on every plan, you get a million records per database, and you can export your whole database in one file any day.

More guides