---
title: "Create a record (Database API)"
description: ""
canonical: "https://docs.softr.io/api/records/create-record"
updated: "2026-12-04"
---

# Create a record (Database API)



```http
POST https://tables-api.softr.io/api/v1/databases/{databaseId}/tables/{tableId}/records
```

## Authorizations

- `Softr-Api-Key` (API key, in header, required)

## Path parameters

- `databaseId` (`string`, required)
- `tableId` (`string`, required)

## Query parameters

- `fieldNames` (`boolean`, default: `false`): If true, use field names as keys in the response fields object instead of field IDs.

## Body

`application/json`, required

- `fields` (`Record<string, unknown>`): A map of Field IDs to their values.

## Response

**200**: The newly created record.

- `data` (`object`)
- `data.id` (`string`)
- `data.tableId` (`string`)
- `data.fields` (`Record<string, unknown>`): A map of Field IDs to their values for this record.
- `data.createdAt` (`string<date-time>`)
- `data.updatedAt` (`string<date-time>`)

```json
{
  "data": {
    "id": "<string>",
    "tableId": "<string>",
    "fields": {},
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z"
  }
}
```

**429**: Rate limit exceeded.

No response body.

**Example request**

```bash
curl --request POST \
  --url 'https://tables-api.softr.io/api/v1/databases/<databaseId>/tables/<tableId>/records' \
  --header 'Softr-Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "fields": {}
}'
```
