Skip to main content
POST
/
sequence-manager
/
sequences
/
batch-upload
cURL
curl --request POST \
  --url https://api.clarionhealth.com/v1/sequence-manager/sequences/batch-upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sequence_definition_id": 123,
  "next_activity_date": "2024-01-15T10:00:00Z",
  "rows": [
    {
      "phoneNumber": "+15551234567",
      "firstName": "John",
      "lastName": "Doe",
      "dateOfBirth": "1990-01-15"
    },
    {
      "phoneNumber": "+15559876543",
      "firstName": "Jane",
      "lastName": "Smith",
      "dateOfBirth": "1985-06-20"
    }
  ],
  "validate_only": false
}
'
{
"valid": true,
"total_attempted": 2,
"valid_count": 2,
"created_count": 2,
"errors": [],
"warnings": []
}

Overview

This endpoint creates multiple sequences from an array of patient data rows. Key details:
  • Maximum 100 rows per request
  • Each row requires phoneNumber, firstName, and lastName
  • Additional fields are mapped to sequence inputs based on the definition’s inputs_definition
  • All row input fields must be in camelCase as per agent convention

Validation Mode

Set validate_only: true to validate rows without creating sequences. This lets you preview errors and warnings before committing the upload.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Batch upload request

sequence_definition_id
integer
required

ID of the sequence definition to use

rows
object[]
required

Patient data rows (max 100). Each row requires phoneNumber, firstName, and lastName, plus any additional fields defined in the sequence definition's inputs_definition. All row input fields must be in camelCase as per agent convention.

Maximum array length: 100
next_activity_date
string<date-time>

ISO 8601 date for when the first activity should be scheduled. Defaults to now if not provided.

validate_only
boolean
default:false

If true, validate without creating sequences

Response

Batch upload result with validation status and any errors/warnings

valid
boolean

True if all rows passed validation (warnings don't affect this)

total_attempted
integer

Total rows in the request

valid_count
integer

Rows that passed validation

created_count
integer

Sequences created (0 if validate_only was true)

errors
object[]

Validation errors (rows with errors are not created)

warnings
object[]

Warnings (rows with warnings can still be created)