EngineRoom Documentation
  • Documentation
    • EngineRoom Documentation
  • EngineRoom Pixel
    • Setup
      • Webflow
      • WordPress
      • Shopify
      • Google Tag Manager
    • UTM Parameters
  • Conversion AI
    • How we use AI for Conversions
    • Quality scores
    • Session engagement scores
  • WildJar
    • Setup
  • API
    • Overview
    • Quick Start
    • Authentication
    • API Reference
      • Leads
      • Sales
      • Webhooks
      • Users
    • Rate Limits
  • Prompt Engine
    • Overview
  • AI Copilot
    • Overview
Powered by GitBook
On this page
  1. API
  2. API Reference

Leads

Use the REST API to interact with Leads

PreviousAPI ReferenceNextSales

Last updated 1 year ago

List leads

Creating a new lead

Get lead

Retrieve leads

get

Retrieve a list of leads

Authorizations
Header parameters
AcceptstringRequired

Setting to application/json is recommended

Example: application/json
Responses
200
Success
application/json
401
Unauthorised
application/json
get
GET /public/leads HTTP/1.1
Host: api2.engineroom.com.au
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
[
  {
    "id": "751dd3d0-23ae-4a4a-9049-6982423da87a",
    "type": "form",
    "google_client_id": 123456789.98765433,
    "lead_date": "2023-01-01 10:30:00",
    "name": "John Smith",
    "email": "johnsmith@emails.xyz",
    "phone": "0411 111 111",
    "message": "I'm looking for a price for a car service",
    "web_source": "google",
    "web_campaign": "Location Based",
    "web_medium": "paid",
    "web_keyword": "Sydney Car Service",
    "quality_score": 6.5,
    "engagement_score": 8,
    "form_name": "Contact Us",
    "url": "https://www.sydcarservice.xyz/contact-us",
    "data": {
      "make": "Nissan",
      "year": 2022,
      "model": "X-Trail"
    },
    "link": "https://app.engineroom.com.au/leads/751dd3d0-23ae-4a4a-9049-6982423da87a&business=46580dbc-da00-4316-9a2d-c04a133741aa",
    "business": {
      "id": "46580dbc-da00-4316-9a2d-c04a133741aa",
      "name": "XYZ Car Servicing"
    }
  }
]

Retrieve lead

get

Retrieve a single lead

Authorizations
Path parameters
idstringRequired

Lead ID

Example: 751dd3d0-23ae-4a4a-9049-6982423da87a
Header parameters
AcceptstringRequired

Setting to application/json is recommended

Example: application/json
Responses
200
Success
application/json
401
Unauthorised
application/json
get
GET /public/leads/{id} HTTP/1.1
Host: api2.engineroom.com.au
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
{
  "id": "751dd3d0-23ae-4a4a-9049-6982423da87a",
  "type": "form",
  "google_client_id": 123456789.98765433,
  "lead_date": "2023-01-01 10:30:00",
  "name": "John Smith",
  "email": "johnsmith@emails.xyz",
  "phone": "0411 111 111",
  "message": "I'm looking for a price for a car service",
  "web_source": "google",
  "web_campaign": "Location Based",
  "web_medium": "paid",
  "web_keyword": "Sydney Car Service",
  "quality_score": 6.5,
  "engagement_score": 8,
  "form_name": "Contact Us",
  "url": "https://www.sydcarservice.xyz/contact-us",
  "data": {
    "make": "Nissan",
    "year": 2022,
    "model": "X-Trail"
  },
  "link": "https://app.engineroom.com.au/leads/751dd3d0-23ae-4a4a-9049-6982423da87a&business=46580dbc-da00-4316-9a2d-c04a133741aa",
  "business": {
    "id": "46580dbc-da00-4316-9a2d-c04a133741aa",
    "name": "XYZ Car Servicing"
  }
}
  • List leads
  • GETRetrieve leads
  • Creating a new lead
  • POSTCreate a new lead
  • Get lead
  • GETRetrieve lead

Create a new lead

post

Create a new lead entry

Authorizations
body
lead_datastringOptional

Datetime value the lead was created at, leave blank for current timestamp

Example: 2023-01-01 10:30:00
namestringOptional

Lead Name

Example: John Smith
emailstringOptional

Lead Email Address

Example: johnsmith@emails.xyz
phonestringOptional

Lead Phone Number

Example: 0411 111 111
messagestringOptional

Message / Content from Form

Example: I'm looking for a price for a car service
google_client_idstringOptional

Google Client ID

Example: 123456789.98765433
web_sourcestringOptional

Source of Lead E.g "google" or "direct"

Example: google
web_campaignstringOptional

Campaign Attribution

Example: Location Based
web_mediumstringOptional

Medium Attribution E.g "paid" or "organic"

Example: paid
web_keywordstringOptional

Keyword Attribution

Example: Sydney Car Service
form_namestringOptional

Name of form lead completed

Example: Contact Us
urlstringOptional

URL of Lead Acquisition

Example: https://www.sydcarservice.xyz/contact-us
datastringOptional

Additional Information (JSON String)

Example: {"make": "Nissan", "model": "X-Trail", "year": "2022"}
Header parameters
AcceptstringRequired

Request content type

Example: application/json
Responses
201
Lead created successfully
application/json
400
Invalid input
post
POST /public/leads HTTP/1.1
Host: api2.engineroom.com.au
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
{
  "message": "Lead created successfully.",
  "data": {
    "id": "b0a00e1a-7748-4c68-acd1-36bc74ec0b7b",
    "type": "form",
    "google_client_id": 123456789.98765433,
    "lead_date": "2023-01-30T03:21:49.005548Z",
    "name": "John Smith",
    "email": "johnsmith@emails.xyz",
    "phone": "0411 111 111",
    "message": "I'm looking for a price for a car service",
    "web_source": "google",
    "web_campaign": "Location Based",
    "web_medium": "paid",
    "web_keyword": "Sydney Car Service",
    "url": "https://www.sydcarservice.xyz/contact-us",
    "data": {
      "make": "Nissan",
      "model": "X-Trail",
      "year": "2022"
    },
    "link": "https://app.engineroom.com.au/leads/b0a00e1a-7748-4c68-acd1-36bc74ec0b7b&business=cb50eb42-22b3-4df4-bbcd-efcd9694f3f8\"",
    "business": {
      "id": "cb50eb42-22b3-4df4-bbcd-efcd9694f3f8",
      "name": "XYZ Car Servicing"
    }
  }
}