Uploading Conversations
This guide describes how to programmatically upload recorded conversations so that Rulebase can ingest and review them.Upload Methods
Rulebase supports two methods for uploading conversations:- Presigned URL workflow (recommended for large files) - Two-step process using presigned URLs
- Direct upload (simpler for smaller files) - Single request with multipart form data
Method 1: Presigned URL Workflow
The presigned URL workflow consists of two HTTP requests and is recommended for larger files:- Generate a presigned upload URL (HTTP
POST). - Upload the ZIP archive to the returned URL (HTTP
PUT).
1 · Generate a presigned URL
Send aPOST /conversations/upload/presign request, passing the filename and source that describe the ZIP archive you intend to upload.
2 · Upload the archive
Upload the ZIP archive with an HTTPPUT request to the url from step 1. The request must use Content-Type: application/octet-stream.
Method 2: Direct Upload
For simpler integration and smaller files, you can upload conversations directly using a singlePOST request with multipart form data.
Upload a conversation directly
Send aPOST /conversations/upload request with the source, metadata, and call recording as multipart form data.
Direct upload requirements
- Content-Type:
multipart/form-data - Maximum file size: 100MB
- Supported audio formats:
.wav,.mp3,.m4a - Metadata format: Individual form fields for each metadata attribute
Supported sources for direct upload
| Source key | Description |
|---|---|
xcally | XCALLY voice recordings |
Supported sources
Thesource attribute defines how Rulebase should interpret the contents of the archive. All sources follow the same two-step upload flow shown above, but each imposes its own file-naming and payload requirements.
| Source key | Description |
|---|---|
outreach_kaia | Outreach Kaia conversation exports |
xcally | XCALLY voice recordings |
Outreach Kaia (outreach_kaia)
1 · Presign request example
2 · ZIP file requirements
- Filename convention:
KAIA-<RFC3339 DateTime>+<InstanceID>.zip - Contents:
File Naming convention Transcript ( .txt)KAIA-<DateTime>+<InstanceID>.txtMedia ( .mp4)KAIA-<DateTime>+<InstanceID>.mp4Metadata ( .json)KAIA-<DateTime>+<InstanceID>.json
3 · Example ZIP structure
XCALLY (xcally)
1 · Presign request example
2 · ZIP file requirements
- Contents:
Required file Notes Audio ( .wavor.mp3)Recording of the call Metadata ( .json)Call attributes (see below) - Filename convention: none—any archive name is accepted as long as exactly one audio file and one JSON file are present.
3 · Example ZIP structure
4 · Metadata JSON schema (example)
| Field | Description |
|---|---|
unique_id | Unique identifier of the call |
type | Call type (inbound, outbound, internal, or dialer) |
caller | Caller phone number |
called | Callee phone number |
connected | Extension/agent that handled the call |
queue | Queue name |
disposition | Call disposition label |
recorded_at | ISO 8601 timestamp when the call was recorded |