Update a table's schema

PATCHhttps://api.floconnector.com/v1/tables/{id}
Scope
tables.manage
Rate limit
the key's write budget, 60 a minute

Rename it, add fields, change a field (rename, type, required, options), remove fields, reorder them, or set or drop the unique key. Existing records are never rewritten to fit a new type; misfits says how many no longer fit.

Path parameters

stringrequired

The table: its slug (e.g. leads), its name, or its id.

Body

The fields it takes:

namestringoptional

New display name. The slug stays the same.

Max length 80

descriptionstringnullableoptional

null clears it.

Max length 500

add_fieldsarray of objectoptional

Fields to add, after the existing ones.

ShowHide 5 fields of each item
namestringrequired

Lower snake case, e.g. company_name. Shown to people as "Company name".

typeenumrequired

The field's type. text holds up to 2,000 characters and long_text up to 50,000; date is a calendar day (YYYY-MM-DD) and datetime a moment in ISO 8601 with a timezone; single_select and multi_select take one or several of the field's options.

textlong_textnumbercheckboxdatedatetimesingle_selectmulti_selectemailurlphone
requiredbooleanoptional

Every record must have a value. Default false.

descriptionstringoptional

What the field holds, for whoever writes to it next.

Max length 500

optionsarray of stringoptional

The allowed values. Required for single_select and multi_select.

update_fieldsarray of objectoptional

Changes to existing fields, each naming its field by the name it has before this call. A field may be changed once per call.

ShowHide 6 fields of each item
namestringrequired

The field's current name.

new_namestringoptional

A new name for the field, in lower snake case. Its values move with it.

typeenumoptional

A new type. Existing values are never rewritten to fit; the reply's misfits counts the records that no longer do.

textlong_textnumbercheckboxdatedatetimesingle_selectmulti_selectemailurlphone
requiredbooleanoptional

true makes the field required, false optional. When it turns on, records with no value are counted in the reply's misfits.

descriptionstringnullableoptional

What the field holds. null clears it.

Max length 500

optionsarray of stringoptional

The full new option list (replaces the old one).

remove_fieldsarray of stringoptional

Field names to remove. Their values are deleted from every record.

confirm_removebooleanoptional

Must be true when remove_fields is set, after the user has agreed.

orderarray of stringoptional

Field names in the order to show them.

keystringnullableoptional

The unique key field, or null for no key. Fails if existing records share a value.

Responses

200Success
tableobject

A table: its fields, its unique key and how many records it holds.

ShowHide 11 fields
idstring

The table's id.

slugstring

The table's short name in lower snake case, e.g. leads. Derived from the name when the table is created; it never changes.

namestring

What people call the table.

descriptionstringnullable

One line on what the table is for. Null when none was given.

statusenum

An archived table can be read but not written until it is restored.

activearchived
fieldsarray of object

The table's fields, in the order they are shown.

ShowHide 7 fields of each item
namestring

The field's name, as records carry it.

labelstring

The name as people read it: company_name becomes "Company name".

typeenum

The field's type. text holds up to 2,000 characters and long_text up to 50,000; date is a calendar day (YYYY-MM-DD) and datetime a moment in ISO 8601 with a timezone; single_select and multi_select take one or several of the field's options.

textlong_textnumbercheckboxdatedatetimesingle_selectmulti_selectemailurlphone
requiredboolean

Whether every record must have a value.

keybooleanoptional

true on the table's unique key field. Left out on every other field.

descriptionstringoptional

What the field holds. Left out when none was given.

optionsarray of stringoptional

The allowed values. Present on single_select and multi_select fields only.

key_fieldstringnullable

The name of the unique key field. Null when the table has no key.

record_countinteger

How many records the table holds.

archived_atstringnullable

When the table was archived, ISO 8601. Null while it is active.

created_atstring

When the table was created, ISO 8601.

updated_atstring

When the table last changed, ISO 8601.

renamedarray of object

The fields this call renamed.

ShowHide 2 fields of each item
fromstring

The old name.

tostring

The new name.

removedarray of string

Names of the fields this call removed.

addedarray of string

Names of the fields this call added.

misfitsarray of object

Existing records whose values no longer fit a changed field. They stay as they are until edited.

ShowHide 3 fields of each item
fieldstring

The changed field's name.

recordsinteger

How many existing records are affected.

reasonstring

What is wrong with them, phrased to follow the count, e.g. "hold values that are not a valid number".

400validation: a field failed validation; field names it.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

401unauthorized: no key, or an unknown, revoked or expired key.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

403insufficient_scope: the key lacks the route's scope, named in required. Or forbidden, or plan_limit when the plan does not include the API.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

404not_found: the thing is not in this workspace.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

429rate_limited: the key's per-minute budget is spent. Retry after Retry-After seconds.

Every error has the same envelope:

errorobject
ShowHide 5 fields
codeenum

What went wrong, as a stable word. Branch on this, never on message.

unauthorizedforbiddeninsufficient_scopeplan_limitnot_foundvalidationconflictread_onlyrate_limitedcsrfunavailableinternal
messagestring

The same thing in a sentence, written for a person.

fieldstringoptional

validation only: the field that failed, as a path into the request.

requiredstringoptional

insufficient_scope only: the scope the route needs.

detailsobjectoptional

Extra structure some errors carry, such as a refused record batch's per-record errors.

Errors lists every error code and what to do about it.