{"openapi":"3.0.3","info":{"title":"Clientwright API","version":"1.0.0","description":"REST API for Clientwright. Authenticate with a workspace API key as a Bearer token."},"servers":[{"url":"https://clientwright.com/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}},"Contacts":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"domain":{"type":"string"},"address_line1":{"type":"string"},"address_line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"},"owner_id":{"type":"string","format":"uuid"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true,"description":"Custom field values by key"},"title":{"type":"string"},"lead_status":{"type":"string"},"lead_score":{"type":"number"}}},"ContactsInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"domain":{"type":"string"},"address_line1":{"type":"string"},"address_line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"},"owner_id":{"type":"string","format":"uuid"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true},"title":{"type":"string"},"lead_status":{"type":"string"}},"additionalProperties":false},"Companies":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"domain":{"type":"string"},"address_line1":{"type":"string"},"address_line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"},"owner_id":{"type":"string","format":"uuid"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true,"description":"Custom field values by key"}}},"CompaniesInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"domain":{"type":"string"},"address_line1":{"type":"string"},"address_line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"},"owner_id":{"type":"string","format":"uuid"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true}},"additionalProperties":false},"Deals":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"close_date":{"type":"string","format":"date"},"pipeline_id":{"type":"string","format":"uuid"},"stage_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true}}},"DealsInput":{"type":"object","required":["name","pipeline_id","stage_id"],"properties":{"name":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"close_date":{"type":"string","format":"date"},"pipeline_id":{"type":"string","format":"uuid"},"stage_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true}},"additionalProperties":false},"Activities":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"type":{"type":"string","description":"call, meeting, task, email or note"},"subject":{"type":"string"},"body":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"direction":{"type":"string"},"assignee_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"deal_id":{"type":"string","format":"uuid"}}},"ActivitiesInput":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"direction":{"type":"string"},"assignee_id":{"type":"string","format":"uuid"},"party_id":{"type":"string","format":"uuid"},"deal_id":{"type":"string","format":"uuid"}},"additionalProperties":false},"Notes":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"subject":{"type":"string"},"body":{"type":"string"},"party_id":{"type":"string","format":"uuid"},"deal_id":{"type":"string","format":"uuid"}}},"NotesInput":{"type":"object","required":["body"],"properties":{"subject":{"type":"string"},"body":{"type":"string"},"party_id":{"type":"string","format":"uuid"},"deal_id":{"type":"string","format":"uuid"}},"additionalProperties":false},"Lists":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"description":{"type":"string"}}},"ListsInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"Products":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"sku":{"type":"string"},"description":{"type":"string"},"unit_price":{"type":"number"},"currency":{"type":"string"},"tax_rate":{"type":"number"},"active":{"type":"boolean"}}},"ProductsInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"sku":{"type":"string"},"description":{"type":"string"},"unit_price":{"type":"number"},"currency":{"type":"string"},"tax_rate":{"type":"number"},"active":{"type":"boolean"}},"additionalProperties":false},"Quotes":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"number":{"type":"string"},"status":{"type":"string"},"deal_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"currency":{"type":"string"},"valid_until":{"type":"string","format":"date"},"discount_percent":{"type":"number"},"notes":{"type":"string"},"total":{"type":"number"}}},"QuotesInput":{"type":"object","required":[],"properties":{"deal_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"currency":{"type":"string"},"valid_until":{"type":"string","format":"date"},"discount_percent":{"type":"number"},"notes":{"type":"string"}},"additionalProperties":false},"Tickets":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"number":{"type":"number"},"subject":{"type":"string"},"description":{"type":"string"},"party_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"priority":{"type":"string","description":"low, normal, high or urgent"},"category":{"type":"string"},"channel":{"type":"string","description":"Defaults to manual"},"assignee_id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"status_id":{"type":"string","format":"uuid"},"status_category":{"type":"string"},"sla_state":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true}}},"TicketsInput":{"type":"object","required":["subject"],"properties":{"subject":{"type":"string"},"description":{"type":"string"},"party_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"priority":{"type":"string"},"category":{"type":"string"},"channel":{"type":"string"},"assignee_id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"status_id":{"type":"string","format":"uuid"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true}},"additionalProperties":false},"Customobjectrecords":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"party_id":{"type":"string","format":"uuid"},"deal_id":{"type":"string","format":"uuid"},"custom":{"type":"object","additionalProperties":true}}},"CustomobjectrecordsInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"party_id":{"type":"string","format":"uuid"},"deal_id":{"type":"string","format":"uuid"},"custom":{"type":"object","additionalProperties":true}},"additionalProperties":false}}},"paths":{"/me":{"get":{"summary":"Check your API key","responses":{"200":{"description":"Key details"},"401":{"$ref":"#/components/responses/Error"}}}},"/contacts":{"get":{"summary":"List contacts","tags":["Contacts"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at, name, email, lead_score; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[name]","in":"query","schema":{"type":"string"}},{"name":"filter[email]","in":"query","schema":{"type":"string"}},{"name":"filter[domain]","in":"query","schema":{"type":"string"}},{"name":"filter[city]","in":"query","schema":{"type":"string"}},{"name":"filter[region]","in":"query","schema":{"type":"string"}},{"name":"filter[country]","in":"query","schema":{"type":"string"}},{"name":"filter[owner_id]","in":"query","schema":{"type":"string"}},{"name":"filter[tags]","in":"query","schema":{"type":"string"}},{"name":"filter[lead_status]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contacts"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a contact","tags":["Contacts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contacts"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/contacts/{id}":{"get":{"summary":"Get one","tags":["Contacts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contacts"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Contacts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contacts"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Contacts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/contacts":{"get":{"summary":"Polling trigger: new or updated contacts","tags":["Automation triggers"],"parameters":[{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contacts"}}}}}}}},"/companies":{"get":{"summary":"List companies","tags":["Companies"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at, name, email; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[name]","in":"query","schema":{"type":"string"}},{"name":"filter[email]","in":"query","schema":{"type":"string"}},{"name":"filter[domain]","in":"query","schema":{"type":"string"}},{"name":"filter[city]","in":"query","schema":{"type":"string"}},{"name":"filter[region]","in":"query","schema":{"type":"string"}},{"name":"filter[country]","in":"query","schema":{"type":"string"}},{"name":"filter[owner_id]","in":"query","schema":{"type":"string"}},{"name":"filter[tags]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Companies"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a companie","tags":["Companies"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompaniesInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Companies"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/companies/{id}":{"get":{"summary":"Get one","tags":["Companies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Companies"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Companies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompaniesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Companies"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Companies"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/companies":{"get":{"summary":"Polling trigger: new or updated companies","tags":["Automation triggers"],"parameters":[{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Companies"}}}}}}}},"/deals":{"get":{"summary":"List deals","tags":["Deals"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at, name, amount, close_date; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[name]","in":"query","schema":{"type":"string"}},{"name":"filter[pipeline_id]","in":"query","schema":{"type":"string"}},{"name":"filter[stage_id]","in":"query","schema":{"type":"string"}},{"name":"filter[company_id]","in":"query","schema":{"type":"string"}},{"name":"filter[contact_id]","in":"query","schema":{"type":"string"}},{"name":"filter[owner_id]","in":"query","schema":{"type":"string"}},{"name":"filter[tags]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Deals"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a deal","tags":["Deals"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealsInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deals"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/deals/{id}":{"get":{"summary":"Get one","tags":["Deals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deals"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Deals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deals"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Deals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/deals":{"get":{"summary":"Polling trigger: new or updated deals","tags":["Automation triggers"],"parameters":[{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Deals"}}}}}}}},"/activities":{"get":{"summary":"List activities","tags":["Activities"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at, occurred_at, due_at; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[type]","in":"query","schema":{"type":"string"}},{"name":"filter[subject]","in":"query","schema":{"type":"string"}},{"name":"filter[assignee_id]","in":"query","schema":{"type":"string"}},{"name":"filter[party_id]","in":"query","schema":{"type":"string"}},{"name":"filter[deal_id]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Activities"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a activitie","tags":["Activities"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivitiesInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Activities"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/activities/{id}":{"get":{"summary":"Get one","tags":["Activities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Activities"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Activities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivitiesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Activities"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Activities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/activities":{"get":{"summary":"Polling trigger: new or updated activities","tags":["Automation triggers"],"parameters":[{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Activities"}}}}}}}},"/notes":{"get":{"summary":"List notes","tags":["Notes"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[party_id]","in":"query","schema":{"type":"string"}},{"name":"filter[deal_id]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Notes"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a note","tags":["Notes"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotesInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Notes"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/notes/{id}":{"get":{"summary":"Get one","tags":["Notes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Notes"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Notes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Notes"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Notes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/notes":{"get":{"summary":"Polling trigger: new or updated notes","tags":["Automation triggers"],"parameters":[{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Notes"}}}}}}}},"/lists":{"get":{"summary":"List lists","tags":["Lists"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at, name; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[name]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lists"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a list","tags":["Lists"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListsInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lists"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/lists/{id}":{"get":{"summary":"Get one","tags":["Lists"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lists"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Lists"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lists"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Lists"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/lists":{"get":{"summary":"Polling trigger: new or updated lists","tags":["Automation triggers"],"parameters":[{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Lists"}}}}}}}},"/products":{"get":{"summary":"List products","tags":["Products"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at, name, unit_price; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[name]","in":"query","schema":{"type":"string"}},{"name":"filter[sku]","in":"query","schema":{"type":"string"}},{"name":"filter[active]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Products"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a product","tags":["Products"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Products"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/products/{id}":{"get":{"summary":"Get one","tags":["Products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Products"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Products"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Products"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/products":{"get":{"summary":"Polling trigger: new or updated products","tags":["Automation triggers"],"parameters":[{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Products"}}}}}}}},"/quotes":{"get":{"summary":"List quotes","tags":["Quotes"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at, number, total; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[number]","in":"query","schema":{"type":"string"}},{"name":"filter[status]","in":"query","schema":{"type":"string"}},{"name":"filter[deal_id]","in":"query","schema":{"type":"string"}},{"name":"filter[company_id]","in":"query","schema":{"type":"string"}},{"name":"filter[contact_id]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Quotes"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a quote","tags":["Quotes"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotesInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quotes"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/quotes/{id}":{"get":{"summary":"Get one","tags":["Quotes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quotes"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Quotes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotesInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quotes"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Quotes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/quotes":{"get":{"summary":"Polling trigger: new or updated quotes","tags":["Automation triggers"],"parameters":[{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Quotes"}}}}}}}},"/tickets":{"get":{"summary":"List tickets","tags":["Tickets"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at, number, subject; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[number]","in":"query","schema":{"type":"string"}},{"name":"filter[subject]","in":"query","schema":{"type":"string"}},{"name":"filter[party_id]","in":"query","schema":{"type":"string"}},{"name":"filter[company_id]","in":"query","schema":{"type":"string"}},{"name":"filter[priority]","in":"query","schema":{"type":"string"}},{"name":"filter[category]","in":"query","schema":{"type":"string"}},{"name":"filter[channel]","in":"query","schema":{"type":"string"}},{"name":"filter[assignee_id]","in":"query","schema":{"type":"string"}},{"name":"filter[team_id]","in":"query","schema":{"type":"string"}},{"name":"filter[status_id]","in":"query","schema":{"type":"string"}},{"name":"filter[status_category]","in":"query","schema":{"type":"string"}},{"name":"filter[sla_state]","in":"query","schema":{"type":"string"}},{"name":"filter[tags]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tickets"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a ticket","tags":["Tickets"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketsInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tickets"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/tickets/{id}":{"get":{"summary":"Get one","tags":["Tickets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tickets"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Tickets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tickets"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Tickets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/tickets":{"get":{"summary":"Polling trigger: new or updated tickets","tags":["Automation triggers"],"parameters":[{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tickets"}}}}}}}},"/objects/{object_id}":{"get":{"summary":"List custom object records","tags":["Custom object records"],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"sort","in":"query","description":"One of created_at, updated_at, name; prefix with - for descending","schema":{"type":"string","default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"created_since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"filter[id]","in":"query","schema":{"type":"string"}},{"name":"filter[name]","in":"query","schema":{"type":"string"}},{"name":"filter[party_id]","in":"query","schema":{"type":"string"}},{"name":"filter[deal_id]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customobjectrecords"}},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a custom object record","tags":["Custom object records"],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomobjectrecordsInput"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Customobjectrecords"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/objects/{object_id}/{id}":{"get":{"summary":"Get one","tags":["Custom object records"],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Customobjectrecords"}}}}}},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Update","tags":["Custom object records"],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomobjectrecordsInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Customobjectrecords"}}}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete (moves to trash)","tags":["Custom object records"],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}},"/triggers/objects/{object_id}":{"get":{"summary":"Polling trigger: new or updated custom object records","tags":["Automation triggers"],"parameters":[{"name":"object_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"event","in":"query","schema":{"type":"string","enum":["created","updated"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Up to 100 records, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Customobjectrecords"}}}}}}}}}}