API Reference
v1.0

Hushmetrics API

Programmatically create and manage leads in your workspace. All requests use JSON and are served under the /v1 prefix.

Base URL

All API requests are made to the following base URL. Every endpoint is prefixed with /v1.

https://api.hushmetrics.com/v1

Error Handling

The API uses standard HTTP status codes. Successful requests return 201 for resource creation and 200 for other successes. Errors return a JSON object with a message.

CodeMeaning
200Success
201Created — resource successfully created
400Bad Request — missing or invalid parameters
404Not Found — workspace or resource not found
500Internal Server Error

Leads

Create and ingest leads into your workspace.

POST/v1/create-lead

Create a new lead in the specified workspace. Returns the full lead object on success.

Parameters

ParameterTypeInDescription
workspace_idrequiredstring (uuid)bodyWorkspace to attach the lead to.
namestringbodyLead's full name. Defaults to "".
emailstringbodyLead's email address. Defaults to "".
phonestringbodyLead's phone number. Defaults to "".
statusenumbodyLead status: contact, qualified, proposal, negotiation, won, lost. Defaults to "contact".
sourceenumbodyWhere the lead came from: website, referral, social, ad, email, cold_call, other. Defaults to "other".
valuenumberbodyMonetary value of the lead. Defaults to 0.
created_bystring (uuid) | nullbodyProfile ID of the user who created the lead.
utmobject | nullbodyUTM tracking parameters (e.g. utm_source, utm_medium, utm_campaign).
extra_dataobject | nullbodyArbitrary JSON object for any additional lead metadata.
page_urlstring | nullbodyURL of the page where the lead was captured.

Request

cURL
curl -X POST https://api.hushmetrics.com/v1/create-lead \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "your-workspace-id",
    "name": "Jane Doe",
    "email": "jane@example.com",
    "phone": "+1234567890",
    "source": "website",
    "value": 500,
    "utm": { "utm_source": "google", "utm_medium": "cpc" },
    "extra_data": { "company": "Acme Inc", "role": "CTO" },
    "page_url": "https://example.com/pricing"
  }'

Response201 Created

JSON
{
  "id": "a1b2c3d4-...",
  "workspace_id": "your-workspace-id",
  "name": "Jane Doe",
  "email": "jane@example.com",
  "phone": "+1234567890",
  "status": "contact",
  "source": "website",
  "value": 500,
  "created_by": null,
  "utm": { "utm_source": "google", "utm_medium": "cpc" },
  "extra_data": { "company": "Acme Inc", "role": "CTO" },
  "page_url": "https://example.com/pricing",
  "created_at": "2026-03-09T12:00:00+00:00",
  "updated_at": "2026-03-09T12:00:00+00:00"
}
POST/v1/webhook/{workspace_id}

Universal webhook endpoint for WordPress, Framer, and any platform that can POST form data or JSON. The workspace ID is in the URL — just paste the URL into your form plugin.

Accepts both application/json and application/x-www-form-urlencoded. Known fields (name, email, phone, source, value, page_url) are mapped automatically. UTM parameters are grouped into the utm column. All other fields are stored in extra_data. If page_url is not provided, the Referer header is used as a fallback.

Parameters

ParameterTypeInDescription
namestringbodyLead's full name. Defaults to "".
emailstringbodyLead's email address. Defaults to "".
phonestringbodyLead's phone number. Defaults to "".
sourceenumbodyLead source. Invalid values default to "other".
valuenumberbodyMonetary value of the lead. Defaults to 0.
page_urlstringbodyURL of the page where the lead was captured. Falls back to the Referer header.
utm_sourcestringbodyGrouped into utm JSON object automatically.
utm_mediumstringbodyGrouped into utm JSON object automatically.
utm_campaignstringbodyGrouped into utm JSON object automatically.
*anybodyAny other field is stored in extra_data.

Request

cURL
# JSON (Framer, custom integrations)
curl -X POST https://api.hushmetrics.com/v1/webhook/your-workspace-id \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Smith",
    "email": "john@example.com",
    "source": "website",
    "utm_source": "google",
    "utm_medium": "cpc",
    "company": "Acme Inc",
    "message": "I'd like a demo"
  }'

# Form-encoded (WordPress, HTML forms)
curl -X POST https://api.hushmetrics.com/v1/webhook/your-workspace-id \
  -d "name=John+Smith&email=john@example.com&source=website&utm_source=google"

Response201 Created

JSON
{
  "id": "f7e8d9c0-...",
  "workspace_id": "your-workspace-id",
  "name": "John Smith",
  "email": "john@example.com",
  "phone": "",
  "status": "contact",
  "source": "website",
  "value": 0,
  "created_by": null,
  "utm": { "utm_source": "google", "utm_medium": "cpc" },
  "extra_data": { "company": "Acme Inc", "message": "I'd like a demo" },
  "page_url": "https://example.com/contact",
  "created_at": "2026-03-10T12:00:00+00:00",
  "updated_at": "2026-03-10T12:00:00+00:00"
}

Utility

Health and status endpoints.

GET/v1/health

Returns the current status of the API. Use this to verify connectivity.

Request

cURL
curl https://api.hushmetrics.com/v1/health

Response200 OK

JSON
{
  "status": "ok"
}