Skip to main content
POST
/
api
/
v1
/
voice
/
conference
/
create
Create Voice Conference
curl --request POST \
  --url https://api.example.com/api/v1/voice/conference/create \
  --header 'Content-Type: application/json' \
  --data '
{
  "parties": [
    {}
  ],
  "contract_type": "<string>",
  "expected_duration": 123
}
'
{
  "conference_id": "<string>",
  "recording_url": "<string>",
  "status": "<string>",
  "webhook_url": "<string>",
  "parties": [
    {}
  ]
}

Overview

This endpoint initiates a voice conference call between multiple parties for recording contract negotiations. The system automatically handles call routing and recording setup through Africa’s Talking voice service.

Request Body

parties
array
required
List of phone numbers for contract parties (minimum 2 required)Example: ["+254712345678", "+254787654321"]
contract_type
string
default:"agricultural_supply"
Type of contract being negotiatedSupported types:
  • agricultural_supply
  • service_agreement
  • loan_agreement
expected_duration
integer
default:"600"
Expected call duration in seconds (default: 10 minutes)

Response

conference_id
string
Unique identifier for the conference session
recording_url
string
URL where the call recording will be available (may be null during call)
status
string
Current conference status: active, completed, or failed
webhook_url
string
Webhook endpoint that receives call status updates
parties
array
List of phone numbers participating in the conference

Example Request

curl -X POST https://api.voicepact.com/api/v1/voice/conference/create \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "parties": ["+254712345678", "+254787654321"],
    "contract_type": "agricultural_supply",
    "expected_duration": 600
  }'

Example Response

{
  "conference_id": "ATVoice_a1b2c3d4e5f6",
  "recording_url": null,
  "status": "active",
  "webhook_url": "/api/v1/voice/webhook",
  "parties": ["+254712345678", "+254787654321"]
}

Error Responses

400 Bad Request
Invalid request parameters (e.g., fewer than 2 parties)
500 Internal Server Error
Failed to initiate voice conference. Check service availability.
{
  "detail": "Failed to create voice conference: Unable to connect to voice service"
}

Workflow

  1. Call Initiation: System dials all parties simultaneously
  2. Recording Setup: Audio recording starts when parties join
  3. Webhook Updates: Conference status sent to webhook endpoint
  4. Recording Storage: Audio file stored after call completion

Next Steps

After creating a conference:
  1. Monitor webhook events for recording completion
  2. Use the Process Voice Recording endpoint to extract contract terms
  3. Check recording status with /recordings/{conference_id} endpoint

Build docs developers (and LLMs) love