REST API Reference
QoraCRM provides a complete WP REST API namespace for developers.
API Namespace: /wp-json/qoracrm/v1
Authentication & Security
All management endpoints (fetching, creating, editing, and deleting leads, forms, and settings) are strictly protected by WordPress permission checks:
- In WordPress Admin / SPA: Automatically authenticated via standard WordPress Cookie session and
X-WP-Nonceheader. - External Clients (Scripts, Mobile Apps, Postman, Zapier): Require standard WordPress Application Passwords passed in the HTTP
Authorization: Basic <base64>header, or a JWT / OAuth authentication plugin. - Unauthenticated / Public Requests: Any unauthorized user or external visitor attempting to access
GET /wp-json/qoracrm/v1/leadsreceives a401 Unauthorizedor403 Forbiddenresponse (rest_forbidden). External visitors cannot read your CRM data.
Only two specific endpoints are publicly reachable:
POST /wp-json/qoracrm/v1/submit— Used exclusively to submit new leads from public frontend forms (only returns a success confirmation message, never exposes lead data).POST /wp-json/qoracrm/v1/leads/webhook— Protected by a secretapi_keyverification.
1. Leads Endpoints
Fetch Leads List
- Endpoint:
GET /wp-json/qoracrm/v1/leads - Access: Requires
manage_optionscapability or CRM access granted viaqoracrm_user_has_crm_accessfilter. - Query Parameters:
page(int, optional) — Page number (default1). When specified, the response returns a paginated envelope object.per_page(int, optional) — Leads per page (default20, max100).status(string, optional) — Filter by status slug (new,wait,complete,cancel,spam, or custom).search(string, optional) — Search query matching against submitted lead data.form_id(int, optional) — Filter leads submitted through a specific form ID.
- Response Headers:
X-WP-Total— Total number of matching leads.X-WP-TotalPages— Total number of pages.
Sample Response (Paginated):
json
{
"success": true,
"data": [
{
"id": 105,
"form_id": 1,
"status": "new",
"entry_data": {
"name": "John Doe",
"phone": "+15551234567",
"email": "[email protected]"
},
"meta_data": {
"ip": "127.0.0.1",
"source": "native_form",
"history": []
},
"assignee_id": null,
"assignee": null,
"is_unread": false,
"created_at": "2026-07-30 14:20:00"
}
],
"total": 45,
"pages": 3,
"page": 1,
"per_page": 20
}Flat Response Without Pagination
When page and per_page are omitted (e.g. internal CRM dashboard queries), the endpoint returns a direct flat array of lead objects [ { ... }, ... ] for maximum performance.
Submit Lead (Public Form Endpoint)
- Endpoint:
POST /wp-json/qoracrm/v1/submit - Access: Public
- Request Body (JSON or FormData):
json
{
"form_id": 1,
"field_1": "John Doe",
"field_2": "+15551234567",
"field_3": "[email protected]"
}Sample Response:
json
{
"success": true,
"message": "Thank you for your submission!"
}External Webhook Lead Creation
- Endpoint:
POST /wp-json/qoracrm/v1/leads/webhook - Access: Requires valid API Key configured in QoraCRM Settings (passed via
X-QoraCRM-Keyheader orapi_keypayload parameter). - Request Body (JSON):
json
{
"api_key": "YOUR_SECRET_API_KEY",
"name": "John Doe",
"phone": "+15551234567",
"email": "[email protected]",
"status": "new",
"tags": ["website", "adwords"],
"total": 150
}Create Lead Manually (CRM Users)
- Endpoint:
POST /wp-json/qoracrm/v1/leads - Access: Requires CRM edit permission (
manage_optionsorqoracrm_user_can_edit). - Request Body (JSON):
json
{
"entry_data": {
"name": "Jane Smith",
"phone": "+15559876543",
"email": "[email protected]"
},
"status": "new",
"tags": ["vip"],
"assignee_id": 2
}Single Lead Management
- Get Lead:
GET /wp-json/qoracrm/v1/leads/<id> - Update Lead:
POST /wp-json/qoracrm/v1/leads/<id>(can updatestatus,entry_data,assignee_id,tags, or appendcomment) - Delete Lead:
DELETE /wp-json/qoracrm/v1/leads/<id> - Send Direct Email:
POST /wp-json/qoracrm/v1/leads/<id>/send-email - Send Direct SMS (Pro):
POST /wp-json/qoracrm/v1/leads/<id>/send-sms - Send Email to Lead:
POST /wp-json/qoracrm/v1/leads/<id>/send-email(sends rich email and logs to comments/history) - Send SMS to Lead (Pro):
POST /wp-json/qoracrm/v1/leads/<id>/send-sms(dispatches SMS via configured provider and logs to comments/history)
SMS & PayPal Endpoints (Pro)
- SMS Settings:
GET / POST /wp-json/qoracrm/v1/sms/settings - SMS Balance / Senders / Test:
POST /wp-json/qoracrm/v1/sms/balance,POST /wp-json/qoracrm/v1/sms/senders,POST /wp-json/qoracrm/v1/sms/test - PayPal Checkout & Webhook:
POST /wp-json/qoracrm/v1/paypal/verify,POST /wp-json/qoracrm/v1/paypal/create-order,POST /wp-json/qoracrm/v1/paypal/capture-order,POST /wp-json/qoracrm/v1/paypal/webhook
2. Forms Endpoints
Fetch All Forms
- Endpoint:
GET /wp-json/qoracrm/v1/forms - Access: Requires CRM access.
Save Form Schema
- Endpoint:
POST /wp-json/qoracrm/v1/forms/save - Access: Requires form management permission (
manage_optionsorcan_manage_forms).
Delete Form
- Endpoint:
DELETE /wp-json/qoracrm/v1/forms/<id> - Access: Requires form management permission.
3. SMS & PayPal Endpoints (Pro)
SMS Gateway Configuration & Dispatch
- Get / Save SMS Settings:
GET/POST /wp-json/qoracrm/v1/sms/settings - Check Provider Balance:
POST /wp-json/qoracrm/v1/sms/balance - Load Senders (TurboSMS):
POST /wp-json/qoracrm/v1/sms/senders - Send Test SMS:
POST /wp-json/qoracrm/v1/sms/test
PayPal Checkout & Webhooks
- Verify Credentials (Admin):
POST /wp-json/qoracrm/v1/paypal/verify - Create Order (Public):
POST /wp-json/qoracrm/v1/paypal/create-order - Capture Order (Public):
POST /wp-json/qoracrm/v1/paypal/capture-order - PayPal Webhook (Public, Signature-Verified):
POST /wp-json/qoracrm/v1/paypal/webhook