Create a lead
Save a company as a lead, such as an inbound or a referral, with the people you know there. Returns the existing lead when the account already has the company.
curl -X POST -H "Authorization: Bearer $REVNU_API_TOKEN" \
-H "content-type: application/json" \
-d '{"domain":"byteful.com","companyName":"Byteful","contacts":[{"name":"Sam Founder","title":"Founder"}]}' \
https://revnu.com/api/v1/leadsBody
{ "domain", "companyName"?, "contacts"? }. domain is the company's website; a full URL is fine. companyName is used only when the lead is new. contacts takes up to 20 people in the shape Save lead contacts takes. Any other field is a 400.
Response
201 { "created": true, "lead", "contacts" } for a new lead, 200 with created: false when the account already had that domain; the contacts are saved on it either way, so a retry never makes a second lead. lead holds id, domain, companyName, status and contactCount. contacts lists only the people you sent, each with result added or updated. A company on your do-not-contact list is a 409.
Creating a lead never drafts or sends anything. A lead Revnu can reach may join its outreach later; to keep Revnu away from a company your team is handling, take it over. Set the deal with Update a lead and write what you know with Add a note.
Frequently Asked Questions
Which scope does this need?
leads:write. A token without it gets 403 with requiredScope in the body.