Lead ingestion

Lead Post Webhook API

Post one JSON lead at a time into TECOBI for lead creation, matching, assignment, appointment creation, and follow-up.

Current v4 Updated Aug 12, 2026
POST /api/v4/webhooks/lead-post/

Overview

The Lead Post Webhook API accepts one JSON lead per request. TECOBI uses the supplied contact data to create a lead or link the request to an existing lead, then applies supported metadata, assignment, appointment, and comments fields.

Before you begin: Request an active client API key from your TECOBI representative. Keep the key server-side and never expose it in browser JavaScript or a public repository.

Bulk arrays are not supported. Send each lead as a separate request.

Endpoint

POST /api/v4/webhooks/lead-post/
Content-Type: application/json
x-tecobi-api-key: <client-api-key>

Authentication

Include the active client’s API key in the x-tecobi-api-key request header.

HeaderRequiredAccepted valueNotes
x-tecobi-api-keyYesActive TECOBI client API keyMissing or invalid keys return 400 Bad Request.

Payload requirements

The request body must be a JSON object. At least one of these contact values must be present for TECOBI to create or link a CRM lead:

  • phone_number
  • phone
  • customData.phone_number
  • email
  • customData.email

If no phone or email is supplied, the endpoint can still return 201 Created, but no CRM lead is created.

Unknown fields are retained in the raw webhook payload, but they do not affect lead creation unless they are listed in this reference.

Request examples

Minimal request

{
  "first_name": "Jane",
  "last_name": "Customer",
  "phone_number": "15551234567",
  "email": "jane@example.com",
  "classification": "Sales"
}

Complete request

{
  "lead_id": "abc-123",
  "service": 5579,
  "language_code": "en",
  "classification": "Sales",
  "first_name": "Jane",
  "last_name": "Customer",
  "phone_number": "15551234567",
  "email": "jane@example.com",
  "company": "Acme Co",
  "address_1": "123 Main St",
  "address_2": "Suite 4",
  "city": "Denver",
  "state": "Colorado",
  "zip_code": "80202",
  "assigned_to": "salesperson@exampledealer.com",
  "sales_manager_email": "manager@exampledealer.com",
  "appointment_time": "2026-08-12T15:00:00-06:00",
  "appointment_notes": "Wants to test drive",
  "appointment_location": "Showroom",
  "comments": {
    "Vehicle": "F-150",
    "Budget": "$45k"
  }
}

cURL request

curl --request POST \
  --url 'https://<tecobi-api-origin>/api/v4/webhooks/lead-post/' \
  --header 'Content-Type: application/json' \
  --header 'x-tecobi-api-key: <client-api-key>' \
  --data '{
    "first_name": "Jane",
    "last_name": "Customer",
    "phone_number": "15551234567",
    "email": "jane@example.com",
    "classification": "Sales"
  }'

Use the API origin supplied with your TECOBI client credentials.

Field reference

Lead identity

FieldTypeRequiredAccepted valuesBehavior
lead_idString or numberNoAny external identifierStored as the external lead ID.
contact_idString or numberNoAny external identifierFallback external lead ID when lead_id is absent.
first_nameStringNoAny non-empty stringSaved as the first name. Defaults to Unknown.
last_nameStringNoAny non-empty stringSaved as the last name. Defaults to Unknown.
customData.first_nameStringNoAny non-empty stringFallback when top-level first_name is absent or Unknown.
customData.last_nameStringNoAny non-empty stringFallback when top-level last_name is absent or Unknown.

Contact information

FieldTypeRequiredAccepted valuesBehavior
phone_numberStringConditionallyUS number with or without +1, spaces, dashes, dots, or parenthesesPreferred phone field. Normalized toward +1XXXXXXXXXX and matched within the client.
phoneStringConditionallySame as phone_numberFallback phone field.
customData.phone_numberStringConditionallySame as phone_numberNested fallback phone field.
emailStringConditionallyEmail addressPreferred email field. Used for matching when no phone is available.
customData.emailStringConditionallyEmail addressNested fallback email field.

At least one phone or email field is required for a lead to be created or linked.

Lead metadata

