---
title: "Create a data source"
method: POST
path: "/v1/data-sources"
tags: ["Data Sources"]
---

# Create a data source

`POST /v1/data-sources`

Creates an ingestion data source (a container for one or more datasets).

If `accountId` is provided, the data source is created in that account;
otherwise, it is created in the account associated with the API key.

Requires a valid `x-api-key` with permission to create data sources in the target account.

## Headers

- `Content-Type` string, required

## Request body

- object
  - `accountId` integer — Unique identifier for the Databox account.
  - `title` string, required — Human-readable name of the data source. May be empty but not null.
  - `timezone` string — IANA time zone string indicating the data source time zone used for data visualization.

## Response `200`

Successful response containing the newly created data source.

- object — Represents a data source available in the account. Some data sources support dataset creation and data ingestion, while others may be read-only.
  - `requestId` string — Unique identifier for the request.
  - `status` string — Indicates the status of the request.
  - `id` integer — Unique identifier for the data source.
  - `title` string — Human-readable name of the data source. May be empty but not null.
  - `created` string, date-time — ISO 8601 timestamp when the data source was created.
  - `timezone` string — IANA time zone string indicating the data source time zone used for data visualization.
  - `key` string — Internal identifier for the data source. Defaults to `"ingestion"`.
  - `ingestionSupported` boolean — Whether the data source supports dataset creation and data ingestion.

## Other responses

- `400` — Error response indicating one or more request parameters are invalid.
- `401` — Error response indicating that the API key is missing or invalid.

---

[API](https://skmtc.dev/databox/apis/databox-api.md) · [All operations](https://skmtc.dev/databox/apis/databox-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/databox/databox-api/revisions/8e7a3a444e6b/schema)
