Worxley for Developers

Quickstart: send a website enquiry to Worxley

A key with leads:write and the id of the campaign the enquiry belongs to are all you need.

Before you start#

  • An API key with the leads:write scope (create one).
  • The id of the campaign the enquiry belongs to, for sourceCampaign.

Create the lead#

POST the enquiry to /leads with your key in the Authorization header. Send an Idempotency-Key too, such as the form submission id, so a retried request can’t create the lead twice.

curl https://crm.api.worxley.com/api/public/v1/leads \
  -H "Authorization: Bearer $WORXLEY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: form-2026-10-15-4821" \
  -d '{
    "name": "Asha Rao",
    "email": "asha@example.com",
    "phoneNumber": "+919812345678",
    "source": "WEBSITE",
    "sourceCampaign": "6a4c3a85c01de391daf2b7ff"
  }'

What happens next#

The lead appears in Worxley right away, goes through your assignment rules, and fires any lead.created webhooks.

The Idempotency-Key header means a retry after a dropped response can’t create the lead twice. See Idempotency.