Inbound Webhooks
Inbound webhooks let an outside system send data into Salesforce. Webhook Studio receives the webhook and creates a Lead — or updates an existing Lead.
Endpoint URL
Send inbound webhooks to:
/services/apexrest/bytenex/v1/webhook
This path is added to your Salesforce org's base URL.
Authentication
Requests must include the secret header for your org's Webhook Studio setup. A request without the correct secret header is rejected — see the 401 status code below. Keep the secret private: anyone who has it can send webhooks into your org.
How a Lead is created or updated
- If the request matches an existing Lead by ID or by Email, that Lead is updated.
- If no existing Lead matches, a new Lead is created.
What JSON to send
Send a JSON body with the Lead fields. Example:
{
"FirstName": "Aarav",
"LastName": "Sharma",
"Email": "aarav.sharma@example.com",
"Company": "Example Company"
}
LastName and Company are the fields Salesforce requires for a Lead; FirstName and Email identify and describe the person — and the Email is also used to match an existing Lead for updates.
HTTP status codes
| Status code | Meaning |
|---|---|
| 200 | Success — the Lead was created or updated. |
| 400 | Bad request — the JSON body is missing or invalid, or a required field is missing. |
| 401 | Unauthorised — the secret header is missing or incorrect. |
| 404 | Not found — the URL is wrong; check it matches the endpoint URL above exactly. |
| 500 | Server error — something went wrong in Salesforce while processing the request. Try again, and if it continues, contact Support. |
Next steps
- Test with the example JSON above, then check the Lead in Salesforce.
- For outbound sending, see Create a Webhook.
Was this helpful? Let us know by email — we read every message.