Stream Records to Data Cloud API

Data Cloud API supports streaming ingestion of contact records. Streaming your ingestion data helps you keep a source system in sync with Marketing Cloud in near real-time.

To stream data from an external source, create an ingestion API schema and connector, deploy a data stream, and then create a connected app.

Configure your application to package the streaming data in a way that matches the schema for the ingestion API. A streaming ingestion request can contain multiple records, but the entire payload must be 200 KB or less.

Each record that you want to add must be an object in an array called data. This example shows the structure of a basic streaming ingestion request.

All of the fields defined in the schema must be present in the request payload, including optional fields. If there’s no data for a field, pass an empty string or null.

Obtain an authorization token, and then exchange it for a Data Cloud token. For more information, see Obtain a Data Cloud access token.

Use synchronous record validation to ensure that your request includes the correct syntax and data types.

To validate the records, send them in a POST request to the /api/v1/ingest/sources/DATA_SOURCE_NAME/DATA_SCHEMA/actions/test endpoint.

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. Repeat this process until the response indicates that there are no issues.

If the API responds with a 200 OK message, you’re ready to send the ingestion 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.

If the API accepts the data, it responds with a 202 Accepted response.