Skip to main content
POST
Bulk create or upsert customers

Creating Customers

This endpoint allows you to create customers.

Request Body

The request body should contain a customers array with the customer information you want to create. Each customer object in the array should include the following fields: You can use priority to control how the customers are picked during campaign runs. It is calculated in ascending order. Lower the value, higher the priority. 0 is the highest priority. In addition to the customers array, the request body can include the following top-level parameters:

Response Structure

The response includes the job ID. You can use this job ID to check the status of the job.

Authorizations

Authorization
string
header
required

Bearer token issued for an authenticated Oration user or service account.

Headers

x-api-key
string
required

Workspace API key used for server-to-server authentication.

x-workspace-slug
string

Human-readable workspace slug. Provide this or x-workspace-id depending on your integration setup.

x-workspace-id
string

Workspace UUID. Useful when the workspace slug is not available.

Body

application/json

Customer records to import in a single async batch job.

Request body for asynchronously importing or upserting customer records.

customers
object[]
required

Customer records to create or update.

strategy
enum<string>
default:insert

Whether to only insert new customers or upsert matching records.

Available options:
upsert,
insert
partial
boolean
default:false

If true, valid records are accepted even when some records in the batch fail validation.

Response

Customer import job created successfully.

Async job handle returned after scheduling a customer import.

jobId
string

Identifier of the background job that tracks import progress.