{"openapi":"3.1.0","info":{"title":"Muchly One Developer API","version":"1.0.0"},"servers":[{"url":"/api/public/v1"}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"Organisation API key created in Settings, Developer access. OAuth MCP tokens cannot call these REST endpoints."}}},"paths":{"/contacts":{"get":{"operationId":"search_contacts","summary":"Search CRM contacts. Follow nextCursor for more results.","x-required-scope":"contacts:read","security":[{"ApiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^[A-Za-z0-9_]{1,64}$"}},{"name":"search","in":"query","schema":{"type":"string","maxLength":160}}],"responses":{"200":{"description":"Success. Data is inside the data property; monetary values are integer minor-unit strings.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"description":"Operation result. Lists include items and nextCursor."}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Insufficient scope, membership or module access"},"409":{"description":"Idempotency conflict or concurrent edit"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Unsupported media type"},"429":{"description":"Rate limit exceeded. Retry-After specifies seconds."}}},"post":{"operationId":"create_contact","summary":"Create a CRM contact. Requires an idempotencyKey for safe retries.","x-required-scope":"contacts:write","security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"contactType":{"default":"PERSON","type":"string","enum":["PERSON","ORGANIZATION","DONOR","VOLUNTEER","REFERRER","SUPPORTER"]},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":40},"organizationName":{"type":"string","maxLength":160}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success. Data is inside the data property; monetary values are integer minor-unit strings.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"description":"Operation result. Lists include items and nextCursor."}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Insufficient scope, membership or module access"},"409":{"description":"Idempotency conflict or concurrent edit"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Unsupported media type"},"429":{"description":"Rate limit exceeded. Retry-After specifies seconds."}}}},"/tasks":{"get":{"operationId":"list_tasks","summary":"List workspace tasks, with cursor pagination.","x-required-scope":"tasks:read","security":[{"ApiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^[A-Za-z0-9_]{1,64}$"}},{"name":"search","in":"query","schema":{"type":"string","maxLength":160}}],"responses":{"200":{"description":"Success. Data is inside the data property; monetary values are integer minor-unit strings.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"description":"Operation result. Lists include items and nextCursor."}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Insufficient scope, membership or module access"},"409":{"description":"Idempotency conflict or concurrent edit"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Unsupported media type"},"429":{"description":"Rate limit exceeded. Retry-After specifies seconds."}}},"post":{"operationId":"create_task","summary":"Create a task or follow-up. Specify an ISO date with timezone when setting a due date.","x-required-scope":"tasks:write","security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":4000},"priority":{"default":"MEDIUM","type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"dueAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success. Data is inside the data property; monetary values are integer minor-unit strings.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"description":"Operation result. Lists include items and nextCursor."}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Insufficient scope, membership or module access"},"409":{"description":"Idempotency conflict or concurrent edit"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Unsupported media type"},"429":{"description":"Rate limit exceeded. Retry-After specifies seconds."}}}},"/tasks/{taskId}":{"get":{"operationId":"get_task","summary":"Read one task, including its current updatedAt value for a subsequent edit.","x-required-scope":"tasks:read","security":[{"ApiKey":[]}],"parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. Data is inside the data property; monetary values are integer minor-unit strings.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"description":"Operation result. Lists include items and nextCursor."}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Insufficient scope, membership or module access"},"409":{"description":"Idempotency conflict or concurrent edit"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Unsupported media type"},"429":{"description":"Rate limit exceeded. Retry-After specifies seconds."}}},"patch":{"operationId":"update_task","summary":"Update a task using its expectedUpdatedAt value to prevent overwriting another edit.","x-required-scope":"tasks:write","security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":4000},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"dueAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"expectedUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"status":{"type":"string","enum":["NEW","IN_PROGRESS","BLOCKED","COMPLETED","ARCHIVED"]}},"required":["expectedUpdatedAt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success. Data is inside the data property; monetary values are integer minor-unit strings.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"description":"Operation result. Lists include items and nextCursor."}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Insufficient scope, membership or module access"},"409":{"description":"Idempotency conflict or concurrent edit"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Unsupported media type"},"429":{"description":"Rate limit exceeded. Retry-After specifies seconds."}}}},"/invoices/unpaid":{"get":{"operationId":"list_unpaid_invoices","summary":"Read outstanding issued invoices. Amounts are integer minor-unit strings. Groups are for the current page only; follow nextCursor to complete the ledger.","x-required-scope":"invoices:read","security":[{"ApiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^[A-Za-z0-9_]{1,64}$"}},{"name":"customerId","in":"query","schema":{"type":"string","pattern":"^[A-Za-z0-9_]{1,64}$"}}],"responses":{"200":{"description":"Success. Data is inside the data property; monetary values are integer minor-unit strings.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"description":"Operation result. Lists include items and nextCursor."}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Insufficient scope, membership or module access"},"409":{"description":"Idempotency conflict or concurrent edit"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Unsupported media type"},"429":{"description":"Rate limit exceeded. Retry-After specifies seconds."}}}},"/quotes/drafts":{"post":{"operationId":"create_quote_draft","summary":"Create a quote draft for human review. Supply agreed prices in minor units and workspace tax-code IDs. Does not issue or send the quote.","x-required-scope":"quotes:draft","security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"customerId":{"type":"string","pattern":"^[A-Za-z0-9_]{1,64}$"},"customerNotes":{"type":"string","maxLength":5000},"terms":{"type":"string","maxLength":5000},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string","maxLength":30,"pattern":"^(?:[1-9]\\d*(?:\\.\\d{1,4})?|0\\.(?=\\d{0,3}[1-9])\\d{1,4})$"},"unitLabel":{"type":"string","minLength":1,"maxLength":40},"unitPriceMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"taxCodeId":{"type":"string","pattern":"^[A-Za-z0-9_]{1,64}$"}},"required":["description","quantity","unitLabel","unitPriceMinor","taxCodeId"],"additionalProperties":false}}},"required":["customerId","lines"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success. Data is inside the data property; monetary values are integer minor-unit strings.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"description":"Operation result. Lists include items and nextCursor."}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Insufficient scope, membership or module access"},"409":{"description":"Idempotency conflict or concurrent edit"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Unsupported media type"},"429":{"description":"Rate limit exceeded. Retry-After specifies seconds."}}}},"/tax-codes":{"get":{"operationId":"list_tax_codes","summary":"List active workspace tax codes for drafting a quote.","x-required-scope":"quotes:draft","security":[{"ApiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success. Data is inside the data property; monetary values are integer minor-unit strings.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"description":"Operation result. Lists include items and nextCursor."}}}}}},"400":{"description":"Invalid input"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Insufficient scope, membership or module access"},"409":{"description":"Idempotency conflict or concurrent edit"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Unsupported media type"},"429":{"description":"Rate limit exceeded. Retry-After specifies seconds."}}}}}}