{"components":{"responses":{},"schemas":{"EstimateProjectConversionInput":{"properties":{"addition_token":{"description":"Bound confirmation token returned by `409 addition_confirmation_required` when `project_id` is set","nullable":true,"type":"string"},"billing":{"enum":["hourly","fixed_fee"],"type":"string"},"budget_alert_percent":{"nullable":true,"type":"integer"},"budget_amount":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"budget_hours":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"budget_kind":{"enum":["none","hours","amount"],"type":"string"},"expense_markup":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"fee":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"hourly_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"name":{"type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"project_id":{"description":"Existing project id to add the estimate to; omit to create a new project","format":"uuid","nullable":true,"type":"string"},"rate_by":{"enum":["task","person"],"type":"string"}},"title":"EstimateProjectConversionInput","type":"object"},"ProjectChange":{"properties":{"billing":{"enum":["hourly","fixed_fee"],"type":"string"},"budget_alert_percent":{"nullable":true,"type":"integer"},"budget_amount":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"budget_hours":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"budget_kind":{"enum":["none","hours","amount"],"type":"string"},"currency":{"nullable":true,"type":"string"},"expense_markup":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"fee":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"hourly_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"name":{"type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"rate_by":{"enum":["task","person"],"type":"string"},"rate_change":{"$ref":"#/components/schemas/RateChangeAnswer"},"tasks":{"items":{"$ref":"#/components/schemas/ProjectTaskInput"},"type":"array"},"team":{"items":{"$ref":"#/components/schemas/ProjectTeamInput"},"type":"array"}},"title":"ProjectChange","type":"object"},"EstimateProjectConversionResponse":{"properties":{"estimate":{"$ref":"#/components/schemas/EstimateDetail"},"project":{"$ref":"#/components/schemas/ProjectDetail"}},"required":["project","estimate"],"title":"EstimateProjectConversionResponse","type":"object"},"RateChangeAnswer":{"description":"Pass on retry after a `409 rate_change_confirmation_required` response, using the `token` returned in `error.details`.","properties":{"from":{"description":"Required ISO date when `mode` is `uninvoiced_from`","format":"date","nullable":true,"type":"string"},"mode":{"description":"How to apply the change to open uninvoiced entries (currency changes allow `all_uninvoiced` only)","enum":["all_uninvoiced","new_only","uninvoiced_from"],"type":"string"},"token":{"description":"Confirmation token from `error.details.token`","type":"string"}},"required":["mode","token"],"title":"RateChangeAnswer","type":"object"},"TaskList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Task"},"type":"array"}},"required":["data"],"title":"TaskList","type":"object"},"EstimateDetail":{"properties":{"accepted_at":{"format":"date-time","nullable":true,"type":"string"},"accepted_name":{"nullable":true,"type":"string"},"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"currency":{"type":"string"},"decline_reason":{"nullable":true,"type":"string"},"declined_at":{"format":"date-time","nullable":true,"type":"string"},"deposit_invoice_id":{"format":"uuid","nullable":true,"type":"string"},"discount_amount":{"nullable":true,"type":"string"},"discount_rate":{"nullable":true,"type":"string"},"display_status":{"enum":["draft","sent","expired","accepted","declined"],"type":"string"},"document_token":{"description":"Concurrency token of the rendered document; required by mark_sent and send","type":"string"},"id":{"format":"uuid","type":"string"},"issue_date":{"format":"date","type":"string"},"language":{"type":"string"},"lines":{"items":{"$ref":"#/components/schemas/EstimateLine"},"type":"array"},"notes":{"nullable":true,"type":"string"},"number":{"type":"string"},"project_id":{"format":"uuid","nullable":true,"type":"string"},"revision":{"type":"integer"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["draft","sent","accepted","declined"],"type":"string"},"subtotal":{"nullable":true,"type":"string"},"tax2_name":{"nullable":true,"type":"string"},"tax2_rate":{"nullable":true,"type":"string"},"tax_amount":{"nullable":true,"type":"string"},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"total":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["id","number","status","display_status","client_id","client_name","currency","language","issue_date","revision","document_token","lines"],"title":"EstimateDetail","type":"object"},"TaskChange":{"properties":{"add_to_new_projects":{"type":"boolean"},"billable_by_default":{"type":"boolean"},"name":{"type":"string"}},"title":"TaskChange","type":"object"},"InvoicePayment":{"properties":{"amount":{"type":"string"},"fee_amount":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"invoice_id":{"format":"uuid","type":"string"},"method":{"enum":["manual","online"],"type":"string"},"net_amount":{"type":"string"},"notes":{"nullable":true,"type":"string"},"paid_on":{"format":"date","type":"string"},"refunded_amount":{"type":"string"},"refunds":{"items":{"$ref":"#/components/schemas/InvoicePaymentRefund"},"type":"array"}},"required":["id","invoice_id","method","paid_on","notes","inserted_at","amount","refunded_amount","net_amount","fee_amount","refunds"],"title":"InvoicePayment","type":"object"},"InvoiceIssueInput":{"properties":{"document_token":{"description":"Current `document_token` from `GET /api/v1/invoices/{id}`","type":"string"}},"required":["document_token"],"title":"InvoiceIssueInput","type":"object"},"InvoicePaymentInput":{"properties":{"amount":{"anyOf":[{"type":"string"},{"type":"number"}]},"confirm_overpayment":{"description":"Set to `true` on retry after `409 overpayment_confirmation_required`","type":"boolean"},"financial_token":{"description":"Current `financial_token` of the invoice","type":"string"},"notes":{"nullable":true,"type":"string"},"paid_on":{"description":"Today of the workspace by default","format":"date","type":"string"}},"required":["financial_token","amount"],"title":"InvoicePaymentInput","type":"object"},"EstimateLine":{"properties":{"amount":{"type":"string"},"description":{"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"enum":["hours","item"],"type":"string"},"position":{"type":"integer"},"quantity":{"type":"string"},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"nullable":true,"type":"string"},"taxable":{"type":"boolean"},"taxable2":{"type":"boolean"},"unit_price":{"type":"string"}},"required":["id","kind","position","description","quantity","taxable","taxable2"],"title":"EstimateLine","type":"object"},"TimeEntryInput":{"properties":{"hours":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"A duration: `2h`, `1:30`, `90m`, `1.5`, or a number of hours"},"member_id":{"description":"A teammate whose time the token may change; the member of the token by default","format":"uuid","type":"string"},"notes":{"nullable":true,"type":"string"},"project_id":{"description":"The project of the task, when the client chose it: a project task of another project is `other_project`","format":"uuid","type":"string"},"project_task_id":{"description":"A `project_task_id` of a project of `GET /api/v1/projects`","format":"uuid","type":"string"},"spent_on":{"description":"Today of the workspace by default","format":"date","type":"string"},"start_time":{"description":"Optional workspace-local start time in 24-hour `HH:MM` format, or `null`","nullable":true,"type":"string"}},"required":["project_task_id","hours"],"title":"TimeEntryInput","type":"object"},"InvoiceSendInput":{"properties":{"bcc":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"nullable":true},"body":{"type":"string"},"cc":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"nullable":true},"copy_me":{"type":"boolean"},"document_token":{"description":"Current `document_token` of the draft","type":"string"},"recipients":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"subject":{"type":"string"}},"required":["document_token"],"title":"InvoiceSendInput","type":"object"},"InvoiceChange":{"description":"Ordinary drafts require `draft_token` (omitted selection lists keep stored attachments/items; explicit lists replace them). Credit drafts require `financial_token` matching `parent_financial_token`.","properties":{"currency":{"type":"string"},"deposit_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"discount_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"draft_token":{"description":"Required for ordinary/deposit drafts","type":"string"},"due_date":{"format":"date","type":"string"},"entry_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"expense_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"financial_token":{"description":"Required for credit drafts (`parent_financial_token`)","type":"string"},"issue_date":{"format":"date","type":"string"},"items":{"items":{"$ref":"#/components/schemas/InvoiceItemInput"},"type":"array"},"language":{"nullable":true,"type":"string"},"line_grouping":{"nullable":true,"type":"string"},"lines":{"items":{"$ref":"#/components/schemas/CreditNoteLineInput"},"type":"array"},"mode":{"description":"Credit draft mode. Omitting both `mode` and `lines` preserves the stored credit mode and lines; providing `lines` defaults `mode` to `part` and cannot be combined with `mode: \"full\"`.","enum":["full","part"],"type":"string"},"notes":{"nullable":true,"type":"string"},"number":{"type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"period_end":{"format":"date","nullable":true,"type":"string"},"period_start":{"format":"date","nullable":true,"type":"string"},"po_number":{"nullable":true,"type":"string"},"returns_time":{"type":"boolean"},"tax2_name":{"nullable":true,"type":"string"},"tax2_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true}},"title":"InvoiceChange","type":"object"},"DepositInvoiceInput":{"properties":{"amount":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"basis":{"description":"Defaults to `amount`","enum":["amount","share"],"type":"string"},"client_id":{"format":"uuid","type":"string"},"number":{"type":"string"},"project_id":{"format":"uuid","type":"string"},"share":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true}},"required":["client_id","project_id"],"title":"DepositInvoiceInput","type":"object"},"ClientContactInput":{"properties":{"email":{"type":"string"},"invoice_role":{"enum":["none","to","cc","bcc"],"type":"string"},"name":{"type":"string"},"title":{"nullable":true,"type":"string"}},"required":["name","email"],"title":"ClientContactInput","type":"object"},"ExpenseList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Expense"},"type":"array"},"next_page":{"nullable":true,"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"required":["data","page","per_page","next_page"],"title":"ExpenseList","type":"object"},"EstimateDepositInput":{"properties":{"amount":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"basis":{"enum":["amount","share"],"type":"string"},"number":{"description":"Optional invoice number; auto-numbered if omitted","type":"string"},"project_id":{"format":"uuid","nullable":true,"type":"string"},"share":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true}},"title":"EstimateDepositInput","type":"object"},"Error":{"example":{"error":{"code":"unauthorized","message":"The bearer token is missing, unknown, revoked or expired."}},"properties":{"error":{"properties":{"code":{"description":"A stable code, such as `unauthorized` or `read_only_token`","type":"string"},"details":{"additionalProperties":true,"description":"Structured confirmation details on 409 confirmation responses","type":"object"},"fields":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"The messages of each invalid field, only in a 422","type":"object"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"title":"Error","type":"object"},"EstimateMarkSentInput":{"properties":{"document_token":{"description":"Current `document_token` of the draft","type":"string"}},"required":["document_token"],"title":"EstimateMarkSentInput","type":"object"},"EstimateDepositResponse":{"properties":{"estimate":{"$ref":"#/components/schemas/EstimateDetail"},"invoice":{"$ref":"#/components/schemas/InvoiceDetail"}},"required":["invoice","estimate"],"title":"EstimateDepositResponse","type":"object"},"TimerStart":{"properties":{"notes":{"nullable":true,"type":"string"},"project_id":{"description":"The project of the task, when the client chose it: a project task of another project is `other_project`","format":"uuid","type":"string"},"project_task_id":{"format":"uuid","type":"string"}},"required":["project_task_id"],"title":"TimerStart","type":"object"},"EstimateSendResponse":{"properties":{"delivery":{"$ref":"#/components/schemas/EstimateDelivery"},"estimate":{"$ref":"#/components/schemas/EstimateDetail"}},"required":["delivery","estimate"],"title":"EstimateSendResponse","type":"object"},"TimerName":{"properties":{"timer_id":{"description":"The timer that the client saw; the timer of now by default","format":"uuid","type":"string"}},"title":"TimerName","type":"object"},"InvoiceWriteOffInput":{"properties":{"financial_token":{"description":"Current `financial_token` of the invoice","type":"string"},"note":{"nullable":true,"type":"string"},"written_off_on":{"format":"date","type":"string"}},"required":["financial_token"],"title":"InvoiceWriteOffInput","type":"object"},"EstimateLineInput":{"properties":{"description":{"type":"string"},"kind":{"description":"`hours` or `item` (`item` by default)","enum":["hours","item"],"type":"string"},"quantity":{"anyOf":[{"type":"string"},{"type":"number"}]},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"taxable":{"anyOf":[{"type":"boolean"},{"enum":["own"],"type":"string"}]},"taxable2":{"type":"boolean"},"unit_price":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["description","quantity","unit_price"],"title":"EstimateLineInput","type":"object"},"InvoicePaymentRecorded":{"properties":{"invoice":{"$ref":"#/components/schemas/InvoiceDetail"},"payment":{"$ref":"#/components/schemas/InvoicePayment"}},"required":["payment","invoice"],"title":"InvoicePaymentRecorded","type":"object"},"InvoiceInput":{"properties":{"client_id":{"format":"uuid","type":"string"},"currency":{"description":"Client currency by default","type":"string"},"deposit_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"discount_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"due_date":{"format":"date","type":"string"},"entry_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"expense_ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"issue_date":{"description":"Today of the workspace by default","format":"date","type":"string"},"items":{"items":{"$ref":"#/components/schemas/InvoiceItemInput"},"type":"array"},"language":{"nullable":true,"type":"string"},"line_grouping":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"number":{"description":"Optional invoice number; auto-numbered if omitted","type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"period_end":{"format":"date","nullable":true,"type":"string"},"period_start":{"format":"date","nullable":true,"type":"string"},"po_number":{"nullable":true,"type":"string"},"tax2_name":{"nullable":true,"type":"string"},"tax2_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true}},"required":["client_id"],"title":"InvoiceInput","type":"object"},"EstimateChange":{"properties":{"discount_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"issue_date":{"format":"date","type":"string"},"language":{"nullable":true,"type":"string"},"lines":{"description":"Replaces all lines when provided; existing lines stay unchanged when omitted","items":{"$ref":"#/components/schemas/EstimateLineInput"},"type":"array"},"notes":{"nullable":true,"type":"string"},"number":{"type":"string"},"tax2_name":{"nullable":true,"type":"string"},"tax2_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"title":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"title":"EstimateChange","type":"object"},"InvoiceDetail":{"allOf":[{"$ref":"#/components/schemas/Invoice"},{"properties":{"credited_invoice_id":{"format":"uuid","nullable":true,"type":"string"},"discount_amount":{"nullable":true,"type":"string"},"discount_rate":{"nullable":true,"type":"string"},"document_token":{"nullable":true,"type":"string"},"draft_token":{"nullable":true,"type":"string"},"financial_token":{"nullable":true,"type":"string"},"lines":{"items":{"properties":{"amount":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"expense_id":{"format":"uuid","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"type":"string"},"project_id":{"format":"uuid","nullable":true,"type":"string"},"quantity":{"nullable":true,"type":"string"},"time_entry_id":{"format":"uuid","nullable":true,"type":"string"},"unit_price":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"parent_financial_token":{"nullable":true,"type":"string"},"period_end":{"format":"date","nullable":true,"type":"string"},"period_start":{"format":"date","nullable":true,"type":"string"},"po_number":{"nullable":true,"type":"string"},"subtotal":{"nullable":true,"type":"string"},"tax_amount":{"nullable":true,"type":"string"}},"type":"object"}],"title":"InvoiceDetail","type":"object"},"ProjectTeamInput":{"properties":{"enabled":{"description":"Defaults to `true`; `false` removes the member from the project team","type":"boolean"},"hourly_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Person-level hourly rate override on `rate_by: person` projects; `null` clears","nullable":true},"manages":{"description":"Only managers can manage a project","type":"boolean"},"member_id":{"format":"uuid","type":"string"}},"required":["member_id"],"title":"ProjectTeamInput","type":"object"},"InvoicePaymentDeleted":{"properties":{"deleted":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"invoice":{"$ref":"#/components/schemas/InvoiceDetail"}},"required":["id","deleted","invoice"],"title":"InvoicePaymentDeleted","type":"object"},"Project":{"description":"Every role gets the ids, the names and `tasks`; the other fields are for a role that sees amounts. `tasks` are the project tasks that take new time: a new entry or timer names its `project_task_id`.","properties":{"archived":{"type":"boolean"},"billing":{"enum":["hourly","fixed_fee"],"type":"string"},"budget_alert_percent":{"nullable":true,"type":"integer"},"budget_amount":{"nullable":true,"type":"string"},"budget_hours":{"nullable":true,"type":"string"},"budget_kind":{"enum":["none","hours","amount"],"type":"string"},"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"currency":{"nullable":true,"type":"string"},"expense_markup":{"description":"A percentage","nullable":true,"type":"string"},"fee":{"nullable":true,"type":"string"},"hourly_rate":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"rate_by":{"enum":["task","person"],"type":"string"},"tasks":{"items":{"properties":{"billable":{"type":"boolean"},"hourly_rate":{"nullable":true,"type":"string"},"name":{"type":"string"},"project_task_id":{"format":"uuid","type":"string"},"task_id":{"format":"uuid","type":"string"}},"required":["project_task_id","task_id","name"],"type":"object"},"type":"array"}},"required":["id","name","client_id","client_name","tasks"],"title":"Project","type":"object"},"Me":{"properties":{"member":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"nullable":true,"type":"string"},"role":{"enum":["owner","admin","manager","member"],"type":"string"}},"required":["id","name","role"],"type":"object"},"money":{"description":"Which money the role shows: a field of money that the role hides is never in a result","properties":{"amounts":{"type":"boolean"},"costs":{"type":"boolean"}},"required":["amounts","costs"],"type":"object"},"token":{"properties":{"access":{"enum":["read","read_write"],"type":"string"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name","access","expires_at"],"type":"object"},"workspace":{"properties":{"currency":{"description":"ISO 4217","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"nullable":true,"type":"string"},"time_format":{"enum":["hm","decimal"],"type":"string"},"time_zone":{"nullable":true,"type":"string"},"week_start":{"type":"string"}},"required":["id","name","currency","time_zone","week_start","time_format"],"type":"object"}},"required":["workspace","member","token","money"],"title":"Me","type":"object"},"ExpenseCategoryList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ExpenseCategory"},"type":"array"}},"required":["data"],"title":"ExpenseCategoryList","type":"object"},"EstimateList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EstimateRow"},"type":"array"},"next_page":{"nullable":true,"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"required":["data","page","per_page","next_page"],"title":"EstimateList","type":"object"},"ProjectMember":{"properties":{"hourly_rate":{"nullable":true,"type":"string"},"manages":{"type":"boolean"},"member_id":{"format":"uuid","type":"string"},"member_name":{"nullable":true,"type":"string"},"role":{"enum":["owner","admin","manager","member"],"type":"string"}},"required":["member_id","member_name","role","manages","hourly_rate"],"title":"ProjectMember","type":"object"},"ExpenseInput":{"properties":{"amount":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Spent amount"},"billable":{"type":"boolean"},"category_id":{"format":"uuid","nullable":true,"type":"string"},"currency":{"description":"Optional currency guard: must match the project currency if supplied","nullable":true,"type":"string"},"member_id":{"description":"A teammate whose expenses this token may change; the member of the token by default","format":"uuid","type":"string"},"note":{"nullable":true,"type":"string"},"project_id":{"description":"An active project that takes new time","format":"uuid","type":"string"},"spent_on":{"description":"Today of the workspace by default","format":"date","type":"string"}},"required":["project_id","amount"],"title":"ExpenseInput","type":"object"},"InvoicePaymentRefund":{"properties":{"amount":{"type":"string"},"fee_amount":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"enum":["refund","dispute_lost"],"type":"string"},"refunded_on":{"format":"date","type":"string"},"status":{"type":"string"}},"required":["id","kind","status","refunded_on","amount","fee_amount"],"title":"InvoicePaymentRefund","type":"object"},"InvoiceResendInput":{"properties":{"bcc":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"nullable":true},"body":{"type":"string"},"cc":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"nullable":true},"copy_me":{"type":"boolean"},"recipients":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"subject":{"type":"string"}},"title":"InvoiceResendInput","type":"object"},"ClientList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Client"},"type":"array"}},"required":["data"],"title":"ClientList","type":"object"},"MemberList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Member"},"type":"array"}},"required":["data"],"title":"MemberList","type":"object"},"Uninvoiced":{"description":"Without `from` and `to`, the Uninvoiced report. With them, the time and the expenses of those days, and the fees left to invoice apart, undated, in `fixed_fees`, out of the totals.","properties":{"fixed_fees":{"items":{"properties":{"amount":{"type":"string"},"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"currency":{"type":"string"},"dated":{"description":"`false` for the fee left to invoice of a fixed-fee project","type":"boolean"},"expense_amount":{"type":"string"},"fixed_fee":{"type":"boolean"},"hours":{"type":"string"},"hours_without_rate":{"type":"string"},"invoiceable":{"type":"boolean"},"oldest_on":{"format":"date","nullable":true,"type":"string"},"project_id":{"format":"uuid","type":"string"},"project_name":{"type":"string"},"waiting_hours":{"type":"string"}},"type":"object"},"type":"array"},"from":{"format":"date","nullable":true,"type":"string"},"rows":{"items":{"properties":{"amount":{"type":"string"},"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"currency":{"type":"string"},"dated":{"description":"`false` for the fee left to invoice of a fixed-fee project","type":"boolean"},"expense_amount":{"type":"string"},"fixed_fee":{"type":"boolean"},"hours":{"type":"string"},"hours_without_rate":{"type":"string"},"invoiceable":{"type":"boolean"},"oldest_on":{"format":"date","nullable":true,"type":"string"},"project_id":{"format":"uuid","type":"string"},"project_name":{"type":"string"},"waiting_hours":{"type":"string"}},"type":"object"},"type":"array"},"to":{"format":"date","nullable":true,"type":"string"},"totals":{"items":{"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"expenses":{"type":"string"},"fixed_fee":{"type":"string"},"hours":{"type":"string"}},"type":"object"},"type":"array"}},"required":["from","to","rows","totals"],"title":"Uninvoiced","type":"object"},"EstimateRow":{"properties":{"accepted_at":{"format":"date-time","nullable":true,"type":"string"},"accepted_name":{"nullable":true,"type":"string"},"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"currency":{"type":"string"},"decline_reason":{"nullable":true,"type":"string"},"declined_at":{"format":"date-time","nullable":true,"type":"string"},"deposit_invoice_id":{"format":"uuid","nullable":true,"type":"string"},"discount_amount":{"nullable":true,"type":"string"},"discount_rate":{"nullable":true,"type":"string"},"display_status":{"enum":["draft","sent","expired","accepted","declined"],"type":"string"},"id":{"format":"uuid","type":"string"},"issue_date":{"format":"date","type":"string"},"number":{"type":"string"},"project_id":{"format":"uuid","nullable":true,"type":"string"},"status":{"enum":["draft","sent","accepted","declined"],"type":"string"},"subtotal":{"nullable":true,"type":"string"},"tax_amount":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"total":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["id","number","status","display_status","client_id","client_name","currency","issue_date"],"title":"EstimateRow","type":"object"},"InvoiceSent":{"properties":{"delivery":{"$ref":"#/components/schemas/InvoiceDelivery"},"invoice":{"$ref":"#/components/schemas/InvoiceDetail"}},"required":["invoice","delivery"],"title":"InvoiceSent","type":"object"},"WebhookDelivery":{"properties":{"attempts":{"type":"integer"},"event_id":{"format":"uuid","type":"string"},"event_type":{"type":"string"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"last_attempt_at":{"format":"date-time","nullable":true,"type":"string"},"response_code":{"nullable":true,"type":"integer"},"status":{"enum":["queued","delivered","failed","stopped"],"type":"string"},"webhook_id":{"format":"uuid","type":"string"}},"required":["id","webhook_id","event_id","event_type","status","attempts","inserted_at"],"title":"WebhookDelivery","type":"object"},"InvoiceItemInput":{"properties":{"description":{"type":"string"},"id":{"format":"uuid","nullable":true,"type":"string"},"project_id":{"format":"uuid","nullable":true,"type":"string"},"quantity":{"anyOf":[{"type":"string"},{"type":"number"}]},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"taxable":{"anyOf":[{"type":"boolean"},{"enum":["own"],"type":"string"}]},"taxable2":{"type":"boolean"},"unit_price":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["description","quantity","unit_price"],"title":"InvoiceItemInput","type":"object"},"InvoicePaymentList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/InvoicePayment"},"type":"array"}},"required":["data"],"title":"InvoicePaymentList","type":"object"},"Client":{"description":"Every role gets `id` and `name`; the other fields are for a role that sees amounts.","properties":{"address":{"nullable":true,"type":"string"},"archived":{"type":"boolean"},"currency":{"nullable":true,"type":"string"},"hourly_rate":{"description":"A decimal","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"language":{"nullable":true,"type":"string"},"name":{"type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"pays_online":{"type":"boolean"},"tax2_name":{"nullable":true,"type":"string"},"tax2_rate":{"nullable":true,"type":"string"},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"nullable":true,"type":"string"}},"required":["id","name"],"title":"Client","type":"object"},"Deleted":{"properties":{"deleted":{"type":"boolean"},"id":{"format":"uuid","type":"string"}},"required":["id","deleted"],"title":"Deleted","type":"object"},"ClientContact":{"properties":{"client_id":{"format":"uuid","type":"string"},"email":{"type":"string"},"id":{"format":"uuid","type":"string"},"invoice_role":{"enum":["none","to","cc","bcc"],"type":"string"},"name":{"type":"string"},"title":{"nullable":true,"type":"string"}},"required":["id","client_id","name","email","invoice_role"],"title":"ClientContact","type":"object"},"ExpenseCategory":{"description":"Every role gets `id` and `name`; `archived` is included for roles that see amounts.","properties":{"archived":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"title":"ExpenseCategory","type":"object"},"WebhookChange":{"properties":{"events":{"items":{"enum":["invoice.issued","invoice.paid","estimate.accepted","estimate.declined","time_entry.created","time_entry.updated","time_entry.deleted","time_entries.bulk_changed","expense.created","expense.updated","expense.deleted","expenses.bulk_changed"],"type":"string"},"type":"array"},"url":{"description":"Public `https://` endpoint URL","type":"string"}},"title":"WebhookChange","type":"object"},"TaskInput":{"properties":{"add_to_new_projects":{"type":"boolean"},"billable_by_default":{"type":"boolean"},"name":{"type":"string"}},"required":["name"],"title":"TaskInput","type":"object"},"ClientContactChange":{"properties":{"email":{"type":"string"},"invoice_role":{"enum":["none","to","cc","bcc"],"type":"string"},"name":{"type":"string"},"title":{"nullable":true,"type":"string"}},"title":"ClientContactChange","type":"object"},"ExpenseChange":{"properties":{"amount":{"anyOf":[{"type":"string"},{"type":"number"}]},"billable":{"type":"boolean"},"category_id":{"format":"uuid","nullable":true,"type":"string"},"currency":{"description":"Required alongside `amount` when moving to a project of another currency","nullable":true,"type":"string"},"note":{"nullable":true,"type":"string"},"project_id":{"format":"uuid","type":"string"},"spent_on":{"format":"date","type":"string"}},"title":"ExpenseChange","type":"object"},"TimeEntryList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TimeEntry"},"type":"array"},"next_page":{"nullable":true,"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"required":["data","page","per_page","next_page"],"title":"TimeEntryList","type":"object"},"ProjectTaskInput":{"properties":{"billable":{"type":"boolean"},"enabled":{"description":"Defaults to `true`; `false` disables or archives the task on the project","type":"boolean"},"hourly_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Task-level hourly rate override; `null` clears","nullable":true},"task_id":{"format":"uuid","type":"string"}},"required":["task_id"],"title":"ProjectTaskInput","type":"object"},"CreditNoteInput":{"properties":{"financial_token":{"description":"Current `financial_token` of the credited invoice","type":"string"},"issue_date":{"format":"date","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/CreditNoteLineInput"},"type":"array"},"mode":{"description":"Defaults to `part` when `lines` is provided, otherwise `full`. Cannot be `full` when `lines` is provided.","enum":["full","part"],"type":"string"},"notes":{"nullable":true,"type":"string"},"number":{"type":"string"},"returns_time":{"type":"boolean"}},"required":["financial_token"],"title":"CreditNoteInput","type":"object"},"Member":{"properties":{"archived":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"name":{"nullable":true,"type":"string"},"role":{"enum":["owner","admin","manager","member"],"type":"string"}},"required":["id","name","role","archived"],"title":"Member","type":"object"},"ClientInput":{"properties":{"address":{"nullable":true,"type":"string"},"currency":{"description":"ISO 4217 currency code; workspace default if omitted","type":"string"},"hourly_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"language":{"nullable":true,"type":"string"},"name":{"type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"tax2_name":{"nullable":true,"type":"string"},"tax2_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true}},"required":["name"],"title":"ClientInput","type":"object"},"Expense":{"description":"Every role gets the spent `amount` and its `currency`. `markup`, `billed_amount`, `invoice_id`, `invoice_number` and `billed_elsewhere_on` are only for a role that sees amounts; for another role `state` names no invoice.","properties":{"amount":{"type":"string"},"billable":{"type":"boolean"},"billed_amount":{"nullable":true,"type":"string"},"billed_elsewhere_on":{"format":"date","nullable":true,"type":"string"},"category_id":{"format":"uuid","nullable":true,"type":"string"},"category_name":{"nullable":true,"type":"string"},"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"currency":{"type":"string"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"invoice_id":{"format":"uuid","nullable":true,"type":"string"},"invoice_number":{"nullable":true,"type":"string"},"markup":{"nullable":true,"type":"string"},"member_id":{"format":"uuid","type":"string"},"member_name":{"nullable":true,"type":"string"},"note":{"nullable":true,"type":"string"},"project_id":{"format":"uuid","type":"string"},"project_name":{"type":"string"},"receipt":{"type":"boolean"},"spent_on":{"format":"date","type":"string"},"state":{"enum":["open","draft","locked","billed_elsewhere","approved","submitted"],"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","spent_on","amount","currency","state","member_id","project_id","client_id"],"title":"Expense","type":"object"},"Timer":{"properties":{"time_entry":{"$ref":"#/components/schemas/TimeEntry"},"timer":{"description":"The timer of the member of the token, or `null`","nullable":true,"properties":{"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"elapsed_seconds":{"type":"integer"},"hours":{"type":"string"},"id":{"format":"uuid","type":"string"},"notes":{"nullable":true,"type":"string"},"paused":{"type":"boolean"},"paused_at":{"format":"date-time","nullable":true,"type":"string"},"project_id":{"format":"uuid","type":"string"},"project_name":{"type":"string"},"project_task_id":{"format":"uuid","type":"string"},"spent_on":{"format":"date","type":"string"},"started_at":{"format":"date-time","type":"string"},"task_id":{"format":"uuid","type":"string"},"task_name":{"type":"string"}},"type":"object"}},"required":["timer"],"title":"Timer","type":"object"},"InvoiceDelivery":{"properties":{"bcc":{"items":{"type":"string"},"type":"array"},"cc":{"items":{"type":"string"},"type":"array"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"invoice_id":{"format":"uuid","type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"to":{"items":{"type":"string"},"type":"array"}},"required":["id","invoice_id","status","to","cc","bcc","subject","inserted_at"],"title":"InvoiceDelivery","type":"object"},"ReceiptUpload":{"properties":{"file":{"description":"JPEG, PNG or PDF file, at most 5 MB","format":"binary","type":"string"}},"required":["file"],"title":"ReceiptUpload","type":"object"},"TimeEntry":{"description":"`billable`, `currency`, `hourly_rate`, `amount`, `invoice_id` and `invoice_number` are only for a role that sees amounts, and `cost_rate`, `cost_currency` and `cost` only for a role that sees costs.","properties":{"amount":{"nullable":true,"type":"string"},"billable":{"type":"boolean"},"billed_elsewhere_on":{"format":"date","nullable":true,"type":"string"},"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"cost":{"nullable":true,"type":"string"},"cost_currency":{"nullable":true,"type":"string"},"cost_rate":{"nullable":true,"type":"string"},"currency":{"type":"string"},"hourly_rate":{"nullable":true,"type":"string"},"hours":{"description":"Decimal hours, such as `1.50`","type":"string"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"invoice_id":{"format":"uuid","nullable":true,"type":"string"},"invoice_number":{"nullable":true,"type":"string"},"member_id":{"format":"uuid","type":"string"},"member_name":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"project_id":{"format":"uuid","type":"string"},"project_name":{"type":"string"},"project_task_id":{"format":"uuid","type":"string"},"spent_on":{"format":"date","type":"string"},"start_time":{"description":"Optional workspace-local start time in 24-hour `HH:MM` format, or `null` when untimed","nullable":true,"type":"string"},"state":{"enum":["open","draft","locked","written_off","billed_elsewhere","approved","submitted"],"type":"string"},"task_id":{"format":"uuid","type":"string"},"task_name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","spent_on","hours","state","member_id","project_task_id","project_id","client_id"],"title":"TimeEntry","type":"object"},"Webhook":{"properties":{"disabled_at":{"format":"date-time","nullable":true,"type":"string"},"disabled_reason":{"nullable":true,"type":"string"},"events":{"items":{"enum":["invoice.issued","invoice.paid","estimate.accepted","estimate.declined","time_entry.created","time_entry.updated","time_entry.deleted","time_entries.bulk_changed","expense.created","expense.updated","expense.deleted","expenses.bulk_changed"],"type":"string"},"type":"array"},"failing_since":{"format":"date-time","nullable":true,"type":"string"},"failure_streak":{"type":"integer"},"has_secret":{"type":"boolean"},"host":{"type":"string"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"last_delivery":{"allOf":[{"$ref":"#/components/schemas/WebhookDelivery"}],"nullable":true},"state":{"enum":["active","disabled"],"type":"string"},"url":{"type":"string"}},"required":["id","url","host","events","state","failure_streak","has_secret","inserted_at"],"title":"Webhook","type":"object"},"WebhookDeliveryList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array"}},"required":["data"],"title":"WebhookDeliveryList","type":"object"},"ProjectList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Project"},"type":"array"},"default_project_task_id":{"description":"The member's most recently tracked active project_task_id, or null","format":"uuid","nullable":true,"type":"string"}},"required":["data","default_project_task_id"],"title":"ProjectList","type":"object"},"WebhookWithSecret":{"properties":{"disabled_at":{"format":"date-time","nullable":true,"type":"string"},"disabled_reason":{"nullable":true,"type":"string"},"events":{"items":{"enum":["invoice.issued","invoice.paid","estimate.accepted","estimate.declined","time_entry.created","time_entry.updated","time_entry.deleted","time_entries.bulk_changed","expense.created","expense.updated","expense.deleted","expenses.bulk_changed"],"type":"string"},"type":"array"},"failing_since":{"format":"date-time","nullable":true,"type":"string"},"failure_streak":{"type":"integer"},"has_secret":{"type":"boolean"},"host":{"type":"string"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"last_delivery":{"allOf":[{"$ref":"#/components/schemas/WebhookDelivery"}],"nullable":true},"secret":{"description":"Signing secret returned once on creation or secret roll","type":"string"},"state":{"enum":["active","disabled"],"type":"string"},"url":{"type":"string"}},"required":["id","url","host","events","state","failure_streak","has_secret","inserted_at","secret"],"title":"WebhookWithSecret","type":"object"},"InvoiceList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"},"next_page":{"nullable":true,"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"required":["data","page","per_page","next_page"],"title":"InvoiceList","type":"object"},"ExpenseCategoryInput":{"properties":{"name":{"type":"string"}},"required":["name"],"title":"ExpenseCategoryInput","type":"object"},"WebhookList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Webhook"},"type":"array"}},"required":["data"],"title":"WebhookList","type":"object"},"WebhookTestResponse":{"properties":{"delivery":{"allOf":[{"$ref":"#/components/schemas/WebhookDelivery"}],"nullable":true},"webhook":{"$ref":"#/components/schemas/Webhook"}},"required":["webhook","delivery"],"title":"WebhookTestResponse","type":"object"},"Invoice":{"properties":{"amount_due":{"nullable":true,"type":"string"},"amount_paid":{"nullable":true,"type":"string"},"balance":{"nullable":true,"type":"string"},"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"credited_amount":{"nullable":true,"type":"string"},"currency":{"type":"string"},"display_status":{"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"imported_from":{"enum":["harvest","csv"],"nullable":true,"type":"string"},"issue_date":{"format":"date","nullable":true,"type":"string"},"kind":{"enum":["standard","deposit","credit_note"],"type":"string"},"number":{"nullable":true,"type":"string"},"status":{"type":"string"},"total":{"nullable":true,"type":"string"}},"required":["id","kind","status","client_id","currency"],"title":"Invoice","type":"object"},"CreditNoteLineInput":{"properties":{"line_id":{"format":"uuid","type":"string"},"quantity":{"anyOf":[{"type":"string"},{"type":"number"}]},"unit_price":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["line_id"],"title":"CreditNoteLineInput","type":"object"},"TimeEntryChange":{"properties":{"hours":{"anyOf":[{"type":"string"},{"type":"number"}]},"notes":{"nullable":true,"type":"string"},"project_id":{"description":"The project of the task, when the client chose it: a project task of another project is `other_project`","format":"uuid","type":"string"},"project_task_id":{"format":"uuid","type":"string"},"spent_on":{"format":"date","type":"string"},"start_time":{"description":"Optional workspace-local start time in 24-hour `HH:MM` format; `null` clears it","nullable":true,"type":"string"}},"title":"TimeEntryChange","type":"object"},"ProjectInput":{"properties":{"billing":{"enum":["hourly","fixed_fee"],"type":"string"},"budget_alert_percent":{"nullable":true,"type":"integer"},"budget_amount":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"budget_hours":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"budget_kind":{"enum":["none","hours","amount"],"type":"string"},"client_id":{"format":"uuid","type":"string"},"currency":{"nullable":true,"type":"string"},"expense_markup":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"fee":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"hourly_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"name":{"type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"rate_by":{"enum":["task","person"],"type":"string"},"tasks":{"description":"Optional explicit task settings; when omitted, default workspace tasks are enabled","items":{"$ref":"#/components/schemas/ProjectTaskInput"},"type":"array"},"team":{"description":"Optional team assignment overrides applied after `all_future_projects` defaults","items":{"$ref":"#/components/schemas/ProjectTeamInput"},"type":"array"}},"required":["client_id","name"],"title":"ProjectInput","type":"object"},"Task":{"description":"Every role gets `id` and `name`; the other fields are for a role that sees amounts.","properties":{"add_to_new_projects":{"type":"boolean"},"archived":{"type":"boolean"},"billable_by_default":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"}},"required":["id","name"],"title":"Task","type":"object"},"ExpenseCategoryChange":{"properties":{"name":{"type":"string"}},"title":"ExpenseCategoryChange","type":"object"},"WebhookInput":{"properties":{"events":{"description":"Event types to subscribe to (defaults to all events if omitted)","items":{"enum":["invoice.issued","invoice.paid","estimate.accepted","estimate.declined","time_entry.created","time_entry.updated","time_entry.deleted","time_entries.bulk_changed","expense.created","expense.updated","expense.deleted","expenses.bulk_changed"],"type":"string"},"type":"array"},"url":{"description":"Public `https://` endpoint URL","type":"string"}},"required":["url"],"title":"WebhookInput","type":"object"},"ClientChange":{"properties":{"address":{"nullable":true,"type":"string"},"currency":{"description":"ISO 4217 currency code","type":"string"},"hourly_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"language":{"nullable":true,"type":"string"},"name":{"type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"rate_change":{"$ref":"#/components/schemas/RateChangeAnswer"},"tax2_name":{"nullable":true,"type":"string"},"tax2_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true}},"title":"ClientChange","type":"object"},"ProjectDetail":{"description":"Every role gets the ids, the names and `tasks`; the other fields (including `team`) are for a role that sees amounts.","properties":{"archived":{"type":"boolean"},"billing":{"enum":["hourly","fixed_fee"],"type":"string"},"budget_alert_percent":{"nullable":true,"type":"integer"},"budget_amount":{"nullable":true,"type":"string"},"budget_hours":{"nullable":true,"type":"string"},"budget_kind":{"enum":["none","hours","amount"],"type":"string"},"client_id":{"format":"uuid","type":"string"},"client_name":{"type":"string"},"currency":{"nullable":true,"type":"string"},"expense_markup":{"description":"A percentage","nullable":true,"type":"string"},"fee":{"nullable":true,"type":"string"},"hourly_rate":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"payment_instructions":{"nullable":true,"type":"string"},"payment_terms_days":{"nullable":true,"type":"integer"},"rate_by":{"enum":["task","person"],"type":"string"},"tasks":{"items":{"properties":{"billable":{"type":"boolean"},"hourly_rate":{"nullable":true,"type":"string"},"name":{"type":"string"},"project_task_id":{"format":"uuid","type":"string"},"task_id":{"format":"uuid","type":"string"}},"required":["project_task_id","task_id","name"],"type":"object"},"type":"array"},"team":{"items":{"$ref":"#/components/schemas/ProjectMember"},"type":"array"}},"required":["id","name","client_id","client_name","tasks"],"title":"ProjectDetail","type":"object"},"ClientContactList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ClientContact"},"type":"array"}},"required":["data"],"title":"ClientContactList","type":"object"},"EstimateInput":{"properties":{"client_id":{"format":"uuid","type":"string"},"discount_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"issue_date":{"format":"date","type":"string"},"language":{"nullable":true,"type":"string"},"lines":{"items":{"$ref":"#/components/schemas/EstimateLineInput"},"type":"array"},"notes":{"nullable":true,"type":"string"},"number":{"description":"Optional estimate number; auto-numbered if omitted","type":"string"},"tax2_name":{"nullable":true,"type":"string"},"tax2_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"tax_name":{"nullable":true,"type":"string"},"tax_rate":{"anyOf":[{"type":"string"},{"type":"number"}],"nullable":true},"title":{"nullable":true,"type":"string"},"valid_until":{"format":"date","nullable":true,"type":"string"}},"required":["client_id"],"title":"EstimateInput","type":"object"},"EstimateDelivery":{"properties":{"bcc":{"items":{"type":"string"},"type":"array"},"cc":{"items":{"type":"string"},"type":"array"},"estimate_id":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"revision":{"type":"integer"},"status":{"enum":["queued","sent","failed"],"type":"string"},"subject":{"type":"string"},"to":{"items":{"type":"string"},"type":"array"}},"required":["id","estimate_id","revision","status","to","cc","bcc","subject","inserted_at"],"title":"EstimateDelivery","type":"object"},"EstimateSendInput":{"properties":{"bcc":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"nullable":true},"body":{"type":"string"},"cc":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"nullable":true},"copy_me":{"type":"boolean"},"document_token":{"description":"Current `document_token` of the draft","type":"string"},"recipients":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"subject":{"type":"string"}},"required":["document_token"],"title":"EstimateSendInput","type":"object"}},"securitySchemes":{"bearer":{"description":"A personal token of a member (`hb_…`), made on the API page of the app","scheme":"bearer","type":"http"}}},"info":{"title":"Hourbun API","version":"1"},"openapi":"3.0.0","paths":{"/api/v1/tasks/{id}":{"delete":{"callbacks":{},"description":"Deletes a task without time entries or running timers; returns `409 in_use` otherwise.","operationId":"PetalProWeb.Hourbun.Api.TaskController.delete","parameters":[{"description":"The id of the task","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Delete a task","tags":["tasks"]},"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TaskController.show","parameters":[{"description":"The id of the task","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"A task","tags":["tasks"]},"patch":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TaskController.update","parameters":[{"description":"The id of the task","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskChange"}}},"description":"Changes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Update a task","tags":["tasks"]}},"/api/v1/estimates/{id}":{"delete":{"callbacks":{},"description":"Deletes a draft, sent or declined estimate without an email in flight. Accepted estimates cannot be deleted.","operationId":"PetalProWeb.Hourbun.Api.EstimateController.delete","parameters":[{"description":"The id of the estimate","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"description":"Estimate deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Delete an estimate","tags":["estimates"]},"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.EstimateController.show","parameters":[{"description":"The id of the estimate","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateDetail"}}},"description":"Estimate"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"An estimate, with its lines and `document_token`","tags":["estimates"]},"patch":{"callbacks":{},"description":"Updates draft fields and lines. Existing lines are preserved when `lines` is omitted.","operationId":"PetalProWeb.Hourbun.Api.EstimateController.update","parameters":[{"description":"The id of the estimate","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateChange"}}},"description":"Estimate draft changes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateDetail"}}},"description":"Estimate updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Update a draft estimate","tags":["estimates"]}},"/api/v1/clients/{id}/restore":{"post":{"callbacks":{},"description":"Restores the client and the projects that were archived with it.","operationId":"PetalProWeb.Hourbun.Api.ClientController.restore","parameters":[{"description":"The id of the client","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}},"description":"Client"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Restore an archived client","tags":["clients"]}},"/api/v1/timer/start":{"post":{"callbacks":{},"description":"A new timer of a `project_task_id` of `GET /api/v1/projects`, on today of the workspace.","operationId":"PetalProWeb.Hourbun.Api.TimerController.start","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerStart"}}},"description":"The timer","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timer"}}},"description":"Timer"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Start the timer","tags":["timer"]}},"/api/v1/webhooks/{id}/test":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.WebhookController.test_event","parameters":[{"description":"The id of the webhook","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResponse"}}},"description":"Test queued"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Queue a `webhook.test` delivery (REST-only)","tags":["webhooks"]}},"/api/v1/estimates/{id}/revert":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.EstimateController.revert","parameters":[{"description":"The id of the estimate","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateDetail"}}},"description":"Estimate reverted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Revert a sent estimate to draft","tags":["estimates"]}},"/api/v1/tasks":{"get":{"callbacks":{},"description":"For an admin and the owner, the tasks of the workspace; for another role, the tasks of the projects that take its time, with ids and names only. By name.","operationId":"PetalProWeb.Hourbun.Api.TaskController.index","parameters":[{"description":"For an admin and the owner; another role reads the active records that take its time","in":"query","name":"status","required":false,"schema":{"enum":["active","archived","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskList"}}},"description":"Tasks"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The tasks","tags":["tasks"]},"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TaskController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskInput"}}},"description":"Task","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create a task","tags":["tasks"]}},"/api/v1/estimates/{id}/project":{"post":{"callbacks":{},"description":"Creates a new project when `project_id` is omitted, or adds the estimate to an existing project (first returning `409 addition_confirmation_required` with a bound `addition_token` preview).","operationId":"PetalProWeb.Hourbun.Api.EstimateController.convert_project","parameters":[{"description":"The id of the estimate","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateProjectConversionInput"}}},"description":"Project conversion options","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateProjectConversionResponse"}}},"description":"Estimate converted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Convert an accepted estimate to a project","tags":["estimates"]}},"/api/v1/timer/resume":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TimerController.resume","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerName"}}},"description":"The timer that the client saw; the timer of now without it","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timer"}}},"description":"Timer"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Resume the timer","tags":["timer"]}},"/api/v1/invoices/{invoice_id}/credit_notes":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.create_credit_note","parameters":[{"description":"The id of the credited invoice","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteInput"}}},"description":"Credit note","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Credit note draft"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create a credit note draft for an issued invoice","tags":["invoices"]}},"/api/v1/webhooks":{"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.WebhookController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}},"description":"Webhooks"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"List webhooks (REST-only)","tags":["webhooks"]},"post":{"callbacks":{},"description":"Creates a webhook endpoint and returns its signing `secret` once. Runs URL SSRF verification before committing.","operationId":"PetalProWeb.Hourbun.Api.WebhookController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}},"description":"Webhook fields","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}},"description":"Webhook created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Create a webhook (REST-only)","tags":["webhooks"]}},"/api/v1/estimates/{id}/mark_sent":{"post":{"callbacks":{},"description":"Freezes the draft and activates its client link without emailing. Requires current `document_token`.","operationId":"PetalProWeb.Hourbun.Api.EstimateController.mark_sent","parameters":[{"description":"The id of the estimate","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateMarkSentInput"}}},"description":"Document token","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateDetail"}}},"description":"Estimate marked sent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Mark a draft estimate as sent","tags":["estimates"]}},"/api/v1/webhooks/{id}/disable":{"post":{"callbacks":{},"description":"Stops future deliveries to the webhook. Allowed while the workspace plan is paused.","operationId":"PetalProWeb.Hourbun.Api.WebhookController.disable","parameters":[{"description":"The id of the webhook","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"Webhook disabled"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Disable a webhook (REST-only)","tags":["webhooks"]}},"/api/v1/invoices/{invoice_id}/payments/{id}":{"delete":{"callbacks":{},"description":"Removes a manual bookkeeping payment; requires `reason` and `financial_token` query parameters. Refuses Stripe online receipts with `409 online_payment`.","operationId":"PetalProWeb.Hourbun.Api.InvoicePaymentController.delete","parameters":[{"description":"The id of the invoice","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The id of the payment","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Reason for removing the payment","in":"query","name":"reason","required":true,"schema":{"type":"string"}},{"description":"Current `financial_token` of the invoice","in":"query","name":"financial_token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePaymentDeleted"}}},"description":"Deleted payment and updated invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Remove a manual payment from an invoice","tags":["invoices"]},"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoicePaymentController.show","parameters":[{"description":"The id of the invoice","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The id of the payment","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePayment"}}},"description":"Invoice payment"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"A payment of an invoice","tags":["invoices"]}},"/api/v1/uninvoiced":{"get":{"callbacks":{},"description":"Without `from` and `to`, the Uninvoiced report of the app. With them (for \"this month\": the first and the last day of the month), only the time and the expenses of those days, and the fees left to invoice of the fixed-fee projects apart in `fixed_fees`, undated and out of the totals.","operationId":"PetalProWeb.Hourbun.Api.UninvoicedController.show","parameters":[{"description":"The first day, with `to`","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"The last day, with `from`","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Uninvoiced"}}},"description":"Uninvoiced"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The uninvoiced time, fees and expenses","tags":["uninvoiced"]}},"/api/v1/clients":{"get":{"callbacks":{},"description":"For an admin and the owner, the clients of the workspace; for another role, the clients of the projects that take its time, with ids and names only. By name.","operationId":"PetalProWeb.Hourbun.Api.ClientController.index","parameters":[{"description":"For an admin and the owner; another role reads the active records that take its time","in":"query","name":"status","required":false,"schema":{"enum":["active","archived","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientList"}}},"description":"Clients"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The clients","tags":["clients"]},"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ClientController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientInput"}}},"description":"Client","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}},"description":"Client"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create a client","tags":["clients"]}},"/api/v1/time_entries":{"get":{"callbacks":{},"description":"One page of the entries of every member whose time the token sees: the own time, and for a manager the time of a teammate on the projects that the manager manages, for an admin and the owner all time. By date, then creation.","operationId":"PetalProWeb.Hourbun.Api.TimeEntryController.index","parameters":[{"description":"The first day","in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"description":"The last day: the range is at most 366 days, both dates included","in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}},{"description":"Only this project","in":"query","name":"project_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only this member","in":"query","name":"member_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"From 1","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"50 by default","in":"query","name":"per_page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryList"}}},"description":"Entries"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The time entries of a range of days","tags":["time entries"]},"post":{"callbacks":{},"description":"A new entry of a `project_task_id` of `GET /api/v1/projects`, on `spent_on` (today of the workspace by default). The rate, the currency and the billable flag come from the project.","operationId":"PetalProWeb.Hourbun.Api.TimeEntryController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryInput"}}},"description":"The entry","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntry"}}},"description":"Entry"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Track time","tags":["time entries"]}},"/api/v1/invoices/{invoice_id}/payments":{"get":{"callbacks":{},"description":"Lists manual and online payment receipts on an invoice with refunds, net amount, and optional online fee.","operationId":"PetalProWeb.Hourbun.Api.InvoicePaymentController.index","parameters":[{"description":"The id of the invoice","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePaymentList"}}},"description":"Invoice payments"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The payments of an invoice","tags":["invoices"]},"post":{"callbacks":{},"description":"Records a manual bookkeeping payment; requires `financial_token`. Returns `409 overpayment_confirmation_required` with `error.details` if the payment adds overpayment unless `confirm_overpayment: true` is passed.","operationId":"PetalProWeb.Hourbun.Api.InvoicePaymentController.create","parameters":[{"description":"The id of the invoice","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePaymentInput"}}},"description":"Payment","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePaymentRecorded"}}},"description":"Recorded payment and invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Record a manual payment on an invoice","tags":["invoices"]}},"/api/v1/expenses/{id}":{"delete":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ExpenseController.delete","parameters":[{"description":"The id of the expense","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Delete an expense","tags":["expenses"]},"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ExpenseController.show","parameters":[{"description":"The id of the expense","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":"Expense"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"An expense","tags":["expenses"]},"patch":{"callbacks":{},"description":"Updates an expense that this token sees. Moving to a project of another currency requires both `currency` and `amount`.","operationId":"PetalProWeb.Hourbun.Api.ExpenseController.update","parameters":[{"description":"The id of the expense","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseChange"}}},"description":"Changes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":"Expense"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Update an expense","tags":["expenses"]}},"/api/v1/invoices/{id}/revert":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.revert","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Revert a sent invoice to draft","tags":["invoices"]}},"/api/v1/timer":{"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TimerController.show","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timer"}}},"description":"Timer"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The timer","tags":["timer"]}},"/api/v1/invoices/{id}":{"delete":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.delete","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Delete a draft or unpaid sent invoice","tags":["invoices"]},"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.show","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"An invoice, with its lines and concurrency tokens","tags":["invoices"]},"patch":{"callbacks":{},"description":"Ordinary drafts require `draft_token`; omitted selection lists keep existing attachments/items while explicit lists replace them. Credit drafts require `financial_token` matching `parent_financial_token`.","operationId":"PetalProWeb.Hourbun.Api.InvoiceController.update","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceChange"}}},"description":"Draft changes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Update a draft invoice or credit draft","tags":["invoices"]}},"/api/v1/timer/stop":{"post":{"callbacks":{},"description":"The entry of the timer, in `time_entry`. Also in a paused workspace.","operationId":"PetalProWeb.Hourbun.Api.TimerController.stop","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerName"}}},"description":"The timer that the client saw; the timer of now without it","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timer"}}},"description":"No timer, and the entry"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Stop the timer","tags":["timer"]}},"/api/v1/expense_categories":{"get":{"callbacks":{},"description":"For an admin and the owner, workspace expense categories (`status`: `active`, `archived`, or `all`); for another role, active categories.","operationId":"PetalProWeb.Hourbun.Api.ExpenseCategoryController.index","parameters":[{"description":"For an admin and the owner; another role reads the active records that take its time","in":"query","name":"status","required":false,"schema":{"enum":["active","archived","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCategoryList"}}},"description":"Expense categories"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The expense categories","tags":["expense categories"]},"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ExpenseCategoryController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCategoryInput"}}},"description":"Category","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCategory"}}},"description":"Expense category"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create an expense category","tags":["expense categories"]}},"/api/v1/invoices/{id}/link/replace":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.replace_link","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Replace or re-enable the client link of an invoice","tags":["invoices"]}},"/api/v1/projects/{id}":{"delete":{"callbacks":{},"description":"Deletes a project without time entries, expenses or invoice lines; returns `409 in_use` otherwise.","operationId":"PetalProWeb.Hourbun.Api.ProjectController.delete","parameters":[{"description":"The id of the project","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Delete a project","tags":["projects"]},"get":{"callbacks":{},"description":"Returns a project with its tasks and (for roles that see amounts) its assigned team.","operationId":"PetalProWeb.Hourbun.Api.ProjectController.show","parameters":[{"description":"The id of the project","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetail"}}},"description":"Project"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"A project","tags":["projects"]},"patch":{"callbacks":{},"description":"Updates project settings, `tasks` and `team`. If a rate, currency or `rate_by` change affects open time entries, returns `409 rate_change_confirmation_required` with `error.details`; retry with `rate_change` to apply.","operationId":"PetalProWeb.Hourbun.Api.ProjectController.update","parameters":[{"description":"The id of the project","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChange"}}},"description":"Changes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetail"}}},"description":"Project"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Update a project","tags":["projects"]}},"/api/v1/projects/{id}/restore":{"post":{"callbacks":{},"description":"Restores an archived project; returns `409 client_archived` if its client is still archived.","operationId":"PetalProWeb.Hourbun.Api.ProjectController.restore","parameters":[{"description":"The id of the project","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetail"}}},"description":"Project"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Restore an archived project","tags":["projects"]}},"/api/v1/invoices/{id}/link/disable":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.disable_link","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Disable the client link of an invoice","tags":["invoices"]}},"/api/v1/expense_categories/{id}/restore":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ExpenseCategoryController.restore","parameters":[{"description":"The id of the expense category","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCategory"}}},"description":"Expense category"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Restore an archived expense category","tags":["expense categories"]}},"/api/v1/clients/{id}/archive":{"post":{"callbacks":{},"description":"Archives the client and its active projects.","operationId":"PetalProWeb.Hourbun.Api.ClientController.archive","parameters":[{"description":"The id of the client","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}},"description":"Client"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Archive a client","tags":["clients"]}},"/api/v1/members":{"get":{"callbacks":{},"description":"Admin and owner only. Returns member ids, names, roles and archive state (no cost rates or secrets).","operationId":"PetalProWeb.Hourbun.Api.MemberController.index","parameters":[{"description":"For an admin and the owner; another role reads the active records that take its time","in":"query","name":"status","required":false,"schema":{"enum":["active","archived","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberList"}}},"description":"Members"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The members of the workspace","tags":["members"]}},"/api/v1/expense_categories/{id}/archive":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ExpenseCategoryController.archive","parameters":[{"description":"The id of the expense category","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCategory"}}},"description":"Expense category"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Archive an expense category","tags":["expense categories"]}},"/api/v1/clients/{client_id}/contacts":{"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ClientContactController.index","parameters":[{"description":"The id of the client","in":"path","name":"client_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientContactList"}}},"description":"Contacts"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The contacts of a client","tags":["clients"]},"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ClientContactController.create","parameters":[{"description":"The id of the client","in":"path","name":"client_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientContactInput"}}},"description":"Contact","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientContact"}}},"description":"Contact"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Add a contact to a client","tags":["clients"]}},"/api/v1/me":{"get":{"callbacks":{},"description":"The workspace, the member and the role of the token, its access, and which money the role shows.","operationId":"PetalProWeb.Hourbun.Api.MeController.show","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"description":"Me"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The token, its member and its workspace","tags":["me"]}},"/api/v1/projects/{id}/archive":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ProjectController.archive","parameters":[{"description":"The id of the project","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetail"}}},"description":"Project"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Archive a project","tags":["projects"]}},"/api/v1/webhooks/{id}/deliveries":{"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.WebhookController.deliveries","parameters":[{"description":"The id of the webhook","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}},"description":"Deliveries"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"List recent webhook deliveries (REST-only)","tags":["webhooks"]}},"/api/v1/invoices":{"get":{"callbacks":{},"description":"One page of the invoices, newest first. Filter by `status` and optional `client_id`.","operationId":"PetalProWeb.Hourbun.Api.InvoiceController.index","parameters":[{"description":"A tab of the invoice list; `all` by default leaves the credit notes out","in":"query","name":"status","required":false,"schema":{"enum":["all","draft","sent","overdue","paid","written_off","credit_notes"],"type":"string"}},{"description":"Only invoices of this client","in":"query","name":"client_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"From 1","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"50 by default","in":"query","name":"per_page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}},"description":"Invoices"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The invoices","tags":["invoices"]},"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceInput"}}},"description":"Invoice draft","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create a draft invoice","tags":["invoices"]}},"/api/v1/invoices/{id}/write_off":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.write_off","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceWriteOffInput"}}},"description":"Write-off details","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Write off a sent invoice","tags":["invoices"]}},"/api/v1/tasks/{id}/archive":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TaskController.archive","parameters":[{"description":"The id of the task","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Archive a task","tags":["tasks"]}},"/api/v1/invoices/{id}/issue":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.issue","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceIssueInput"}}},"description":"Issue token","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Issue a draft invoice or credit draft","tags":["invoices"]}},"/api/v1/webhooks/{id}/deliveries/{delivery_id}/redeliver":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.WebhookController.redeliver","parameters":[{"description":"The id of the webhook","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The id of the delivery","in":"path","name":"delivery_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}},"description":"Delivery requeued"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Redeliver a webhook delivery (REST-only)","tags":["webhooks"]}},"/api/v1/invoices/deposits":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.create_deposit","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositInvoiceInput"}}},"description":"Deposit draft","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create a draft deposit invoice","tags":["invoices"]}},"/api/v1/timer/pause":{"post":{"callbacks":{},"description":"Also in a paused workspace.","operationId":"PetalProWeb.Hourbun.Api.TimerController.pause","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerName"}}},"description":"The timer that the client saw; the timer of now without it","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timer"}}},"description":"Timer"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Pause the timer","tags":["timer"]}},"/api/v1/time_entries/{id}":{"delete":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TimeEntryController.delete","parameters":[{"description":"The id of the entry","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Delete a time entry","tags":["time entries"]},"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TimeEntryController.show","parameters":[{"description":"The id of the entry","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntry"}}},"description":"Entry"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"A time entry","tags":["time entries"]},"patch":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TimeEntryController.update","parameters":[{"description":"The id of the entry","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryChange"}}},"description":"The fields that change","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntry"}}},"description":"Entry"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Change a time entry","tags":["time entries"]}},"/api/v1/invoices/{id}/reopen":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.InvoiceController.reopen","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}},"description":"Invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Reopen a written-off invoice","tags":["invoices"]}},"/api/v1/estimates/{id}/send":{"post":{"callbacks":{},"description":"Freezes the draft and queues its email delivery. Requires current `document_token`. REST-only.","operationId":"PetalProWeb.Hourbun.Api.EstimateController.send_email","parameters":[{"description":"The id of the estimate","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateSendInput"}}},"description":"Send options","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateSendResponse"}}},"description":"Estimate sent"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Send a draft estimate by email (REST-only)","tags":["estimates"]}},"/api/v1/estimates":{"get":{"callbacks":{},"description":"One page of estimates, newest issue date first. Filter by `status` and optional `client_id`.","operationId":"PetalProWeb.Hourbun.Api.EstimateController.index","parameters":[{"description":"Display status filter (`all` by default)","in":"query","name":"status","required":false,"schema":{"enum":["all","draft","sent","expired","accepted","declined"],"type":"string"}},{"description":"Only estimates of this client","in":"query","name":"client_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"From 1","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"50 by default","in":"query","name":"per_page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateList"}}},"description":"Estimates"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The estimates","tags":["estimates"]},"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.EstimateController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateInput"}}},"description":"Estimate draft fields","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateDetail"}}},"description":"Estimate created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create a draft estimate","tags":["estimates"]}},"/api/v1/webhooks/{id}/enable":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.WebhookController.enable","parameters":[{"description":"The id of the webhook","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"Webhook enabled"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Enable a disabled webhook (REST-only)","tags":["webhooks"]}},"/api/v1/clients/{id}":{"delete":{"callbacks":{},"description":"Deletes a client without projects, invoices or estimates; returns `409 in_use` otherwise.","operationId":"PetalProWeb.Hourbun.Api.ClientController.delete","parameters":[{"description":"The id of the client","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Delete a client","tags":["clients"]},"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ClientController.show","parameters":[{"description":"The id of the client","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}},"description":"Client"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"A client","tags":["clients"]},"patch":{"callbacks":{},"description":"Updates a client. If a rate or currency change affects open time entries, returns `409 rate_change_confirmation_required` with `error.details`; retry with `rate_change` to apply.","operationId":"PetalProWeb.Hourbun.Api.ClientController.update","parameters":[{"description":"The id of the client","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientChange"}}},"description":"Changes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}},"description":"Client"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Update a client","tags":["clients"]}},"/api/v1/webhooks/{id}":{"delete":{"callbacks":{},"description":"Deletes a webhook and its deliveries. Allowed while the workspace plan is paused.","operationId":"PetalProWeb.Hourbun.Api.WebhookController.delete","parameters":[{"description":"The id of the webhook","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"description":"Webhook deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Delete a webhook (REST-only)","tags":["webhooks"]},"get":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.WebhookController.show","parameters":[{"description":"The id of the webhook","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"Webhook"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Get a webhook (REST-only)","tags":["webhooks"]},"patch":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.WebhookController.update","parameters":[{"description":"The id of the webhook","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookChange"}}},"description":"Webhook changes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"Webhook updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Update a webhook (REST-only)","tags":["webhooks"]}},"/api/v1/estimates/{id}/deposit":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.EstimateController.create_deposit","parameters":[{"description":"The id of the estimate","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateDepositInput"}}},"description":"Deposit options","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateDepositResponse"}}},"description":"Deposit created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create a deposit invoice from an accepted estimate","tags":["estimates"]}},"/api/v1/projects":{"get":{"callbacks":{},"description":"Each project has its client and `tasks`: the project tasks that take new time, whose `project_task_id` a new entry or timer names. For an admin and the owner, the projects of the workspace; for another role, the projects that take its time, with ids and names only.","operationId":"PetalProWeb.Hourbun.Api.ProjectController.index","parameters":[{"description":"For an admin and the owner; another role reads the active records that take its time","in":"query","name":"status","required":false,"schema":{"enum":["active","archived","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectList"}}},"description":"Projects"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The projects, with the project tasks that take time","tags":["projects"]},"post":{"callbacks":{},"description":"Creates a project under an active client, optionally configuring explicit `tasks` and `team` assignments.","operationId":"PetalProWeb.Hourbun.Api.ProjectController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectInput"}}},"description":"Project","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetail"}}},"description":"Project"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create a project","tags":["projects"]}},"/api/v1/clients/{client_id}/contacts/{id}":{"delete":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ClientContactController.delete","parameters":[{"description":"The id of the client","in":"path","name":"client_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The id of the contact","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}},"description":"Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Delete a client contact","tags":["clients"]},"patch":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ClientContactController.update","parameters":[{"description":"The id of the client","in":"path","name":"client_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The id of the contact","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientContactChange"}}},"description":"Changes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientContact"}}},"description":"Contact"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Update a client contact","tags":["clients"]}},"/api/v1/expenses/{id}/restore_billed_elsewhere":{"post":{"callbacks":{},"description":"Admin and owner only. Clears the billed-elsewhere state so the expense becomes open again.","operationId":"PetalProWeb.Hourbun.Api.ExpenseController.restore_billed_elsewhere","parameters":[{"description":"The id of the expense","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":"Expense"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Restore a billed-elsewhere expense","tags":["expenses"]}},"/api/v1/expense_categories/{id}":{"patch":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ExpenseCategoryController.update","parameters":[{"description":"The id of the expense category","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCategoryChange"}}},"description":"Changes","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseCategory"}}},"description":"Expense category"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Update an expense category","tags":["expense categories"]}},"/api/v1/expenses":{"get":{"callbacks":{},"description":"One page of the expenses of every member whose expenses the token sees, by the view of the time entries. By date, then creation.","operationId":"PetalProWeb.Hourbun.Api.ExpenseController.index","parameters":[{"description":"The first day","in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"description":"The last day: the range is at most 366 days, both dates included","in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}},{"description":"Only this project","in":"query","name":"project_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Only this member","in":"query","name":"member_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"From 1","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"50 by default","in":"query","name":"per_page","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseList"}}},"description":"Expenses"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"The expenses of a range of days","tags":["expenses"]},"post":{"callbacks":{},"description":"Records an expense on an active project. `spent_on` defaults to today in the workspace time zone; `member_id` records an expense for a teammate whose expenses this token may change.","operationId":"PetalProWeb.Hourbun.Api.ExpenseController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpenseInput"}}},"description":"Expense","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":"Expense"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Create an expense","tags":["expenses"]}},"/api/v1/invoices/{id}/resend":{"post":{"callbacks":{},"description":"REST only. Queues another email delivery for an already-issued invoice or credit note.","operationId":"PetalProWeb.Hourbun.Api.InvoiceController.resend_email","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResendInput"}}},"description":"Resend options","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSent"}}},"description":"Invoice and queued delivery"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Resend an issued invoice or credit note by email","tags":["invoices"]}},"/api/v1/expenses/{id}/receipt":{"delete":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.ExpenseController.delete_receipt","parameters":[{"description":"The id of the expense","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":"Expense"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Remove the receipt of an expense","tags":["expenses"]},"get":{"callbacks":{},"description":"REST only. Returns verified binary bytes (JPEG, PNG or PDF) with `X-Content-Type-Options: nosniff`, `Content-Security-Policy: sandbox`, and `Cache-Control: private, no-store`.","operationId":"PetalProWeb.Hourbun.Api.ExpenseReceiptController.show","parameters":[{"description":"The id of the expense","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Receipt bytes"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Download the receipt file of an expense","tags":["expenses"]},"post":{"callbacks":{},"description":"REST only (`multipart/form-data`). Uploads a JPEG, PNG or PDF file (at most 5 MB) after pre-flight access, lock and quota checks, and commits atomically with optional `Idempotency-Key`.","operationId":"PetalProWeb.Hourbun.Api.ExpenseReceiptController.create","parameters":[{"description":"The id of the expense","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReceiptUpload"}}},"description":"Receipt file","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Expense"}}},"description":"Expense"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Upload or replace the receipt file of an expense","tags":["expenses"]}},"/api/v1/tasks/{id}/restore":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TaskController.restore","parameters":[{"description":"The id of the task","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Restore an archived task","tags":["tasks"]}},"/api/v1/webhooks/{id}/roll_secret":{"post":{"callbacks":{},"description":"Replaces the signing secret immediately and returns the new `secret` once.","operationId":"PetalProWeb.Hourbun.Api.WebhookController.roll_secret","parameters":[{"description":"The id of the webhook","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}},"description":"Secret rolled"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Roll a webhook's signing secret (REST-only)","tags":["webhooks"]}},"/api/v1/invoices/{id}/send":{"post":{"callbacks":{},"description":"REST only. First-send of a draft or credit draft; requires `document_token`.","operationId":"PetalProWeb.Hourbun.Api.InvoiceController.send_email","parameters":[{"description":"The id of the invoice","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSendInput"}}},"description":"Send options","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSent"}}},"description":"Sent invoice and queued delivery"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Service unavailable"}},"summary":"Issue and send a draft invoice or credit draft by email","tags":["invoices"]}},"/api/v1/timer/discard":{"post":{"callbacks":{},"operationId":"PetalProWeb.Hourbun.Api.TimerController.discard","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimerName"}}},"description":"The timer that the client saw; the timer of now without it","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timer"}}},"description":"No timer"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden: `forbidden`, `read_only_token`, `consent_required`, `plan_required` or `access_changed`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid: `invalid` with `fields`, `idempotency_mismatch` or `other_project`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited"}},"summary":"Discard the timer and its time","tags":["timer"]}}},"security":[{"bearer":[]}],"servers":[{"url":"https://hourbun.com","variables":{}}],"tags":[]}