Skip to main content
POST
/
api
/
v1
/
contracts
/
{contract_id}
/
confirm
Confirm Contract
curl --request POST \
  --url https://api.example.com/api/v1/contracts/{contract_id}/confirm
{
  "status": "<string>",
  "contract_id": "<string>",
  "signed_by": "<string>",
  "all_signed": true
}
Records a party’s confirmation/signature for a contract. When all parties have confirmed, the contract status is automatically updated to “confirmed”.

Path Parameters

contract_id
string
required
The unique identifier of the contract to confirm

Query Parameters

phone_number
string
required
The phone number of the party confirming the contract

Response

status
string
Always returns “confirmed” on successful signature
contract_id
string
The identifier of the confirmed contract
signed_by
string
Phone number of the party who signed
all_signed
boolean
Indicates whether all parties have now signed the contract

Example Request

curl -X POST "https://api.voicepact.com/api/v1/contracts/AGRI-2026-001234/confirm?phone_number=%2B254712345678" \
  -H "Content-Type: application/json"

Example Responses

Partial Confirmation (Not All Parties Signed)

{
  "status": "confirmed",
  "contract_id": "AGRI-2026-001234",
  "signed_by": "+254712345678",
  "all_signed": false
}

Full Confirmation (All Parties Signed)

{
  "status": "confirmed",
  "contract_id": "AGRI-2026-001234",
  "signed_by": "+254787654321",
  "all_signed": true
}
When all_signed is true, the contract status is automatically updated to “confirmed” and the confirmed_at timestamp is set.

Error Responses

404 Not Found

{
  "detail": "Signature record not found"
}
Returned when:
  • The contract_id doesn’t exist
  • The phone_number is not a party to this contract
  • No signature record exists for this combination

500 Internal Server Error

{
  "detail": "Failed to confirm contract"
}
Returned when an unexpected error occurs during confirmation.

How It Works

  1. Signature Lookup: The system finds the signature record for the specified contract and phone number
  2. Status Update: The signature status is updated to “signed” with a timestamp
  3. Check All Signatures: The system counts how many parties have signed
  4. Auto-Confirm: If all parties have signed, the contract status changes to “confirmed”

Signature Lifecycle

  1. Created: Signature record created when contract is created (status: “pending”)
  2. Signed: Party confirms via this endpoint (status: “signed”)
  3. Contract Confirmed: When all signatures are “signed”, contract becomes “confirmed”

Notes

  • Each party can only sign once (idempotent operation)
  • The phone number must exactly match the number registered for that party
  • Signature timestamps are recorded in UTC
  • The signature method is tracked as “sms_confirmation”

Build docs developers (and LLMs) love