CabPhy API

Public lead API

Create enquiries in one request

Send a single POST with your fleet key and secret. No separate “validate” step.

Base URL: http://api.cabphy.com

Getting started

Three steps to your first successful enquiry — then use Reference for the full request body and error format.

  1. 1

    Get an API key

    From the CabPhy dashboard, copy the fleet public key and secret and plug them into the cURL example below.

  2. 2

    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.

  3. 3

    Receive the enquiry ID

    On HTTP 201, read the new lead’s id from the JSON path data.id.

Minimal cURL

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"}'

After the request

  • Enquiry is created when you get 201.
  • Response includes the new enquiry id in data.
  • That lead is visible in your CabPhy dashboard and app like any other enquiry.

If the request fails

  • Invalid API key — wrong or missing credentials; expect 401 and INVALID_API_KEY.
  • Plan issue — expired subscription or not allowed for this API; 403 and PLAN_EXPIRED or PLAN_RESTRICTED.
  • Rate limit — too many calls; 429 and RATE_LIMIT_EXCEEDED.

Next: ·

API reference

POST http://api.cabphy.com/api/v1/enquiries

Creates one enquiry. Content-Type: application/json recommended.

Headers

  • X-Client-Id — required
  • X-Client-Secret — required
  • Content-Type: application/json

Success response

HTTP 201

{
  "success": true,
  "message": "Enquiry received.",
  "data": { "id": 123 }
}

Request body

FieldType
namerequired, string, max 120
phonerequired, string, max 32
customer_emailrequired, valid email
pickup_locationrequired, string, max 500
drop_locationoptional
travel_dateoptional, date
notesoptional, long text

Error codes (machine-readable)

errorHTTPWhen
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.

Code samples

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;

Try the API

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.

Integrations

WordPress · CabPhy Lead Connector

Connect site forms to CabPhy

When visitors submit your contact forms, leads go straight to the CabPhy app. Same product as the plugin folder cabphy-leads (v1.0.0).

How it works

  1. 1 Install the plugin — upload and activate CabPhy Lead Connector.
  2. 2 Configure the API — paste API Key and Secret from the CabPhy app.
  3. 3 Map fields — align form fields to CabPhy (name, email, phone, locations, etc.).
  4. 4 Receive leads — submissions appear in the CabPhy app, with optional activity in WP.

Where to find your API Key & Secret

In the CabPhy mobile app (same as the plugin on-screen help):

  1. Open CabPhy, then tap More (bottom navigation).
  2. Scroll to the System section.
  3. Tap API KeysCreate API Key.
  4. Copy the API Key and Secret Key into the plugin’s settings.

Important: the Secret is shown only once—store it safely.

In WordPress (after install)

  1. Go to Plugins and activate CabPhy Lead Connector (or upload the ZIP: Plugins → Add New → Upload Plugin).
  2. Open CabPhy Leads in the admin menu (or Settings link on the plugin row).
  3. Paste API Key and Secret Key, then use Test Connection and Save.
  4. Confirm your form plugin is supported (below) and map fields so they match the field names where needed.

Supported form plugins

As shipped in the plugin integration layer:

  • Contact Form 7
  • WPForms (Lite & Pro)
  • Gravity Forms
  • Ninja Forms
  • Elementor Pro Forms
  • Fluent Forms
  • Formidable Forms

Don’t see your builder? Use the support email below—other integrations can be added on request (same as the plugin’s admin notice).

What gets sent to CabPhy

Typical lead payload fields (map your form to these in WordPress or match the Reference API body):

  • Customer name, phone, email
  • Pickup location
  • Drop location (optional)
  • Travel date (optional)
  • Notes / message (optional)

Why use it (from the plugin)

  • Instant lead delivery to the app
  • Mobile push so you don’t miss enquiries
  • One place to manage site + in-app leads
  • HTTPS; credentials stored in your WordPress DB

Support

Same contact as the plugin: support@cabphy.com — for new form plugin support or integration questions.

FAQ (plugin readme)

Do I need a CabPhy account?
Yes, with an active plan that includes API access.
Is my data secure?
Data is sent over HTTPS; API credentials live in your WordPress database only.
What if my subscription expires?
Leads stop syncing until you renew; the plugin can show an expired status in settings.
Multiple websites?
Use a separate API key per site (create additional keys in the app).