AutoGlass CRM API Reference
Integrate your website and other systems with the CRM: embed the instant-quote widget (price + online booking), or send in leads from any contact form — every endpoint here is documented with request fields, responses and copy-paste examples.
https://www.autoglass-crm.comOverview
The CRM exposes a small, focused HTTP API. All requests and responses are JSON, sent over HTTPS. You authenticate with an API key you generate inside the CRM. CORS is enabled, so you can call the public endpoints directly from browser JavaScript on your own website.
REST + JSON
Plain HTTPS requests with JSON bodies — no SDK required.
API-key auth
Per-website keys, generated and revoked in Settings.
Copy-paste ready
cURL, fetch and a full HTML form for every endpoint.
Authentication
Create a key in Settings → Website Leads (Admin only). You can issue one key per website, see how many leads each has received, and disable or delete a key at any time. The full key (format agk_…) is shown once — copy it immediately.
Send the key on every request in either header:
X-API-Key: agk_9f3a1b…
# — or —
Authorization: Bearer agk_9f3a1b…A key used in browser code is visible to visitors. That's acceptable for lead intake (it can only create leads and can be revoked), but for full secrecy proxy the request through your own server and add the header there.
Quote Widget
LiveThe embeddable instant-quote funnel: a visitor enters their ZIP and vehicle (VIN or year/make/model), leaves their contact info — a Lead is created that instant — then sees their price (choosing between glass options when several fit) and can book an appointment on the spot. Booking converts the lead into a client + job, ready to dispatch.
Drop-in embed (recommended)
Two lines on any website — plain HTML, WordPress, Webflow, React. It renders in a Shadow DOM (no CSS conflicts), and all branding, wording, colors and booking behaviour are managed centrally in Settings → Quote Widget — edits there go live on every site without touching them.
<div data-autoglass-quote data-api-key="agk_your_key"></div>
<script src="https://www.autoglass-crm.com/embed/quote-widget.js" async></script>Container options
Optional data-* attributes override the CRM-configured values for that page only:
| Attribute | Purpose |
|---|---|
| data-api-key | Required. The site's key (agk_…). |
| data-shop-id | Route the lead + pricing to a specific shop. |
| data-accent | Accent color (any CSS color). |
| data-theme | "light" or "dark". |
| data-company | Company name shown in the widget header. |
| data-phone | Phone number for the "call us" buttons. |
| data-title / data-subtitle / data-cta / data-disclaimer | Wording overrides. |
| data-compare-percent | "Other companies charge" markup %. 0 hides the comparison. |
| data-source | Attribution label stored on the lead (default WEBSITE). |
Under the hood (build your own UI)
The widget drives these public endpoints — all JSON, CORS-enabled, authenticated with the same X-API-Key header. The follow-up calls reference the lead through the signed bookingToken returned by POST /api/public/quote, so a visitor can only act on their own quote. Prices are final customer prices — vendor costs and part numbers are never exposed.
https://www.autoglass-crm.com/api/public/quote/configBranding, texts, services, booking days/windows — merged from the CRM settings.
https://www.autoglass-crm.com/api/public/quote/vehicle-optionsCascading Year → Make → Model → Body lists (?type=years|makes|models|bodies).
https://www.autoglass-crm.com/api/public/quoteCreate the lead. With deferQuote:true returns instantly (quote:null + bookingToken); without it, also prices in the same call.
https://www.autoglass-crm.com/api/public/quote/pricePhase two: price the saved lead (slow — live vendor lookup; show progress). Updates the lead with the shown options.
https://www.autoglass-crm.com/api/public/quote/selectRecord which glass option the customer picked — stored on the lead.
https://www.autoglass-crm.com/api/public/quote/bookBook a day (tomorrow+) + Morning/Evening window + address. Converts the lead: client + job appear in the CRM.
https://www.autoglass-crm.com/api/public/quote/placesAddress autocomplete for the booking form (server-side Google Places proxy).
Full request/response schemas and a step-by-step integration recipe live in the repo doc docs/embeddable-quote-widget.md.
Website Leads
LiveTurn a website contact / quote form into a CRM lead. Each submission becomes a Lead tagged 🌐 Website, attributed to the originating site.
https://www.autoglass-crm.com/api/public/leadsRequest body
JSON. phone is the only strictly required field, plus a name (name, or firstName + lastName).
| Field | Type | Required | Notes |
|---|---|---|---|
| name | string | name or first | Full name; split into first/last automatically. |
| firstName | string | name or first | Use instead of name if you have separate fields. |
| lastName | string | optional | Optional. |
| phone | string | required | Minimum 7 characters. |
| string | optional | Validated if present. | |
| vin | string | optional | Recommended — drives accurate glass lookup. |
| year | number | optional | 1900–2100. |
| make | string | optional | Optional. |
| model | string | optional | Optional. |
| serviceType | string | optional | Free text e.g. "windshield repair" — mapped to a job type. |
| jobType | string | optional | Same as serviceType; either works. |
| address | string | optional | Service location. |
| city | string | optional | — |
| state | string | optional | — |
| zip | string | optional | — |
| message | string | optional | Customer message → stored as customer notes. |
| website | string | optional | Originating page/site; overrides auto-detected source. |
| shopId | string | optional | Route the lead to a specific shop. |
| source | string | optional | Public source only (WEBSITE, GOOGLE, FACEBOOK…). Defaults WEBSITE. |
Responses
Examples
curl -X POST https://www.autoglass-crm.com/api/public/leads \
-H "Content-Type: application/json" \
-H "X-API-Key: agk_9f3a1b…" \
-d '{
"name": "Jane Doe",
"phone": "555-123-4567",
"email": "jane@example.com",
"vin": "1HGCM82633A004352",
"serviceType": "windshield repair",
"message": "Rock chip on the highway"
}'What happens to the lead
- • Created with
source = WEBSITEand a unique number (LD-YYYY-NNNNNN). - • Attributed to the originating website (stored on the lead and shown with a 🌐 Website flag).
- • Routed to a shop: payload
shopId→ default shop → the only active shop. - • Appears instantly in Leads, newest first.
Hostinger guide
No-codeHave a website built on Hostinger? You can connect it without writing any code — paste one block into an Embed element. This works for the Hostinger Website Builder, WordPress, or a plain HTML site.
- 1In the CRM, go to Settings → Website Leads, create a key (optionally routed to a shop), and copy it.
- 2In Hostinger Website Builder → Add element → Advanced → Embed code (WordPress: use the free WPCodeplugin as an HTML snippet; plain HTML: paste inside
<body>). - 3Paste the block below, replace
agk_PASTE_YOUR_KEY_HEREwith your key, then Publish.
<!-- AutoGlass CRM lead form -->
<form id="agc-lead-form" style="max-width:480px;display:grid;gap:10px">
<input name="name" placeholder="Full name*" required />
<input name="phone" placeholder="Phone*" required />
<input name="email" type="email" placeholder="Email" />
<input name="vin" placeholder="VIN (windshield / door jamb)" />
<select name="service">
<option value="WINDSHIELD_REPLACEMENT">Windshield replacement</option>
<option value="WINDSHIELD_REPAIR">Windshield chip / crack repair</option>
<option value="DOOR_GLASS_FRONT_LEFT">Door glass — front left</option>
<option value="DOOR_GLASS_FRONT_RIGHT">Door glass — front right</option>
<option value="DOOR_GLASS_REAR_LEFT">Door glass — rear left</option>
<option value="DOOR_GLASS_REAR_RIGHT">Door glass — rear right</option>
<option value="BACK_GLASS">Back glass / rear window</option>
<option value="OTHER">Something else</option>
</select>
<textarea name="message" placeholder="Tell us what happened" rows="3"></textarea>
<button type="submit">Request a quote</button>
<p id="agc-status"></p>
</form>
<script>
(function () {
var CRM_ENDPOINT = "https://www.autoglass-crm.com/api/public/leads";
var API_KEY = "agk_PASTE_YOUR_KEY_HERE"; // from Settings → Website Leads
var form = document.getElementById("agc-lead-form");
var status = document.getElementById("agc-status");
form.addEventListener("submit", function (e) {
e.preventDefault();
status.textContent = "Sending…";
fetch(CRM_ENDPOINT, {
method: "POST",
headers: { "Content-Type": "application/json", "X-API-Key": API_KEY },
body: JSON.stringify({
name: form.name.value, phone: form.phone.value, email: form.email.value,
vin: form.vin.value, jobType: form.service.value,
message: form.message.value, website: location.hostname
})
})
.then(function (r) { return r.json(); })
.then(function (d) { form.reset(); status.textContent = d.ok ? "Thanks! We'll be in touch." : "Please check your details."; })
.catch(function () { status.textContent = "Something went wrong — please call us."; });
});
})();
</script>The endpoint is already filled in with your CRM domain. Only the API key needs replacing.
Open the full Hostinger guideReady to connect a website?
Generate a key and paste in one of the snippets above.
More endpoints will appear here as they ship. Questions? Contact your CRM administrator.