# Create a data source 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. Endpoint: POST /v1/data-sources Version: v1 Security: x-api-key ## Header parameters: - `Content-Type` (string, required) Must be set to application/json ## Request fields (application/json): - `accountId` (integer) Unique identifier for the Databox account. Example: 123456 - `title` (string, required) Human-readable name of the data source. May be empty but not null. Example: "ERP System" - `timezone` (string) IANA time zone string indicating the data source time zone used for data visualization. Example: "UTC" ## Response 200 fields (application/json): - `requestId` (string) Unique identifier for the request. Example: "b0eac937-c25c-47a5-bb7e-552f6b860458" - `status` (string) Indicates the status of the request. Example: "processing" - `id` (integer) Unique identifier for the data source. Example: 4754489 - `title` (string) Human-readable name of the data source. May be empty but not null. Example: "ERP System" - `created` (string) ISO 8601 timestamp when the data source was created. Example: "2025-10-01T12:00:00.000000Z" - `timezone` (string) IANA time zone string indicating the data source time zone used for data visualization. Example: "UTC" - `key` (string) Internal identifier for the data source. Defaults to "ingestion". Example: "ingestion" ## Response 400 fields (application/json): - `requestId` (string) Unique identifier for the request. Example: "b0eac937-c25c-47a5-bb7e-552f6b860458" - `status` (string) Indicates the status of the request. Example: "error" - `errors` (array) - `errors.code` (string,null) A machine-readable error code that identifies the type of error. Example: "invalid_input" - `errors.message` (string) A human-readable message explaining the error. Example: "The provided parameter is invalid." - `errors.field` (string) The name of the request field associated with the error, if applicable. Example: "datasetId" - `errors.type` (string) The category or context of the error, such as validation or permission. Example: "validation" ## Response 401 fields (application/json): - `requestId` (string) Unique identifier for the request. Example: "b0eac937-c25c-47a5-bb7e-552f6b860458" - `status` (string) Indicates the status of the request. Example: "error" - `errors` (array) - `errors.code` (string,null) A machine-readable error code that identifies the type of error. Example: "invalid_input" - `errors.message` (string) A human-readable message explaining the error. Example: "The provided parameter is invalid." - `errors.field` (string) The name of the request field associated with the error, if applicable. Example: "datasetId" - `errors.type` (string) The category or context of the error, such as validation or permission. Example: "validation"