GET
/health
Health check
Public health check for the API and database connection.
Plain HTML docs served directly by the API. No Swagger JavaScript required.
https://api.towit.ai
x-api-key: <TOWIT_API_KEY>
GET /health
/health
Public health check for the API and database connection.
/v1/customers
/v1/customers
Creates a customer, or updates an existing customer when phone_e164 already exists.
{
"full_name": "Example Customer",
"phone_e164": "+447700900123",
"email": "customer@example.com",
"customer_type": "private",
"source_channel": "whatsapp",
"notes": "Prefers WhatsApp updates"
}/v1/whatsapp/intake
Creates or updates the customer, active transport job, inbound message, outbound reply, and quote when distance can be calculated from supplied miles or pickup/delivery postcodes.
{
"from_phone_e164": "+447700900123",
"customer_name": "Example Customer",
"message_id": "wamid.example",
"body": "Hi, quote please. Reg AB12CDE, starts and drives, from B1 1AA to M1 1AE, open trailer, private customer.",
"customer_type": "private"
}/v1/jobs
/v1/jobs
Creates a structured vehicle transport job. Existing IDs, nested objects, or a mix of both are accepted.
{
"customer": {
"full_name": "Example Customer",
"phone_e164": "+447700900123",
"customer_type": "private"
},
"vehicle": {
"registration": "AB12CDE",
"make": "BMW",
"model": "3 Series",
"condition_status": "starts_drives",
"has_keys": true
},
"pickup_location": {
"postcode": "B1 1AA",
"town_city": "Birmingham"
},
"delivery_location": {
"postcode": "M1 1AE",
"town_city": "Manchester"
},
"trailer_preference": "open",
"requested_by_channel": "whatsapp",
"source_message_id": "whatsapp-message-id"
}/v1/jobs/{id}
/v1/jobs/{id}/status
{
"status": "quote_needed",
"actor_type": "openclaw",
"notes": "Pickup and delivery postcodes collected"
}/v1/jobs/{id}/messages
{
"channel": "whatsapp",
"external_message_id": "provider-message-id",
"direction": "inbound",
"sender_label": "Customer",
"body": "Pickup B1, delivery M1"
}/v1/jobs/{id}/quotes
{
"status": "sent",
"transport_type": "open",
"distance_miles": 120,
"customer_price": 264,
"pricing_notes": "Private quote sent by operator"
}/v1/drivers
/v1/drivers
{
"full_name": "Driver Name",
"phone_e164": "+447700900555",
"email": "driver@example.com",
"company_name": "Driver Ltd",
"active": true,
"transport_capability": [
"open"
]
}/v1/drivers/onboarding
/v1/drivers/{id}/documents
{
"document_type": "insurance",
"onboarding_stage": "stage_2",
"file_url": "https://storage.example.com/insurance.pdf",
"notes": "Expires June 2027"
}/v1/drivers/{id}/onboarding-status
{
"status": "towit_verified",
"reviewed_by": "Paul",
"notes": "Documents checked and approved"
}/v1/jobs/{id}/assignments
Only active drivers with onboarding_status towit_verified can receive jobs.
{
"driver_id": "00000000-0000-0000-0000-000000000000",
"status": "offered",
"notes": "Offer sent on WhatsApp"
}