> This page is for Referencia de la API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://signalcore.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://signalcore.ai/docs/_mcp/server.

# Create

POST https://signalcore.ai/v1/data
Content-Type: application/json

Reference: https://signalcore.ai/docs/referencia/tablas/create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `name` (string, required)
- `title` (string, required)
- `fields` (list of FieldDef, required)

## Response

### 201

Successful Response

- `name` (string, required)
- `title` (string, required)
- `fields` (list of FieldOut, required)
- `id` (string, required)
- `system` (boolean, required)
- `rows` (integer, required)
- `created_at` (datetime, required)

## Errors

### 422 Data Create Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### FieldDef

- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `text`, `number`, `boolean`, `date`, `datetime`, `money`, `choice`
- `required` (boolean, optional, default: false)
- `options` (list of string, optional, nullable)

### FieldOut

- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `text`, `number`, `boolean`, `date`, `datetime`, `money`, `choice`
- `required` (boolean, optional, default: false)
- `options` (list of string, optional, nullable)
- `read_only` (boolean, optional, default: false)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (map from string to any, optional)

### ValidationErrorLocItem

## Examples

**Request**

```json
{
  "name": "name",
  "title": "title",
  "fields": [
    {
      "name": "name",
      "type": "text"
    }
  ]
}
```

**Response**

```json
{
  "name": "name",
  "title": "title",
  "fields": [
    {
      "name": "name",
      "type": "text",
      "required": true,
      "options": [
        "options"
      ],
      "read_only": true
    }
  ],
  "id": "id",
  "system": true,
  "rows": 1,
  "created_at": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://signalcore.ai/v1/data"

payload = {
    "name": "name",
    "title": "title",
    "fields": [
        {
            "name": "name",
            "type": "text"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```