---
schema_version: "1"
id: d1fee11d22ae57416d7d929471a53b97c7e5731540393b31767faf72ec38f893
title: Stream Records to Data 360 Connect API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/mc-core/guide/mc-manage-objects/mc-manage-objects-create/mc-manage-objects-create-streaming-data-cloud.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-growth/guide/mc-manage-objects-create-streaming-data-cloud.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ad6a5396eddf032a67e25a17b8f3c14a10b18d1ed6514d0d3dfa0bbb3b2133c7
products:
  - Marketing Cloud Next
  - Marketing Cloud
---
# Stream Records to Data 360 Connect API

Data 360 Connect API supports streaming ingestion of contact records. Stream data to keep a source system in sync with Marketing Cloud Next in near real-time.

## Prerequisite

To stream data from an external source, create an ingestion API schema and connector, deploy a data stream, and then create an external client app.

- [Create an ingestion API schema file](https://developer.salesforce.com/docs/data/data-cloud-int/guide/c360-a-ingestion-api-schema-req.html)
- [Create an ingestion API connector](https://developer.salesforce.com/docs/data/data-cloud-int/guide/c360-a-connect-an-ingestion-source.html)
- [Create and deploy a data stream](https://help.salesforce.com/s/articleView?id=data.c360_a_data_ingestion.htm)
- [Create an external client app](https://help.salesforce.com/s/articleView?id=xcloud.create_a_local_external_client_app.htm)

## Step 1: Package the Streaming Data

Configure your app to package the streaming data in a way that matches the schema for the ingestion API. A streaming ingestion request can contain multiple records. The maximum payload size is 200 KB.

Each record that you add corresponds to an object in the `data` array. Include all fields from the schema in the request payload, including optional fields. If there’s no data for a field, pass an empty string or `null`.

```json
{
  "data": [
    {
      "field1": "value1",
      "field2": "value2",
      "optionalField1": "value3",
      ...
    },
    {
      "field1": "valueX",
      "field2": "valueY",
      "optionalField1": "",
      ...
    },
    ...
  ]
}
```

## Step 2: Obtain a Token

Obtain an authorization token, and then exchange it for a Data 360 token. For more information, see [Obtain a Data 360 access token](https://developer.salesforce.com/docs/marketing/mc-connect-apis/mc-connect-apis-data-cloud.md).

## Step 3: Validate the Request

To make sure that your request includes the correct syntax and data types, use [synchronous record validation](https://developer.salesforce.com/docs/atlas.en-us.c360a_api.meta/c360a_api/c360a_api_synchronous_record_validation.htm).

To validate the records, send them in a POST request to the `/api/v1/ingest/sources/DATA_SOURCE_NAME/DATA_SCHEMA/actions/test` endpoint.

```json
POST /v1/ingest/sources/DATA_SOURCE_NAME/DATA_SCHEMA/actions/test HTTP/1.1
Host: YOUR_SUBDOMAIN.c360a.salesforce.com
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN

{
  "data": [
    {
      "field1": "value1",
      "field2": "value2",
      "optionalField1": "value3"
    },
    {
      "field1": "valueX",
      "field2": "valueY",
      "optionalField1": ""
    }
  ]
}
```

If there are errors in the request, the response includes information about the issue that caused the error. Address the issues, and then resubmit the data to the validation endpoint. Make sure to resolve all of the issues before you send the request.

When the API responds with a `200 OK` message, you’re ready to send the ingestion request.

## Step 4: Send the Request

When your data is properly configured, you can submit it to the Ingestion API. Issue a POST request to the `/api/v1/ingest/sources/DATA_SOURCE_NAME/DATA_SCHEMA` endpoint.

```json
POST /api/v1/ingest/sources/DATA_SOURCE_NAME/DATA_SCHEMA HTTP/1.1
Host: YOUR_SUBDOMAIN.c360a.salesforce.com
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN

{
  "data": [
    {
      "ext_id": 101,
      "first_name": "Rachel",
      "last_name": "Rodriquez",
      "email": "rrodiquez@example.com",
      "gender": "Female",
      "city": "Boston",
      "state": "MA",
      "created": "2024-02-01T09:11:11.816319Z"
    },
    {
      "ext_id": 102,
      "first_name": "D'Angelo",
      "last_name": "Cunningham",
      "email": "dcunningham@example.com",
      "gender": "",
      "city": "San Francisco",
      "state": "CA",
      "created": "2024-02-01T09:11:11.816319Z"
    }
  ]
}
```

If the API accepts the data, it responds with a `202 Accepted` response.

```json
{
  "accepted": true
}
```
