Skip to navigation

Add contacts

View as Markdown

Adds contacts to an existing batch. Each contact must have contact_name and contact_phone. Additional fields are stored in agent_args. Customer ID is automatically determined from the API key.

Authentication

X-API-Keystring

API key for authentication. Example: raya_ABCD1234567890abcdef

Path parameters

idintegerRequired
The batch ID

Request

This endpoint expects an object.
contactslist of objectsRequired

Array of contact objects. Each contact must have contact_name and contact_phone. Additional fields are allowed.

Response

Contacts added successfully
statusenumOptional
Status of the batch creation
Allowed values:
messagestringOptional

Human-readable message about the result

totalRowsintegerOptional
Total number of contacts in the request
validRowsintegerOptional
Number of valid contacts that were processed
invalidRowsintegerOptional
Number of invalid contacts that were rejected
batchIdintegerOptional
ID of the created or updated batch
contactsInsertedintegerOptional
Number of contacts successfully added to the batch
datalist of maps from strings to anyOptional
Array of valid contact data that was processed
errorslist of objectsOptional

Array of validation errors (only present if status is error)

Errors

400
Bad Request Error
404
Not Found Error