# Field value formats in the API

> How to send each field type when you create or update a record through the REST API, and how each one comes back when you read it.

Source: https://tadabase.com/docs/developers/field-types-reference  
Status: Verified Nov 17, 2026. Checked against the current product

When you create or update a record, each key in the body is a field slug and each value must be in the format that field type expects. This page lists the format for every field type, and what the API returns when you read it.

## How values are sent

- Send JSON (`Content-Type: application/json`) or form data. Use `multipart/form-data` when the request uploads a file.
- Fields with parts (Name, Address, Date Range) take an object in JSON, such as `{"field_12": {"first_name": "Ada"}}`, or brackets in form data: `field_12[first_name]=Ada`.
- Fields that hold several values (Multi-Select, Checkbox, a connection to many records) take a JSON array, or repeated `field_20[]=` keys in form data.
- To find a field's slug, type and options, see [Read your tables, fields and roles](https://tadabase.com/docs/developers/tables-and-fields-api).

## Formats by field type

| Field type | Send | Comes back as |
| --- | --- | --- |
| Text, Email, Phone, Long Text | Text: `"field_36": "Ada"`. An Email field refuses an invalid address (HTTP 400). | Text |
| Rich Text | HTML text. Scripts, event attributes and `javascript:` links are removed. | HTML text |
| Number | A number. Decimals are kept only if the field has decimal places; otherwise `3.7` is saved as `3`. | A number |
| Currency | A number. Commas and spaces are removed: `"1,250.50"` is saved as `1250.5`. | A number |
| Decision Box | `1` (or `true`) for checked, `0` (or `false`) for unchecked. Any other non-empty value, even `"No"`, saves as checked. | `1` or `0` |
| Rating | A whole number from 0 to the field's number of stars. Anything else saves the field blank. | A number |
| Slider | A whole number between the field's minimum and maximum. Anything else saves the field blank. | A number |
| Date | `"2026-11-17"`, or a date in your app's date format. | Year-month-day text |
| Date/Time | `"2026-11-17 14:30"`, or your app's date and time format. | Year-month-day and time text |
| Time | `"14:30"` | Time text |
| Date Range | `{"start": "2026-11-17 09:00", "end": "2026-11-18 17:00", "all_day": ""}` | An object with `start`, `end` and `all_day` |
| Name | `{"title": "Dr.", "first_name": "Ada", "middle_name": "", "last_name": "Lovelace"}`. Send only the parts you need. | An object with the same parts |
| Address | `{"address": "1 Main St", "address2": "", "city": "Springfield", "state": "IL", "zip": "62701", "country": "USA"}`. `lat` and `lng` are accepted too. | An object with the same parts, plus `lat` and `lng` |
| Select, Radio | The option's text (upper and lower case do not matter). If the field uses separate option values, send the value. A value that is not an option saves the field blank. | The option |
| Multi-Select, Checkbox | An array of options: `["Plumbing", "Electrical"]`. Values that are not options are dropped. | An array of options |
| Link | A URL, or `{"link": "https://example.com", "text": "Example"}` | An object with `link` and `text` |
| Connection | A record ID, an array of IDs, or IDs separated by commas: `["K2ejlOQo9B", "a7rQ0pXyNb"]`. The IDs you send replace the record's current connections; an empty value removes them all. | `field_40`: an array of IDs. `field_40_val`: each ID with its display value. |
| JSON | A JSON value, or JSON text. Invalid JSON is refused with HTTP 400. | The JSON value |
| File, Image | Upload one file with `multipart/form-data`, or send a URL (see below). An Image field takes PNG, JPEG, GIF, WebP or BMP. | An object describing the file, including its URL |
| Files | Upload one or more files with `multipart/form-data`, or send up to 10 URLs (see below). | An array of files, each with its `url`, `name`, `type`, `ext` and `secured` |
| Equation, Rollup, formula fields, Auto Increment | Cannot be set. Values sent for them are ignored; Auto Increment is assigned when the record is created. | The calculated value |
| Signature | Cannot be set through the REST API. | - |

A connection to the Users table's role field also accepts role names instead of IDs.

## Upload files

Send the request as `multipart/form-data`. Use the field slug for a File or Image field, and `slug[]` once per file for a Files field:

```bash
curl -X POST "https://api.tadabase.io/api/v1/data-tables/{tableId}/records" \
  -H "X-Tadabase-App-id: YOUR_APP_ID" \
  -H "X-Tadabase-App-Key: YOUR_API_KEY" \
  -H "X-Tadabase-App-Secret: YOUR_API_SECRET" \
  -F "field_36=Ada Lovelace" \
  -F "field_70=@/path/to/contract.pdf" \
  -F "field_71[]=@/path/to/photo-1.jpg" \
  -F "field_71[]=@/path/to/photo-2.jpg"
```

To have Tadabase download a file from a public URL instead, send the URL and add `<slug>_format` set to `url`:

```json
{
  "field_70": "https://example.com/files/contract.pdf",
  "field_70_format": "url",
  "field_71": ["https://example.com/a.jpg", "https://example.com/b.jpg"],
  "field_71_format": "url"
}
```

If a file cannot be downloaded or is not allowed in the field, the record is not saved and `msg` says why.

## Fields you leave out

- When you update a record, fields you do not send keep their values. Send an empty value to clear one.
- When you create a record, fields you do not send are left empty, except a field with a **Default Record Value** in its settings: that value is saved instead.
- Calculated fields (equations, rollups, formulas) are filled in by Tadabase after the save.
