Skip to main content
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:
  1. Presigned URL workflow (recommended for large files) - Two-step process using presigned URLs
  2. 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:
  1. Generate a presigned upload URL (HTTP POST).
  2. Upload the ZIP archive to the returned URL (HTTP PUT).

1 · Generate a presigned URL

Send a POST /conversations/upload/presign request, passing the filename and source that describe the ZIP archive you intend to upload.
Successful responses contain the upload id and a time-limited url to which you must upload the archive:
For the full REST spec see Generate a presigned URL for conversation upload.

2 · Upload the archive

Upload the ZIP archive with an HTTP PUT request to the url from step 1. The request must use Content-Type: application/octet-stream.
⚠️ The presigned URL expires 30 minutes after it is issued.

Method 2: direct upload

For simpler integration and smaller files, you can upload conversations directly using a single POST request with multipart form data.

Upload a conversation directly

Send a POST /conversations/upload request with the source, metadata, and call recording as multipart form data.
Successful responses contain the upload id and processing status:

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

⚠️ Direct upload currently supports XCALLY sources only. For other sources, use the presigned URL workflow.

Supported sources

The source 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. Detailed requirements for each source are provided below.

Outreach Kaia (outreach_kaia)

1 · Presign request example

2 · ZIP file requirements

  • Filename convention: KAIA-<RFC3339 DateTime>+<InstanceID>.zip
  • Contents:

3 · Example ZIP structure

For a complete description of the export schema, refer to the official Outreach Kaia export documentation.

XCALLY (xcally)

1 · Presign request example

2 · ZIP file requirements

  • Contents:
  • 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)

For additional reference see the XCALLY voice recordings documentation. To confirm Rulebase received uploads after they are processed, see Confirm received uploads.