Create leads using webhooks
Send leads to Relner from a website, form, Make, Zapier, or any service that can make an HTTP POST request. A Zapier subscription is not required by the Relner webhook itself. Meta attribution fields are optional unless you need the corresponding Meta workflow.
Sending a request
- Open Create lead webhook in your company account and copy the full URL.
- In your connector or HTTP client, choose POST. Set Content-Type: application/json and use a raw JSON body.
- Copy the model shown on the page and replace the sample values with your own submission fields. Keep the exact lowercase names
firstname,lastname, andgeneralinfo. - For Meta form leads, also map the original submission ID to
metaLeadIdas a string. Never reuse the sample ID for real leads. - Send the request. A new lead returns HTTP 201; a repeated Meta Lead ID for the same company may return the existing record with 200.
- Check the lead in Relner. Copying the cURL example does not send anything; running it creates a real lead and may trigger your company's automations.
A Meta Access token is not required for this incoming request. The company-specific webhook URL identifies the destination. The sample below is a template: replace <companyId> by copying your actual URL from the page.
curl --request POST 'https://app.relner.com/api/lead/create/webhook/<companyId>' \
--header 'Content-Type: application/json' \
--data-raw '{"firstname":"Example","lastname":"Customer","email":"[email protected]","mobile":"+972541234567","source":"Other"}'
The page offers the same command with your company URL already filled in. Use your own customer data, and do not run example requests against a production company simply to view the format.
4. Sending leads to the CRM
Complete webhook and lead field reference for your connector specialist.
4.1. Endpoint and request format
The production CRM normally uses app.relner.com. The webhook page uses the current CRM origin, including its protocol and port, so dev and localhost addresses are generated for their own environment. Your complete company-specific URL is already generated in the interface: open Admin → Create lead webhook, sign in to your company, and use the copy button next to the URL. This page also includes example JSON, a cURL command, and sending instructions.
POST https://app.relner.com/api/lead/create/webhook/<companyId>
Content-Type: application/json
<companyId> is your internal company identifier. Do not paste this template literally: copy the complete URL from the page, where the correct ID is already filled in. The previous Admin → Zapier URL redirects to the new webhook page.
The endpoint works with any HTTP client, website, Make, or Zapier; it is not Zapier-specific. Copy the URL from the environment you intend to use. A cloud connector must be able to reach it; localhost is not a public server address.
The URL includes your company identifier and is intended for your connector. Do not publish it for third parties.
The endpoint accepts flat JSON using the fields below. A raw native Meta webhook containing nested entry[].changes[] cannot be sent to this endpoint without transformation.
4.2. The key field: the original Meta Lead ID
For leads from Facebook/Instagram Instant Forms, send the identifier of the specific submission received from Meta. Three alternative field names are supported:
metaLeadId;leadgen_id;lead_id.
One field is sufficient. If you send several, the precedence is metaLeadId, then leadgen_id, then lead_id. Their values should not conflict.
Send every Meta ID as a quoted string:
{"metaLeadId": "12345678901234567"}
Do not send IDs as JSON numbers: a long identifier may lose precision inside the connector before it reaches the CRM. The current integration accepts 5–30 digits.
This value is not a person's name, telephone number, internal CRM lead ID, or advertising campaign ID.
4.3. Incoming webhook fields
| Request field | Meaning | How it is used |
|---|---|---|
email |
Customer email | Stored on the lead; after normalization and SHA-256 hashing, it may be used to match events |
mobile |
Customer telephone number | A telephone hash requires an international number starting with + or 00 |
firstname |
First name | CRM only; not sent as a separate Meta field |
lastname |
Last name | CRM only |
fullname |
Full name, as an alternative to separate name fields | Parsed by the CRM; separate firstname/lastname values take precedence. Separate fields are preferable |
campaign |
Readable campaign name | CRM and internal analytics; not included in the Meta event |
source |
Lead source | CRM; defaults to Zapier when omitted |
metaLeadId / leadgen_id / lead_id |
Original Meta submission ID | Stored as meta.leadId and sent as user_data.lead_id |
campaign_id |
Meta campaign ID | Stored in the CRM; not sent back as a separate field |
adset_id |
Ad set ID | Stored in the CRM; not sent back as a separate field |
ad_id |
Advertisement ID | Stored in the CRM; not sent back as a separate field |
form_id |
Meta form ID | Stored in the CRM; not sent back as a separate field |
fbc |
Actual click identifier in Meta's format | When available, sent as user_data.fbc without hashing |
fbp |
Actual browser identifier in Meta's format | When available, sent as user_data.fbp without hashing |
country |
Customer country | CRM; does not automatically supply the telephone country code |
website |
Website | CRM |
generalinfo |
General information | CRM |
language |
Language | CRM |
comment |
Comment | Creates a CRM note; not sent to Meta |
Allowed source values: Application, Facebook, Google, Instagram, Twitter, LinkedIn, Website, Zapier, Partner, Other, WhatsApp. You can use Facebook for Facebook form leads.
campaign_id, adset_id, ad_id, and form_id are optional for outgoing events. Stage delivery requires a Meta Lead ID. For sales, having both the original Meta Lead ID and usable customer contact details is preferable.
Only provide fbc and fbp if they were actually collected from the website visitor. Current validation accepts a string in the format fb.<number>.<number>.<value>, up to 512 characters; the last part may contain letters, digits, _, and -. Do not invent these values or collect them from a sales representative's browser. The webhook does not directly process fbclid: your connector must convert it into a valid fbc if required.
4.4. Example incoming request
These are fictional values. Replace them with data from your own form and connector.
{
"firstname": "Example",
"lastname": "Customer",
"email": "[email protected]",
"mobile": "+972541234567",
"source": "Facebook",
"campaign": "Autumn leads",
"metaLeadId": "12345678901234567",
"campaign_id": "23456789012345678",
"adset_id": "34567890123456789",
"ad_id": "45678901234567890",
"form_id": "56789012345678901"
}
In Make/Zapier, map the incoming submission fields to these names. Do not copy the sample identifiers into a live connector.
When a new lead is created, the CRM returns HTTP 201 and the lead record. A repeated request with the same Meta Lead ID for the same company returns the existing lead with HTTP 200; redelivery does not create another record. Such a repeated request does not automatically update the existing record's contact details or attribution.
Submissions without Meta IDs continue to work with the previous format. Sales can be sent using contact details, but stage delivery is not performed for those leads in the current implementation.
4.5. Field naming: the webhook and lead record use different formats
For Make/Zapier and incoming submissions, use the field names in the webhook table (§ 4.3). Internal lead record field names are not always identical.
| Webhook request field | Stored lead record / authenticated API field | Important distinction |
|---|---|---|
firstname |
firstName |
The webhook expects the lowercase spelling |
lastname |
lastName |
The same applies to the last name |
fullname |
Split into firstName and lastName |
The current parser takes the first and second words only; remaining words are not retained by this parser. Use separate fields for multi-part names |
generalinfo |
generalInfo |
The webhook uses the lowercase spelling |
mobile |
mobile |
Use this field for the main telephone number from an advertising form |
metaLeadId / leadgen_id / lead_id |
meta.leadId |
One original Meta submission ID |
campaign_id |
meta.campaignId |
Different from the readable campaign name |
adset_id |
meta.adsetId |
Ad set ID |
ad_id |
meta.adId |
Advertisement ID |
form_id |
meta.formId |
Form ID |
fbc, fbp |
meta.fbc, meta.fbp |
Sent at the top level of the webhook request |
comment |
A separate note linked to the lead | Not the generalInfo field or an embedded comments array |
| Company in the webhook URL | company |
The company is determined by the URL, not by a JSON field |
Field names are case-sensitive. For example, sending firstName instead of firstname to the incoming webhook does not populate the first name. Likewise, a nested meta object does not replace the flat attribution fields supported by this webhook.
The current webhook does not assign the following request fields to the lead: phone, status, manager, image, customFields, approwed, converted, created, lastUpdate, lastActivity, and smsActivity. Sending these keys does not enable that functionality: the handler does not copy them into the record. Unknown keys do not automatically become custom fields either.
You cannot include a sales amount, currency, resolution, or resolutions array in this request to create a monetary event immediately. Sales outcomes are recorded separately after the lead exists.
4.6. Complete lead record field reference
This section is for administrators and technical integrators. It describes the lead model, not additional incoming webhook capabilities.
Normal lead creation uses POST /api/lead; updates use PATCH /api/lead/<leadId>. These endpoints require CRM user authentication through JWT. A Meta Access token is not a Relner authorization token. For cloud advertising lead delivery, use the assigned webhook. Arrange access to the authenticated API with your administrator.
In JSON, use quoted strings, true / false for booleans, and numbers for numeric values. References to a manager, file, or custom field must be existing internal Relner IDs, usually 24-character hexadecimal strings, not Meta IDs.
| Lead record field | Type | Meaning, default, and how it is populated |
|---|---|---|
_id |
ID | Internal lead ID generated by the database; do not assign it manually |
id |
String, service representation | May appear in JSON as the string representation of _id; not a separate input field |
email |
String | Customer email; accepted by both the webhook and normal API |
firstName |
String | First name; use firstName in the normal API and firstname in the webhook |
lastName |
String | Last name; use lastName in the normal API and lastname in the webhook |
fullName |
Computed string | Built from first and last name; not independently stored. Different from the incoming fullname field |
mobile |
String | Main mobile number; the primary telephone identifier for Conversions API |
phone |
String | Additional telephone number; supported by the normal API, not the current webhook. Considered for Meta only when mobile is empty |
country |
String | Country; does not automatically add a telephone code and is not sent in the Meta event |
language |
String | Lead language; defaults to English. Use the system language names listed below |
website |
String | Website address; also accepted by the webhook |
generalInfo |
String | General lead information; the corresponding webhook field is generalinfo |
company |
Company ID | Taken from the authenticated user during normal creation, or from the webhook URL. A JSON value does not select another company |
manager |
User ID | Assigned representative; send an ID through the normal API. Leads created by a Sales user are assigned to that user. Webhook assignment follows the company's round-robin setting if enabled |
image |
File ID | Lead image referencing an uploaded Relner file; not a file URL or binary content |
status |
String | Exact company status name; defaults to New. The webhook does not assign it from JSON. Use existing CRM statuses in the normal API |
source |
Enumerated string | Lead source. Defaults to Application for normal creation and Zapier for the webhook. Allowed values are listed in § 4.3 |
campaign |
String | Readable advertising campaign name, not the Meta campaign ID |
approwed |
Boolean | Internal approval flag; defaults to false. The current model spells it approwed, not approved. It does not indicate payment or Meta consent |
converted |
Boolean | Indicates conversion of a lead into a client; defaults to false. Use the CRM conversion action rather than merely changing the flag. The flag alone does not create a Purchase |
created |
Date/time | Defaults to record creation time. Set by the system for webhook leads; normal lead updates do not change it. Do not alter it to manipulate advertising reporting |
lastUpdate |
Date/time | Service update timestamp set by specific system operations. Not a guaranteed timer covering every representative action |
lastActivity |
String | Service description of the latest activity; not an amount, Meta stage, or complete activity history |
smsActivity |
String | Service information about SMS activity |
customFields |
Array of objects | Values of previously configured custom fields; see § 4.7. Not populated by the current incoming webhook |
meta |
Nested object | Advertising identifiers. Client-supplied changes to this object are ignored by normal creation/update endpoints; it is populated through supported webhook fields |
processingHistory |
Array of objects | New status and assignment history, maintained by the server. Client-supplied values are discarded by the normal API |
__v |
Number, service field | Internal database document version; not a user field or Meta API version |
A server-side user value used by some operations is not a Lead model field. city, address, budget, and arbitrary keys do not become lead fields merely because they appear in JSON. Use configured custom fields or an agreed integration extension for such information.
Language names used by the system interface: English, Russian, Hebrew, Ukrainian, Arabic, French, German, Spanish, Italian, Portuguese, Japanese. The current model stores language as a string; use a listed value for compatibility.
Example of normal authenticated lead creation; this is not the incoming advertising webhook format:
{
"firstName": "Example",
"lastName": "Customer",
"email": "[email protected]",
"mobile": "+972541234567",
"phone": "+97231234567",
"country": "Israel",
"language": "English",
"website": "https://example.com",
"generalInfo": "Interested in a consultation",
"status": "New",
"source": "Facebook",
"campaign": "Autumn leads",
"manager": "000000000000000000000010"
}
The manager ID is fictional. A live request must use an existing employee ID for your company. Changing a status associated with a contract through the normal API does not replace recording a positive resolution.
4.7. Custom fields customFields
A CRM administrator must first create each custom field definition. The lead stores a reference to that definition and a value. Sending a new field name does not automatically create a definition.
| Path | Type | Meaning |
|---|---|---|
customFields[].customField |
ID | Required reference to a Relner custom field definition |
customFields[].value |
Depends on field type | The field value; not a Meta secret or event parameter |
customFields[].type |
String | Field type. During a normal API update, it may be read from the definition if omitted |
customFields[]._id |
ID, service field | May be added by the database for the array item; does not identify the field definition |
Supported types:
type |
Value to send |
|---|---|
text, textarea |
Text |
url |
URL string |
address |
Address string |
number |
Number |
date |
ISO date/time string, such as 2026-10-20T12:00:00Z |
checkbox |
Boolean true or false |
select, radio |
One value from the configured options |
multipleSelect |
Array of selected values from the configured options |
Example fragment for a normal API request:
{
"customFields": [
{
"customField": "000000000000000000000020",
"type": "text",
"value": "Needs a callback next week"
},
{
"customField": "000000000000000000000021",
"type": "number",
"value": 250000
},
{
"customField": "000000000000000000000022",
"type": "multipleSelect",
"value": ["Option A", "Option B"]
}
]
}
All IDs and options in this example are illustrative. Use your company's existing definitions and allowed options. When updating the array through the normal API, remember that it replaces the stored array: do not accidentally omit previously populated fields.
This fragment does not work through the current incoming webhook: that endpoint does not implement customFields. If Make/Zapier needs to populate these fields, agree on a separate solution with your administrator. Custom fields are not automatically sent to Meta either.
4.8. Nested service fields and related records
API responses and the lead interface may include additional structures:
| Structure | Contents and purpose |
|---|---|
meta |
leadId, campaignId, adsetId, adId, formId, fbc, fbp; their incoming webhook mappings are listed above |
processingHistory[] |
_id: history entry ID; status: status name; at: timestamp; manager: responsible user ID at that point. Maintained by the system |
manager, image in certain responses |
May contain an expanded user/file object instead of an ID. This is an enriched response, not a requirement to send objects to the webhook |
resolutions in certain responses |
Outcomes joined from a separate collection, not a normal lead creation field |
| Comments, notes, and files | Related CRM entities; do not invent arbitrary embedded arrays in webhook JSON |
A sales outcome separately uses leadId, description, and amount. Currency, time, author, and analytics are captured by the server. Do not add amount, currency, order_id, event_name, event_time, event_id, or user_data to an incoming lead submission expecting the webhook to record a sale: that is a different processing step.
Practical rule: the connector creates the lead; sales outcomes are recorded separately.