{"openapi":"3.0.3","info":{"title":"Kaam360 API","version":"2.0.0","description":"Work with Kaam360 on behalf of a person who connected your app (OAuth 2.0, authorization code with PKCE). Every call acts as that person: it sees and changes only what they may, within the scopes they allowed. Send the access token as \"Authorization: Bearer k360at_...\". Answers are JSON: { data } or { data, page, limit, total } for lists, and { error: { code, message } } when something is refused. Limits: 120 requests a minute for each token and the app's own limit across all its tokens, shown in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds); over a limit the answer is 429 with Retry-After. Guide: https://kaam360.com/developers","contact":{"name":"Kaam360 developers","url":"https://kaam360.com/developers"}},"servers":[{"url":"https://kaam360.com/api/v2"}],"tags":[{"name":"Account"},{"name":"Projects"},{"name":"Tasks"},{"name":"Time"},{"name":"CRM"},{"name":"Invoices"},{"name":"Support"},{"name":"Webhooks"}],"components":{"schemas":{"AddInCaptureInput":{"type":"object","properties":{"kind":{"type":"string"},"source":{"type":"string","nullable":true},"projectId":{"type":"integer","format":"int32","nullable":true},"customerId":{"type":"integer","format":"int32","nullable":true},"title":{"type":"string","nullable":true},"url":{"type":"string","nullable":true},"text":{"type":"string","nullable":true},"fromName":{"type":"string","nullable":true},"fromEmail":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true},"company":{"type":"string","nullable":true}},"required":["kind"]},"Captured":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"integer","format":"int32"},"link":{"type":"string"}},"required":["kind","id","link"]},"CapturedAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Captured"}],"nullable":true}}},"CapturedFile":{"type":"object","properties":{"fileName":{"type":"string"},"size":{"type":"integer","format":"int64"},"group":{"type":"integer","format":"int32","nullable":true}},"required":["fileName","size"]},"CapturedFileAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/CapturedFile"}],"nullable":true}}},"Comment":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"taskId":{"type":"integer","format":"int32"},"authorId":{"type":"string"},"author":{"type":"string"},"body":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","taskId","authorId","author","body","createdAt"]},"CommentList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Comment"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"Contact":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"customerId":{"type":"integer","format":"int32"},"name":{"type":"string"},"designation":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","customerId","name","isPrimary","createdAt"]},"ContactList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"Created":{"type":"object","properties":{"id":{"type":"integer","format":"int32"}},"required":["id"]},"CreatedAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Created"}],"nullable":true}}},"Customer":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"taxNumber":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","createdAt"]},"CustomerList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"Deal":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"customerId":{"type":"integer","format":"int32"},"stage":{"type":"string"},"status":{"type":"string"},"amount":{"type":"number","nullable":true},"currency":{"type":"string"},"expectedClose":{"type":"string","format":"date","nullable":true},"closedOn":{"type":"string","format":"date","nullable":true},"ownerId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","customerId","stage","status","currency","createdAt"]},"DealList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Deal"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"Error":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"required":["error"]},"ErrorBody":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"Invoice":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"number":{"type":"string"},"customerId":{"type":"integer","format":"int32"},"projectId":{"type":"integer","format":"int32","nullable":true},"status":{"type":"string"},"issueDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"paidOn":{"type":"string","format":"date","nullable":true},"currency":{"type":"string"},"subtotal":{"type":"number"},"taxAmount":{"type":"number"},"total":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","number","customerId","status","issueDate","dueDate","currency","subtotal","taxAmount","total","createdAt"]},"InvoiceAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Invoice"}],"nullable":true}}},"InvoiceList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"Lead":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"company":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"status":{"type":"string"},"source":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","status","source","createdAt"]},"LeadList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"MarkPaidInput":{"type":"object","properties":{"paidOn":{"type":"string","format":"date","nullable":true}}},"Me":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"organization":{"type":"string"},"app":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"language":{"type":"string","nullable":true}},"required":["userId","name","organization","app","scopes"]},"MeAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Me"}],"nullable":true}}},"NewCommentInput":{"type":"object","properties":{"body":{"type":"string"}},"required":["body"]},"NewContactInput":{"type":"object","properties":{"customerId":{"type":"integer","format":"int32"},"name":{"type":"string"},"designation":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"isPrimary":{"type":"boolean","nullable":true}},"required":["customerId","name"]},"NewCustomerInput":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"taxNumber":{"type":"string","nullable":true}},"required":["name"]},"NewLeadInput":{"type":"object","properties":{"firstName":{"type":"string","nullable":true},"lastName":{"type":"string"},"company":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"source":{"type":"string","nullable":true}},"required":["lastName"]},"NewProjectInput":{"type":"object","properties":{"name":{"type":"string"},"customerId":{"type":"integer","format":"int32","nullable":true},"startDate":{"type":"string","format":"date","nullable":true},"endDate":{"type":"string","format":"date","nullable":true},"description":{"type":"string","nullable":true}},"required":["name"]},"NewTaskInput":{"type":"object","properties":{"projectId":{"type":"integer","format":"int32"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"assigneeId":{"type":"string","nullable":true},"priority":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true},"estimatedHours":{"type":"number","nullable":true}},"required":["projectId","title"]},"NewTaskLinkInput":{"type":"object","properties":{"type":{"type":"string"},"taskId":{"type":"integer","format":"int32"},"inward":{"type":"boolean"}},"required":["type","taskId","inward"]},"NewTicketInput":{"type":"object","properties":{"subject":{"type":"string"},"message":{"type":"string"},"requesterName":{"type":"string"},"requesterEmail":{"type":"string"},"category":{"type":"string","nullable":true},"priority":{"type":"string","nullable":true},"customerId":{"type":"integer","format":"int32","nullable":true},"projectId":{"type":"integer","format":"int32","nullable":true}},"required":["subject","message","requesterName","requesterEmail"]},"NewTimeEntryInput":{"type":"object","properties":{"projectId":{"type":"integer","format":"int32"},"taskId":{"type":"integer","format":"int32","nullable":true},"date":{"type":"string","format":"date"},"hours":{"type":"number"},"billable":{"type":"boolean","nullable":true},"notes":{"type":"string","nullable":true}},"required":["projectId","date","hours"]},"NewWebhook":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"secret":{"type":"string"}},"required":["id","name","url","events","secret"]},"NewWebhookAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/NewWebhook"}],"nullable":true}}},"NewWebhookInput":{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string","nullable":true},"events":{"type":"array","items":{"type":"string"},"nullable":true}},"required":["url"]},"Project":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"code":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"customerId":{"type":"integer","format":"int32","nullable":true},"startDate":{"type":"string","format":"date","nullable":true},"endDate":{"type":"string","format":"date","nullable":true},"ownerId":{"type":"string"},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","code","name","status","ownerId","archived","createdAt"]},"ProjectAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Project"}],"nullable":true}}},"ProjectList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"ProjectStatusInput":{"type":"object","properties":{"status":{"type":"string"}},"required":["status"]},"Sender":{"type":"object","properties":{"email":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"deals":{"type":"array","items":{"$ref":"#/components/schemas/Deal"}},"leads":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"tickets":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}}},"required":["email","contacts","customers","deals","leads","tickets"]},"SenderAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Sender"}],"nullable":true}}},"Task":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"projectId":{"type":"integer","format":"int32"},"taskListId":{"type":"integer","format":"int32"},"status":{"type":"string"},"priority":{"type":"string"},"assigneeId":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true},"percentComplete":{"type":"integer","format":"int32"},"estimatedHours":{"type":"number","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","title","projectId","taskListId","status","priority","percentComplete","createdAt"]},"TaskAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Task"}],"nullable":true}}},"TaskChangeInput":{"type":"object","properties":{"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"assigneeId":{"type":"string","nullable":true},"priority":{"type":"string","nullable":true},"startDate":{"type":"string","format":"date","nullable":true},"dueDate":{"type":"string","format":"date","nullable":true},"percentComplete":{"type":"integer","format":"int32","nullable":true},"estimatedHours":{"type":"number","nullable":true}}},"TaskLink":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"typeId":{"type":"integer","format":"int32"},"type":{"type":"string","nullable":true},"label":{"type":"string"},"taskId":{"type":"integer","format":"int32"},"taskCode":{"type":"string"},"taskTitle":{"type":"string"},"projectId":{"type":"integer","format":"int32"},"status":{"type":"string"}},"required":["id","typeId","label","taskId","taskCode","taskTitle","projectId","status"]},"TaskLinkList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TaskLink"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"TaskList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"Ticket":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"number":{"type":"integer","format":"int32"},"subject":{"type":"string"},"category":{"type":"string"},"status":{"type":"string"},"priority":{"type":"string"},"customerId":{"type":"integer","format":"int32","nullable":true},"projectId":{"type":"integer","format":"int32","nullable":true},"assigneeId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","number","subject","category","status","priority","createdAt"]},"TicketList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"TimeEntry":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"projectId":{"type":"integer","format":"int32"},"taskId":{"type":"integer","format":"int32","nullable":true},"userId":{"type":"string"},"date":{"type":"string","format":"date"},"hours":{"type":"number"},"billable":{"type":"boolean"},"notes":{"type":"string","nullable":true},"approval":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","projectId","userId","date","hours","billable","approval","createdAt"]},"TimeEntryList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeEntry"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]},"Timer":{"type":"object","properties":{"running":{"type":"boolean"},"projectId":{"type":"integer","format":"int32","nullable":true},"projectName":{"type":"string","nullable":true},"taskId":{"type":"integer","format":"int32","nullable":true},"taskTitle":{"type":"string","nullable":true},"startedAt":{"type":"string","format":"date-time","nullable":true}},"required":["running"]},"TimerAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Timer"}],"nullable":true}}},"TimerStartInput":{"type":"object","properties":{"taskId":{"type":"integer","format":"int32"}},"required":["taskId"]},"TimerStopInput":{"type":"object","properties":{"billable":{"type":"boolean","nullable":true},"notes":{"type":"string","nullable":true}}},"TimerStopped":{"type":"object","properties":{"hours":{"type":"number"},"projectId":{"type":"integer","format":"int32"},"taskId":{"type":"integer","format":"int32","nullable":true},"taskTitle":{"type":"string","nullable":true}},"required":["hours","projectId"]},"TimerStoppedAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/TimerStopped"}],"nullable":true}}},"Triaged":{"type":"object","properties":{"triageItemId":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"}},"required":["triageItemId","status","message"]},"TriagedAnswer":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Triaged"}],"nullable":true}}},"Webhook":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"}},"required":["id","name","url","events","active"]},"WebhookList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"page":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"}},"required":["data","page","limit","total"]}},"securitySchemes":{"oauth2":{"type":"oauth2","description":"Authorization code with PKCE (S256). Refresh tokens are rotated: each works once.","flows":{"authorizationCode":{"authorizationUrl":"https://kaam360.com/oauth/authorize","tokenUrl":"https://kaam360.com/oauth/token","refreshUrl":"https://kaam360.com/oauth/token","scopes":{"projects:read":"See the projects you can see","projects:write":"Create projects and change their status","tasks:read":"See tasks and their comments in your projects","tasks:write":"Add tasks, change them, complete them and comment","time:read":"See your time entries (and your team's, if you approve time)","time:write":"Log time for you","crm:read":"See customers, contacts, deals and leads","crm:write":"Add customers, contacts and leads","invoices:read":"See invoices","invoices:write":"Mark invoices as paid","tickets:read":"See support tickets","tickets:write":"Open support tickets","updates:write":"Post project updates on projects you may update","reports:read":"See key numbers you may see (the CEO briefing and unbilled work)","webhooks:write":"Set up webhooks that tell the app when things happen"}}}}}},"paths":{"/captures":{"post":{"tags":["Add-ins"],"summary":"Save a web page or an email as a task, a support ticket, a lead or a contact (each kind needs its own write scope)","description":"Any valid token.","operationId":"postCaptures","security":[{"oauth2":[]}],"parameters":[],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapturedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddInCaptureInput"}}}}}},"/captures/{kind}/{id}/files":{"post":{"tags":["Add-ins"],"summary":"Copy one of an email's files onto the task, ticket, lead or contact it was saved as. Send the file's bytes as the body (its type as Content-Type) and its name as ?name=. Programs are refused; the record's own size limits and the storage allowance apply","description":"Any valid token.","operationId":"postCapturesKindIdFiles","security":[{"oauth2":[]}],"parameters":[{"name":"kind","in":"path","required":true,"description":"","schema":{"type":"integer"}},{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}},{"name":"name","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"group","in":"query","required":false,"description":"","schema":{"type":"integer","format":"int32","nullable":true}}],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapturedFileAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts":{"get":{"tags":["CRM"],"summary":"List contacts (people at customers)","description":"Scope: `crm:read`.","operationId":"getContacts","security":[{"oauth2":["crm:read"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 200 (default 50).","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"customerId","in":"query","required":false,"description":"Only this customer's records.","schema":{"type":"integer","format":"int32","nullable":true}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"crm:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["CRM"],"summary":"Add a contact to a customer","description":"Scope: `crm:write`.","operationId":"postContacts","security":[{"oauth2":["crm:write"]}],"parameters":[],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"crm:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewContactInput"}}}}}},"/customers":{"get":{"tags":["CRM"],"summary":"List customers","description":"Scope: `crm:read`.","operationId":"getCustomers","security":[{"oauth2":["crm:read"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 200 (default 50).","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"updatedSince","in":"query","required":false,"description":"Only records created or changed since this moment (ISO 8601, UTC).","schema":{"type":"string","format":"date-time","nullable":true}},{"name":"search","in":"query","required":false,"description":"Only names that contain this text.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"crm:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["CRM"],"summary":"Add a customer","description":"Scope: `crm:write`.","operationId":"postCustomers","security":[{"oauth2":["crm:write"]}],"parameters":[],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"crm:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCustomerInput"}}}}}},"/deals":{"get":{"tags":["CRM"],"summary":"List deals (status: Open, Won or Lost)","description":"Scope: `crm:read`.","operationId":"getDeals","security":[{"oauth2":["crm:read"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 200 (default 50).","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"updatedSince","in":"query","required":false,"description":"Only records created or changed since this moment (ISO 8601, UTC).","schema":{"type":"string","format":"date-time","nullable":true}},{"name":"status","in":"query","required":false,"description":"Only records with this status.","schema":{"type":"string"}},{"name":"customerId","in":"query","required":false,"description":"Only this customer's records.","schema":{"type":"integer","format":"int32","nullable":true}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"crm:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices":{"get":{"tags":["Invoices"],"summary":"List invoices (status: Draft, Sent, Paid or Void)","description":"Scope: `invoices:read`.","operationId":"getInvoices","security":[{"oauth2":["invoices:read"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 200 (default 50).","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"updatedSince","in":"query","required":false,"description":"Only records created or changed since this moment (ISO 8601, UTC).","schema":{"type":"string","format":"date-time","nullable":true}},{"name":"status","in":"query","required":false,"description":"Only records with this status.","schema":{"type":"string"}},{"name":"customerId","in":"query","required":false,"description":"Only this customer's records.","schema":{"type":"integer","format":"int32","nullable":true}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"invoices:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}":{"get":{"tags":["Invoices"],"summary":"One invoice","description":"Scope: `invoices:read`.","operationId":"getInvoicesId","security":[{"oauth2":["invoices:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"invoices:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}/mark-paid":{"post":{"tags":["Invoices"],"summary":"Mark an issued invoice as paid (on paidOn, or today)","description":"Scope: `invoices:write`.","operationId":"postInvoicesIdMarkpaid","security":[{"oauth2":["invoices:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"204":{"description":"Done (no content)."},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"invoices:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkPaidInput"}}}}}},"/leads":{"get":{"tags":["CRM"],"summary":"List leads","description":"Scope: `crm:read`.","operationId":"getLeads","security":[{"oauth2":["crm:read"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 200 (default 50).","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"updatedSince","in":"query","required":false,"description":"Only records created or changed since this moment (ISO 8601, UTC).","schema":{"type":"string","format":"date-time","nullable":true}},{"name":"status","in":"query","required":false,"description":"Only records with this status.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"crm:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["CRM"],"summary":"Add a lead","description":"Scope: `crm:write`.","operationId":"postLeads","security":[{"oauth2":["crm:write"]}],"parameters":[],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"crm:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewLeadInput"}}}}}},"/me":{"get":{"tags":["Account"],"summary":"The person the token acts for, their organization, and the scopes the token has","description":"Any valid token.","operationId":"getMe","security":[{"oauth2":[]}],"parameters":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects":{"get":{"tags":["Projects"],"summary":"List the projects the person can see","description":"Scope: `projects:read`.","operationId":"getProjects","security":[{"oauth2":["projects:read"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 200 (default 50).","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"updatedSince","in":"query","required":false,"description":"Only records created or changed since this moment (ISO 8601, UTC).","schema":{"type":"string","format":"date-time","nullable":true}},{"name":"customerId","in":"query","required":false,"description":"Only this customer's records.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"includeArchived","in":"query","required":false,"description":"Also archived projects.","schema":{"type":"boolean","nullable":true}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"projects:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Projects"],"summary":"Create a project (the person becomes its owner)","description":"Scope: `projects:write`.","operationId":"postProjects","security":[{"oauth2":["projects:write"]}],"parameters":[],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"projects:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewProjectInput"}}}}}},"/projects/{id}":{"get":{"tags":["Projects"],"summary":"One project","description":"Scope: `projects:read`.","operationId":"getProjectsId","security":[{"oauth2":["projects:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"projects:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/status":{"post":{"tags":["Projects"],"summary":"Change a project's status (Active, OnHold, Delayed, Completed or Cancelled)","description":"Scope: `projects:write`.","operationId":"postProjectsIdStatus","security":[{"oauth2":["projects:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"204":{"description":"Done (no content)."},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"projects:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectStatusInput"}}}}}},"/senders":{"get":{"tags":["Add-ins"],"summary":"What Kaam360 knows about an email address: contacts, leads, their customer (or one at the same company domain), open deals and recent tickets","description":"Scope: `crm:read`.","operationId":"getSenders","security":[{"oauth2":["crm:read"]}],"parameters":[{"name":"email","in":"query","required":false,"description":"The email address to look up.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"crm:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tasks":{"get":{"tags":["Tasks"],"summary":"List tasks in the projects the person can see","description":"Scope: `tasks:read`.","operationId":"getTasks","security":[{"oauth2":["tasks:read"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 200 (default 50).","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"updatedSince","in":"query","required":false,"description":"Only records created or changed since this moment (ISO 8601, UTC).","schema":{"type":"string","format":"date-time","nullable":true}},{"name":"projectId","in":"query","required":false,"description":"Only this project's records.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"openOnly","in":"query","required":false,"description":"Only tasks that are not completed.","schema":{"type":"boolean","nullable":true}},{"name":"mine","in":"query","required":false,"description":"Only tasks the person owns.","schema":{"type":"boolean","nullable":true}},{"name":"dueBy","in":"query","required":false,"description":"Only tasks due on or before this day (yyyy-MM-dd), soonest first.","schema":{"type":"string","format":"date","nullable":true}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Tasks"],"summary":"Add a task to a project (to its first task list); when the project triages new work it waits in Triage (202)","description":"Scope: `tasks:write`.","operationId":"postTasks","security":[{"oauth2":["tasks:write"]}],"parameters":[],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAnswer"}}}},"202":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriagedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTaskInput"}}}}}},"/tasks/{id}":{"get":{"tags":["Tasks"],"summary":"One task","description":"Scope: `tasks:read`.","operationId":"getTasksId","security":[{"oauth2":["tasks:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Tasks"],"summary":"Change a task: only the fields you send change","description":"Scope: `tasks:write`.","operationId":"patchTasksId","security":[{"oauth2":["tasks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskChangeInput"}}}}}},"/tasks/{id}/comments":{"get":{"tags":["Tasks"],"summary":"A task's comments, oldest first","description":"Scope: `tasks:read`.","operationId":"getTasksIdComments","security":[{"oauth2":["tasks:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Tasks"],"summary":"Comment on a task","description":"Scope: `tasks:write`.","operationId":"postTasksIdComments","security":[{"oauth2":["tasks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCommentInput"}}}}}},"/tasks/{id}/complete":{"post":{"tags":["Tasks"],"summary":"Complete a task","description":"Scope: `tasks:write`.","operationId":"postTasksIdComplete","security":[{"oauth2":["tasks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tasks/{id}/links":{"get":{"tags":["Tasks"],"summary":"A task's links to other tasks (blocks, relates to, duplicates...), read from this task's side","description":"Scope: `tasks:read`.","operationId":"getTasksIdLinks","security":[{"oauth2":["tasks:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskLinkList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Tasks"],"summary":"Link a task to another task","description":"Scope: `tasks:write`.","operationId":"postTasksIdLinks","security":[{"oauth2":["tasks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTaskLinkInput"}}}}}},"/tasks/{id}/links/{linkId}":{"delete":{"tags":["Tasks"],"summary":"Remove one of a task's links","description":"Scope: `tasks:write`.","operationId":"deleteTasksIdLinksLinkId","security":[{"oauth2":["tasks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}},{"name":"linkId","in":"path","required":true,"description":"","schema":{"type":"integer"}}],"responses":{"204":{"description":"Done (no content)."},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tasks:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tickets":{"get":{"tags":["Support"],"summary":"List support tickets","description":"Scope: `tickets:read`.","operationId":"getTickets","security":[{"oauth2":["tickets:read"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 200 (default 50).","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"updatedSince","in":"query","required":false,"description":"Only records created or changed since this moment (ISO 8601, UTC).","schema":{"type":"string","format":"date-time","nullable":true}},{"name":"status","in":"query","required":false,"description":"Only records with this status.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tickets:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Support"],"summary":"Open a support ticket","description":"Scope: `tickets:write`.","operationId":"postTickets","security":[{"oauth2":["tickets:write"]}],"parameters":[],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"tickets:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTicketInput"}}}}}},"/time-entries":{"get":{"tags":["Time"],"summary":"Time entries: the person's own, or everyone's for a person who approves time","description":"Scope: `time:read`.","operationId":"getTimeentries","security":[{"oauth2":["time:read"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"limit","in":"query","required":false,"description":"How many to return, 1 to 200 (default 50).","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"from","in":"query","required":false,"description":"From this day (yyyy-MM-dd).","schema":{"type":"string","format":"date","nullable":true}},{"name":"to","in":"query","required":false,"description":"Up to and including this day (yyyy-MM-dd).","schema":{"type":"string","format":"date","nullable":true}},{"name":"projectId","in":"query","required":false,"description":"Only this project's records.","schema":{"type":"integer","format":"int32","nullable":true}},{"name":"userId","in":"query","required":false,"description":"Only this person's entries (for people who approve time).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"time:read\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Time"],"summary":"Log time for the person","description":"Scope: `time:write`.","operationId":"postTimeentries","security":[{"oauth2":["time:write"]}],"parameters":[],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"time:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTimeEntryInput"}}}}}},"/timer":{"get":{"tags":["Time"],"summary":"The person's running timer, if any","description":"Scope: `time:write`.","operationId":"getTimer","security":[{"oauth2":["time:write"]}],"parameters":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"time:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/timer/start":{"post":{"tags":["Time"],"summary":"Start the timer on a task (a timer already running is saved first)","description":"Scope: `time:write`.","operationId":"postTimerStart","security":[{"oauth2":["time:write"]}],"parameters":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"time:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerStartInput"}}}}}},"/timer/stop":{"post":{"tags":["Time"],"summary":"Stop the timer: the time is logged as an ordinary time entry","description":"Scope: `time:write`.","operationId":"postTimerStop","security":[{"oauth2":["time:write"]}],"parameters":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerStoppedAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"time:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerStopInput"}}}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"The webhooks this app made with this connection","description":"Scope: `webhooks:write`.","operationId":"getWebhooks","security":[{"oauth2":["webhooks:write"]}],"parameters":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"webhooks:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"summary":"Subscribe: send signed messages about these events to a public https address (the signing secret is in the answer, once). Each event needs the read scope of its area","description":"Scope: `webhooks:write`.","operationId":"postWebhooks","security":[{"oauth2":["webhooks:write"]}],"parameters":[],"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewWebhookAnswer"}}}},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"webhooks:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewWebhookInput"}}}}}},"/webhooks/{id}":{"delete":{"tags":["Webhooks"],"summary":"Unsubscribe: remove a webhook this app made","description":"Scope: `webhooks:write`.","operationId":"deleteWebhooksId","security":[{"oauth2":["webhooks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The record's id.","schema":{"type":"integer"}}],"responses":{"204":{"description":"Done (no content)."},"401":{"description":"No token, or the token is not valid, expired or revoked (see WWW-Authenticate).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the \"webhooks:write\" scope (insufficient_scope), or the person's rights do not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record, or the person may not see it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A value is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: see Retry-After and the X-RateLimit headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}