TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/scooller/Leben-site/llms.txt
Use this file to discover all available pages before exploring further.
/api/v1/contact-submissions endpoint accepts contact form submissions from any authorized frontend, persists the data locally, and immediately dispatches a CreateSalesforceCaseJob to create the corresponding Lead or Case record in Salesforce with full UTM tracking. Submissions are validated against a dynamic field schema that is configurable per contact channel in SiteSettings. If Cloudflare Turnstile is enabled for the installation, a valid turnstile_token must be included and is verified server-side before the submission is accepted.
Endpoint
Authentication
This endpoint is public — no user session is required. Rate limiting applies to prevent abuse.| Constraint | Value |
|---|---|
| Rate limit | 10 requests per minute per IP |
| Auth required | None |
Channel resolution
The contact channel is resolved from one of two sources, checked in this order:channelfield in the JSON request bodyX-Contact-ChannelHTTP header
422 validation error — there is no silent fallback to a default channel.
Request body
Slug of the contact channel (e.g.
"sale", "arriendo"). Can also be supplied via the X-Contact-Channel request header instead of the body. The channel determines which fields are required or optional within fields. Must match an active channel configured in SiteSettings.Dynamic form fields. The exact set of accepted and required fields depends on the active channel configuration in SiteSettings. The fields listed below are the standard recommended set.
Cloudflare Turnstile challenge response token. Required when Turnstile is enabled in the installation (configured via the
CLOUDFLARE_TURNSTILE_SECRET_KEY environment variable). The token is validated server-side — client-side validation alone is not sufficient.Example request
The following is the minimum recommended body as documented in the iLeben API guide:UTM enrichment
The backend automatically setsfields.utm_site on every submission when the field is not already present in fields. The value is resolved from the first non-empty candidate in this header priority order:
OriginheaderRefererheaderX-Source-Sitecustom header
Response
201 Created
Human-readable confirmation that the submission was received (e.g.
"Tu mensaje fue enviado correctamente.").Database ID of the newly created contact submission record.
Error codes
| Status | Cause |
|---|---|
422 Unprocessable Entity | Validation failed — required fields missing, malformed, or no valid active channel could be resolved |
429 Too Many Requests | Rate limit exceeded (10 requests/minute per IP) |
403 Forbidden | Cloudflare Turnstile validation failed — the provided turnstile_token was rejected by the Cloudflare API |
Cloudflare Turnstile validation is performed entirely server-side using the
CLOUDFLARE_TURNSTILE_SECRET_KEY environment variable. When this key is configured, every request must include a valid turnstile_token or the submission will be rejected with a 422 response. Set CLOUDFLARE_TURNSTILE_SECRET_KEY in your .env to enable or disable this protection.Downstream processing
After a submission is persisted, iLeben dispatches aCreateSalesforceCaseJob synchronously (via dispatchSync) when Salesforce Lead sync is enabled (SALESFORCE_LEAD_ENABLED=true). This job:
- Maps the submission fields to the correct Salesforce Lead or Case object based on the channel
- Includes full UTM field mapping aligned with Salesforce custom fields (
Proyect_ID__c, etc.) - Automatically enriches
proyecto_salesforce_idby looking up the project record when a project name or slug is provided infields - Is monitored via the Filament admin panel under Contacto → Submissions, which shows sync status and allows manual re-synchronization