---
title: "Create Data Source"
description: "How to call Create Data Source (POST /api/data-sources) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/v2025-07-15/reference/create_data_source"
revision: "2025-07-15"
latestUrl: "https://developers.klaviyo.com/en/reference/create_data_source"
operationId: "create_data_source"
method: "POST"
endpoint: "https://a.klaviyo.com/api/data-sources"
authentication: "privateKey"
scopes: ["custom-objects:write"]
rateLimits: {"burst":"3/s","steady":"60/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
related: ["https://developers.klaviyo.com/en/v2025-07-15/reference/custom-objects/llms.txt","https://developers.klaviyo.com/en/v2025-07-15/reference/get_data_sources.md","https://developers.klaviyo.com/en/v2025-07-15/reference/get_data_source.md","https://developers.klaviyo.com/en/v2025-07-15/reference/delete_data_source.md","https://developers.klaviyo.com/en/v2025-07-15/reference/bulk_create_data_source_records.md"]
---

# Create Data Source

> This is the Markdown version of https://developers.klaviyo.com/en/v2025-07-15/reference/create_data_source

```http
POST https://a.klaviyo.com/api/data-sources
```

Create a new data source in an account

- Revision header: `revision: 2025-07-15` (required)
- Scopes: `custom-objects:write`
- Rate limits: Burst: `3/s`, Steady: `60/m`

## Example request

```bash
curl --request POST \
     --url 'https://a.klaviyo.com/api/data-sources' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2025-07-15' \
     --header 'content-type: application/vnd.api+json' \
     --data '{
  "data": {
    "type": "data-source",
    "attributes": {
      "title": "string",
      "visibility": "private"
    }
  }
}'
```

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2025-07-15`

## Request body

Content type: `application/vnd.api+json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `data-source`
  - `attributes` (object, required)
    - `title` (string, required)
    - `visibility` (string, required): Visibility of data source. Currently only PRIVATE is supported. Allowed values: `private`, `shared`
    - `description` (string, nullable): Default: ``

### Example request body

```json
{
  "data": {
    "type": "data-source",
    "attributes": {
      "title": "string",
      "visibility": "private"
    }
  }
}
```

## Responses

### 201: Success

Content type: `application/vnd.api+json`

- `data` (object, required)
  - `type` (string, required): Allowed values: `data-source`
  - `id` (string, required): The ID of the data source Example: `925e385b52fb405715f3616c337cc65c`
  - `attributes` (object, required)
    - `title` (string, required): The title of the data source Example: `My Data Source`
    - `visibility` (string, required): The status of this data source Allowed values: `private`, `shared`
    - `description` (string, required): The description of the data source Example: `This is a data source`
  - `links` (object, required)
    - `self` (string<uri>, required)

#### Example response body

```json
{
  "data": {
    "type": "data-source",
    "id": "925e385b52fb405715f3616c337cc65c",
    "attributes": {
      "title": "My Data Source",
      "visibility": "private",
      "description": "This is a data source"
    },
    "links": {
      "self": "https://www.example.com"
    }
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
