Skip to main content
POST
/
conversations
/
upload
Upload a conversation
curl --request POST \
  --url https://api.rulebase.co/conversations/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'upload[source]=xcally' \
  --form 'upload[metadata][unique_id]=<string>' \
  --form 'upload[metadata][type]=inbound' \
  --form 'upload[metadata][caller]=<string>' \
  --form 'upload[metadata][called]=<string>' \
  --form 'upload[metadata][recorded_at]=<string>' \
  --form upload[file]='@example-file'
{
  "data": {
    "id": "<string>",
    "status": "pending",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API key authentication using Bearer Token

Body

multipart/form-data
upload[source]
enum<string>
required

The source system or platform from which the call is being uploaded

Available options:
xcally
upload[metadata][unique_id]
string
required

Unique identifier for the call

upload[metadata][type]
enum<string>
required

The direction of the call (inbound or outbound)

Available options:
inbound,
outbound
upload[metadata][caller]
string
required

The caller phone number

upload[metadata][called]
string
required

The called phone number

upload[metadata][recorded_at]
string
required

The date and time the call was recorded

upload[file]
file
required

The audio recording file (WAV, MP3, or M4A format, max 100MB)

Response

201 - application/json

Conversation uploaded successfully

data
object
required