POST
/api/public/v1/leads

Create a lead

Adds one prospect. Only the name is required — a cold list routinely has a phone number and nothing else, and rejecting that would mean rejecting the list.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.

leads:write

Request Body

PropertyTypeDescription
locationIdstringThe location.
fullnamestringThe only required field.
emailstring
phoneNumberstring
companyNamestring
titlestring
websitestring
citystring
statestring
sourcestringWhere it came from — "Trade show", "Referral".
notesstring
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/leads" \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "locationId": "loc_abc123",
    "fullname": "Rae Nakamura",
    "email": "rae@northwind.example",
    "companyName": "Northwind Traders",
    "source": "Trade show"
  }'
200Example response
json
{
  "message": "Lead created successfully!",
  "content": {
    "lead": {
      "id": "led_5c21",
      "locationId": "loc_abc123",
      "fullname": "Rae Nakamura",
      "email": "rae@northwind.example",
      "phoneNumber": "+15125550142",
      "companyName": "Northwind Traders",
      "title": "Operations lead",
      "website": "https://northwind.example",
      "city": "Austin",
      "state": "TX",
      "source": "Trade show",
      "notes": null,
      "status": "NEW",
      "lastContactedAt": null,
      "accountId": null,
      "createdAt": "2026-08-11T16:20:00.000Z",
      "updatedAt": "2026-08-11T16:20:00.000Z"
    }
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

xRM → Leads
/xrm/leads
  1. Open Leads.
  2. Add a lead.