Documentation Developers

Status API

Set the status, value and a note of a lead from another system with one request.

Available from the Business plan. Compare plans

The status API lets another system tell Leadwon that a lead was contacted, qualified, won or lost. A qualified or won lead is then reported to your ad platforms, exactly as if you had changed it in WordPress. It needs the Business or Agency plan.

Address and key

Copy the Address for status updates from Leads → CRM. It looks like this:

https://example.com/wp-json/leadwon-pro/v1/inbound?key=…

Instead of the key parameter, you can send the key in an X-Leadwon-Key header. Create a new address replaces the key; the old one stops working at once.

Request

POST, as JSON or form data.

Field Description
lead_id ID of the lead, as sent by the webhook.
email Instead of lead_id: the latest lead with this email address is updated.
status Required. contacted, qualified, won or lost.
value Optional. Deal value, e.g. 4800 or "4.800,00".
currency Optional. Three letters, e.g. EUR. Without it, the lead keeps its currency or gets the currency of your site.
note Optional. Added to the notes of the lead with the date, up to 2,000 characters.
curl -X POST "https://example.com/wp-json/leadwon-pro/v1/inbound" \
  -H "X-Leadwon-Key: …" \
  -H "Content-Type: application/json" \
  -d '{"lead_id": 1234, "status": "won", "value": 4800, "currency": "EUR"}'

Response

{ "lead_id": 1234, "status": "won", "value": 4800, "currency": "EUR" }
Code Meaning
200 The lead was updated.
400 A field is invalid, e.g. the value is not a number.
401 The key is missing or wrong.
402 The Leadwon Pro license is not active.
403 The plan does not include CRM integrations.
404 No lead with this ID or email address.
429 More than 300 requests in an hour. Try again later.