ByDomuDevelopers

Enviar formulario de contacto

POSThttps://api.bydomu.com/v1/leads

This reference is generated from the API’s code, so descriptions are in Spanish. Names, parameters and examples are the same in every language.

Registra un lead desde un formulario web: crea o actualiza el contacto, suma la analítica del portal y dispara el webhook LEAD_CREATED / lead.submitted. Pensado para claves publicables.

Permission required

leads:write

Required header

X-API-Key · publishable or secret key

Access level

Level 1 · no request

Headers

1 · all optional
Idempotency-Keystring · optional
Clave única de la operación (8-128 caracteres de [a-zA-Z0-9._:-]). Un reintento con la misma clave y el mismo cuerpo devuelve la respuesta original sin repetir la operación. Vive 24 horas.8–128 chars

Body (JSON)

13 · 2 required
firstNamestring · required
2–100 chars
phonestring · required
7–20 chars
emailstring | string · optional
messagestring · optional
≤ 1000 chars
propertyIdstring · optional
interestedInstring · optional
SALE · RENT · SALE_OR_RENT
See the other 7 parameters
searchobject · optional
ownerobject · optional
adCampaignIdstring · optional
utmSourcestring · optional
≤ 100 chars
utmMediumstring · optional
≤ 100 chars
utmCampaignstring · optional
≤ 200 chars
utmContentstring · optional
≤ 200 chars

Response 201

SuccessFlag · 1 fields
dataLa operación se aceptó.
successbooleantrue

Possible errors

shaped as { "error": { "code", "message" } }
  • 400Datos inválidos: el cuerpo o la query no cumplen el esquema, o `Idempotency-Key` está mal formada.
  • 401UNAUTHORIZED
  • 402PAYMENT_REQUIRED
  • 403FORBIDDEN
  • 409DUPLICATE
  • 429RATE_LIMITED
  • 500INTERNAL_ERROR
RequestPOST/v1/leads
Official SDK · @bydomu/sdk · not on npm yet
import { ByDomu } from "@bydomu/sdk";

const bydomu = new ByDomu({
  apiKey: process.env.BYDOMU_API_KEY,
});

const { data } = await bydomu.leads.submit({
  "firstName": "María",
  "phone": "+573001234567",
  "email": "[email protected]",
  "message": "Me interesa conocer más sobre este apartamento",
  "propertyId": "clx1prop001",
  "interestedIn": "SALE",
  "utmSource": "google"
});
201 Created · example
{
  "data": {
    "success": true
  }
}