Public lead API
Send a single POST with your fleet key and secret. No separate “validate” step.
Base URL: http://api.cabphy.com
Three steps to your first successful enquiry — then use Reference for the full request body and error format.
Get an API key
From the CabPhy dashboard, copy the fleet public key and secret and plug them into the cURL example below.
Send POST http://api.cabphy.com/api/v1/enquiries
Use Content-Type: application/json and a JSON body. The example below has only the required fields.
Receive the enquiry ID
On HTTP 201, read the new lead’s id from the JSON path data.id.
Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET, then paste into a terminal.
curl -sS -X POST "http://api.cabphy.com/api/v1/enquiries" \
-H "Content-Type: application/json" \
-H "X-Client-Id: YOUR_CLIENT_ID" \
-H "X-Client-Secret: YOUR_CLIENT_SECRET" \
-d '{"name":"Example","phone":"+19995550123","customer_email":"user@example.com","pickup_location":"Airport"}'
201.id in data.401 and INVALID_API_KEY.403 and PLAN_EXPIRED or PLAN_RESTRICTED.429 and RATE_LIMIT_EXCEEDED.Next: ·
http://api.cabphy.com/api/v1/enquiries
Creates one enquiry. Content-Type: application/json recommended.
X-Client-Id — requiredX-Client-Secret — requiredContent-Type: application/jsonHTTP 201
{
"success": true,
"message": "Enquiry received.",
"data": { "id": 123 }
}
| Field | Type |
|---|---|
| name | required, string, max 120 |
| phone | required, string, max 32 |
| customer_email | required, valid email |
| pickup_location | required, string, max 500 |
| drop_location | optional |
| travel_date | optional, date |
| notes | optional, long text |
| error | HTTP | When |
|---|---|---|
| INVALID_API_KEY | 401 | Missing credentials, wrong key/secret, or inactive key. |
| PLAN_EXPIRED | 403 | Subscription has expired. |
| PLAN_RESTRICTED | 403 | API not in plan, or enquiry daily/monthly limit reached. |
| RATE_LIMIT_EXCEEDED | 429 | Too many requests (throttling). |
Validation (bad JSON fields) may return 422 with errors per field.
curl -sS -X POST "http://api.cabphy.com/api/v1/enquiries" \
-H "Content-Type: application/json" \
-H "X-Client-Id: YOUR_CLIENT_ID" \
-H "X-Client-Secret: YOUR_CLIENT_SECRET" \
-d '{ "name": "Example Customer", "phone": "+19995550123", "customer_email": "user@example.com", "pickup_location": "Airport", "drop_location": "Downtown", "travel_date": "2026-05-01", "notes": "Test lead" }'
const payload = {
"name": "Example Customer",
"phone": "+19995550123",
"customer_email": "user@example.com",
"pickup_location": "Airport",
"drop_location": "Downtown",
"travel_date": "2026-05-01",
"notes": "Test lead"
};
const res = await fetch('http://api.cabphy.com/api/v1/enquiries', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Client-Id': 'YOUR_CLIENT_ID',
'X-Client-Secret': 'YOUR_CLIENT_SECRET',
},
body: JSON.stringify(payload),
});
const data = await res.json();\nconsole.log(data);
<?php
$ch = curl_init('http://api.cabphy.com/api/v1/enquiries');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-Client-Id: YOUR_CLIENT_ID',
'X-Client-Secret: YOUR_CLIENT_SECRET',
],
CURLOPT_POSTFIELDS => '{ "name": "Example Customer", "phone": "+19995550123", "customer_email": "user@example.com", "pickup_location": "Airport", "drop_location": "Downtown", "travel_date": "2026-05-01", "notes": "Test lead" }',
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $code, "\n", $response;
Interactive request builder can be added here (OpenAPI, Postman, or a hosted “Try it” with test keys). Use the code samples with your credentials for now.
WordPress · CabPhy Lead Connector
When visitors submit your contact forms, leads go straight to the CabPhy app. Same product as the plugin folder cabphy-leads (v1.0.0).
In the CabPhy mobile app (same as the plugin on-screen help):
Important: the Secret is shown only once—store it safely.
As shipped in the plugin integration layer:
Don’t see your builder? Use the support email below—other integrations can be added on request (same as the plugin’s admin notice).
Typical lead payload fields (map your form to these in WordPress or match the Reference API body):
Same contact as the plugin: support@cabphy.com — for new form plugin support or integration questions.