Tables
Create records
Adds one record to a table, or up to 500 records in one go.
POST
https://app.getera.io/api/v1/tables/{tableId}/recordsAPI key
Send one JSON object in the body to add one record. Send an array of objects and they are imported in one go: either all of them are written or none.
The record is written as the key's owner and passes the same rules as a record added on screen (required fields, field types, read-only fields, row rules), producing the same events.
Authentication
An API key in the x-api-key header. One record needs write permission in Tables; a batch needs import permission. See Authentication.
Path parameter
| Name | Type | Required | Description |
|---|---|---|---|
tableId | UUID | Yes | The table's id (/tables/<tableId>). |
Body
| Shape | Description |
|---|---|
| Object | Field key → value. Every key must be a field on the table. |
| Array of objects | At most 500 records. Split larger sets. |
Example: one record
curl -X POST https://app.getera.io/api/v1/tables/3f2a9c1e-0000-4000-8000-000000000001/records \
-H "x-api-key: ERA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Demo Cafe", "status": "Paid", "amount": 1200}'{ "id": "8b1d0c4e-0000-4000-8000-000000000010" }Status 201.
Example: batch
curl -X POST https://app.getera.io/api/v1/tables/3f2a9c1e-0000-4000-8000-000000000001/records \
-H "x-api-key: ERA_API_KEY" \
-H "Content-Type: application/json" \
-d '[{"name": "Demo Cafe"}, {"name": "Sample Bakery"}]'{ "dataTableId": "3f2a9c1e-0000-4000-8000-000000000001", "count": 2, "errors": [] }Errors
Error bodies look like {"error": "...", "code": "..."}; code names the problem.
| Status | When |
|---|---|
400 | The body is not a JSON object or array. |
401 | Missing or invalid key. |
403 | No permission (write or import), or the key's owner is not in the workspace. |
404 | Table not found, or no read permission. |
409 | A rule refused it. Example code values: unknown_field, required_field_missing, type_mismatch, readonly_field, invalid_field_format, row_limit_reached, row_policy_denies, import_batch_too_large, nothing_to_import. |
422 | The input is malformed. |
429 | Rate limit. |