curl --request POST \
--url https://api.example.com/api/v1/contracts/create \
--header 'Content-Type: application/json' \
--data '
{
"transcript": "<string>",
"parties": [
{}
],
"contract_type": "<string>",
"terms": {}
}
'{
"contract_id": "<string>",
"status": "<string>",
"created_at": "<string>",
"expires_at": "<string>",
"total_amount": 123,
"currency": "<string>",
"parties": [
{}
],
"contract_hash": "<string>",
"status_code": 123,
"detail": "<string>"
}Create a new contract from voice transcript and terms
curl --request POST \
--url https://api.example.com/api/v1/contracts/create \
--header 'Content-Type: application/json' \
--data '
{
"transcript": "<string>",
"parties": [
{}
],
"contract_type": "<string>",
"terms": {}
}
'{
"contract_id": "<string>",
"status": "<string>",
"created_at": "<string>",
"expires_at": "<string>",
"total_amount": 123,
"currency": "<string>",
"parties": [
{}
],
"contract_hash": "<string>",
"status_code": 123,
"detail": "<string>"
}phone: Phone number of the partyrole: Party role (e.g., “buyer”, “seller”)name: Name of the party (optional)agricultural_supplytotal_amount: Total contract amountcurrency: Currency code (e.g., “KES”)delivery_location: Delivery locationquality_requirements: Quality specificationsphone_number: Party’s phone numberrole: Party’s role in the contractname: Party’s namecurl -X POST https://api.voicepact.com/api/v1/contracts/create \
-H "Content-Type: application/json" \
-d '{
"transcript": "Agreement to supply 500 kg of maize at 50 KES per kg",
"parties": [
{
"phone": "+254712345678",
"role": "buyer",
"name": "John Kamau"
},
{
"phone": "+254787654321",
"role": "seller",
"name": "Mary Wanjiru"
}
],
"contract_type": "agricultural_supply",
"terms": {
"product": "maize",
"quantity": "500",
"unit": "kg",
"unit_price": 50,
"total_amount": 25000,
"currency": "KES",
"delivery_location": "Nairobi Market",
"delivery_deadline": "2026-03-15",
"quality_requirements": "Grade A, moisture content below 13%"
}
}'
{
"contract_id": "AGRI-2026-001234",
"status": "pending",
"created_at": "2026-03-06T10:30:00Z",
"expires_at": null,
"total_amount": 25000,
"currency": "KES",
"parties": [
{
"phone_number": "+254712345678",
"role": "buyer",
"name": "John Kamau"
},
{
"phone_number": "+254787654321",
"role": "seller",
"name": "Mary Wanjiru"
}
],
"contract_hash": "a7f8d9e2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0"
}
{
"detail": "Contract creation failed: [error details]"
}