FieldTypeRequiredAccepted valuesBehavior
classificationStringNoSales, Reseller, Service, Parts, Employment, Collections, Service CanceledDefaults to Sales. Send a valid CRM classification. The database field is limited to 16 characters.
serviceInteger or integer stringNoExisting LeadProviderService.idDefaults to 5579. Resolves provider, master provider, and service when the ID exists.
customData.ServiceInteger or integer stringNoExisting LeadProviderService.idFallback service ID. The capital S is required.
language_codeStringNoExisting Language.codePreferred language code.
languageStringNoExisting Language.codeFallback when language_code is absent.

Assignment and roles

Each role accepts the email of an active user on the client. Send it at the top level or inside customData with the same key. An unmatched email does not fail the request; TECOBI creates an internal warning note.

FieldTypeRequiredMaps to
assigned_toStringNoLead assignee
secondary_rep_emailStringNoSecondary representative
salesperson_2StringNoSecondary representative
sales_manager_emailStringNoSales manager
bdc_rep_emailStringNoBDC representative
finance_manager_emailStringNoFinance manager
service_rep_emailStringNoService representative
parts_rep_emailStringNoParts representative

Address and company

FieldTypeRequiredAccepted valuesBehavior
company_nameStringNoAny stringSaved as the lead company name.
companyStringNoAny stringFallback company name.
addressStringNoAny stringPrimary street address. Can also provide a recognizable state fallback.
address_1, address1, streetStringNoAny stringPrimary street address fallbacks.
address_2, address2StringNoAny stringAppended to the primary address.
cityStringNoAny stringSaved as the lead city.
stateStringNoTwo-letter abbreviation or full US state nameRecognized full names are converted to abbreviations.
postal_code, postalcode, zip, zip_code, zipcodeStringNoAny stringSaved as the lead postal code.

Appointments

Appointment fields can be sent at the top level or inside customData with the same key.

FieldTypeRequiredAccepted valuesBehavior
appointment_timeStringNoDate/time string parseable by the APICreates an appointment when valid. Naive times use the client’s timezone and are converted to UTC. Invalid values produce an internal warning, not a failed request. Duplicate active appointments at the same time are ignored.
appointment_notesStringNoAny stringSaved as appointment notes.
appointment_locationStringNoAny stringSaved as the appointment location.

Notes and comments

FieldTypeRequiredAccepted valuesBehavior
question_responses_lead_idStringNoPipe-delimited stringSplit on `
commentsAny JSON valueNoString, object, array, or other JSON valueCreates an internal comments message and is included in the generated inbound message.
message.bodyStringNoAny stringFallback comments source when comments is absent.
customData.inquiry_detailsStringNoAny stringFinal comments fallback.

Comments are normalized as follows:

  • Object values become key: value lines.
  • Array values become one line per non-empty item.
  • String values are retained as text.
  • Pipe-and-colon strings such as Color: Red|Trim: XLT become separate key: value lines.

Nested custom data

customData must be a JSON object. It provides fallback values for selected fields. Unknown nested keys remain in the raw payload but are ignored during lead creation.

Supported keys are phone_number, email, first_name, last_name, Service, all assignment and role keys, all appointment keys, and inquiry_details.

Lead processing behavior

Phone leads

TECOBI removes common punctuation and normalizes US phone values toward +1 format. Leads are matched by client and normalized number. Existing matching leads are reactivated to an active, fresh status when applicable.

Email-only leads

When no phone is supplied, TECOBI attempts to match an existing client lead by normalized email and compatible first and last name. If no match is found, it creates a new web lead.

New-lead defaults

Lead fieldDefault behavior
status_id1
lead_typeSMS with a phone number; otherwise Web
lead_statusNew
twilio_numberClient default number
scriptScript assigned to the client default number
classificationRequest value, defaulting to Sales
provider, master_provider, serviceDerived from the resolved LeadProviderService

Responses

Success

HTTP/1.1 201 Created
Content-Type: application/json

{}

The success body is always an empty JSON object and does not include the created or matched lead ID.

Missing API key

HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "message": "x-tecobi-api-key header is required."
}

Invalid API key

HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "message": "x-tecobi-api-key is not valid."
}

Implementation notes

  • A valid request can return 201 Created without creating a CRM lead when no phone or email is supplied.
  • Unknown fields are stored in the raw webhook payload but ignored by lead creation.
  • Invalid role emails and invalid appointment times create internal warnings instead of failing the request.
  • Lead creation is attempted synchronously during the request.
  • Send exactly one lead per request.

Search TECOBI

Search the blog, customer stories, and platform pages.

Search TECOBI content by product, industry, resource, integration, article, or customer story topic.

Start typing to search TECOBI content.