Skip to main content

Batch Call Ingestion API

This API allows partners to ingest multiple call recordings in a single request. The system processes each call recording asynchronously, providing an efficient way to upload multiple recordings at once.

Endpoint

POST /partner/ingest/batch-call

Version

v1

Request Body

The request body should be a JSON object with the following structure:

{
"data": [
{
"call": {
"id": "string",
"recording_url": "string",
"start_time": "2023-01-01T00:00:00Z",
"end_time": "2023-01-01T00:30:00Z",
"contact_number": "string"
},
"agent": {
"id": "string",
"email": "string",
"name": "string"
},
"customer": {
"id": "string",
"name": "string",
"email": "string",
"disposition_status": "string"
},
"callback_url": "string",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"custom_fields": [
{
"internal_name": "string",
"value": "string"
}
]
}
]
}

Field Descriptions

Call Object

FieldTypeRequiredDescription
idstringYesUnique identifier for the call. Must be unique across all calls for your partner account.
recording_urlstringYesPublicly accessible URL to the call recording file. Supported formats: MP3, WAV, AAC, M4A.
start_timestring (ISO 8601)YesStart time of the call in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). Must be in UTC timezone.
end_timestring (ISO 8601)YesEnd time of the call in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). Must be in UTC timezone and must be after start_time.
contact_numberstringYesContact number used for the call. Format: E.164 international format (e.g., +1234567890).

Agent Object

FieldTypeRequiredDescription
idstringYesUnique identifier for the agent within your system.
emailstringNoEmail address of the agent. Must be a valid email format.
namestringNoFull name of the agent. Maximum length: 255 characters.

Customer Object

FieldTypeRequiredDescription
idstringYesUnique identifier for the customer within your system.
namestringNoFull name of the customer. Maximum length: 255 characters.
emailstringNoEmail address of the customer. Must be a valid email format.
disposition_statusstringNoCurrent disposition status of the customer in your system.

Additional Fields

FieldTypeRequiredDescription
callback_urlstringNoHTTPS URL to call back when processing is complete. Must be a valid URL starting with https://.
metadataobjectNoAdditional metadata as key-value pairs. Maximum of 5 key-value pairs. Keys must be strings, values can be strings or numbers. These will be sent back in the callback url when processing is completed.
custom_fieldsarrayNoCustom fields as name-value pairs. Maximum of 10 custom fields.

Response

Success Response

{
"success": true
}

HTTP Status Code: 200 OK

Error Responses

Authentication Error

{
"success": false,
"message": "Forbidden"
}

HTTP Status Code: 403 Forbidden

Missing Tenant ID

{
"success": false,
"message": "Tenant ID is required"
}

HTTP Status Code: 400 Bad Request

Missing Sub-Tenant ID

{
"success": false,
"message": "Sub-Tenant ID is required"
}

HTTP Status Code: 400 Bad Request

Validation Error

{
"success": false,
"message": "Validation failed",
"errors": [
{
"field": "data[0].call.id",
"message": "id should not be empty"
}
]
}

HTTP Status Code: 422 Unprocessable Entity

Rate Limit Exceeded

{
"success": false,
"message": "Rate limit exceeded. Try again in 60 seconds."
}

HTTP Status Code: 429 Too Many Requests

Server Error

{
"success": false,
"message": "Internal server error"
}

HTTP Status Code: 500 Internal Server Error

Example

Request

curl -X POST \
https://api.zipteams.com/api/v1/partner/ingest/batch-call \
-H 'Content-Type: application/json' \
-H 'x-partner-id: 123' \
-H 'x-tenant-id: tenant1' \
-H 'x-sub-tenant-id: subtenant1' \
-d '{
"data": [
{
"call": {
"id": "call123",
"recording_url": "https://example.com/recordings/call123.mp3",
"start_time": "2023-01-01T10:00:00Z",
"end_time": "2023-01-01T10:30:00Z",
"contact_number": "+1234567890"
},
"agent": {
"id": "agent123",
"email": "agent@example.com",
"name": "John Doe"
},
"customer": {
"id": "customer123",
"name": "Jane Smith",
"email": "customer@example.com",
"disposition_status": "interested"
},
"industry": "Technology",
"function": "Sales",
"callback_url": "https://partner.example.com/callback",
"metadata": {
"campaign": "Q1 Outreach",
"source": "Website"
}
}
]
}'

Response

{
"success": true
}

Technical Notes

  • The system processes each call recording asynchronously.
  • The maximum number of calls in a single batch is 50. If you need to ingest more calls, split them into multiple requests.
  • The maximum request payload size is 5MB.
  • Supported recording formats: MP3, WAV, ACC, M4A, MP4.
  • Recordings must be publicly accessible via the provided URL.
  • Processing time depends on the length and quality of the recording.
  • If the callback_url is provided, the system will call back with the processing results when complete.
  • Callbacks will retry up to 3 times with exponential backoff if the callback endpoint returns an error.
  • All timestamps must be in UTC timezone in ISO 8601 format.
  • The API is idempotent - submitting the same call ID multiple times will not result in duplicate processing.