{"openapi":"3.0.3","info":{"title":"QuiQSol Public API","version":"1.0.0","description":"The QuiQSol public API lets an external application or agent read and create CRM records in one tenant workspace, scoped and authenticated by an API key generated from Settings → Developer Platform in the QuiQSol app.","contact":{"email":"hello@quiqsol.com","url":"https://quiqsol.com/developers"}},"servers":[{"url":"https://api.quiqsol.com/public/v1","description":"Production"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"http","scheme":"bearer","description":"An API key created under Settings → Developer Platform, sent as `Authorization: Bearer <key>`. The key resolves to one tenant workspace, every request is scoped to that tenant only."}},"schemas":{"Contact":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Ticket":{"type":"object","properties":{"id":{"type":"string"},"ticketNumber":{"type":"string","example":"TICK-00042"},"subject":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["NEW","OPEN","PENDING","ON_HOLD","RESOLVED","CLOSED"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"LeadInput":{"type":"object","required":["firstName","lastName"],"properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"companyName":{"type":"string"},"source":{"type":"string","description":"Defaults to \"WEBSITE\" when omitted."},"customFields":{"type":"object","additionalProperties":true,"description":"Keys must match a Lead custom field already defined under Settings → Custom Fields for this tenant."}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/contacts":{"get":{"summary":"List contacts","tags":["Contacts"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100},"description":"Max records to return (capped at 100)."}],"responses":{"200":{"description":"Contacts belonging to the authenticated tenant.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}}}}},"401":{"description":"Missing, invalid, or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tickets":{"get":{"summary":"List tickets","tags":["Tickets"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100},"description":"Max records to return (capped at 100)."}],"responses":{"200":{"description":"Tickets belonging to the authenticated tenant.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}}}}},"401":{"description":"Missing, invalid, or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/leads":{"post":{"summary":"Create a lead","description":"Intended for website form capture: point a form builder’s webhook/custom-post feature straight at this endpoint.","tags":["Leads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadInput"}}}},"responses":{"201":{"description":"Lead created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}}}}}},"400":{"description":"Validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}