{"components":{"responses":{"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The request conflicts with current state: an Idempotency-Key replayed with a different body (`idempotency_key_reuse`), a key whose first request is still running (`idempotency_key_in_flight`, with Retry-After), or a stale `lock_version`."},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Authenticated, but refused: the key's scopes do not cover this operation, or the key owner's role lacks the capability (code `insufficient_permission`)."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"No such resource in this organization. Cross-tenant and ethically-walled resources answer 404, never 403: the API does not disclose that they exist."},"PreconditionFailed":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The If-Match header no longer matches the resource's current ETag (code `precondition_failed`). Nothing was written; re-GET and retry."},"TooManyRequests":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limited (code `rate_limited`). Honour the Retry-After header; every response carries RateLimit-Limit / RateLimit-Remaining / RateLimit-Reset."},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing, malformed, revoked or expired credential. The request was not authenticated; check the Authorization header."},"UnprocessableEntity":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"The body was understood but refused: a missing required field, a wrongly typed value, or a domain rule. Each error carries a `source.pointer` to the offending field."}},"schemas":{"TeamResponse":{"properties":{"data":{"$ref":"#/components/schemas/TeamResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"TeamResponse","type":"object"},"ReportUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"configuration":{"additionalProperties":true,"nullable":true,"type":"object"},"description":{"nullable":true,"type":"string"},"is_shared":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"report_type":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["reports"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"ReportUpdateRequest","type":"object"},"KeyDateResponse":{"properties":{"data":{"$ref":"#/components/schemas/KeyDateResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"KeyDateResponse","type":"object"},"InvoiceListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/InvoiceResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"InvoiceListResponse","type":"object"},"MatterCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"assigned_to_id":{"format":"uuid","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"jurisdiction_country":{"enum":["AU"],"nullable":true,"type":"string"},"jurisdiction_region":{"enum":["NSW","VIC","QLD","SA","WA","TAS","ACT","NT"],"type":"string"},"matter_type_id":{"format":"uuid","type":"string"},"name":{"type":"string"},"priority":{"enum":["low","normal","high","urgent"],"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"team_id":{"format":"uuid","nullable":true,"type":"string"}},"required":["name","matter_type_id","jurisdiction_region"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["matters"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"MatterCreateRequest","type":"object"},"MatterListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MatterResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"MatterListResponse","type":"object"},"WebhookEndpointResource":{"properties":{"attributes":{"$ref":"#/components/schemas/WebhookEndpointAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["webhooks"],"type":"string"}},"required":["id","type","attributes"],"title":"WebhookEndpointResource","type":"object"},"AutomationAttributes":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/AutomationActionAttributes"},"type":"array"},"conditions":{"items":{"$ref":"#/components/schemas/AutomationCondition"},"type":"array"},"description":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","type":"string"},"is_active":{"type":"boolean"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"type":"string"},"position":{"type":"integer"},"trigger_config":{"additionalProperties":true,"type":"object"},"trigger_type":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"AutomationAttributes","type":"object"},"AvailableTransitionsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AvailableTransitionResource"},"type":"array"}},"title":"AvailableTransitionsResponse","type":"object"},"LeadContactCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"contact_id":{"format":"uuid","type":"string"},"is_primary":{"type":"boolean"},"role":{"nullable":true,"type":"string"}},"required":["contact_id"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["lead-contacts"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"LeadContactCreateRequest","type":"object"},"LeadContactAttributes":{"properties":{"contact_id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"is_primary":{"type":"boolean"},"lead_id":{"format":"uuid","type":"string"},"role":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"LeadContactAttributes","type":"object"},"TaskTemplateUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"assignments":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"category":{"nullable":true,"type":"string"},"default_assignee":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"due_date_mode":{"nullable":true,"type":"string"},"due_key_date_type_id":{"format":"uuid","nullable":true,"type":"string"},"due_offset_days":{"nullable":true,"type":"integer"},"is_active":{"nullable":true,"type":"boolean"},"is_compliance":{"nullable":true,"type":"boolean"},"is_portal_visible":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"priority":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["task-templates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"TaskTemplateUpdateRequest","type":"object"},"IntegrationListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/IntegrationResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"IntegrationListResponse","type":"object"},"InvoiceLineItemListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/InvoiceLineItemResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"InvoiceLineItemListResponse","type":"object"},"TaskTemplateResource":{"properties":{"attributes":{"$ref":"#/components/schemas/TaskTemplateAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["task-templates"],"type":"string"}},"required":["id","type","attributes"],"title":"TaskTemplateResource","type":"object"},"CalendarEventUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"attendee_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"color":{"nullable":true,"type":"string"},"contact_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"description":{"nullable":true,"type":"string"},"end_at":{"format":"date-time","nullable":true,"type":"string"},"is_all_day":{"nullable":true,"type":"boolean"},"location":{"nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"start_at":{"format":"date-time","nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["calendar-events"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"CalendarEventUpdateRequest","type":"object"},"ContactTypeResource":{"properties":{"attributes":{"$ref":"#/components/schemas/ContactTypeAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["contact-types"],"type":"string"}},"required":["id","type","attributes"],"title":"ContactTypeResource","type":"object"},"LeadPipelineStageResource":{"properties":{"attributes":{"$ref":"#/components/schemas/LeadPipelineStageAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["lead-pipeline-stages"],"type":"string"}},"required":["id","type","attributes"],"title":"LeadPipelineStageResource","type":"object"},"PaymentResource":{"properties":{"attributes":{"$ref":"#/components/schemas/PaymentAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["payments"],"type":"string"}},"required":["id","type","attributes"],"title":"PaymentResource","type":"object"},"StepHistoryAttributes":{"properties":{"changed_by_name":{"nullable":true,"type":"string"},"duration_seconds":{"nullable":true,"type":"integer"},"from_reporting_step_id":{"format":"uuid","nullable":true,"type":"string"},"from_reporting_step_label":{"nullable":true,"type":"string"},"from_step_name":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","type":"string"},"reason":{"nullable":true,"type":"string"},"reporting_transition":{"type":"boolean"},"to_reporting_step_id":{"format":"uuid","nullable":true,"type":"string"},"to_reporting_step_label":{"nullable":true,"type":"string"},"to_step_name":{"type":"string"}},"title":"StepHistoryAttributes","type":"object"},"LeadPipelineStageAttributes":{"properties":{"color":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_terminal":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"pipeline_id":{"format":"uuid","nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"step_type":{"enum":["sequential","conditional"],"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"LeadPipelineStageAttributes","type":"object"},"LeadDeferRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"next_follow_up_at":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["leads"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"LeadDeferRequest","type":"object"},"ReportAttributes":{"properties":{"configuration":{"additionalProperties":true,"nullable":true,"type":"object"},"created_by_id":{"format":"uuid","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_shared":{"nullable":true,"type":"boolean"},"is_system":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"report_type":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"ReportAttributes","type":"object"},"DocumentAttributes":{"properties":{"ai_analyzed_at":{"format":"date-time","nullable":true,"type":"string"},"ai_classification":{"nullable":true,"type":"string"},"ai_summary":{"nullable":true,"type":"string"},"archived_at":{"format":"date-time","nullable":true,"type":"string"},"archived_by_id":{"format":"uuid","nullable":true,"type":"string"},"category":{"nullable":true,"type":"string"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"content_type":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"file_size":{"nullable":true,"type":"integer"},"filename":{"nullable":true,"type":"string"},"folder_id":{"format":"uuid","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_current":{"nullable":true,"type":"boolean"},"is_portal_visible":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"retention_expires_at":{"format":"date-time","nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"uploaded_by_id":{"format":"uuid","nullable":true,"type":"string"},"version":{"nullable":true,"type":"integer"}},"title":"DocumentAttributes","type":"object"},"LeadCloseLostRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"reason":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["leads"],"type":"string"}},"type":"object"}},"title":"LeadCloseLostRequest","type":"object"},"FieldGroupRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"code":{"type":"string"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"matter_type_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"required":["name","code"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["field-groups"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"FieldGroupRequest","type":"object"},"ReportResponse":{"properties":{"data":{"$ref":"#/components/schemas/ReportResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"ReportResponse","type":"object"},"NoteResponse":{"properties":{"data":{"$ref":"#/components/schemas/NoteResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"NoteResponse","type":"object"},"FolderRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"contact_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","type":"string"},"name":{"type":"string"},"parent_id":{"format":"uuid","nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"}},"required":["name","matter_id"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["folders"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"FolderRequest","type":"object"},"LeadNoteCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"content":{"type":"string"},"pinned":{"nullable":true,"type":"boolean"},"visibility":{"enum":["internal","client"],"nullable":true,"type":"string"}},"required":["content"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["lead-notes"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"LeadNoteCreateRequest","type":"object"},"CalendarEventResource":{"properties":{"attributes":{"$ref":"#/components/schemas/CalendarEventAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["calendar-events"],"type":"string"}},"required":["id","type","attributes"],"title":"CalendarEventResource","type":"object"},"DocumentRequestTemplateListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DocumentRequestTemplateResource"},"type":"array"},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"title":"DocumentRequestTemplateListResponse","type":"object"},"WebhookDeliveryResponse":{"properties":{"data":{"$ref":"#/components/schemas/WebhookDeliveryResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"WebhookDeliveryResponse","type":"object"},"DocumentUploadUrlResponse":{"properties":{"data":{"properties":{"attributes":{"properties":{"expires_in":{"description":"URL lifetime in seconds.","type":"integer"},"headers":{"additionalProperties":{"type":"string"},"description":"Headers the client must send with the PUT request.","type":"object"},"method":{"enum":["PUT"],"type":"string"},"upload_key":{"type":"string"},"upload_url":{"format":"uri","type":"string"}},"required":["upload_key","upload_url","method","headers","expires_in"],"type":"object"},"type":{"enum":["document-uploads"],"type":"string"}},"required":["type","attributes"],"type":"object"}},"required":["data"],"title":"DocumentUploadUrlResponse","type":"object"},"FieldGroupResource":{"properties":{"attributes":{"$ref":"#/components/schemas/FieldGroupAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["field-groups"],"type":"string"}},"required":["id","type","attributes"],"title":"FieldGroupResource","type":"object"},"LeadNoteListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LeadNoteResource"},"type":"array"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"LeadNoteListResponse","type":"object"},"EmailDraftResponse":{"properties":{"data":{"$ref":"#/components/schemas/EmailDraftResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"EmailDraftResponse","type":"object"},"TaskDependencyResource":{"properties":{"attributes":{"$ref":"#/components/schemas/TaskDependencyAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["task-dependencies"],"type":"string"}},"required":["id","type","attributes"],"title":"TaskDependencyResource","type":"object"},"EmailTemplateResponse":{"properties":{"data":{"$ref":"#/components/schemas/EmailTemplateResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"EmailTemplateResponse","type":"object"},"MatterAttributes":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"assigned_to_id":{"format":"uuid","nullable":true,"type":"string"},"cancelled_at":{"format":"date-time","nullable":true,"type":"string"},"closed_at":{"format":"date-time","nullable":true,"type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"conflict_checks":{"description":"Present on the single-matter endpoint (GET /matters/{id}) only; omitted from the list response.","items":{"$ref":"#/components/schemas/MatterConflictCheckAttributes"},"nullable":true,"type":"array"},"current_reporting_step_id":{"format":"uuid","nullable":true,"type":"string"},"current_step_id":{"format":"uuid","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_blocked":{"nullable":true,"type":"boolean"},"jurisdiction_country":{"enum":["AU"],"nullable":true,"type":"string"},"jurisdiction_country_label":{"nullable":true,"type":"string"},"jurisdiction_region":{"enum":["NSW","VIC","QLD","SA","WA","TAS","ACT","NT"],"nullable":true,"type":"string"},"jurisdiction_region_label":{"nullable":true,"type":"string"},"lock_version":{"description":"Optimistic-lock version incremented by the web edit form. Read-only; API callers wanting compare-and-swap semantics use the If-Match header.","nullable":true,"type":"integer"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"name":{"nullable":true,"type":"string"},"opened_at":{"format":"date-time","nullable":true,"type":"string"},"priority":{"enum":["low","normal","high","urgent"],"nullable":true,"type":"string"},"reference":{"description":"Auto-generated reference code","nullable":true,"type":"string"},"status":{"enum":["open","on_hold","closed","archived","cancelled","completed"],"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"team_id":{"format":"uuid","nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"MatterAttributes","type":"object"},"KeyDateTypeResource":{"properties":{"attributes":{"$ref":"#/components/schemas/KeyDateTypeAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["key-date-types"],"type":"string"}},"required":["id","type","attributes"],"title":"KeyDateTypeResource","type":"object"},"WebhookDeliveryListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookDeliveryResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"WebhookDeliveryListResponse","type":"object"},"UserResource":{"properties":{"attributes":{"$ref":"#/components/schemas/UserAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["users"],"type":"string"}},"required":["id","type","attributes"],"title":"UserResource","type":"object"},"PaginationLinks":{"properties":{"first":{"format":"uri","type":"string"},"last":{"format":"uri","type":"string"},"next":{"format":"uri","nullable":true,"type":"string"},"prev":{"format":"uri","nullable":true,"type":"string"},"self":{"format":"uri","type":"string"}},"title":"PaginationLinks","type":"object"},"ContactAttributes":{"properties":{"abn":{"nullable":true,"type":"string"},"acn":{"nullable":true,"type":"string"},"address_line_1":{"nullable":true,"type":"string"},"address_line_2":{"nullable":true,"type":"string"},"avatar_url":{"nullable":true,"type":"string"},"company_name":{"nullable":true,"type":"string"},"contact_type_id":{"format":"uuid","nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"custom_fields":{"additionalProperties":true,"nullable":true,"type":"object"},"date_of_birth":{"format":"date","nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_archived":{"nullable":true,"type":"boolean"},"is_company":{"nullable":true,"type":"boolean"},"last_name":{"nullable":true,"type":"string"},"mobile":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"string"},"postcode":{"nullable":true,"type":"string"},"preferred_name":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"suburb":{"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"ContactAttributes","type":"object"},"LeadPipelineResource":{"properties":{"attributes":{"$ref":"#/components/schemas/LeadPipelineAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["lead-pipelines"],"type":"string"}},"required":["id","type","attributes"],"title":"LeadPipelineResource","type":"object"},"IntegrationResource":{"properties":{"attributes":{"$ref":"#/components/schemas/IntegrationAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["integrations"],"type":"string"}},"required":["id","type","attributes"],"title":"IntegrationResource","type":"object"},"StepListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StepResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"StepListResponse","type":"object"},"UserAttributes":{"properties":{"email":{"nullable":true,"type":"string"},"full_name":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"role":{"enum":["owner","admin","manager","staff","readonly"],"nullable":true,"type":"string"},"title":{"description":"Job title (partner, associate…), independent of role","nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"UserAttributes","type":"object"},"DocumentRequestTemplateResource":{"properties":{"attributes":{"$ref":"#/components/schemas/DocumentRequestTemplateAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["document-request-templates"],"type":"string"}},"required":["id","type","attributes"],"title":"DocumentRequestTemplateResource","type":"object"},"WorkflowCloneRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"WorkflowCloneRequest","type":"object"},"OrganizationAttributes":{"properties":{"currency":{"nullable":true,"type":"string"},"date_format":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"timezone":{"nullable":true,"type":"string"}},"title":"OrganizationAttributes","type":"object"},"InvoiceLineItemAttributes":{"properties":{"amount_cents":{"nullable":true,"type":"integer"},"description":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"invoice_id":{"format":"uuid","nullable":true,"type":"string"},"line_type":{"enum":["fee","disbursement","discount"],"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"quantity":{"nullable":true,"type":"string"},"tax_rate":{"nullable":true,"type":"string"},"taxable":{"nullable":true,"type":"boolean"},"unit_price_cents":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"InvoiceLineItemAttributes","type":"object"},"NoteCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"content":{"type":"string"}},"required":["content"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["notes"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"NoteCreateRequest","type":"object"},"EmailResource":{"properties":{"attributes":{"$ref":"#/components/schemas/EmailAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["emails"],"type":"string"}},"required":["id","type","attributes"],"title":"EmailResource","type":"object"},"EmailTemplateListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EmailTemplateResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"EmailTemplateListResponse","type":"object"},"FieldGroupResponse":{"properties":{"data":{"$ref":"#/components/schemas/FieldGroupResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"FieldGroupResponse","type":"object"},"WebhookEndpointRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"description":{"nullable":true,"type":"string"},"events":{"description":"Subscribed event names; \"*\" and \"resource.*\" wildcards allowed.","items":{"type":"string"},"type":"array"},"is_active":{"nullable":true,"type":"boolean"},"url":{"type":"string"}},"required":["url","events"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["webhooks"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"WebhookEndpointRequest","type":"object"},"TaskTemplateResponse":{"properties":{"data":{"$ref":"#/components/schemas/TaskTemplateResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"TaskTemplateResponse","type":"object"},"AutomationActionRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"action_type":{"type":"string"},"configuration":{"additionalProperties":true,"type":"object"},"continue_on_error":{"type":"boolean"},"delay_seconds":{"type":"integer"},"position":{"type":"integer"}},"required":["action_type"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["automation-actions"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"AutomationActionRequest","type":"object"},"ReportRunRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"parameters":{"additionalProperties":true,"type":"object"}},"type":"object"}},"type":"object"}},"title":"ReportRunRequest","type":"object"},"DocumentUploadUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"category":{"nullable":true,"type":"string"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"content_type":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"file_size":{"nullable":true,"type":"integer"},"filename":{"nullable":true,"type":"string"},"folder_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["documents"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"DocumentUploadUpdateRequest","type":"object"},"CalendarEventAttributes":{"properties":{"attendee_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"color":{"nullable":true,"type":"string"},"contact_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"created_by_id":{"format":"uuid","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"end_at":{"format":"date-time","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_all_day":{"nullable":true,"type":"boolean"},"location":{"nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"start_at":{"format":"date-time","nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"CalendarEventAttributes","type":"object"},"ReportRunResponse":{"properties":{"data":{"additionalProperties":true,"type":"object"}},"title":"ReportRunResponse","type":"object"},"DisbursementListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DisbursementResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"DisbursementListResponse","type":"object"},"KeyDateTypeRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"auto_complete":{"nullable":true,"type":"boolean"},"code":{"type":"string"},"color":{"nullable":true,"type":"string"},"default_reminder_days":{"nullable":true,"type":"integer"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_milestone":{"nullable":true,"type":"boolean"},"matter_type_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"}},"required":["name","code"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["key-date-types"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"KeyDateTypeRequest","type":"object"},"MatterTypeResponse":{"properties":{"data":{"$ref":"#/components/schemas/MatterTypeResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"MatterTypeResponse","type":"object"},"MatterRoleUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"contact_id":{"format":"uuid","nullable":true,"type":"string"},"is_primary":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"role_name":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["matter-roles"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"MatterRoleUpdateRequest","type":"object"},"TeamResource":{"properties":{"attributes":{"$ref":"#/components/schemas/TeamAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["teams"],"type":"string"}},"required":["id","type","attributes"],"title":"TeamResource","type":"object"},"EmailResponse":{"properties":{"data":{"$ref":"#/components/schemas/EmailResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"EmailResponse","type":"object"},"EmailDraftUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"bcc_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"body_html":{"nullable":true,"type":"string"},"cc_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"reply_to_email_id":{"format":"uuid","nullable":true,"type":"string"},"reply_to_inbound_email_id":{"format":"uuid","nullable":true,"type":"string"},"sender_address":{"nullable":true,"type":"string"},"sender_integration_id":{"format":"uuid","nullable":true,"type":"string"},"subject":{"nullable":true,"type":"string"},"template_id":{"format":"uuid","nullable":true,"type":"string"},"to_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"use_branding":{"nullable":true,"type":"boolean"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["email-drafts"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"EmailDraftUpdateRequest","type":"object"},"AutomationLogResource":{"properties":{"attributes":{"$ref":"#/components/schemas/AutomationLogAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["automation-logs"],"type":"string"}},"required":["id","type","attributes"],"title":"AutomationLogResource","type":"object"},"IntegrationAttributes":{"properties":{"capabilities":{"description":"What this connection can do for the firm, e.g. [\"send_email\"]","items":{"type":"string"},"nullable":true,"type":"array"},"connected_by_id":{"description":"The user who connected (and owns) this integration","format":"uuid","nullable":true,"type":"string"},"display_name":{"description":"Human-readable account name reported by the provider","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"mailbox_email":{"description":"The connected mailbox address, for mailbox providers","nullable":true,"type":"string"},"provider":{"enum":["google","microsoft","outlook","sharepoint","onedrive","xero","stripe","slack","zapier","make","dropbox","quickbooks","myob","pexa","infotrack","salesforce","hubspot","docusign","imanage","clm","legal_research","court_filing","sendgrid","twilio"],"nullable":true,"type":"string"},"service":{"enum":["calendar","storage","accounting","payment","email","notifications","automation"],"nullable":true,"type":"string"},"status":{"enum":["active","pending","expired","disconnected"],"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"IntegrationAttributes","type":"object"},"PaginationMeta":{"properties":{"page":{"description":"Current page number","type":"integer"},"page_size":{"description":"Records per page","type":"integer"},"total":{"description":"Total record count","type":"integer"},"total_pages":{"description":"Total pages","type":"integer"}},"title":"PaginationMeta","type":"object"},"RoleTemplateResponse":{"properties":{"data":{"$ref":"#/components/schemas/RoleTemplateResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"RoleTemplateResponse","type":"object"},"DocumentListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DocumentResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"DocumentListResponse","type":"object"},"FieldDefinitionUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"code":{"nullable":true,"type":"string"},"default_value":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"field_group_id":{"format":"uuid","nullable":true,"type":"string"},"field_type":{"nullable":true,"type":"string"},"is_required":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"options":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"placeholder":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"validation_rules":{"additionalProperties":true,"nullable":true,"type":"object"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["field-definitions"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"FieldDefinitionUpdateRequest","type":"object"},"InvoiceLineItemCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"description":{"type":"string"},"line_type":{"enum":["fee","disbursement","discount"],"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"quantity":{"nullable":true,"type":"string"},"tax_rate":{"nullable":true,"type":"string"},"taxable":{"nullable":true,"type":"boolean"},"unit_price_cents":{"type":"integer"}},"required":["description","unit_price_cents"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["invoice-line-items"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"InvoiceLineItemCreateRequest","type":"object"},"LeadListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LeadResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"LeadListResponse","type":"object"},"KeyDateTypeResponse":{"properties":{"data":{"$ref":"#/components/schemas/KeyDateTypeResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"KeyDateTypeResponse","type":"object"},"TaskDependencyResponse":{"properties":{"data":{"$ref":"#/components/schemas/TaskDependencyResource"}},"title":"TaskDependencyResponse","type":"object"},"EmailTemplateAttributes":{"properties":{"body_html":{"nullable":true,"type":"string"},"body_text":{"nullable":true,"type":"string"},"category":{"nullable":true,"type":"string"},"editor_design":{"additionalProperties":true,"nullable":true,"type":"object"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"is_system":{"nullable":true,"type":"boolean"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"step_id":{"format":"uuid","nullable":true,"type":"string"},"subject":{"nullable":true,"type":"string"},"system_key":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"EmailTemplateAttributes","type":"object"},"DocumentRequestTemplateResponse":{"properties":{"data":{"$ref":"#/components/schemas/DocumentRequestTemplateResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"DocumentRequestTemplateResponse","type":"object"},"FieldGroupListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FieldGroupResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"FieldGroupListResponse","type":"object"},"WebhookEndpointListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookEndpointResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"WebhookEndpointListResponse","type":"object"},"WebhookEndpointResponse":{"properties":{"data":{"$ref":"#/components/schemas/WebhookEndpointResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"WebhookEndpointResponse","type":"object"},"EmailDraftResource":{"properties":{"attributes":{"$ref":"#/components/schemas/EmailDraftAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["email-drafts"],"type":"string"}},"required":["id","type","attributes"],"title":"EmailDraftResource","type":"object"},"EmailDraftListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EmailDraftResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"EmailDraftListResponse","type":"object"},"OrganizationResponse":{"properties":{"data":{"$ref":"#/components/schemas/OrganizationResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"OrganizationResponse","type":"object"},"WorkflowUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"description":{"nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"is_template":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["workflows"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"WorkflowUpdateRequest","type":"object"},"RoleTemplateAttributes":{"properties":{"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_primary":{"nullable":true,"type":"boolean"},"is_required":{"nullable":true,"type":"boolean"},"matter_type_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"max_count":{"nullable":true,"type":"integer"},"position":{"nullable":true,"type":"integer"},"role_name":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"RoleTemplateAttributes","type":"object"},"TaskCommentAttributes":{"properties":{"body":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"mentioned_user_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"portal_user_id":{"format":"uuid","nullable":true,"type":"string"},"task_id":{"format":"uuid","nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"user_id":{"format":"uuid","nullable":true,"type":"string"}},"title":"TaskCommentAttributes","type":"object"},"ReportRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"configuration":{"additionalProperties":true,"nullable":true,"type":"object"},"description":{"nullable":true,"type":"string"},"is_shared":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"report_type":{"type":"string"}},"required":["name","report_type"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["reports"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"ReportRequest","type":"object"},"EmailDraftCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"bcc_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"body_html":{"nullable":true,"type":"string"},"cc_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"lead_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"reply_to_email_id":{"format":"uuid","nullable":true,"type":"string"},"reply_to_inbound_email_id":{"format":"uuid","nullable":true,"type":"string"},"sender_address":{"nullable":true,"type":"string"},"sender_integration_id":{"format":"uuid","nullable":true,"type":"string"},"subject":{"nullable":true,"type":"string"},"template_id":{"format":"uuid","nullable":true,"type":"string"},"to_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"use_branding":{"nullable":true,"type":"boolean"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["email-drafts"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"EmailDraftCreateRequest","type":"object"},"ContactMergeRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"field_selections":{"additionalProperties":true,"type":"object"},"secondary_id":{"format":"uuid","type":"string"}},"required":["secondary_id"],"type":"object"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"ContactMergeRequest","type":"object"},"DocumentRequestResource":{"properties":{"attributes":{"$ref":"#/components/schemas/DocumentRequestAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["document-requests"],"type":"string"}},"required":["id","type","attributes"],"title":"DocumentRequestResource","type":"object"},"MatterUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"assigned_to_id":{"format":"uuid","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"jurisdiction_country":{"enum":["AU"],"nullable":true,"type":"string"},"jurisdiction_region":{"enum":["NSW","VIC","QLD","SA","WA","TAS","ACT","NT"],"nullable":true,"type":"string"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"name":{"nullable":true,"type":"string"},"priority":{"enum":["low","normal","high","urgent"],"nullable":true,"type":"string"},"status":{"enum":["open","on_hold","closed","archived","cancelled","completed"],"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"team_id":{"format":"uuid","nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["matters"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"MatterUpdateRequest","type":"object"},"FieldValueSetRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"values":{"additionalProperties":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"description":"Map of field_definition_id (UUID) to the value to set. Dates and datetimes are passed as strings; null clears a value.","type":"object"}},"required":["values"],"type":"object"},"type":{"enum":["field-values"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"FieldValueSetRequest","type":"object"},"ContactTypeResponse":{"properties":{"data":{"$ref":"#/components/schemas/ContactTypeResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"ContactTypeResponse","type":"object"},"DisbursementRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"amount_cents":{"type":"integer"},"category":{"nullable":true,"type":"string"},"date":{"format":"date","type":"string"},"description":{"type":"string"},"is_billable":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","type":"string"},"user_id":{"format":"uuid","nullable":true,"type":"string"}},"required":["description","amount_cents","date","matter_id"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["disbursements"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"DisbursementRequest","type":"object"},"LeadContactResource":{"properties":{"attributes":{"$ref":"#/components/schemas/LeadContactAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["lead-contacts"],"type":"string"}},"required":["id","type","attributes"],"title":"LeadContactResource","type":"object"},"DocumentResponse":{"properties":{"data":{"$ref":"#/components/schemas/DocumentResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"DocumentResponse","type":"object"},"TimeEntryRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"category":{"nullable":true,"type":"string"},"date":{"format":"date","type":"string"},"description":{"type":"string"},"duration_minutes":{"type":"integer"},"is_billable":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"rate_cents":{"nullable":true,"type":"integer"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"user_id":{"format":"uuid","nullable":true,"type":"string"}},"required":["description","date","duration_minutes"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["time-entries"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"TimeEntryRequest","type":"object"},"KeyDateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"date":{"format":"date","type":"string"},"is_all_day":{"nullable":true,"type":"boolean"},"key_date_type_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","type":"string"},"name":{"type":"string"},"notes":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"}},"required":["name","date","matter_id"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["key-dates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"KeyDateRequest","type":"object"},"StepResponse":{"properties":{"data":{"$ref":"#/components/schemas/StepResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"StepResponse","type":"object"},"TimeEntryUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"category":{"nullable":true,"type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"duration_minutes":{"nullable":true,"type":"integer"},"is_billable":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"rate_cents":{"nullable":true,"type":"integer"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["time-entries"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"TimeEntryUpdateRequest","type":"object"},"AutomationResource":{"properties":{"attributes":{"$ref":"#/components/schemas/AutomationAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["automations"],"type":"string"}},"required":["id","type","attributes"],"title":"AutomationResource","type":"object"},"FolderAttributes":{"properties":{"contact_id":{"format":"uuid","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_system":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"parent_id":{"format":"uuid","nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"FolderAttributes","type":"object"},"DisbursementResponse":{"properties":{"data":{"$ref":"#/components/schemas/DisbursementResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"DisbursementResponse","type":"object"},"InvoiceLineItemResponse":{"properties":{"data":{"$ref":"#/components/schemas/InvoiceLineItemResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"InvoiceLineItemResponse","type":"object"},"TimeEntryListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TimeEntryResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"TimeEntryListResponse","type":"object"},"WorkflowRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"description":{"nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"is_template":{"nullable":true,"type":"boolean"},"name":{"type":"string"}},"required":["name"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["workflows"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"WorkflowRequest","type":"object"},"InvoiceResponse":{"properties":{"data":{"$ref":"#/components/schemas/InvoiceResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"InvoiceResponse","type":"object"},"RoleTemplateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"is_primary":{"nullable":true,"type":"boolean"},"is_required":{"nullable":true,"type":"boolean"},"matter_type_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"max_count":{"nullable":true,"type":"integer"},"position":{"nullable":true,"type":"integer"},"role_name":{"type":"string"}},"required":["role_name"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["role-templates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"RoleTemplateRequest","type":"object"},"TaskTemplateAttributes":{"properties":{"assignments":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"category":{"nullable":true,"type":"string"},"default_assignee":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"due_date_mode":{"nullable":true,"type":"string"},"due_key_date_type_id":{"format":"uuid","nullable":true,"type":"string"},"due_offset_days":{"nullable":true,"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"is_compliance":{"nullable":true,"type":"boolean"},"is_portal_visible":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"priority":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"TaskTemplateAttributes","type":"object"},"MatterTypeAttributes":{"properties":{"code":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"default_tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"reference_format":{"nullable":true,"type":"string"},"required_contact_types":{"items":{"type":"string"},"nullable":true,"type":"array"},"settings":{"additionalProperties":true,"nullable":true,"type":"object"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"workflow_id":{"format":"uuid","nullable":true,"type":"string"}},"title":"MatterTypeAttributes","type":"object"},"WorkflowListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WorkflowResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"WorkflowListResponse","type":"object"},"EmailDraftAttributes":{"properties":{"bcc_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"body_html":{"nullable":true,"type":"string"},"cc_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"created_by_id":{"format":"uuid","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"last_edited_by_id":{"format":"uuid","nullable":true,"type":"string"},"lead_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"reply_to_email_id":{"format":"uuid","nullable":true,"type":"string"},"reply_to_inbound_email_id":{"format":"uuid","nullable":true,"type":"string"},"sender_address":{"nullable":true,"type":"string"},"sender_integration_id":{"format":"uuid","nullable":true,"type":"string"},"source":{"enum":["manual","automation","step_action","workflow_action","api"],"nullable":true,"type":"string"},"subject":{"nullable":true,"type":"string"},"template_id":{"format":"uuid","nullable":true,"type":"string"},"to_addresses":{"items":{"type":"string"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"use_branding":{"nullable":true,"type":"boolean"}},"title":"EmailDraftAttributes","type":"object"},"DisbursementAttributes":{"properties":{"amount_cents":{"nullable":true,"type":"integer"},"category":{"nullable":true,"type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"invoice_id":{"format":"uuid","nullable":true,"type":"string"},"is_billable":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"receipt_document_id":{"format":"uuid","nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"user_id":{"format":"uuid","nullable":true,"type":"string"}},"title":"DisbursementAttributes","type":"object"},"LeadPipelineListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LeadPipelineResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"LeadPipelineListResponse","type":"object"},"ContactTypeRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"code":{"type":"string"},"color":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"name":{"type":"string"}},"required":["name","code"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["contact-types"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"ContactTypeRequest","type":"object"},"LeadPipelineAttributes":{"properties":{"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"is_default":{"nullable":true,"type":"boolean"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"LeadPipelineAttributes","type":"object"},"MatterConflictCheckAttributes":{"properties":{"acknowledged_at":{"format":"date-time","nullable":true,"type":"string"},"acknowledged_by":{"format":"uuid","nullable":true,"type":"string"},"check_type":{"enum":["new_matter","new_party","new_lead","lead_conversion","matter_reopen","periodic","lateral_hire","manual"],"type":"string"},"clearance_reason":{"nullable":true,"type":"string"},"cleared_at":{"format":"date-time","nullable":true,"type":"string"},"cleared_by_user_id":{"format":"uuid","nullable":true,"type":"string"},"conflict_type":{"enum":["same_party","opposing_party","related","related_party","identifier","former_client"],"nullable":true,"type":"string"},"conflicting_matter_id":{"format":"uuid","nullable":true,"type":"string"},"conflicting_matter_name":{"nullable":true,"type":"string"},"conflicting_matter_reference":{"nullable":true,"type":"string"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"contact_name":{"nullable":true,"type":"string"},"disclosure_redacted":{"nullable":false,"type":"boolean"},"highest_score":{"description":"Combined match confidence, 0.0 to 1.0.","format":"float","nullable":true,"type":"number"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"rechecked_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["pending","flagged","blocked","cleared","waived","escalated","acknowledged","resolved"],"type":"string"},"subject_name":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"MatterConflictCheckAttributes","type":"object"},"MatterRoleRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"contact_id":{"format":"uuid","type":"string"},"is_primary":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"role_name":{"type":"string"},"source":{"nullable":true,"type":"string"}},"required":["role_name","contact_id"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["matter-roles"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"MatterRoleRequest","type":"object"},"TaskCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"assigned_to_id":{"format":"uuid","nullable":true,"type":"string"},"category":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"lead_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"type":"string"},"parent_task_id":{"format":"uuid","nullable":true,"type":"string"},"priority":{"enum":["low","normal","high","urgent"],"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["name"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["tasks"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"TaskCreateRequest","type":"object"},"StepRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"color":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_initial":{"nullable":true,"type":"boolean"},"is_terminal":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"position":{"type":"integer"},"reporting_step_id":{"format":"uuid","nullable":true,"type":"string"},"settings":{"additionalProperties":true,"nullable":true,"type":"object"},"step_type":{"enum":["sequential","conditional"],"nullable":true,"type":"string"},"workflow_id":{"format":"uuid","nullable":true,"type":"string"}},"required":["name","position"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["steps"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"StepRequest","type":"object"},"LeadNoteResponse":{"properties":{"data":{"$ref":"#/components/schemas/LeadNoteResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"LeadNoteResponse","type":"object"},"DocumentCollectionResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DocumentResource"},"type":"array"},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"title":"DocumentCollectionResponse","type":"object"},"TaskCommentUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"body":{"nullable":true,"type":"string"},"mentioned_user_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["task-comments"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"TaskCommentUpdateRequest","type":"object"},"MatterResponse":{"properties":{"data":{"$ref":"#/components/schemas/MatterResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"MatterResponse","type":"object"},"TeamListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TeamResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"TeamListResponse","type":"object"},"FieldDefinitionListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FieldDefinitionResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"FieldDefinitionListResponse","type":"object"},"FieldValueIndexMeta":{"properties":{"record_id":{"format":"uuid","nullable":true,"type":"string"}},"title":"FieldValueIndexMeta","type":"object"},"NoteResource":{"properties":{"attributes":{"$ref":"#/components/schemas/NoteAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["notes"],"type":"string"}},"required":["id","type","attributes"],"title":"NoteResource","type":"object"},"FieldGroupAttributes":{"properties":{"code":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"is_system":{"nullable":true,"type":"boolean"},"matter_type_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"FieldGroupAttributes","type":"object"},"TeamAttributes":{"properties":{"archived_at":{"format":"date-time","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"lead_user_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"TeamAttributes","type":"object"},"EmailTemplateUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"body_html":{"nullable":true,"type":"string"},"body_text":{"nullable":true,"type":"string"},"category":{"nullable":true,"type":"string"},"editor_design":{"additionalProperties":true,"nullable":true,"type":"object"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"step_id":{"format":"uuid","nullable":true,"type":"string"},"subject":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["email-templates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"EmailTemplateUpdateRequest","type":"object"},"KeyDateTypeUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"auto_complete":{"nullable":true,"type":"boolean"},"code":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"default_reminder_days":{"nullable":true,"type":"integer"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_milestone":{"nullable":true,"type":"boolean"},"matter_type_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["key-date-types"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"KeyDateTypeUpdateRequest","type":"object"},"CalendarEventRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"attendee_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"color":{"nullable":true,"type":"string"},"contact_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"description":{"nullable":true,"type":"string"},"end_at":{"format":"date-time","type":"string"},"is_all_day":{"nullable":true,"type":"boolean"},"location":{"nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"start_at":{"format":"date-time","type":"string"},"title":{"type":"string"}},"required":["title","start_at","end_at"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["calendar-events"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"CalendarEventRequest","type":"object"},"InvoiceResource":{"properties":{"attributes":{"$ref":"#/components/schemas/InvoiceAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["invoices"],"type":"string"}},"required":["id","type","attributes"],"title":"InvoiceResource","type":"object"},"ChangeStepRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"reason":{"description":"Optional reason for step change","nullable":true,"type":"string"},"to_step_id":{"description":"Target step ID","format":"uuid","type":"string"}},"required":["to_step_id"],"type":"object"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"ChangeStepRequest","type":"object"},"NoteListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/NoteResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"NoteListResponse","type":"object"},"InvoiceUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"contact_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"payment_terms":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["invoices"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"InvoiceUpdateRequest","type":"object"},"NoteUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"content":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["notes"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"NoteUpdateRequest","type":"object"},"LeadNoteAttributes":{"properties":{"content":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"lead_id":{"format":"uuid","nullable":true,"type":"string"},"pinned":{"nullable":true,"type":"boolean"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"user_id":{"format":"uuid","nullable":true,"type":"string"},"visibility":{"enum":["internal","client"],"nullable":true,"type":"string"}},"title":"LeadNoteAttributes","type":"object"},"OrganizationResource":{"properties":{"attributes":{"$ref":"#/components/schemas/OrganizationAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["organizations"],"type":"string"}},"required":["id","type","attributes"],"title":"OrganizationResource","type":"object"},"MatterTypeRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"code":{"type":"string"},"color":{"nullable":true,"type":"string"},"default_tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"reference_format":{"nullable":true,"type":"string"},"settings":{"additionalProperties":true,"nullable":true,"type":"object"},"workflow_id":{"format":"uuid","nullable":true,"type":"string"}},"required":["name","code"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["matter-types"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"MatterTypeRequest","type":"object"},"RoleTemplateResource":{"properties":{"attributes":{"$ref":"#/components/schemas/RoleTemplateAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["role-templates"],"type":"string"}},"required":["id","type","attributes"],"title":"RoleTemplateResource","type":"object"},"MatterTypeUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"code":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"default_tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"reference_format":{"nullable":true,"type":"string"},"settings":{"additionalProperties":true,"nullable":true,"type":"object"},"workflow_id":{"format":"uuid","nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["matter-types"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"MatterTypeUpdateRequest","type":"object"},"KeyDateAttributes":{"properties":{"completed_at":{"format":"date-time","nullable":true,"type":"string"},"completed_by_id":{"format":"uuid","nullable":true,"type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_all_day":{"nullable":true,"type":"boolean"},"key_date_type_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"source_id":{"format":"uuid","nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"KeyDateAttributes","type":"object"},"ResourceMeta":{"properties":{"timestamp":{"format":"date-time","type":"string"}},"title":"ResourceMeta","type":"object"},"ContactResponse":{"properties":{"data":{"$ref":"#/components/schemas/ContactResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"ContactResponse","type":"object"},"CalendarEventResponse":{"properties":{"data":{"$ref":"#/components/schemas/CalendarEventResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"CalendarEventResponse","type":"object"},"DocumentRequestResponse":{"properties":{"data":{"$ref":"#/components/schemas/DocumentRequestResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"DocumentRequestResponse","type":"object"},"AuditLogListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuditLogResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"AuditLogListResponse","type":"object"},"DocumentRequestAttributes":{"properties":{"closed_at":{"format":"date-time","nullable":true,"type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"email_id":{"format":"uuid","nullable":true,"type":"string"},"expires_at":{"format":"date-time","type":"string"},"folder_id":{"format":"uuid","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","type":"string"},"instructions":{"nullable":true,"type":"string"},"items":{"items":{"$ref":"#/components/schemas/DocumentRequestItemAttributes"},"type":"array"},"matter_id":{"format":"uuid","type":"string"},"recipient_email":{"type":"string"},"recipient_name":{"type":"string"},"requested_by_id":{"format":"uuid","nullable":true,"type":"string"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"uploads_count":{"type":"integer"}},"title":"DocumentRequestAttributes","type":"object"},"AutomationTriggerResponse":{"properties":{"meta":{"properties":{"status":{"enum":["enqueued"],"type":"string"}},"type":"object"}},"title":"AutomationTriggerResponse","type":"object"},"TimeEntryResponse":{"properties":{"data":{"$ref":"#/components/schemas/TimeEntryResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"TimeEntryResponse","type":"object"},"CalendarEventListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CalendarEventResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"CalendarEventListResponse","type":"object"},"AutomationListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AutomationResource"},"type":"array"},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"title":"AutomationListResponse","type":"object"},"AutomationActionResponse":{"properties":{"data":{"$ref":"#/components/schemas/AutomationActionResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"AutomationActionResponse","type":"object"},"MatterRoleAttributes":{"properties":{"contact_id":{"format":"uuid","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_primary":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"role_name":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"MatterRoleAttributes","type":"object"},"EmailListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EmailResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"EmailListResponse","type":"object"},"InvoiceLineItemUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"description":{"nullable":true,"type":"string"},"line_type":{"enum":["fee","disbursement","discount"],"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"quantity":{"nullable":true,"type":"string"},"tax_rate":{"nullable":true,"type":"string"},"taxable":{"nullable":true,"type":"boolean"},"unit_price_cents":{"nullable":true,"type":"integer"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["invoice-line-items"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"InvoiceLineItemUpdateRequest","type":"object"},"FieldValueIndexResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FieldValueResource"},"type":"array"},"meta":{"$ref":"#/components/schemas/FieldValueIndexMeta"}},"title":"FieldValueIndexResponse","type":"object"},"RoleTemplateUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"is_primary":{"nullable":true,"type":"boolean"},"is_required":{"nullable":true,"type":"boolean"},"matter_type_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"max_count":{"nullable":true,"type":"integer"},"position":{"nullable":true,"type":"integer"},"role_name":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["role-templates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"RoleTemplateUpdateRequest","type":"object"},"ContactTypeAttributes":{"properties":{"code":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"is_system":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"ContactTypeAttributes","type":"object"},"DocumentRequestListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DocumentRequestResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"DocumentRequestListResponse","type":"object"},"ContactListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ContactResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"ContactListResponse","type":"object"},"AutomationCondition":{"additionalProperties":false,"properties":{"field":{"description":"Condition field path, for example matter.jurisdiction_region","type":"string"},"operator":{"enum":["equals","not_equals","contains","starts_with","in","not_in","greater_than","less_than","between","is_empty","is_not_empty","older_than","newer_than"],"type":"string"},"type":{"enum":["field","field_value","role_exists","step","time"],"type":"string"},"value":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]}},"required":["field","operator"],"title":"AutomationCondition","type":"object"},"InvoiceAttributes":{"properties":{"accounting_provider":{"nullable":true,"type":"string"},"accounting_sync_status":{"nullable":true,"type":"string"},"balance_cents":{"nullable":true,"type":"integer"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"delivered_at":{"format":"date-time","nullable":true,"type":"string"},"delivery_status":{"nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"invoice_number":{"nullable":true,"type":"string"},"invoice_type":{"nullable":true,"type":"string"},"issue_date":{"format":"date","nullable":true,"type":"string"},"issued_at":{"format":"date-time","nullable":true,"type":"string"},"last_sync_error":{"nullable":true,"type":"string"},"line_items":{"description":"The invoice's line items (show only), each as {id, type, attributes} with the attributes of the invoice_line_items resource.","items":{"properties":{"attributes":{"properties":{"amount_cents":{"nullable":true,"type":"integer"},"description":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"invoice_id":{"format":"uuid","nullable":true,"type":"string"},"line_type":{"enum":["fee","disbursement","discount"],"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"quantity":{"nullable":true,"type":"string"},"tax_rate":{"nullable":true,"type":"string"},"taxable":{"nullable":true,"type":"boolean"},"unit_price_cents":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"InvoiceLineItemAttributes","type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["invoice-line-items"],"type":"string"}},"required":["id","type","attributes"],"type":"object"},"nullable":true,"type":"array"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"paid_at":{"format":"date-time","nullable":true,"type":"string"},"paid_cents":{"nullable":true,"type":"integer"},"payment_mode":{"nullable":true,"type":"string"},"payment_provider":{"nullable":true,"type":"string"},"payment_status":{"nullable":true,"type":"string"},"payment_terms":{"nullable":true,"type":"string"},"payments":{"description":"Payments recorded against the invoice (show only), newest first.","items":{"properties":{"amount_cents":{"type":"integer"},"id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"method":{"nullable":true,"type":"string"},"paid_at":{"format":"date-time","nullable":true,"type":"string"},"reference":{"nullable":true,"type":"string"}},"required":["id","amount_cents"],"type":"object"},"nullable":true,"type":"array"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"subtotal_cents":{"nullable":true,"type":"integer"},"tax_cents":{"nullable":true,"type":"integer"},"total_cents":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"voided_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"InvoiceAttributes","type":"object"},"FieldDefinitionAttributes":{"properties":{"code":{"nullable":true,"type":"string"},"default_value":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"field_group_id":{"format":"uuid","nullable":true,"type":"string"},"field_type":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_readonly":{"nullable":true,"type":"boolean"},"is_required":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"options":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"placeholder":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"settings":{"additionalProperties":true,"nullable":true,"type":"object"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"validation_rules":{"additionalProperties":true,"nullable":true,"type":"object"}},"title":"FieldDefinitionAttributes","type":"object"},"StepHistoryResource":{"properties":{"attributes":{"$ref":"#/components/schemas/StepHistoryAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["step-changes"],"type":"string"}},"required":["id","type","attributes"],"title":"StepHistoryResource","type":"object"},"AutomationLogAttributes":{"properties":{"automation_id":{"format":"uuid","type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"duration_ms":{"nullable":true,"type":"integer"},"error_message":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["running","completed","failed"],"type":"string"},"trigger_type":{"nullable":true,"type":"string"}},"title":"AutomationLogAttributes","type":"object"},"FieldValueResource":{"properties":{"attributes":{"$ref":"#/components/schemas/FieldValueAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["field-values"],"type":"string"}},"required":["id","type","attributes"],"title":"FieldValueResource","type":"object"},"WebhookDeliveryAttributes":{"properties":{"attempt":{"nullable":true,"type":"integer"},"duration_ms":{"nullable":true,"type":"integer"},"error_message":{"nullable":true,"type":"string"},"event":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"next_retry_at":{"format":"date-time","nullable":true,"type":"string"},"response_status":{"nullable":true,"type":"integer"},"status":{"enum":["pending","success","failed","retrying"],"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"webhook_endpoint_id":{"format":"uuid","nullable":true,"type":"string"}},"title":"WebhookDeliveryAttributes","type":"object"},"LeadCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"jurisdiction_country":{"nullable":true,"pattern":"^[Aa][Uu]$","type":"string"},"jurisdiction_region":{"nullable":true,"pattern":"^(?i:NSW|VIC|QLD|SA|WA|TAS|ACT|NT)$","type":"string"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"name":{"type":"string"},"owner_id":{"format":"uuid","nullable":true,"type":"string"},"priority":{"enum":["low","normal","high","urgent"],"nullable":true,"type":"string"},"referral_source":{"nullable":true,"type":"string"},"source":{"enum":["portal","intake_forms","email","chat","manual","api","import","referral"],"nullable":true,"type":"string"},"source_detail":{"nullable":true,"type":"string"},"summary":{"nullable":true,"type":"string"}},"required":["name"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["leads"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"LeadCreateRequest","type":"object"},"LeadNoteResource":{"properties":{"attributes":{"$ref":"#/components/schemas/LeadNoteAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["lead-notes"],"type":"string"}},"required":["id","type","attributes"],"title":"LeadNoteResource","type":"object"},"DocumentRequestTemplateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"description":{"nullable":true,"type":"string"},"instructions":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"type":"string"},"requested_items":{"type":"string"},"subject":{"nullable":true,"type":"string"}},"required":["name","requested_items"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["document-request-templates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"DocumentRequestTemplateRequest","type":"object"},"AutomationActionAttributes":{"properties":{"action_type":{"type":"string"},"automation_id":{"format":"uuid","type":"string"},"conditions":{"description":"Shortcut mirror of configuration.conditions","items":{"$ref":"#/components/schemas/AutomationCondition"},"type":"array"},"configuration":{"additionalProperties":true,"description":"Action configuration. Include conditions for action-level conditional execution.","type":"object"},"continue_on_error":{"type":"boolean"},"delay_seconds":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"position":{"type":"integer"},"updated_at":{"format":"date-time","type":"string"}},"title":"AutomationActionAttributes","type":"object"},"TaskCommentResource":{"properties":{"attributes":{"$ref":"#/components/schemas/TaskCommentAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["task-comments"],"type":"string"}},"required":["id","type","attributes"],"title":"TaskCommentResource","type":"object"},"AuditLogAttributes":{"properties":{"action":{"enum":["create","update","delete"],"type":"string"},"changed_fields":{"items":{"type":"string"},"type":"array"},"inserted_at":{"format":"date-time","type":"string"},"metadata":{"additionalProperties":true,"type":"object"},"resource_id":{"format":"uuid","type":"string"},"resource_type":{"type":"string"},"user_id":{"format":"uuid","nullable":true,"type":"string"}},"title":"AuditLogAttributes","type":"object"},"LeadResponse":{"properties":{"data":{"$ref":"#/components/schemas/LeadResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"LeadResponse","type":"object"},"TaskCommentCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"body":{"type":"string"},"mentioned_user_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"}},"required":["body"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["task-comments"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"TaskCommentCreateRequest","type":"object"},"LeadUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"jurisdiction_country":{"nullable":true,"pattern":"^[Aa][Uu]$","type":"string"},"jurisdiction_region":{"nullable":true,"pattern":"^(?i:NSW|VIC|QLD|SA|WA|TAS|ACT|NT)$","type":"string"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"name":{"nullable":true,"type":"string"},"owner_id":{"format":"uuid","nullable":true,"type":"string"},"priority":{"enum":["low","normal","high","urgent"],"nullable":true,"type":"string"},"referral_source":{"nullable":true,"type":"string"},"source":{"enum":["portal","intake_forms","email","chat","manual","api","import","referral"],"nullable":true,"type":"string"},"source_detail":{"nullable":true,"type":"string"},"summary":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["leads"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"LeadUpdateRequest","type":"object"},"DisbursementUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"amount_cents":{"nullable":true,"type":"integer"},"category":{"nullable":true,"type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"is_billable":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"user_id":{"format":"uuid","nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["disbursements"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"DisbursementUpdateRequest","type":"object"},"TaskAttributes":{"properties":{"assigned_to_id":{"format":"uuid","nullable":true,"type":"string"},"blocked":{"description":"Whether this task has unresolved blocking dependencies. Derived, supplied on the single-task GET only.","nullable":true,"type":"boolean"},"category":{"nullable":true,"type":"string"},"completed_at":{"format":"date-time","nullable":true,"type":"string"},"completed_by_id":{"format":"uuid","nullable":true,"type":"string"},"completed_by_portal_user_id":{"format":"uuid","nullable":true,"type":"string"},"created_by_id":{"format":"uuid","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"due_time":{"nullable":true,"type":"string"},"elapsed_seconds":{"nullable":true,"type":"integer"},"estimated_minutes":{"nullable":true,"type":"integer"},"finished_at":{"format":"date-time","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_portal_visible":{"nullable":true,"type":"boolean"},"is_recurring":{"nullable":true,"type":"boolean"},"lead_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"parent_task_id":{"format":"uuid","nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"priority":{"enum":["low","normal","high","urgent"],"nullable":true,"type":"string"},"recurrence_rule":{"additionalProperties":true,"nullable":true,"type":"object"},"source":{"nullable":true,"type":"string"},"started_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"enum":["pending","in_progress","completed","cancelled"],"nullable":true,"type":"string"},"step_id":{"format":"uuid","nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"TaskAttributes","type":"object"},"DocumentRequestTemplateUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"description":{"nullable":true,"type":"string"},"instructions":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"type":"string"},"requested_items":{"type":"string"},"subject":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["document-request-templates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"DocumentRequestTemplateUpdateRequest","type":"object"},"MatterRoleListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MatterRoleResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"MatterRoleListResponse","type":"object"},"InvoicePreviewRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"matter_id":{"format":"uuid","type":"string"}},"required":["matter_id"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["invoices"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"InvoicePreviewRequest","type":"object"},"TaskCommentListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TaskCommentResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"TaskCommentListResponse","type":"object"},"LeadResource":{"properties":{"attributes":{"$ref":"#/components/schemas/LeadAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["leads"],"type":"string"}},"required":["id","type","attributes"],"title":"LeadResource","type":"object"},"DocumentRequestTemplateAttributes":{"properties":{"description":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","type":"string"},"instructions":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"items":{"items":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"type":"array"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"type":"string"},"requested_items":{"type":"string"},"subject":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"title":"DocumentRequestTemplateAttributes","type":"object"},"UserListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"UserListResponse","type":"object"},"FieldDefinitionResponse":{"properties":{"data":{"$ref":"#/components/schemas/FieldDefinitionResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"FieldDefinitionResponse","type":"object"},"DocumentVersionCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"content_type":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"filename":{"nullable":true,"type":"string"},"upload_key":{"type":"string"}},"required":["upload_key"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["documents"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"DocumentVersionCreateRequest","type":"object"},"StepAttributes":{"properties":{"color":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_initial":{"nullable":true,"type":"boolean"},"is_terminal":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"reporting_step_id":{"format":"uuid","nullable":true,"type":"string"},"settings":{"additionalProperties":true,"nullable":true,"type":"object"},"step_type":{"enum":["sequential","conditional"],"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"workflow_id":{"format":"uuid","nullable":true,"type":"string"}},"title":"StepAttributes","type":"object"},"DocumentUploadRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"category":{"nullable":true,"type":"string"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"content_type":{"type":"string"},"description":{"nullable":true,"type":"string"},"filename":{"type":"string"},"folder_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"upload_key":{"type":"string"}},"required":["upload_key","filename","content_type"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["documents"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"DocumentUploadRequest","type":"object"},"TaskTemplateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"assignments":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"category":{"nullable":true,"type":"string"},"default_assignee":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"due_date_mode":{"nullable":true,"type":"string"},"due_key_date_type_id":{"format":"uuid","nullable":true,"type":"string"},"due_offset_days":{"nullable":true,"type":"integer"},"is_active":{"nullable":true,"type":"boolean"},"is_compliance":{"nullable":true,"type":"boolean"},"is_portal_visible":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"position":{"nullable":true,"type":"integer"},"priority":{"nullable":true,"type":"string"}},"required":["name"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["task-templates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"TaskTemplateRequest","type":"object"},"TaskResponse":{"properties":{"data":{"$ref":"#/components/schemas/TaskResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"TaskResponse","type":"object"},"LeadConversionMeta":{"properties":{"conversion":{"properties":{"matter_id":{"format":"uuid","type":"string"},"matter_name":{"type":"string"}},"required":["matter_id","matter_name"],"type":"object"}},"title":"LeadConversionMeta","type":"object"},"EmailTemplateResource":{"properties":{"attributes":{"$ref":"#/components/schemas/EmailTemplateAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["email-templates"],"type":"string"}},"required":["id","type","attributes"],"title":"EmailTemplateResource","type":"object"},"RoleTemplateListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RoleTemplateResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"RoleTemplateListResponse","type":"object"},"TaskCommentResponse":{"properties":{"data":{"$ref":"#/components/schemas/TaskCommentResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"TaskCommentResponse","type":"object"},"PaymentAttributes":{"properties":{"amount_cents":{"nullable":true,"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"invoice_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"method":{"enum":["bank_transfer","credit_card","trust_account","cheque","cash","other"],"nullable":true,"type":"string"},"paid_at":{"format":"date-time","nullable":true,"type":"string"},"reference":{"nullable":true,"type":"string"},"status":{"enum":["pending","completed","failed","refunded"],"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"PaymentAttributes","type":"object"},"FolderUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"contact_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"parent_id":{"format":"uuid","nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["folders"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"FolderUpdateRequest","type":"object"},"AuditLogResource":{"properties":{"attributes":{"$ref":"#/components/schemas/AuditLogAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["audit-logs"],"type":"string"}},"required":["id","type","attributes"],"title":"AuditLogResource","type":"object"},"TaskDependencyAttributes":{"properties":{"dependency_type":{"enum":["blocks","related"],"type":"string"},"depends_on_id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"task_id":{"format":"uuid","type":"string"}},"title":"TaskDependencyAttributes","type":"object"},"KeyDateUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"date":{"format":"date","nullable":true,"type":"string"},"is_all_day":{"nullable":true,"type":"boolean"},"key_date_type_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"time":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["key-dates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"KeyDateUpdateRequest","type":"object"},"FieldGroupUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"code":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"matter_type_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["field-groups"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"FieldGroupUpdateRequest","type":"object"},"MatterRoleResource":{"properties":{"attributes":{"$ref":"#/components/schemas/MatterRoleAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["matter-roles"],"type":"string"}},"required":["id","type","attributes"],"title":"MatterRoleResource","type":"object"},"DocumentRequestCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"contact_id":{"format":"uuid","nullable":true,"type":"string"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"folder_id":{"format":"uuid","nullable":true,"type":"string"},"instructions":{"nullable":true,"type":"string"},"items":{"items":{"additionalProperties":false,"properties":{"description":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["name"],"type":"object"},"type":"array"},"matter_id":{"format":"uuid","type":"string"},"metadata":{"additionalProperties":true,"type":"object"},"recipient_email":{"type":"string"},"recipient_name":{"type":"string"},"subject":{"nullable":true,"type":"string"}},"required":["matter_id","recipient_email"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["document-requests"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"DocumentRequestCreateRequest","type":"object"},"ContactCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"abn":{"nullable":true,"type":"string"},"acn":{"nullable":true,"type":"string"},"address_line_1":{"nullable":true,"type":"string"},"address_line_2":{"nullable":true,"type":"string"},"company_name":{"nullable":true,"type":"string"},"contact_type_id":{"format":"uuid","nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"date_of_birth":{"format":"date","nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"is_company":{"nullable":true,"type":"boolean"},"last_name":{"nullable":true,"type":"string"},"mobile":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"postcode":{"nullable":true,"type":"string"},"preferred_name":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"suburb":{"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["contacts"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"ContactCreateRequest","type":"object"},"AvailableTransitionResource":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"step_type":{"nullable":true,"type":"string"}},"required":["id","name"],"title":"AvailableTransitionResource","type":"object"},"FieldValueAttributes":{"properties":{"field_definition_id":{"format":"uuid","type":"string"},"field_record_id":{"format":"uuid","type":"string"},"inserted_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"},"value_boolean":{"nullable":true,"type":"boolean"},"value_contact_id":{"format":"uuid","nullable":true,"type":"string"},"value_date":{"format":"date","nullable":true,"type":"string"},"value_datetime":{"format":"date-time","nullable":true,"type":"string"},"value_json":{"additionalProperties":true,"nullable":true,"type":"object"},"value_number":{"nullable":true,"type":"number"},"value_text":{"nullable":true,"type":"string"}},"title":"FieldValueAttributes","type":"object"},"DocumentUploadUrlRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"byte_size":{"type":"integer"},"content_type":{"type":"string"},"filename":{"type":"string"}},"required":["filename","content_type","byte_size"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["documents"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"DocumentUploadUrlRequest","type":"object"},"LeadPipelineStageListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LeadPipelineStageResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"LeadPipelineStageListResponse","type":"object"},"InvoiceCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"contact_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","type":"string"},"notes":{"nullable":true,"type":"string"},"payment_terms":{"nullable":true,"type":"string"},"tax_rate":{"nullable":true,"type":"string"}},"required":["matter_id"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["invoices"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"InvoiceCreateRequest","type":"object"},"ReportResource":{"properties":{"attributes":{"$ref":"#/components/schemas/ReportAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["reports"],"type":"string"}},"required":["id","type","attributes"],"title":"ReportResource","type":"object"},"PaymentResponse":{"properties":{"data":{"$ref":"#/components/schemas/PaymentResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"PaymentResponse","type":"object"},"DisbursementResource":{"properties":{"attributes":{"$ref":"#/components/schemas/DisbursementAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["disbursements"],"type":"string"}},"required":["id","type","attributes"],"title":"DisbursementResource","type":"object"},"AutomationLogListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AutomationLogResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"AutomationLogListResponse","type":"object"},"LeadNoteUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"content":{"nullable":true,"type":"string"},"pinned":{"nullable":true,"type":"boolean"},"visibility":{"enum":["internal","client"],"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["lead-notes"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"LeadNoteUpdateRequest","type":"object"},"ContactResource":{"properties":{"attributes":{"$ref":"#/components/schemas/ContactAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["contacts"],"type":"string"}},"required":["id","type","attributes"],"title":"ContactResource","type":"object"},"KeyDateTypeListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/KeyDateTypeResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"KeyDateTypeListResponse","type":"object"},"FolderResponse":{"properties":{"data":{"$ref":"#/components/schemas/FolderResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"FolderResponse","type":"object"},"CollectionMeta":{"properties":{"count":{"type":"integer"},"timestamp":{"format":"date-time","type":"string"}},"title":"CollectionMeta","type":"object"},"StepHistoryListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StepHistoryResource"},"type":"array"},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"title":"StepHistoryListResponse","type":"object"},"MatterTypeListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MatterTypeResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"MatterTypeListResponse","type":"object"},"InvoiceLineItemResource":{"properties":{"attributes":{"$ref":"#/components/schemas/InvoiceLineItemAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["invoice-line-items"],"type":"string"}},"required":["id","type","attributes"],"title":"InvoiceLineItemResource","type":"object"},"ContactTypeUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"code":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["contact-types"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"ContactTypeUpdateRequest","type":"object"},"TaskDependencyCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"dependency_type":{"description":"\"blocks\" prevents completion until the dependency is done; \"related\" is informational.","enum":["blocks","related"],"nullable":true,"type":"string"},"depends_on_id":{"description":"The id of the task this task waits on.","format":"uuid","type":"string"}},"required":["depends_on_id"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["tasks"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"TaskDependencyCreateRequest","type":"object"},"MatterResource":{"properties":{"attributes":{"$ref":"#/components/schemas/MatterAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["matters"],"type":"string"}},"required":["id","type","attributes"],"title":"MatterResource","type":"object"},"InvoicePreviewResponse":{"properties":{"data":{"properties":{"attributes":{"properties":{"disbursement_cents":{"type":"integer"},"disbursement_count":{"type":"integer"},"empty":{"type":"boolean"},"matter_id":{"format":"uuid","type":"string"},"time_entry_cents":{"type":"integer"},"time_entry_count":{"type":"integer"},"total_cents":{"type":"integer"},"unpriced_count":{"type":"integer"}},"type":"object"},"type":{"enum":["invoice-previews"],"type":"string"}},"type":"object"}},"title":"InvoicePreviewResponse","type":"object"},"StepUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"color":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"is_initial":{"nullable":true,"type":"boolean"},"is_terminal":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"reporting_step_id":{"format":"uuid","nullable":true,"type":"string"},"settings":{"additionalProperties":true,"nullable":true,"type":"object"},"step_type":{"enum":["sequential","conditional"],"nullable":true,"type":"string"},"workflow_id":{"format":"uuid","nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["steps"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"StepUpdateRequest","type":"object"},"DocumentRequestItemAttributes":{"properties":{"description":{"nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"position":{"type":"integer"},"received_at":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"}},"title":"DocumentRequestItemAttributes","type":"object"},"ContactTypeListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ContactTypeResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"ContactTypeListResponse","type":"object"},"LeadContactResponse":{"properties":{"data":{"$ref":"#/components/schemas/LeadContactResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"LeadContactResponse","type":"object"},"LeadConversionResponse":{"properties":{"data":{"$ref":"#/components/schemas/LeadResource"},"meta":{"$ref":"#/components/schemas/LeadConversionMeta"}},"title":"LeadConversionResponse","type":"object"},"ErrorResponse":{"properties":{"errors":{"items":{"properties":{"detail":{"type":"string"},"source":{"properties":{"pointer":{"type":"string"}},"type":"object"},"status":{"description":"HTTP status code as a string","type":"string"},"title":{"description":"Short, human-readable summary of the error","type":"string"}},"type":"object"},"type":"array"}},"title":"ErrorResponse","type":"object"},"LeadMoveStageRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"stage_id":{"format":"uuid","type":"string"}},"required":["stage_id"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["leads"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"LeadMoveStageRequest","type":"object"},"UserResponse":{"properties":{"data":{"$ref":"#/components/schemas/UserResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"UserResponse","type":"object"},"AutomationActionUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"action_type":{"type":"string"},"configuration":{"additionalProperties":true,"type":"object"},"continue_on_error":{"type":"boolean"},"delay_seconds":{"type":"integer"},"position":{"type":"integer"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["automation-actions"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"AutomationActionUpdateRequest","type":"object"},"FieldDefinitionRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"code":{"type":"string"},"default_value":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"field_group_id":{"format":"uuid","nullable":true,"type":"string"},"field_type":{"type":"string"},"is_required":{"nullable":true,"type":"boolean"},"name":{"type":"string"},"options":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"placeholder":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"validation_rules":{"additionalProperties":true,"nullable":true,"type":"object"}},"required":["name","code","field_type"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["field-definitions"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"FieldDefinitionRequest","type":"object"},"LeadConvertRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"assigned_to_id":{"format":"uuid","nullable":true,"type":"string"},"jurisdiction_country":{"nullable":true,"pattern":"^[Aa][Uu]$","type":"string"},"jurisdiction_region":{"nullable":true,"pattern":"^(?i:NSW|VIC|QLD|SA|WA|TAS|ACT|NT)$","type":"string"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"team_id":{"format":"uuid","nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["leads"],"type":"string"}},"type":"object"}},"title":"LeadConvertRequest","type":"object"},"WorkflowAttributes":{"properties":{"description":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"is_template":{"nullable":true,"type":"boolean"},"name":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"version":{"nullable":true,"type":"integer"}},"title":"WorkflowAttributes","type":"object"},"MatterTypeResource":{"properties":{"attributes":{"$ref":"#/components/schemas/MatterTypeAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["matter-types"],"type":"string"}},"required":["id","type","attributes"],"title":"MatterTypeResource","type":"object"},"WorkflowResource":{"properties":{"attributes":{"$ref":"#/components/schemas/WorkflowAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["workflows"],"type":"string"}},"required":["id","type","attributes"],"title":"WorkflowResource","type":"object"},"AutomationActionResource":{"properties":{"attributes":{"$ref":"#/components/schemas/AutomationActionAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["automation-actions"],"type":"string"}},"required":["id","type","attributes"],"title":"AutomationActionResource","type":"object"},"NoteAttributes":{"properties":{"content":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_pinned":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"mentioned_user_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"user_id":{"format":"uuid","nullable":true,"type":"string"}},"title":"NoteAttributes","type":"object"},"TimeEntryAttributes":{"properties":{"amount_cents":{"nullable":true,"type":"integer"},"category":{"nullable":true,"type":"string"},"date":{"format":"date","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"duration_minutes":{"nullable":true,"type":"integer"},"end_time":{"format":"date-time","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"invoice_id":{"format":"uuid","nullable":true,"type":"string"},"is_billable":{"nullable":true,"type":"boolean"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"rate_cents":{"nullable":true,"type":"integer"},"source":{"nullable":true,"type":"string"},"start_time":{"format":"date-time","nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"user_id":{"format":"uuid","nullable":true,"type":"string"}},"title":"TimeEntryAttributes","type":"object"},"MatterRoleResponse":{"properties":{"data":{"$ref":"#/components/schemas/MatterRoleResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"MatterRoleResponse","type":"object"},"ContactUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"abn":{"nullable":true,"type":"string"},"acn":{"nullable":true,"type":"string"},"address_line_1":{"nullable":true,"type":"string"},"address_line_2":{"nullable":true,"type":"string"},"company_name":{"nullable":true,"type":"string"},"contact_type_id":{"format":"uuid","nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"date_of_birth":{"format":"date","nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"is_company":{"nullable":true,"type":"boolean"},"last_name":{"nullable":true,"type":"string"},"mobile":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"phone":{"nullable":true,"type":"string"},"postcode":{"nullable":true,"type":"string"},"preferred_name":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"suburb":{"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["contacts"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"ContactUpdateRequest","type":"object"},"TaskDependencyCollectionResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TaskDependencyResource"},"type":"array"},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"title":"TaskDependencyCollectionResponse","type":"object"},"AutomationRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"conditions":{"items":{"$ref":"#/components/schemas/AutomationCondition"},"type":"array"},"description":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"type":"string"},"position":{"type":"integer"},"trigger_config":{"additionalProperties":true,"type":"object"},"trigger_type":{"type":"string"}},"required":["name","trigger_type"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["automations"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"AutomationRequest","type":"object"},"TaskTemplateListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TaskTemplateResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"TaskTemplateListResponse","type":"object"},"EmailTemplateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"body_html":{"type":"string"},"body_text":{"nullable":true,"type":"string"},"category":{"nullable":true,"type":"string"},"editor_design":{"additionalProperties":true,"nullable":true,"type":"object"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"type":"string"},"step_id":{"format":"uuid","nullable":true,"type":"string"},"subject":{"type":"string"}},"required":["name","subject","body_html"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["email-templates"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"EmailTemplateRequest","type":"object"},"LeadAttributes":{"properties":{"consultation_scheduled_at":{"format":"date-time","nullable":true,"type":"string"},"conversion_matter_id":{"format":"uuid","nullable":true,"type":"string"},"converted_at":{"format":"date-time","nullable":true,"type":"string"},"current_reporting_step_id":{"format":"uuid","nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"jurisdiction_country":{"nullable":true,"pattern":"^[Aa][Uu]$","type":"string"},"jurisdiction_region":{"nullable":true,"pattern":"^(?i:NSW|VIC|QLD|SA|WA|TAS|ACT|NT)$","type":"string"},"last_contacted_at":{"format":"date-time","nullable":true,"type":"string"},"lost_at":{"format":"date-time","nullable":true,"type":"string"},"lost_reason":{"nullable":true,"type":"string"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"name":{"nullable":true,"type":"string"},"next_follow_up_at":{"format":"date-time","nullable":true,"type":"string"},"owner_id":{"format":"uuid","nullable":true,"type":"string"},"pipeline_id":{"format":"uuid","nullable":true,"type":"string"},"pipeline_stage_id":{"format":"uuid","nullable":true,"type":"string"},"priority":{"enum":["low","normal","high","urgent"],"nullable":true,"type":"string"},"qualified_at":{"format":"date-time","nullable":true,"type":"string"},"referral_source":{"nullable":true,"type":"string"},"source":{"enum":["portal","intake_forms","email","chat","manual","api","import","referral"],"nullable":true,"type":"string"},"source_detail":{"nullable":true,"type":"string"},"status":{"enum":["open","qualified","won","lost","deferred","archived"],"nullable":true,"type":"string"},"summary":{"nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"LeadAttributes","type":"object"},"ReportListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ReportResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"ReportListResponse","type":"object"},"FolderListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FolderResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"FolderListResponse","type":"object"},"EmailAttributes":{"properties":{"bcc_addresses":{"items":{"type":"string"},"type":"array"},"body_html":{"nullable":true,"type":"string"},"body_text":{"nullable":true,"type":"string"},"cc_addresses":{"items":{"type":"string"},"type":"array"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"from_address":{"type":"string"},"from_name":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","type":"string"},"lead_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"opened_at":{"format":"date-time","nullable":true,"type":"string"},"reply_to":{"nullable":true,"type":"string"},"scheduled_at":{"format":"date-time","nullable":true,"type":"string"},"sent_at":{"format":"date-time","nullable":true,"type":"string"},"sent_by_id":{"format":"uuid","nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"status":{"enum":["queued","sending","sent","delivered","bounced","failed"],"type":"string"},"subject":{"type":"string"},"template_id":{"format":"uuid","nullable":true,"type":"string"},"to_addresses":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"title":"EmailAttributes","type":"object"},"PaymentCreateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"amount_cents":{"type":"integer"},"method":{"enum":["bank_transfer","credit_card","trust_account","cheque","cash","other"],"nullable":true,"type":"string"},"paid_at":{"format":"date-time","nullable":true,"type":"string"},"reference":{"nullable":true,"type":"string"}},"required":["amount_cents"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["payments"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"PaymentCreateRequest","type":"object"},"TimeEntryResource":{"properties":{"attributes":{"$ref":"#/components/schemas/TimeEntryAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["time-entries"],"type":"string"}},"required":["id","type","attributes"],"title":"TimeEntryResource","type":"object"},"TaskResource":{"properties":{"attributes":{"$ref":"#/components/schemas/TaskAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["tasks"],"type":"string"}},"required":["id","type","attributes"],"title":"TaskResource","type":"object"},"TaskListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TaskResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"TaskListResponse","type":"object"},"KeyDateListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/KeyDateResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"KeyDateListResponse","type":"object"},"WebhookEndpointUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"description":{"nullable":true,"type":"string"},"events":{"description":"Subscribed event names; \"*\" and \"resource.*\" wildcards allowed.","items":{"type":"string"},"nullable":true,"type":"array"},"is_active":{"nullable":true,"type":"boolean"},"url":{"nullable":true,"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["webhooks"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"WebhookEndpointUpdateRequest","type":"object"},"AutomationResponse":{"properties":{"data":{"$ref":"#/components/schemas/AutomationResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"AutomationResponse","type":"object"},"AutomationUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"conditions":{"items":{"$ref":"#/components/schemas/AutomationCondition"},"type":"array"},"description":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"matter_type_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"type":"string"},"position":{"type":"integer"},"trigger_config":{"additionalProperties":true,"type":"object"},"trigger_type":{"type":"string"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["automations"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"AutomationUpdateRequest","type":"object"},"SendEmailRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"bcc":{"items":{"type":"string"},"type":"array"},"bcc_addresses":{"items":{"type":"string"},"type":"array"},"body_html":{"type":"string"},"body_text":{"nullable":true,"type":"string"},"cc":{"items":{"type":"string"},"type":"array"},"cc_addresses":{"items":{"type":"string"},"type":"array"},"contact_id":{"format":"uuid","nullable":true,"type":"string"},"from":{"nullable":true,"type":"string"},"from_address":{"nullable":true,"type":"string"},"lead_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"scheduled_at":{"format":"date-time","nullable":true,"type":"string"},"sender_address":{"nullable":true,"type":"string"},"sender_integration_id":{"format":"uuid","nullable":true,"type":"string"},"subject":{"type":"string"},"template_id":{"format":"uuid","nullable":true,"type":"string"},"to":{"items":{"type":"string"},"type":"array"},"to_addresses":{"items":{"type":"string"},"type":"array"}},"required":["subject","body_html"],"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["emails"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"SendEmailRequest","type":"object"},"TaskUpdateRequest":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"assigned_to_id":{"format":"uuid","nullable":true,"type":"string"},"category":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"due_date":{"format":"date","nullable":true,"type":"string"},"lead_id":{"format":"uuid","nullable":true,"type":"string"},"matter_id":{"format":"uuid","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"parent_task_id":{"format":"uuid","nullable":true,"type":"string"},"priority":{"enum":["low","normal","high","urgent"],"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"id":{"format":"uuid","type":"string"},"type":{"enum":["tasks"],"type":"string"}},"required":["attributes"],"type":"object"}},"required":["data"],"title":"TaskUpdateRequest","type":"object"},"AutomationActionListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AutomationActionResource"},"type":"array"},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"title":"AutomationActionListResponse","type":"object"},"FolderResource":{"properties":{"attributes":{"$ref":"#/components/schemas/FolderAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["folders"],"type":"string"}},"required":["id","type","attributes"],"title":"FolderResource","type":"object"},"DocumentResource":{"properties":{"attributes":{"$ref":"#/components/schemas/DocumentAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["documents"],"type":"string"}},"required":["id","type","attributes"],"title":"DocumentResource","type":"object"},"KeyDateResource":{"properties":{"attributes":{"$ref":"#/components/schemas/KeyDateAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["key-dates"],"type":"string"}},"required":["id","type","attributes"],"title":"KeyDateResource","type":"object"},"StepChangeResponse":{"properties":{"data":{"properties":{"current_reporting_step_id":{"format":"uuid","nullable":true,"type":"string"},"current_step_id":{"format":"uuid","nullable":true,"type":"string"},"id":{"format":"uuid","type":"string"},"message":{"type":"string"}},"required":["id","message"],"type":"object"}},"title":"StepChangeResponse","type":"object"},"FieldDefinitionResource":{"properties":{"attributes":{"$ref":"#/components/schemas/FieldDefinitionAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["field-definitions"],"type":"string"}},"required":["id","type","attributes"],"title":"FieldDefinitionResource","type":"object"},"WebhookEndpointAttributes":{"properties":{"description":{"nullable":true,"type":"string"},"disabled_at":{"description":"When the endpoint was disabled (manually or automatically).","format":"date-time","nullable":true,"type":"string"},"events":{"description":"Subscribed event names; \"*\" and \"resource.*\" wildcards allowed.","items":{"type":"string"},"nullable":true,"type":"array"},"failure_count":{"description":"Consecutive failures; the endpoint auto-disables at 10.","nullable":true,"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_active":{"nullable":true,"type":"boolean"},"last_triggered_at":{"format":"date-time","nullable":true,"type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"title":"WebhookEndpointAttributes","type":"object"},"StepResource":{"properties":{"attributes":{"$ref":"#/components/schemas/StepAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["steps"],"type":"string"}},"required":["id","type","attributes"],"title":"StepResource","type":"object"},"WorkflowResponse":{"properties":{"data":{"$ref":"#/components/schemas/WorkflowResource"},"meta":{"$ref":"#/components/schemas/ResourceMeta"}},"title":"WorkflowResponse","type":"object"},"WebhookDeliveryResource":{"properties":{"attributes":{"$ref":"#/components/schemas/WebhookDeliveryAttributes"},"id":{"format":"uuid","type":"string"},"type":{"enum":["webhook-deliveries"],"type":"string"}},"required":["id","type","attributes"],"title":"WebhookDeliveryResource","type":"object"},"PaymentListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PaymentResource"},"type":"array"},"links":{"$ref":"#/components/schemas/PaginationLinks"},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"title":"PaymentListResponse","type":"object"},"KeyDateTypeAttributes":{"properties":{"auto_complete":{"nullable":true,"type":"boolean"},"code":{"nullable":true,"type":"string"},"color":{"nullable":true,"type":"string"},"default_reminder_days":{"nullable":true,"type":"integer"},"description":{"nullable":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_milestone":{"nullable":true,"type":"boolean"},"matter_type_ids":{"items":{"format":"uuid","type":"string"},"nullable":true,"type":"array"},"name":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"title":"KeyDateTypeAttributes","type":"object"}},"securitySchemes":{"matterFirstApiKey":{"bearerFormat":"API Key","description":"A MatterFirst API key (`mf_live_…` prefix), minted in Settings → API Keys. Acts with its creator's permissions, narrowed by the scopes delegated to the key.","scheme":"bearer","type":"http"},"referralPartnerKey":{"bearerFormat":"Partner Key","description":"A referral partner credential (`mf_ref_…` prefix), issued per partner and valid only on the referral-contract endpoints.","scheme":"bearer","type":"http"}}},"info":{"description":"RESTful API for MatterFirst: legal practice management.\nResponses follow JSON:API-like conventions.\n\n## Surfaces and credentials\n\nMatterFirst exposes seven HTTP surfaces; this document describes the\nfirst two in full and indexes the rest:\n\n| Surface | Base path | Credential |\n|---|---|---|\n| v1 REST API | `/api/v1` | `Authorization: Bearer mf_live_…` API key |\n| Referral partner API | `/api/v1/referral-contracts` | `Authorization: Bearer mf_ref_…` partner key |\n| Content API | `/api/content/v1` | `Authorization: Bearer mf_content_…` content key |\n| Marketing lead capture | `/api/marketing/leads` | none (anonymous form capture) |\n| Provider webhook receivers | `/api/webhooks/*` | each provider's own signature (Stripe, Xero, Resend, Google, Microsoft) |\n| MCP server | `/mcp` | Bearer token or OAuth, JSON-RPC 2.0, outside this document |\n| Signed document downloads | `/api/v1/documents/{id}/content` | single-use signed `token` query param, no API key |\n\n## Error envelope\n\nEvery error on the JSON surfaces is the same shape (see\n`ErrorResponse`): `{\"errors\": [{\"status\", \"code\", \"title\", \"detail\",\n\"source\"}]}`. A client branches on `code` (stable), shows `detail`\n(prose, may change), and never needs to parse `title`.\n\n## Pagination and filtering\n\nList endpoints take `page_number` and `page_size` and answer with\n`meta` (`total`, `page`, `page_size`, `total_pages`) plus `links`\n(`self`, `first`, `last`, `prev`, `next`). Filtering is\n`filter[field]=value` against each resource's declared filterable\nfields; sorting is `sort=field` or `sort=-field` against its sortable\nfields; sparse fieldsets are `fields[type]=a,b`; related resources are\nembedded with `include=`.\n\n## Outbound webhook signatures\n\nDeliveries to endpoints registered via `/api/v1/webhooks` carry\n`x-matterfirst-timestamp` and `x-matterfirst-signature: v1=<hex>`,\nwhere the signature is HMAC-SHA256 over `\"v1.<timestamp>.<body>\"`.\nVerify the signature, then reject timestamps outside your tolerance\nwindow (300 seconds is the reference tolerance) to stop replays.\n\n## Links\n\nInteractive docs: `/api/v1/swaggerui`. This document: `/api/v1/openapi`.\nWhat your key can do: `GET /api/v1/capabilities`.\n\n## Rate limits\n\nRate limits: 300 requests per minute per API key and 1,000 per minute\nper organization, with a tighter 30-per-minute per-key limit on\nexpensive POST endpoints (paths ending in /send, /run, /convert,\n/uploads, /test or /merge). Every response carries RateLimit-Limit,\nRateLimit-Remaining and RateLimit-Reset headers; exceeding a limit\nreturns 429 with error code `rate_limited` and a Retry-After header.\n\nSafe retries: POST endpoints accept an optional `Idempotency-Key`\nheader (max 255 chars). Retrying with the same key and body replays\nthe original response byte-identically with `Idempotency-Replayed:\ntrue`; the same key with a different body is refused with 409\n`idempotency_key_reuse`, and a key whose first request is still\nrunning answers 409 `idempotency_key_in_flight` with Retry-After.\n5xx responses are never stored, so retrying them re-runs the request.\n\nOptimistic concurrency: GET and update responses for matters,\ninvoices, tasks and leads carry a weak `ETag`. Sending it back as\n`If-Match` on PATCH/PUT makes the update conditional: a stale tag is\nrefused with 412 `precondition_failed` before anything is written.\nBoth headers are optional; omitting them keeps today's behaviour.\n","title":"MatterFirst API","version":"1.0.0"},"openapi":"3.0.0","paths":{"/api/v1/calendar-events/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.CalendarEventsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a calendar event","tags":["Calendar Events"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.CalendarEventsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, created_by.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventResponse"}}},"description":"Calendar event"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a calendar event","tags":["Calendar Events"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.CalendarEventsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventUpdateRequest"}}},"description":"Calendar event params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a calendar event","tags":["Calendar Events"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.CalendarEventsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventUpdateRequest"}}},"description":"Calendar event params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a calendar event","tags":["Calendar Events"]}},"/api/v1/email-templates/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailTemplatesController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Template is in use"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete an email template","tags":["Email Templates"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailTemplatesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}},"description":"Email template"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get an email template","tags":["Email Templates"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailTemplatesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateUpdateRequest"}}},"description":"Email template params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an email template","tags":["Email Templates"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailTemplatesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateUpdateRequest"}}},"description":"Email template params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an email template","tags":["Email Templates"]}},"/api/v1/matters/{matter_id}/notes/{id}/unpin":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterNotesController.unpin","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteResponse"}}},"description":"Unpinned note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Unpin a note","tags":["Matter notes"]}},"/api/v1/field-groups":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldGroupsController.index","parameters":[{"description":"","in":"query","name":"matter_type_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldGroupListResponse"}}},"description":"Field group list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List field groups","tags":["Field Groups"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldGroupsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldGroupRequest"}}},"description":"Field group params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldGroupResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a field group","tags":["Field Groups"]}},"/api/v1/webhooks/{id}/deliveries":{"get":{"callbacks":{},"description":"Delivery metadata only: the stored payload and response bodies are not included; they can carry client data and belong to the receiving system.","operationId":"MatterFirstWeb.API.V1.WebhooksController.deliveries","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListResponse"}}},"description":"Delivery list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List delivery attempts for a webhook endpoint","tags":["Webhooks"]}},"/api/v1/task-templates/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskTemplatesController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a task template","tags":["Task Templates"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskTemplatesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateResponse"}}},"description":"Task template"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a task template","tags":["Task Templates"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskTemplatesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateUpdateRequest"}}},"description":"Task template params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a task template","tags":["Task Templates"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskTemplatesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateUpdateRequest"}}},"description":"Task template params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a task template","tags":["Task Templates"]}},"/api/v1/document-requests/{id}/close":{"post":{"callbacks":{},"description":"Revokes the request's live public upload link (COMP-01). This is the\nterminal state: a closed request cannot be reopened, because the revoked\nlink must never come back to life, so further documents need a new request.\n","operationId":"MatterFirstWeb.API.V1.DocumentRequestsController.close","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestResponse"}}},"description":"Closed document request"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Close a secure document request upload link","tags":["Document Requests"]}},"/api/v1/tasks/{task_id}/comments/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskCommentsController.delete","parameters":[{"description":"","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a comment","tags":["Task comments"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskCommentsController.show","parameters":[{"description":"","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: task, user.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCommentResponse"}}},"description":"Comment"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a comment","tags":["Task comments"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskCommentsController.update (2)","parameters":[{"description":"","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCommentUpdateRequest"}}},"description":"Comment params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCommentResponse"}}},"description":"Updated comment"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a comment","tags":["Task comments"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskCommentsController.update","parameters":[{"description":"","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCommentUpdateRequest"}}},"description":"Comment params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCommentResponse"}}},"description":"Updated comment"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a comment","tags":["Task comments"]}},"/api/v1/webhook-events":{"get":{"callbacks":{},"description":"Every event name a webhook endpoint may subscribe to. \"*\" and \"<category>.*\" wildcards are also accepted on an endpoint's `events`.","operationId":"MatterFirstWeb.API.V1.WebhookEventsController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"attributes":{"properties":{"category":{"type":"string"}},"type":"object"},"id":{"type":"string"},"type":{"enum":["webhook-events"],"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Webhook event catalog"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List subscribable webhook event names","tags":["Webhooks"]}},"/api/v1/documents":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentsController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, contact, folder.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListResponse"}}},"description":"Document list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List documents","tags":["Documents"]},"post":{"callbacks":{},"description":"Second half of the two-step upload flow: registers the document row for a\nfile already PUT to the presigned URL from `POST /documents/uploads`. The\nupload is verified to exist in storage before the document is created.\n","operationId":"MatterFirstWeb.API.V1.DocumentsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadRequest"}}},"description":"Document params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}},"description":"Created document"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Register an uploaded document","tags":["Documents"]}},"/api/v1/workflows":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WorkflowsController.index","parameters":[{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowListResponse"}}},"description":"Workflow list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List workflows","tags":["Workflows"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WorkflowsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRequest"}}},"description":"Workflow params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}},"description":"Created workflow"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a workflow","tags":["Workflows"]}},"/api/v1/leads/{id}/move-stage":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.move_stage","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMoveStageRequest"}}},"description":"Move-stage params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Moved lead"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Blocked"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Move a lead to a different pipeline stage","tags":["Leads"]}},"/api/v1/key-date-types/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDateTypesController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Key date type is in use"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a key date type","tags":["Key Date Types"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDateTypesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateTypeResponse"}}},"description":"Key date type"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a key date type","tags":["Key Date Types"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDateTypesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateTypeUpdateRequest"}}},"description":"Key date type params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateTypeResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a key date type","tags":["Key Date Types"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDateTypesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateTypeUpdateRequest"}}},"description":"Key date type params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateTypeResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a key date type","tags":["Key Date Types"]}},"/api/v1/contact-types":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactTypesController.index","parameters":[{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTypeListResponse"}}},"description":"Contact type list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List contact types","tags":["Contact Types"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactTypesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTypeRequest"}}},"description":"Contact type params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTypeResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a contact type","tags":["Contact Types"]}},"/api/v1/key-date-types":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDateTypesController.index","parameters":[{"description":"","in":"query","name":"matter_type_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateTypeListResponse"}}},"description":"Key date type list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List key date types","tags":["Key Date Types"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDateTypesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateTypeRequest"}}},"description":"Key date type params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateTypeResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a key date type","tags":["Key Date Types"]}},"/api/v1/automations/{automation_id}/actions/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationActionsController.delete","parameters":[{"description":"","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete an automation action","tags":["Automation Actions"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationActionsController.show","parameters":[{"description":"","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationActionResponse"}}},"description":"Automation action"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get an automation action","tags":["Automation Actions"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationActionsController.update (2)","parameters":[{"description":"","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationActionUpdateRequest"}}},"description":"Automation action params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationActionResponse"}}},"description":"Updated action"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an automation action","tags":["Automation Actions"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationActionsController.update","parameters":[{"description":"","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationActionUpdateRequest"}}},"description":"Automation action params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationActionResponse"}}},"description":"Updated action"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an automation action","tags":["Automation Actions"]}},"/api/v1/contact-types/{id}":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactTypesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTypeResponse"}}},"description":"Contact type"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a contact type","tags":["Contact Types"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactTypesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTypeUpdateRequest"}}},"description":"Contact type params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTypeResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a contact type","tags":["Contact Types"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactTypesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTypeUpdateRequest"}}},"description":"Contact type params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTypeResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a contact type","tags":["Contact Types"]}},"/api/v1/leads/{id}/contacts":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.add_contact","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadContactCreateRequest"}}},"description":"Lead contact params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadContactResponse"}}},"description":"Created lead contact"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Add a contact to a lead","tags":["Leads"]}},"/api/v1/leads":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: pipeline, pipeline_stage, matter_type, owner, conversion_matter.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListResponse"}}},"description":"Lead list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List leads","tags":["Leads"]},"post":{"callbacks":{},"description":"Supports the optional Idempotency-Key request header (max 255 chars): retrying the POST with the same key and body replays the original response instead of creating a second lead.","operationId":"MatterFirstWeb.API.V1.LeadsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreateRequest"}}},"description":"Lead params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Created lead"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a lead","tags":["Leads"]}},"/api/v1/webhooks":{"get":{"callbacks":{},"description":"The signing secret is never included; see the create and rotate-secret operations.","operationId":"MatterFirstWeb.API.V1.WebhooksController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointListResponse"}}},"description":"Webhook endpoint list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List webhook endpoints","tags":["Webhooks"]},"post":{"callbacks":{},"description":"The signing secret is generated server-side and returned ONCE, as `meta.secret` on this response. Store it: no read endpoint ever returns it again. Use POST /webhooks/{id}/rotate-secret to replace a lost or compromised secret.","operationId":"MatterFirstWeb.API.V1.WebhooksController.create","parameters":[],"requestBody":{"content":{"application/json":{"example":{"data":{"attributes":{"description":"Practice dashboard sync","events":["matter.created","task.updated"],"url":"https://integrations.example.com/matterfirst"}}},"schema":{"$ref":"#/components/schemas/WebhookEndpointRequest"}}},"description":"Webhook endpoint params","required":false},"responses":{"201":{"content":{"application/json":{"example":{"data":{"attributes":{"description":"Practice dashboard sync","events":["matter.created","task.updated"],"is_active":true,"url":"https://integrations.example.com/matterfirst"},"id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e07","type":"webhooks"},"meta":{"secret":"whsec_c2FtcGxlLXNpZ25pbmctc2VjcmV0","timestamp":"2026-09-01T03:15:00Z"}},"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a webhook endpoint","tags":["Webhooks"]}},"/api/v1/matters/{matter_id}/notes/{id}/pin":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterNotesController.pin","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteResponse"}}},"description":"Pinned note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Pin a note","tags":["Matter notes"]}},"/api/v1/contacts":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactsController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Field filters, e.g. `filter[email]=*@acme.com`. Also supports `filter[lead_id]=<uuid>` to return only the contacts linked to that lead.","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListResponse"}}},"description":"Contact list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List contacts","tags":["Contacts"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreateRequest"}}},"description":"Contact params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}},"description":"Created contact"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a contact","tags":["Contacts"]}},"/api/v1/referral-contracts/{public_id}/spec":{"get":{"callbacks":{},"description":"Returns the OpenAPI spec describing the expected submission payload for a contract.","operationId":"MatterFirstWeb.API.V1.ReferralSubmissionsController.spec","parameters":[{"description":"Contract public ID","in":"path","name":"public_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"OpenAPI 3.0.3 specification","properties":{"info":{"description":"API info","type":"object"},"openapi":{"type":"string"},"paths":{"description":"API paths","type":"object"}},"type":"object"}}},"description":"OpenAPI spec"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Contract not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"referralPartnerKey":[]}],"summary":"Get contract submission spec","tags":["Referral Submissions"]}},"/api/v1/emails/send":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailsController.send_email","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailRequest"}}},"description":"Email params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailResponse"}}},"description":"Sent"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Send an email","tags":["Emails"]}},"/api/v1/leads/{id}/archive":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.archive","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Archived lead"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Failed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Archive a lead","tags":["Leads"]}},"/api/v1/key-dates":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDatesController.index","parameters":[{"description":"","in":"query","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateListResponse"}}},"description":"Key date list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List key dates for a matter","tags":["Key Dates"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDatesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateRequest"}}},"description":"Key date params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a key date","tags":["Key Dates"]}},"/api/v1/invoices/{id}/send":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoicesController.send_invoice","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"description":"Sent invoice"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Send error"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Send an invoice","tags":["Invoices"]}},"/api/v1/workflows/{workflow_id}/steps":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.StepsController.index","parameters":[{"description":"","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepListResponse"}}},"description":"Step list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List steps for a workflow","tags":["Steps"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.StepsController.create","parameters":[{"description":"","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepRequest"}}},"description":"Step params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepResponse"}}},"description":"Created step"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a step","tags":["Steps"]}},"/api/v1/automations/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete an automation","tags":["Automations"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationResponse"}}},"description":"Automation"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get an automation","tags":["Automations"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationUpdateRequest"}}},"description":"Automation params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationResponse"}}},"description":"Updated automation"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an automation","tags":["Automations"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationUpdateRequest"}}},"description":"Automation params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationResponse"}}},"description":"Updated automation"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an automation","tags":["Automations"]}},"/api/v1/workflows/{workflow_id}/steps/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.StepsController.delete","parameters":[{"description":"","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Dependency error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Delete error"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a step","tags":["Steps"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.StepsController.show","parameters":[{"description":"","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepResponse"}}},"description":"Step"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a step","tags":["Steps"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.StepsController.update (2)","parameters":[{"description":"","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepUpdateRequest"}}},"description":"Step params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepResponse"}}},"description":"Updated step"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a step","tags":["Steps"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.StepsController.update","parameters":[{"description":"","in":"path","name":"workflow_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepUpdateRequest"}}},"description":"Step params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepResponse"}}},"description":"Updated step"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a step","tags":["Steps"]}},"/api/v1/key-dates/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDatesController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a key date","tags":["Key Dates"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDatesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateResponse"}}},"description":"Key date"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a key date","tags":["Key Dates"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDatesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateUpdateRequest"}}},"description":"Key date params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a key date","tags":["Key Dates"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.KeyDatesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateUpdateRequest"}}},"description":"Key date params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyDateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a key date","tags":["Key Dates"]}},"/api/v1/matters/{matter_id}/notes/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterNotesController.delete","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a note","tags":["Matter notes"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterNotesController.show","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, user.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteResponse"}}},"description":"Note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a note","tags":["Matter notes"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterNotesController.update (2)","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUpdateRequest"}}},"description":"Note params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteResponse"}}},"description":"Updated note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a note","tags":["Matter notes"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterNotesController.update","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUpdateRequest"}}},"description":"Note params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteResponse"}}},"description":"Updated note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a note","tags":["Matter notes"]}},"/api/v1/tasks/{id}/dependencies":{"get":{"callbacks":{},"description":"The tasks this task depends on. A `blocks` dependency prevents completion until the depended-on task is done; `related` is informational. Bounded by one task, so the list is not paginated.","operationId":"MatterFirstWeb.API.V1.TasksController.dependencies","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDependencyCollectionResponse"}}},"description":"Dependency list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List a task's dependencies","tags":["Tasks"]},"post":{"callbacks":{},"description":"Makes this task depend on another task in the same firm. A `blocks` dependency that would close a cycle is refused (422): a circular block leaves both tasks permanently uncompletable.","operationId":"MatterFirstWeb.API.V1.TasksController.add_dependency","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDependencyCreateRequest"}}},"description":"Dependency params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDependencyResponse"}}},"description":"Created dependency"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Add a dependency to a task","tags":["Tasks"]}},"/api/v1/documents/{id}/download":{"post":{"callbacks":{},"description":"Returns a short-lived, signed URL for the document's file. For `:s3`\nstorage this is a presigned, expiring S3 GET URL; for `:local` storage it\nis a signed link to `GET /documents/:id/content` that expires in\n900 seconds. Either way the URL carries its own\nauthorization and stops working once it expires. It is not a permanent,\npublic path.\n","operationId":"MatterFirstWeb.API.V1.DocumentsController.download","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"format":"uri","type":"string"}},"type":"object"}}},"description":"Download URL"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a download URL for a document","tags":["Documents"]}},"/api/v1/tasks":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TasksController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, lead, assignee, parent_task.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskListResponse"}}},"description":"Task list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List tasks","tags":["Tasks"]},"post":{"callbacks":{},"description":"Supports the optional Idempotency-Key request header (max 255 chars): retrying the POST with the same key and body replays the original response instead of creating a second task.","operationId":"MatterFirstWeb.API.V1.TasksController.create","parameters":[],"requestBody":{"content":{"application/json":{"example":{"data":{"attributes":{"assigned_to_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4a11","due_date":"2026-09-08","matter_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e01","name":"Order title search","priority":"normal"}}},"schema":{"$ref":"#/components/schemas/TaskCreateRequest"}}},"description":"Task params","required":false},"responses":{"201":{"content":{"application/json":{"example":{"data":{"attributes":{"assigned_to_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4a11","due_date":"2026-09-08","matter_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e01","name":"Order title search","priority":"normal","status":"pending"},"id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e02","type":"tasks"},"meta":{"timestamp":"2026-09-01T03:15:00Z"}},"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Created task"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a task","tags":["Tasks"]}},"/api/v1/users":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.UsersController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserListResponse"}}},"description":"User list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List users","tags":["Discovery"]}},"/api/v1/referral-contracts/{public_id}/submissions":{"post":{"callbacks":{},"description":"Submit a referral against a contract. Authenticated with a partner API credential (mf_ref_ prefix).","operationId":"MatterFirstWeb.API.V1.ReferralSubmissionsController.create","parameters":[{"description":"Contract public ID","in":"path","name":"public_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"data":{"description":"Submission field data","type":"object"},"external_reference":{"description":"Partner-side reference ID","type":"string"}},"type":"object"}}},"description":"Referral submission payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"format":"uuid","type":"string"},"message":{"type":"string"},"missing_fields":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"}},"type":"object"}}},"description":"Referral created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Contract not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Duplicate external_reference"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"referralPartnerKey":[]}],"summary":"Submit a referral","tags":["Referral Submissions"]}},"/api/v1/me":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MeController.show","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"description":"Current user"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"The API key's owner and the key's own delegation","tags":["Discovery"]}},"/api/v1/document-request-templates":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentRequestTemplatesController.index","parameters":[{"description":"","in":"query","name":"matter_type_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestTemplateListResponse"}}},"description":"Document request template list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List document request templates","tags":["Document Request Templates"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentRequestTemplatesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestTemplateRequest"}}},"description":"Document request template params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestTemplateResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a document request template","tags":["Document Request Templates"]}},"/api/v1/invoices/preview":{"post":{"callbacks":{},"description":"Computes what \"include unbilled work\" would sweep onto a draft for the matter: counts, cents and the entries held back for having no price, without creating anything. The same predicate that refuses an issue at send time, so the preview and the refusal cannot disagree.","operationId":"MatterFirstWeb.API.V1.InvoicesController.preview","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePreviewRequest"}}},"description":"Preview params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"attributes":{"properties":{"disbursement_cents":{"type":"integer"},"disbursement_count":{"type":"integer"},"empty":{"type":"boolean"},"matter_id":{"format":"uuid","type":"string"},"time_entry_cents":{"type":"integer"},"time_entry_count":{"type":"integer"},"total_cents":{"type":"integer"},"unpriced_count":{"type":"integer"}},"type":"object"},"type":{"enum":["invoice-previews"],"type":"string"}},"type":"object"}},"title":"InvoicePreviewResponse","type":"object"}}},"description":"Invoice preview"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Preview what an invoice for a matter would bill","tags":["Invoices"]}},"/api/v1/invoices":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoicesController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, contact.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceListResponse"}}},"description":"Invoice list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List invoices","tags":["Invoices"]},"post":{"callbacks":{},"description":"Supports the optional Idempotency-Key request header (max 255 chars): retrying the POST with the same key and body replays the original response instead of creating a second invoice.","operationId":"MatterFirstWeb.API.V1.InvoicesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreateRequest"}}},"description":"Invoice params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"description":"Created invoice"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create an invoice","tags":["Invoices"]}},"/api/v1/tasks/{task_id}/comments":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskCommentsController.index","parameters":[{"description":"","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: task, user.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCommentListResponse"}}},"description":"Comment list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List comments on a task","tags":["Task comments"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskCommentsController.create","parameters":[{"description":"","in":"path","name":"task_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCommentCreateRequest"}}},"description":"Comment params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCommentResponse"}}},"description":"Created comment"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a comment on a task","tags":["Task comments"]}},"/api/v1/calendar-events":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.CalendarEventsController.index","parameters":[{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, created_by.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}},{"description":"Start of an overlap window (YYYY-MM-DD, inclusive), resolved in the firm's timezone. Returns every event still running on or after this date, including one that began before it.","in":"query","name":"start_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"End of an overlap window (YYYY-MM-DD, inclusive), resolved in the firm's timezone. Returns every event that begins on or before the end of this date, including one that runs past it.","in":"query","name":"end_date","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventListResponse"}}},"description":"Calendar event list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List calendar events","tags":["Calendar Events"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.CalendarEventsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventRequest"}}},"description":"Calendar event params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a calendar event","tags":["Calendar Events"]}},"/api/v1/matters/{matter_id}/roles":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterRolesController.index","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterRoleListResponse"}}},"description":"Role list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List roles for a matter","tags":["Matter Roles"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterRolesController.create","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterRoleRequest"}}},"description":"Role params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterRoleResponse"}}},"description":"Created role"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Add a role to a matter","tags":["Matter Roles"]}},"/api/v1/matters/{matter_id}/roles/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterRolesController.delete","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Remove a role from a matter","tags":["Matter Roles"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterRolesController.show","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterRoleResponse"}}},"description":"Role"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a matter role","tags":["Matter Roles"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterRolesController.update (2)","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterRoleUpdateRequest"}}},"description":"Role params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterRoleResponse"}}},"description":"Updated role"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a matter role","tags":["Matter Roles"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterRolesController.update","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterRoleUpdateRequest"}}},"description":"Role params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterRoleResponse"}}},"description":"Updated role"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a matter role","tags":["Matter Roles"]}},"/api/v1/leads/{id}/close-lost":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.close_lost","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCloseLostRequest"}}},"description":"Close-lost params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Lead marked lost"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Failed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Mark a lead as lost","tags":["Leads"]}},"/api/v1/organization":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.OrganizationController.show","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}},"description":"Organization"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get the caller's organization","tags":["Discovery"]}},"/api/v1/matters/{matter_id}/transitions":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.StepsController.available_transitions","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableTransitionsResponse"}}},"description":"Available transitions"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get available step transitions for a matter","tags":["Steps"]}},"/api/v1/matters/{matter_id}/notes":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterNotesController.index","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, user.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteListResponse"}}},"description":"Note list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List notes on a matter","tags":["Matter notes"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterNotesController.create","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"data":{"attributes":{"content":"Client confirmed settlement date moved to 30 October."}}},"schema":{"$ref":"#/components/schemas/NoteCreateRequest"}}},"description":"Note params","required":false},"responses":{"201":{"content":{"application/json":{"example":{"data":{"attributes":{"content":"Client confirmed settlement date moved to 30 October.","matter_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e01"},"id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e06","type":"notes"},"meta":{"timestamp":"2026-09-01T03:15:00Z"}},"schema":{"$ref":"#/components/schemas/NoteResponse"}}},"description":"Created note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a note on a matter","tags":["Matter notes"]}},"/api/v1/email-drafts/{id}/send":{"post":{"callbacks":{},"description":"Runs the draft through the full outbound pipeline (template render, merge tags, branding, sender resolution) and deletes it. Returns the created email. A draft already sent or discarded returns 404. Sender resolution happens here rather than at create time: the draft's `sender_integration_id`, if set, is the explicit pick, and otherwise the chain falls through to the acting user's mailbox, the matter's or lead's responsible user, and the firm default. When no step of that chain yields a send-ready mailbox the send is refused with 422 rather than delivered from an unintended address.","operationId":"MatterFirstWeb.API.V1.EmailDraftsController.send_draft","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailResponse"}}},"description":"Sent email"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Send an email draft","tags":["Emails"]}},"/api/v1/invoices/{invoice_id}/line-items/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoiceLineItemsController.delete","parameters":[{"description":"","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invoice not editable"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Remove a line item from a draft invoice","tags":["Invoices"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoiceLineItemsController.update (2)","parameters":[{"description":"","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineItemUpdateRequest"}}},"description":"Line item params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineItemResponse"}}},"description":"Updated line item"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invoice not editable"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a line item on a draft invoice","tags":["Invoices"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoiceLineItemsController.update","parameters":[{"description":"","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineItemUpdateRequest"}}},"description":"Line item params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineItemResponse"}}},"description":"Updated line item"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invoice not editable"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a line item on a draft invoice","tags":["Invoices"]}},"/api/v1/invoices/{id}/void":{"post":{"callbacks":{},"description":"Withdraws a draft, sent or viewed invoice that has no money recorded against it, releasing the work it billed back into unbilled WIP. A part-paid invoice cannot be voided: issue a credit note instead.","operationId":"MatterFirstWeb.API.V1.InvoicesController.void","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"description":"Voided invoice"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invoice not voidable"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Void an invoice","tags":["Invoices"]}},"/api/v1/document-requests/{id}":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentRequestsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestResponse"}}},"description":"Document request"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a secure document request","tags":["Document Requests"]}},"/api/v1/contacts/{id}/merge":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactsController.merge","parameters":[{"description":"Primary contact ID","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMergeRequest"}}},"description":"Merge params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}},"description":"Merged contact"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Merge error"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Merge two contacts","tags":["Contacts"]}},"/api/v1/time-entries/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TimeEntriesController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a time entry","tags":["Time Entries"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TimeEntriesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, user, invoice.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryResponse"}}},"description":"Time entry"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a time entry","tags":["Time Entries"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TimeEntriesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryUpdateRequest"}}},"description":"Time entry params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryResponse"}}},"description":"Updated time entry"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a time entry","tags":["Time Entries"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TimeEntriesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryUpdateRequest"}}},"description":"Time entry params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryResponse"}}},"description":"Updated time entry"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a time entry","tags":["Time Entries"]}},"/api/v1/leads/{lead_id}/notes":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadNotesController.index","parameters":[{"description":"","in":"path","name":"lead_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadNoteListResponse"}}},"description":"Lead note list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List notes on a lead","tags":["Leads"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadNotesController.create","parameters":[{"description":"","in":"path","name":"lead_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadNoteCreateRequest"}}},"description":"Lead note params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadNoteResponse"}}},"description":"Created note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a note on a lead","tags":["Leads"]}},"/api/v1/integrations":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.IntegrationsController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationListResponse"}}},"description":"Integration list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List connected integrations","tags":["Discovery"]}},"/api/v1/matters":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MattersController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter_type, assigned_to, team.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterListResponse"}}},"description":"Matter list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List matters","tags":["Matters"]},"post":{"callbacks":{},"description":"Supports the optional Idempotency-Key request header (max 255 chars): retrying the POST with the same key and body replays the original response instead of creating a second matter.","operationId":"MatterFirstWeb.API.V1.MattersController.create","parameters":[],"requestBody":{"content":{"application/json":{"example":{"data":{"attributes":{"assigned_to_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4a11","description":"Purchase of 42 Riverside Ave, settlement 30 October.","jurisdiction_region":"VIC","matter_type_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4a10","name":"Nguyen: Riverside Ave conveyance","priority":"high"}}},"schema":{"$ref":"#/components/schemas/MatterCreateRequest"}}},"description":"Matter params","required":false},"responses":{"201":{"content":{"application/json":{"example":{"data":{"attributes":{"assigned_to_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4a11","jurisdiction_country":"AU","jurisdiction_region":"VIC","matter_type_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4a10","name":"Nguyen: Riverside Ave conveyance","opened_at":"2026-09-01T03:15:00Z","priority":"high","reference":"MAT-2026-0042","status":"open"},"id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e01","type":"matters"},"meta":{"timestamp":"2026-09-01T03:15:00Z"}},"schema":{"$ref":"#/components/schemas/MatterResponse"}}},"description":"Created matter"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a matter","tags":["Matters"]}},"/api/v1/tasks/{id}/subtasks":{"get":{"callbacks":{},"description":"The tasks whose parent_task_id is this task, paginated.","operationId":"MatterFirstWeb.API.V1.TasksController.subtasks","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskListResponse"}}},"description":"Subtask list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List a task's subtasks","tags":["Tasks"]}},"/api/v1/tasks/{id}/cancel":{"post":{"callbacks":{},"description":"Sets the task's status to cancelled. Idempotent on an already-cancelled task; refused (409) on a completed one: reopen it first.","operationId":"MatterFirstWeb.API.V1.TasksController.cancel","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Cancelled task"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid status"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Cancel a task","tags":["Tasks"]}},"/api/v1/matters/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MattersController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a matter","tags":["Matters"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MattersController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter_type, assigned_to, team.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterResponse"}}},"description":"Matter"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a matter","tags":["Matters"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MattersController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Optional optimistic-concurrency precondition: the ETag from a previous GET/update of this matter. A stale value is refused with 412 precondition_failed before anything is written.","in":"header","name":"if-match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterUpdateRequest"}}},"description":"Matter params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterResponse"}}},"description":"Updated matter"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a matter","tags":["Matters"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MattersController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Optional optimistic-concurrency precondition: the ETag from a previous GET/update of this matter. A stale value is refused with 412 precondition_failed before anything is written.","in":"header","name":"if-match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterUpdateRequest"}}},"description":"Matter params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterResponse"}}},"description":"Updated matter"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a matter","tags":["Matters"]}},"/api/v1/matter-types/{id}":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterTypesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterTypeResponse"}}},"description":"Matter type"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a matter type","tags":["Matter Types"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterTypesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterTypeUpdateRequest"}}},"description":"Matter type params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterTypeResponse"}}},"description":"Updated matter type"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a matter type","tags":["Matter Types"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterTypesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterTypeUpdateRequest"}}},"description":"Matter type params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterTypeResponse"}}},"description":"Updated matter type"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a matter type","tags":["Matter Types"]}},"/api/v1/documents/{id}/content":{"get":{"callbacks":{},"description":"Serves the raw file for a document to a caller holding a valid signed\ntoken minted by `POST /documents/:id/download`. The token authorises this\nsingle document for a short window; no API key is required (and none is\naccepted) on this endpoint: the token is the whole authorization, exactly\nlike a presigned S3 URL.\n","operationId":"MatterFirstWeb.API.V1.DocumentsController.content","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"File contents"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[],"summary":"Fetch a document's file bytes via a signed link","tags":["Documents"]}},"/api/v1/leads/{id}/qualify":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.qualify","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Qualified lead"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Failed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Mark a lead as qualified","tags":["Leads"]}},"/api/v1/documents/{id}/versions":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentsController.versions","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCollectionResponse"}}},"description":"Version history"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get version history for a document","tags":["Documents"]},"post":{"callbacks":{},"description":"Registers a file already PUT to a presigned URL (from\n`POST /documents/uploads`) as the next version of this document, the same\ntwo-step flow as document creation. Only the current version accepts a new\none; a superseded version is refused with 409. The existing head is marked\nno longer current and the new version becomes the head, linked to it.\n","operationId":"MatterFirstWeb.API.V1.DocumentsController.create_version","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionCreateRequest"}}},"description":"Version params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}},"description":"Created version"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not the current version"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Upload a new version of a document","tags":["Documents"]}},"/api/v1/matters/{matter_id}/field-groups/{field_group_id}/values":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldValuesController.index","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"field_group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldValueIndexResponse"}}},"description":"Field values"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get field values for a matter + field group","tags":["Field Values"]},"put":{"callbacks":{},"description":"Idempotent upsert of the whole value set: creates the field record when\nnone exists, then applies each `{field_definition_id => value}` entry.\nAll-or-nothing: an unknown or cross-group definition id fails the entire\nrequest with nothing written. Responds with the same shape as the index.\n","operationId":"MatterFirstWeb.API.V1.FieldValuesController.update","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"field_group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldValueSetRequest"}}},"description":"Field value set","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldValueIndexResponse"}}},"description":"Field values"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Set field values for a matter + field group","tags":["Field Values"]}},"/api/v1/teams":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TeamsController.index","parameters":[{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamListResponse"}}},"description":"Team list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List teams","tags":["Discovery"]}},"/api/v1/field-groups/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldGroupsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Field group is in use"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a field group","tags":["Field Groups"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldGroupsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldGroupResponse"}}},"description":"Field group"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a field group","tags":["Field Groups"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldGroupsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldGroupUpdateRequest"}}},"description":"Field group params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldGroupResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a field group","tags":["Field Groups"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldGroupsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldGroupUpdateRequest"}}},"description":"Field group params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldGroupResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a field group","tags":["Field Groups"]}},"/api/v1/invoices/{invoice_id}/payments":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoicePaymentsController.index","parameters":[{"description":"","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentListResponse"}}},"description":"Payment list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List an invoice's payments","tags":["Invoices"]},"post":{"callbacks":{},"description":"Records money received. Refuses drafts and voided invoices (409). A payment larger than the balance is accepted: the invoice settles for its own total and the surplus is held as an explicit overpayment credit for the client.","operationId":"MatterFirstWeb.API.V1.InvoicePaymentsController.create","parameters":[{"description":"","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"data":{"attributes":{"amount_cents":99000,"method":"bank_transfer","paid_at":"2026-09-01T03:15:00Z","reference":"EFT 2026-09-01 Nguyen"}}},"schema":{"$ref":"#/components/schemas/PaymentCreateRequest"}}},"description":"Payment params","required":false},"responses":{"201":{"content":{"application/json":{"example":{"data":{"attributes":{"amount_cents":99000,"invoice_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e04","method":"bank_transfer","paid_at":"2026-09-01T03:15:00Z","reference":"EFT 2026-09-01 Nguyen","status":"completed"},"id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e05","type":"payments"},"meta":{"timestamp":"2026-09-01T03:15:00Z"}},"schema":{"$ref":"#/components/schemas/PaymentResponse"}}},"description":"Recorded payment"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invoice not payable"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Record a payment against an issued invoice","tags":["Invoices"]}},"/api/v1/tasks/{id}/start":{"post":{"callbacks":{},"description":"Sets the task's status to in_progress and starts its timer. Idempotent on an already-running task.","operationId":"MatterFirstWeb.API.V1.TasksController.start","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Started task"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Start a task","tags":["Tasks"]}},"/api/v1/disbursements":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DisbursementsController.index","parameters":[{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, user, invoice.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisbursementListResponse"}}},"description":"Disbursement list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List disbursements","tags":["Disbursements"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DisbursementsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisbursementRequest"}}},"description":"Disbursement params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisbursementResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a disbursement","tags":["Disbursements"]}},"/api/v1/contacts/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Still referenced"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a contact","tags":["Contacts"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}},"description":"Contact"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a contact","tags":["Contacts"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateRequest"}}},"description":"Contact params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}},"description":"Updated contact"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a contact","tags":["Contacts"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateRequest"}}},"description":"Contact params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}},"description":"Updated contact"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a contact","tags":["Contacts"]}},"/api/v1/lead-pipelines":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadPipelinesController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPipelineListResponse"}}},"description":"Lead pipeline list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List active lead pipelines","tags":["Discovery"]}},"/api/v1/document-requests":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentRequestsController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestListResponse"}}},"description":"Document request list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List secure document requests","tags":["Document Requests"]},"post":{"callbacks":{},"description":"A document request's whole lifecycle is create → close (W2.6). Creating\none mints a live public upload link and emails it; closing revokes the\nlink. There is deliberately no reopen and no delete: the link that was\nsent is evidence of what the firm asked for, and a closed request stays\nclosed. Send a new request instead.\n","operationId":"MatterFirstWeb.API.V1.DocumentRequestsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestCreateRequest"}}},"description":"Document request params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestResponse"}}},"description":"Created document request"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create and send a secure document request","tags":["Document Requests"]}},"/api/v1/teams/{id}":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TeamsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}},"description":"Team"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a team","tags":["Discovery"]}},"/api/v1/audit-log/{resource_type}/{resource_id}":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AuditLogController.show","parameters":[{"description":"","in":"path","name":"resource_type","required":true,"schema":{"type":"string"}},{"description":"","in":"path","name":"resource_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogListResponse"}}},"description":"Audit log entries for resource"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get audit log entries for a specific resource","tags":["Audit Log"]}},"/api/v1/invoices/{id}":{"delete":{"callbacks":{},"description":"Only a draft with no payments recorded against it can be deleted. An issued invoice is a document the client has: void it instead.","operationId":"MatterFirstWeb.API.V1.InvoicesController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invoice not deletable"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a draft invoice","tags":["Invoices"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoicesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, contact.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"description":"Invoice"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get an invoice","tags":["Invoices"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoicesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Optional optimistic-concurrency precondition: the ETag from a previous GET/update of this invoice. A stale value is refused with 412 precondition_failed before anything is written.","in":"header","name":"if-match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdateRequest"}}},"description":"Invoice params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"description":"Updated invoice"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an invoice","tags":["Invoices"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoicesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Optional optimistic-concurrency precondition: the ETag from a previous GET/update of this invoice. A stale value is refused with 412 precondition_failed before anything is written.","in":"header","name":"if-match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdateRequest"}}},"description":"Invoice params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"description":"Updated invoice"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an invoice","tags":["Invoices"]}},"/api/v1/webhooks/{id}/rotate-secret":{"post":{"callbacks":{},"description":"Replaces the signing secret. The NEW secret is returned once, as `meta.secret` on this response, and deliveries signed with the old secret stop verifying immediately. The audit log records that a rotation happened, never the value.","operationId":"MatterFirstWeb.API.V1.WebhooksController.rotate_secret","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}},"description":"Rotated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Rotate a webhook endpoint's signing secret","tags":["Webhooks"]}},"/api/v1/tasks/{id}/reopen":{"post":{"callbacks":{},"description":"Moves a completed or cancelled task back to pending, clearing its completion bookkeeping. Refused (409) from any other status.","operationId":"MatterFirstWeb.API.V1.TasksController.reopen","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Reopened task"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid status"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Reopen a task","tags":["Tasks"]}},"/api/v1/tasks/{id}/complete":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TasksController.complete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"attributes":{"completed_at":"2026-09-01T03:15:00Z","matter_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e01","name":"Order title search","status":"completed"},"id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e02","type":"tasks"},"meta":{"timestamp":"2026-09-01T03:15:00Z"}},"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Completed task"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Mark a task as completed","tags":["Tasks"]}},"/api/v1/tasks/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TasksController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a task","tags":["Tasks"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TasksController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, lead, assignee, parent_task.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Task"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a task","tags":["Tasks"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TasksController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Optional optimistic-concurrency precondition: the ETag from a previous GET/update of this task. A stale value is refused with 412 precondition_failed before anything is written.","in":"header","name":"if-match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdateRequest"}}},"description":"Task params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Updated task"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a task","tags":["Tasks"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TasksController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Optional optimistic-concurrency precondition: the ETag from a previous GET/update of this task. A stale value is refused with 412 precondition_failed before anything is written.","in":"header","name":"if-match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdateRequest"}}},"description":"Task params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}},"description":"Updated task"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a task","tags":["Tasks"]}},"/api/v1/lead-pipelines/{id}/stages":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadPipelinesController.stages","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadPipelineStageListResponse"}}},"description":"Stage list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List a pipeline's stages, in position order","tags":["Discovery"]}},"/api/v1/matters/{matter_id}/step-history":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.StepsController.step_history","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepHistoryListResponse"}}},"description":"Step history"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get step history for a matter","tags":["Steps"]}},"/api/v1/documents/{id}/versions/{version_id}/restore":{"post":{"callbacks":{},"description":"Restores `version_id` by creating a NEW head version carrying its file, so\nthe chain only ever grows forward (DOC-11): the version history of a legal\nfile is evidence and is never rewritten. Restoring the version that is\nalready current is refused with 409.\n","operationId":"MatterFirstWeb.API.V1.DocumentsController.restore_version","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"version_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}},"description":"New head version"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Already current"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Restore a previous version of a document","tags":["Documents"]}},"/api/v1/folders":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FoldersController.index","parameters":[{"description":"","in":"query","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderListResponse"}}},"description":"Folder list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List folders for a matter","tags":["Folders"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FoldersController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderRequest"}}},"description":"Folder params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}},"description":"Created folder"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a folder","tags":["Folders"]}},"/api/v1/referral-contracts/{public_id}/test":{"post":{"callbacks":{},"description":"Validates a referral payload against the contract without creating any records. Use this to test your integration.","operationId":"MatterFirstWeb.API.V1.ReferralSubmissionsController.test","parameters":[{"description":"Contract public ID","in":"path","name":"public_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"data":{"description":"Submission field data","type":"object"}},"type":"object"}}},"description":"Referral submission payload","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"},"missing_fields":{"items":{"type":"string"},"type":"array"},"normalized":{"type":"object"},"valid":{"type":"boolean"}},"type":"object"}}},"description":"Validation result"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Contract not found"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"referralPartnerKey":[]}],"summary":"Test a referral submission","tags":["Referral Submissions"]}},"/api/v1/time-entries":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TimeEntriesController.index","parameters":[{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, user, invoice.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryListResponse"}}},"description":"Time entry list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List time entries","tags":["Time Entries"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TimeEntriesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryRequest"}}},"description":"Time entry params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryResponse"}}},"description":"Created time entry"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a time entry","tags":["Time Entries"]}},"/api/v1/capabilities":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.CapabilitiesController.show","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"Capabilities"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"API version, scopes, limits and enum catalogs","tags":["Discovery"]}},"/api/v1/email-templates":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailTemplatesController.index","parameters":[{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateListResponse"}}},"description":"Email template list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List email templates","tags":["Email Templates"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailTemplatesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateRequest"}}},"description":"Email template params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create an email template","tags":["Email Templates"]}},"/api/v1/documents/uploads":{"post":{"callbacks":{},"description":"First half of the two-step upload flow. Returns a short-lived presigned\nURL; PUT the raw file bytes to it (with the returned headers), then\nregister the document with `POST /documents`, passing the returned\n`upload_key`.\n","operationId":"MatterFirstWeb.API.V1.DocumentsController.create_upload","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadUrlRequest"}}},"description":"Upload params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadUrlResponse"}}},"description":"Presigned upload"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Request a presigned upload URL for a document file","tags":["Documents"]}},"/api/v1/contact-types/{id}/deactivate":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ContactTypesController.deactivate","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTypeResponse"}}},"description":"Deactivated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Deactivate a contact type","tags":["Contact Types"]}},"/api/v1/leads/{id}/defer":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.defer","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadDeferRequest"}}},"description":"Defer params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Deferred lead"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Failed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Defer a lead for later follow-up","tags":["Leads"]}},"/api/v1/reports/{id}/run":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ReportsController.run","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRunRequest"}}},"description":"Run parameters","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRunResponse"}}},"description":"Report results"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Report could not be run"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Run a report and return results","tags":["Reports"]}},"/api/v1/emails/schedule":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailsController.schedule","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailRequest"}}},"description":"Email params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailResponse"}}},"description":"Scheduled"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Schedule an email for future delivery","tags":["Emails"]}},"/api/v1/task-templates":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskTemplatesController.index","parameters":[{"description":"","in":"query","name":"matter_type_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateListResponse"}}},"description":"Task template list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List task templates","tags":["Task Templates"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TaskTemplatesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateRequest"}}},"description":"Task template params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTemplateResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a task template","tags":["Task Templates"]}},"/api/v1/emails/{id}":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailResponse"}}},"description":"Email"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get an email","tags":["Emails"]}},"/api/v1/audit-log":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AuditLogController.index","parameters":[{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"resource_type","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"action","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"user_id","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogListResponse"}}},"description":"Audit log entries"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List audit log entries","tags":["Audit Log"]}},"/api/v1/webhooks/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WebhooksController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a webhook endpoint","tags":["Webhooks"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WebhooksController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}},"description":"Webhook endpoint"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a webhook endpoint","tags":["Webhooks"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WebhooksController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdateRequest"}}},"description":"Webhook endpoint params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a webhook endpoint","tags":["Webhooks"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WebhooksController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdateRequest"}}},"description":"Webhook endpoint params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a webhook endpoint","tags":["Webhooks"]}},"/api/v1/matters/{matter_id}/activity":{"get":{"callbacks":{},"description":"The audit trail for the matter and everything on it (tasks, notes,\ndocuments, step moves), newest first, paginated. Serves the changed field\nNAMES only, never the changed values: the raw audit `changes` column is\nwhatever a call site passed and cannot be made safe (P0-01).\n","operationId":"MatterFirstWeb.API.V1.MattersController.activity","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"user_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"action","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogListResponse"}}},"description":"Activity entries"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List a matter's activity timeline","tags":["Matters"]}},"/api/v1/tasks/{id}/dependencies/{depends_on_id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.TasksController.remove_dependency","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"depends_on_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Remove a dependency from a task","tags":["Tasks"]}},"/api/v1/matters/{matter_id}/change-step":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.StepsController.change_step","parameters":[{"description":"","in":"path","name":"matter_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeStepRequest"}}},"description":"Change step params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepChangeResponse"}}},"description":"Step changed"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Change error"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Change matter to a different step","tags":["Steps"]}},"/api/v1/webhook-deliveries/{id}/retry":{"post":{"callbacks":{},"description":"Enqueues a fresh delivery of the same event and payload to the same endpoint, as a new delivery record with its own attempt counter.","operationId":"MatterFirstWeb.API.V1.WebhookDeliveriesController.retry","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}},"description":"Retry queued"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Retry a webhook delivery","tags":["Webhooks"]}},"/api/v1/disbursements/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DisbursementsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a disbursement","tags":["Disbursements"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DisbursementsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, user, invoice.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisbursementResponse"}}},"description":"Disbursement"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a disbursement","tags":["Disbursements"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DisbursementsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisbursementUpdateRequest"}}},"description":"Disbursement params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisbursementResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a disbursement","tags":["Disbursements"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DisbursementsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisbursementUpdateRequest"}}},"description":"Disbursement params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisbursementResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a disbursement","tags":["Disbursements"]}},"/api/v1/leads/{id}/reopen":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.reopen","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Reopened lead"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid status"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Reopen a lost, deferred or archived lead","tags":["Leads"]}},"/api/v1/email-drafts/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailDraftsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Discarded"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Discard an email draft","tags":["Emails"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailDraftsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftResponse"}}},"description":"Email draft"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get an email draft","tags":["Emails"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailDraftsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftUpdateRequest"}}},"description":"Draft params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftResponse"}}},"description":"Updated draft"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an email draft","tags":["Emails"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailDraftsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftUpdateRequest"}}},"description":"Draft params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftResponse"}}},"description":"Updated draft"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update an email draft","tags":["Emails"]}},"/api/v1/invoices/{id}/issue":{"post":{"callbacks":{},"description":"Marks a draft as issued (status \"sent\") with no email: the explicit no-inbox path; the PDF can be delivered manually. POST /invoices/:id/send is the emailed variant of the same transition.","operationId":"MatterFirstWeb.API.V1.InvoicesController.issue","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}},"description":"Issued invoice"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invoice not draft"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Issue refused"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Issue an invoice without emailing it","tags":["Invoices"]}},"/api/v1/role-templates/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.RoleTemplatesController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a role template","tags":["Role Templates"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.RoleTemplatesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleTemplateResponse"}}},"description":"Role template"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a role template","tags":["Role Templates"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.RoleTemplatesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleTemplateUpdateRequest"}}},"description":"Role template params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleTemplateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a role template","tags":["Role Templates"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.RoleTemplatesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleTemplateUpdateRequest"}}},"description":"Role template params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleTemplateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a role template","tags":["Role Templates"]}},"/api/v1/leads/{id}/convert":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.convert","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadConvertRequest"}}},"description":"Convert params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadConversionResponse"}}},"description":"Converted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conversion failed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Convert a lead to a matter","tags":["Leads"]}},"/api/v1/reports":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ReportsController.index","parameters":[{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportListResponse"}}},"description":"Report list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List reports","tags":["Reports"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ReportsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}},"description":"Report params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a report","tags":["Reports"]}},"/api/v1/automations/{id}/trigger":{"post":{"callbacks":{},"description":"Enqueues a run of an active, manual-trigger automation, optionally against\na matter (`?matter_id=`). Refused (409) for an inactive automation or one\nwhose trigger type is not `manual`. The run is asynchronous: poll\n`GET /automations/:automation_id/logs` for its outcome.\n","operationId":"MatterFirstWeb.API.V1.AutomationsController.trigger","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"matter_id","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationTriggerResponse"}}},"description":"Run enqueued"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not triggerable"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Manually trigger an automation","tags":["Automations"]}},"/api/v1/emails":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailsController.index","parameters":[{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailListResponse"}}},"description":"Email list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List emails","tags":["Emails"]}},"/api/v1/documents/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a document","tags":["Documents"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: matter, contact, folder.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}},"description":"Document"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a document","tags":["Documents"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadUpdateRequest"}}},"description":"Document params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}},"description":"Updated document"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a document","tags":["Documents"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadUpdateRequest"}}},"description":"Document params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}},"description":"Updated document"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a document","tags":["Documents"]}},"/api/v1/reports/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ReportsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a report","tags":["Reports"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ReportsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}},"description":"Report"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a report","tags":["Reports"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ReportsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportUpdateRequest"}}},"description":"Report params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a report","tags":["Reports"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.ReportsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportUpdateRequest"}}},"description":"Report params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a report","tags":["Reports"]}},"/api/v1/email-drafts":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.EmailDraftsController.index","parameters":[{"description":"","in":"query","name":"filter","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftListResponse"}}},"description":"Email draft list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List email drafts","tags":["Emails"]},"post":{"callbacks":{},"description":"`sender_integration_id` is an *explicit* mailbox pick and is optional. A draft that leaves it null is still sendable: the sender is resolved at send time by `MatterFirst.Integrations.Senders`, which tries the explicit pick, then the acting user's own connected mailbox, then the matter's or lead's responsible user, then the firm's default mailbox. Sendability therefore cannot be decided when the draft is created (a mailbox can be connected or disconnected in between), so this endpoint does not refuse a draft for want of one. List the pickable mailboxes with `GET /api/v1/integrations?filter[capability]=send_email`.","operationId":"MatterFirstWeb.API.V1.EmailDraftsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftCreateRequest"}}},"description":"Draft params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftResponse"}}},"description":"Created draft"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create an email draft","tags":["Emails"]}},"/api/v1/invoices/{invoice_id}/line-items":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoiceLineItemsController.index","parameters":[{"description":"","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineItemListResponse"}}},"description":"Line item list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List an invoice's line items","tags":["Invoices"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.InvoiceLineItemsController.create","parameters":[{"description":"","in":"path","name":"invoice_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"data":{"attributes":{"description":"Contract review and advice","line_type":"fee","quantity":"2","taxable":true,"unit_price_cents":45000}}},"schema":{"$ref":"#/components/schemas/InvoiceLineItemCreateRequest"}}},"description":"Line item params","required":false},"responses":{"201":{"content":{"application/json":{"example":{"data":{"attributes":{"amount_cents":90000,"description":"Contract review and advice","invoice_id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e04","line_type":"fee","quantity":"2","taxable":true,"unit_price_cents":45000},"id":"0198c5b2-7f2e-7c43-b9a1-3d6a1c2f4e03","type":"invoice-line-items"},"meta":{"timestamp":"2026-09-01T03:15:00Z"}},"schema":{"$ref":"#/components/schemas/InvoiceLineItemResponse"}}},"description":"Created line item"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invoice not editable"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Add a line item to a draft invoice","tags":["Invoices"]}},"/api/v1/automations":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationsController.index","parameters":[{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationListResponse"}}},"description":"Automation list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List automations","tags":["Automations"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationsController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRequest"}}},"description":"Automation params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationResponse"}}},"description":"Created automation"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create an automation","tags":["Automations"]}},"/api/v1/workflows/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WorkflowsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Dependency error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Delete error"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a workflow","tags":["Workflows"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WorkflowsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}},"description":"Workflow"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a workflow","tags":["Workflows"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WorkflowsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdateRequest"}}},"description":"Workflow params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a workflow","tags":["Workflows"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WorkflowsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdateRequest"}}},"description":"Workflow params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a workflow","tags":["Workflows"]}},"/api/v1/matter-types":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterTypesController.index","parameters":[{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterTypeListResponse"}}},"description":"Matter type list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List matter types","tags":["Matter Types"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.MatterTypesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterTypeRequest"}}},"description":"Matter type params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterTypeResponse"}}},"description":"Created matter type"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a matter type","tags":["Matter Types"]}},"/api/v1/matter-types/{id}/deactivate":{"post":{"callbacks":{},"description":"The declared end of a matter type's lifecycle (W2.6). Matter types have no\ndelete on purpose, because matters keep referencing their type forever, so\nan unused type is deactivated instead: it keeps its history and stops being\noffered for new matters. Mirrors `POST /contact-types/:id/deactivate`.\n","operationId":"MatterFirstWeb.API.V1.MatterTypesController.deactivate","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatterTypeResponse"}}},"description":"Deactivated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Deactivate a matter type","tags":["Matter Types"]}},"/api/v1/field-groups/{field_group_id}/definitions":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldDefinitionsController.index","parameters":[{"description":"","in":"path","name":"field_group_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldDefinitionListResponse"}}},"description":"Field definition list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List field definitions","tags":["Field Definitions"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldDefinitionsController.create","parameters":[{"description":"","in":"path","name":"field_group_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldDefinitionRequest"}}},"description":"Field definition params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldDefinitionResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a field definition","tags":["Field Definitions"]}},"/api/v1/webhooks/{id}/test":{"post":{"callbacks":{},"description":"Queues a `test.ping` delivery, signed exactly as real deliveries are.","operationId":"MatterFirstWeb.API.V1.WebhooksController.test","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}},"description":"Test delivery queued"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Send a test delivery to a webhook endpoint","tags":["Webhooks"]}},"/api/v1/automations/{automation_id}/logs":{"get":{"callbacks":{},"description":"The run history for one automation, newest first, paginated. Serves the\noutcome of each run (status, timing, error message), never the raw\n`trigger_data` or per-action results, which are free-form maps that can\ncarry anything the trigger passed.\n","operationId":"MatterFirstWeb.API.V1.AutomationsController.logs","parameters":[{"description":"","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationLogListResponse"}}},"description":"Execution log list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List an automation's execution logs","tags":["Automations"]}},"/api/v1/workflows/{id}/clone":{"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.WorkflowsController.clone","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCloneRequest"}}},"description":"Clone params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}},"description":"Cloned workflow"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Clone error"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Clone a workflow","tags":["Workflows"]}},"/api/v1/automations/{automation_id}/actions":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationActionsController.index","parameters":[{"description":"","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationActionListResponse"}}},"description":"Automation action list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List actions for an automation","tags":["Automation Actions"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.AutomationActionsController.create","parameters":[{"description":"","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationActionRequest"}}},"description":"Automation action params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationActionResponse"}}},"description":"Created action"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create an automation action","tags":["Automation Actions"]}},"/api/v1/document-request-templates/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentRequestTemplatesController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Template is in use"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a document request template","tags":["Document Request Templates"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentRequestTemplatesController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestTemplateResponse"}}},"description":"Document request template"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a document request template","tags":["Document Request Templates"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentRequestTemplatesController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestTemplateUpdateRequest"}}},"description":"Document request template params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestTemplateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a document request template","tags":["Document Request Templates"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.DocumentRequestTemplatesController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestTemplateUpdateRequest"}}},"description":"Document request template params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequestTemplateResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a document request template","tags":["Document Request Templates"]}},"/api/v1/role-templates":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.RoleTemplatesController.index","parameters":[{"description":"","in":"query","name":"matter_type_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"query","name":"page_number","required":false,"schema":{"type":"integer"}},{"description":"","in":"query","name":"page_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleTemplateListResponse"}}},"description":"Role template list"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"List role templates for a matter type","tags":["Role Templates"]},"post":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.RoleTemplatesController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleTemplateRequest"}}},"description":"Role template params","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleTemplateResponse"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Create a role template","tags":["Role Templates"]}},"/api/v1/field-groups/{field_group_id}/definitions/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldDefinitionsController.delete","parameters":[{"description":"","in":"path","name":"field_group_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Field definition is in use"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a field definition","tags":["Field Definitions"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldDefinitionsController.show","parameters":[{"description":"","in":"path","name":"field_group_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldDefinitionResponse"}}},"description":"Field definition"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a field definition","tags":["Field Definitions"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldDefinitionsController.update (2)","parameters":[{"description":"","in":"path","name":"field_group_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldDefinitionUpdateRequest"}}},"description":"Field definition params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldDefinitionResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a field definition","tags":["Field Definitions"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FieldDefinitionsController.update","parameters":[{"description":"","in":"path","name":"field_group_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldDefinitionUpdateRequest"}}},"description":"Field definition params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldDefinitionResponse"}}},"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a field definition","tags":["Field Definitions"]}},"/api/v1/leads/{lead_id}/notes/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadNotesController.delete","parameters":[{"description":"","in":"path","name":"lead_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a note on a lead","tags":["Leads"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadNotesController.show","parameters":[{"description":"","in":"path","name":"lead_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadNoteResponse"}}},"description":"Lead note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a note on a lead","tags":["Leads"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadNotesController.update (2)","parameters":[{"description":"","in":"path","name":"lead_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadNoteUpdateRequest"}}},"description":"Lead note params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadNoteResponse"}}},"description":"Updated note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a note on a lead","tags":["Leads"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadNotesController.update","parameters":[{"description":"","in":"path","name":"lead_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadNoteUpdateRequest"}}},"description":"Lead note params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadNoteResponse"}}},"description":"Updated note"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a note on a lead","tags":["Leads"]}},"/api/v1/folders/{id}":{"delete":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FoldersController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Dependency error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Delete error"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a folder","tags":["Folders"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FoldersController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}},"description":"Folder"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a folder","tags":["Folders"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FoldersController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderUpdateRequest"}}},"description":"Folder params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}},"description":"Updated folder"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a folder","tags":["Folders"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.FoldersController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderUpdateRequest"}}},"description":"Folder params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}},"description":"Updated folder"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a folder","tags":["Folders"]}},"/api/v1/leads/{id}":{"delete":{"callbacks":{},"description":"Deletes the lead and the work it alone justified: its notes, its tasks and its unsent email drafts all go with it. Correspondence that actually happened (sent and received emails) and any referral survive, detached. A lead that has been converted to a matter is the provenance of that matter and cannot be deleted: archive it instead.","operationId":"MatterFirstWeb.API.V1.LeadsController.delete","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Lead converted"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Delete a lead","tags":["Leads"]},"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}},{"description":"Comma-separated related resources to embed in the top-level `included` array. Supported values: pipeline, pipeline_stage, matter_type, owner, conversion_matter.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Lead"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a lead","tags":["Leads"]},"patch":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.update (2)","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Optional optimistic-concurrency precondition: the ETag from a previous GET/update of this lead. A stale value is refused with 412 precondition_failed before anything is written.","in":"header","name":"if-match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadUpdateRequest"}}},"description":"Lead params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Updated lead"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a lead","tags":["Leads"]},"put":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.LeadsController.update","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Optional optimistic-concurrency precondition: the ETag from a previous GET/update of this lead. A stale value is refused with 412 precondition_failed before anything is written.","in":"header","name":"if-match","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadUpdateRequest"}}},"description":"Lead params","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}},"description":"Updated lead"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation errors"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Update a lead","tags":["Leads"]}},"/api/v1/users/{id}":{"get":{"callbacks":{},"operationId":"MatterFirstWeb.API.V1.UsersController.show","parameters":[{"description":"","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"JSON:API sparse fieldsets: fields[<type>]=a,b limits the attributes returned for that resource type.","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"type":"object"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"description":"User"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"matterFirstApiKey":[]}],"summary":"Get a user","tags":["Discovery"]}}},"security":[{"matterFirstApiKey":[]}],"servers":[{"description":"API v1","url":"/api/v1","variables":{}}],"tags":[]}