Developer API

AutoGlass CRM API Reference

Integrate your website and other systems with the CRM. Send in leads, and more over time — every endpoint here is documented with request fields, responses and copy-paste examples.

https://www.autoglass-crm.com

Overview

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:

http
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.

Website Leads

Live

Turn a website contact / quote form into a CRM lead. Each submission becomes a Lead tagged 🌐 Website, attributed to the originating site.

POSThttps://www.autoglass-crm.com/api/public/leads

Request body

JSON. phone is the only strictly required field, plus a name (name, or firstName + lastName).

FieldTypeRequiredNotes
namestringname or firstFull name; split into first/last automatically.
firstNamestringname or firstUse instead of name if you have separate fields.
lastNamestringoptionalOptional.
phonestringrequiredMinimum 7 characters.
emailstringoptionalValidated if present.
vinstringoptionalRecommended — drives accurate glass lookup.
yearnumberoptional1900–2100.
makestringoptionalOptional.
modelstringoptionalOptional.
serviceTypestringoptionalFree text e.g. "windshield repair" — mapped to a job type.
jobTypestringoptionalSame as serviceType; either works.
addressstringoptionalService location.
citystringoptional
statestringoptional
zipstringoptional
messagestringoptionalCustomer message → stored as customer notes.
websitestringoptionalOriginating page/site; overrides auto-detected source.
shopIdstringoptionalRoute the lead to a specific shop.
sourcestringoptionalPublic source only (WEBSITE, GOOGLE, FACEBOOK…). Defaults WEBSITE.

Responses

201Created. { "ok": true, "leadNumber": "LD-2026-000045", "id": "…" }
400Body was not valid JSON.
401Missing, unknown, or revoked API key.
422Validation failed — body includes issues.fieldErrors.
500Could not save the lead — retry.

Examples

bash
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 = WEBSITE and 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.

Ready to connect a website?

Generate a key and paste in one of the snippets above.

Get an API key

More endpoints will appear here as they ship. Questions? Contact your CRM administrator.