---
title: "Create Data Source"
method: POST
path: "/api/data/tables/sources"
tags: ["data"]
---

# Create Data Source

`POST /api/data/tables/sources`

## Request

- Base URL: `https://api.tintin-x.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tintin-x.com/api/data/tables/sources`
- Auth: HTTP bearer

Create a DataTable record for the given agent.

## Request body

- DataSourceCreateRequest
  - `agent_id` string, uuid, required
  - `name` string, required
  - `backend` string, required: parquet | bigquery | postgres
  - `config` object, nullable
  - `credential_id` string, uuid, nullable

## Response `200`

Successful Response

- SrcSchemasDataDataSourceResponse
  - `id` string, uuid, required
  - `agent_id` string, uuid, required
  - `name` string, required
  - `source_type` string, required
  - `backend` string, required
  - `row_count` integer, nullable
  - `columns` object[]
  - `size_bytes` integer, nullable
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tintin-x/apis/tintin-api.md) · [All operations](https://skmtc.dev/tintin-x/apis/tintin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tintin-x/apis/tintin-api/revisions/8839a8d0a66c?raw)
