Documentação

ReferênciaLeads

Registrar lead

POST
/leads
X-API-Key<token>

Chave de API (prefixo nbr_) ou Token de Acesso Pessoal (prefixo pat_)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Informe contact ou party_id.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/leads" \  -H "Content-Type: application/json" \  -d '{    "purpose": "compra"  }'
{  "lead": {    "id": "led_abc123",    "party_id": "string",    "source": "olx",    "purpose": "compra",    "source_reference": "string",    "raw_payload": {},    "property_id": "string",    "message": "string",    "stage": "novo",    "discard_reason": "string",    "qualified_at": "2019-08-24T14:15:22Z",    "discarded_at": "2019-08-24T14:15:22Z",    "deal_id": "string",    "assigned_user_id": "string",    "assigned_at": "2019-08-24T14:15:22Z",    "first_response_at": "2019-08-24T14:15:22Z",    "sla_due_at": "2019-08-24T14:15:22Z",    "held": true,    "custom_fields": {},    "search_profile": {      "property_types": [        "apartment"      ],      "cities": [        "string"      ],      "districts": [        "string"      ],      "price_min": 0,      "price_max": 0,      "bedrooms_min": 0,      "area_min": 1,      "notes": "string"    },    "contact_name": "string",    "contact_phone": "string",    "assigned_user_name": "string",    "tenant_id": "string",    "organization_id": "string",    "visibility": "restricted",    "created_by": "string",    "created_at": "2019-08-24T14:15:22Z",    "updated_by": "string",    "updated_at": "2019-08-24T14:15:22Z"  },  "party_created": true,  "candidates": [    {      "party": {        "id": "pty_abc123",        "type": "person",        "document_number": "string",        "email": "string",        "phone": "string",        "full_name": "string",        "nationality": "string",        "profession": "string",        "marital_status": "string",        "marriage_regime": "string",        "prenuptial_agreement": {},        "birthdate": "2019-08-24T14:15:22Z",        "company_name": "string",        "cep": "string",        "street": "string",        "number": "string",        "complement": "string",        "district": "string",        "city": "string",        "state": "string",        "merged_into_id": "pty_def456",        "merged_at": "2019-08-24T14:15:22Z",        "merged_by_actor_id": "string",        "merged_by_actor_type": "user",        "tenant_id": "string",        "organization_id": "string",        "visibility": "restricted",        "created_at": "2019-08-24T14:15:22Z",        "updated_at": "2019-08-24T14:15:22Z",        "created_by": "string",        "updated_by": "string"      },      "reasons": [        {          "kind": "phone",          "value": "string"        }      ]    }  ],  "needs_routing": true,  "duplicate": true}
{  "lead": {    "id": "led_abc123",    "party_id": "string",    "source": "olx",    "purpose": "compra",    "source_reference": "string",    "raw_payload": {},    "property_id": "string",    "message": "string",    "stage": "novo",    "discard_reason": "string",    "qualified_at": "2019-08-24T14:15:22Z",    "discarded_at": "2019-08-24T14:15:22Z",    "deal_id": "string",    "assigned_user_id": "string",    "assigned_at": "2019-08-24T14:15:22Z",    "first_response_at": "2019-08-24T14:15:22Z",    "sla_due_at": "2019-08-24T14:15:22Z",    "held": true,    "custom_fields": {},    "search_profile": {      "property_types": [        "apartment"      ],      "cities": [        "string"      ],      "districts": [        "string"      ],      "price_min": 0,      "price_max": 0,      "bedrooms_min": 0,      "area_min": 1,      "notes": "string"    },    "contact_name": "string",    "contact_phone": "string",    "assigned_user_name": "string",    "tenant_id": "string",    "organization_id": "string",    "visibility": "restricted",    "created_by": "string",    "created_at": "2019-08-24T14:15:22Z",    "updated_by": "string",    "updated_at": "2019-08-24T14:15:22Z"  },  "party_created": true,  "candidates": [    {      "party": {        "id": "pty_abc123",        "type": "person",        "document_number": "string",        "email": "string",        "phone": "string",        "full_name": "string",        "nationality": "string",        "profession": "string",        "marital_status": "string",        "marriage_regime": "string",        "prenuptial_agreement": {},        "birthdate": "2019-08-24T14:15:22Z",        "company_name": "string",        "cep": "string",        "street": "string",        "number": "string",        "complement": "string",        "district": "string",        "city": "string",        "state": "string",        "merged_into_id": "pty_def456",        "merged_at": "2019-08-24T14:15:22Z",        "merged_by_actor_id": "string",        "merged_by_actor_type": "user",        "tenant_id": "string",        "organization_id": "string",        "visibility": "restricted",        "created_at": "2019-08-24T14:15:22Z",        "updated_at": "2019-08-24T14:15:22Z",        "created_by": "string",        "updated_by": "string"      },      "reasons": [        {          "kind": "phone",          "value": "string"        }      ]    }  ],  "needs_routing": true,  "duplicate": true}
{  "type": "validation",  "title": "Validation Failed",  "status": 400,  "detail": "name is required",  "code": "validation.required",  "instance": "/public/v1/brokers",  "request_id": "req_abc123",  "timestamp": "2026-02-15T12:00:00Z",  "documentation_url": "https://docs.nobur.com.br/errors/validation",  "errors": [    {      "field": "name",      "message": "name is required",      "code": "validation.broker.name_required"    }  ]}
{  "type": "unauthorized",  "title": "Authentication Required",  "status": 401,  "detail": "authentication required",  "code": "unauthorized.auth_required",  "request_id": "req_abc123",  "timestamp": "2026-02-15T12:00:00Z",  "documentation_url": "https://docs.nobur.com.br/errors/unauthorized"}
{  "type": "forbidden",  "title": "Access Denied",  "status": 403,  "detail": "insufficient permissions",  "code": "forbidden.insufficient_permissions",  "request_id": "req_abc123",  "timestamp": "2026-02-15T12:00:00Z",  "documentation_url": "https://docs.nobur.com.br/errors/forbidden"}
{  "type": "rate_limit",  "title": "Rate Limit Exceeded",  "status": 429,  "detail": "rate limit exceeded",  "code": "rate_limit.exceeded",  "retry_after": 60,  "request_id": "req_abc123",  "timestamp": "2026-02-15T12:00:00Z",  "documentation_url": "https://docs.nobur.com.br/errors/rate-limit"}
{  "type": "internal",  "title": "Internal Server Error",  "status": 500,  "detail": "an unexpected error occurred",  "code": "internal.unexpected",  "request_id": "req_abc123",  "timestamp": "2026-02-15T12:00:00Z",  "documentation_url": "https://docs.nobur.com.br/errors/internal"}