openapi: 3.0.3
info:
    title: cases
    description: The Cases Service is the main place where all case info lives, including who is involved and what files are attached. It lets you create new cases, view existing ones, and upload documents or files, while notifying other parts of the system when anything changes.
    version: 1.0.0
servers:
    - url: https://cases.platform.arb.inc
paths:
    /:
        get:
            summary: Get basic service information
            description: Returns a plain text welcome message with the service name and creation date.
            operationId: getRoot
            responses:
                '200':
                    description: Successfully retrieved welcome message.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: Welcome to the cases service. Created on August 4, 2025 by Al Beebe
            tags:
                - /
    /cases/create:
        post:
            summary: Create a case
            description: Makes a case for the user.
            operationId: createCase
            security:
                - bearerAuth: []
            responses:
                '200':
                    description: Case successfully created.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    caseID:
                                        type: string
                                        description: Unique ID of the new case.
                                        example: "2025-08-00292"
                                    title:
                                        type: string
                                        description: Short title for the case.
                                        example: "Case 2025-08-00292"
                '403':
                    description: User cannot create more cases.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "case limit reached"
            tags:
                - cases
    /cases/list:
        post:
            summary: List active cases for the signed-in user
            description: Returns the user's active cases with simple pagination via a cursor.
            operationId: listCases
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                cursor:
                                    type: string
                                    format: date-time
                                    nullable: true
                                    description: Return cases created after this timestamp.
                                    example: "2025-07-15T10:20:30Z"
                        examples:
                            default:
                                summary: Start from a timestamp
                                value:
                                    cursor: "2025-07-15T10:20:30Z"
            responses:
                '200':
                    description: Cases successfully listed.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    cases:
                                        type: array
                                        description: List of active cases for the user.
                                        items:
                                            type: object
                                            properties:
                                                overview:
                                                    type: object
                                                    description: Summary information about the case.
                                                    properties:
                                                        id:
                                                            type: string
                                                            description: Unique identifier for the case.
                                                            example: "2025-08-00125"
                                                        created:
                                                            type: string
                                                            format: date-time
                                                            description: When the case was created.
                                                            example: "2025-07-01T09:12:45Z"
                                                        updated:
                                                            type: string
                                                            format: date-time
                                                            description: When the case was last updated.
                                                            example: "2025-07-20T14:03:11Z"
                                                        createdByUserID:
                                                            type: string
                                                            description: ID of the user who created the case.
                                                            example: "2720f109-0caf-4c62-af22-5d08c853711c"
                                                        createdByOrgID:
                                                            type: string
                                                            nullable: true
                                                            description: Organization ID that created the case, if any.
                                                            example: "cfb40d07-6160-4cbc-899e-5541dec01394"
                                                        phaseID:
                                                            type: string
                                                            description: Current phase identifier.
                                                            example: "caseInitiation"
                                                        title:
                                                            type: string
                                                            description: Human-readable title for the case.
                                                            example: "Case 2025-08-00125"
                                                        claimantName:
                                                            type: string
                                                            nullable: true
                                                            description: Name of the claimant (may be null).
                                                            example: "Acme Inc"
                                                        respondentName:
                                                            type: string
                                                            nullable: true
                                                            description: Name of the respondent (may be null).
                                                            example: "Mike Smith"
                                                participants:
                                                    type: array
                                                    description: People or entities involved in the case.
                                                    items:
                                                        type: object
                                                        properties:
                                                            created:
                                                                type: string
                                                                format: date-time
                                                                description: When the participant was added.
                                                                example: "2025-07-02T10:00:00Z"
                                                            userID:
                                                                type: string
                                                                description: ID of the participant user.
                                                                example: "2b7bd450-342a-47c8-8759-9276e5119be4"
                                                            organizationID:
                                                                type: string
                                                                nullable: true
                                                                description: Organization ID tied to the participant.
                                                                example: "4190c6ca-647d-4d99-b8b3-991b30ebb378"
                                                            firstName:
                                                                type: string
                                                                description: Participants first name.
                                                                example: "Owen"
                                                            lastName:
                                                                type: string
                                                                nullable: true
                                                                description: Optional participants last name.
                                                                example: "Smith"
                                                            partyID:
                                                                type: string
                                                                description: Participant party role.
                                                                example: "claimant"
                                                            isPrimary:
                                                                type: boolean
                                                                description: Whether this participant is the primary representative.
                                                                example: true
                                                            isObserver:
                                                                type: boolean
                                                                description: Whether this participant is an observer.
                                                                example: false
                                                partyID:
                                                    type: string
                                                    description: Users party in the case.
                                                    example: "claimant"
                                    cursor:
                                        type: string
                                        format: date-time
                                        nullable: true
                                        description: Cursor for fetching the next page (created time of the last case).
                                        example: "2025-07-20T14:03:11Z"
                                    moreCases:
                                        type: boolean
                                        description: Indicates if more cases are available to fetch.
                                        example: true
                            examples:
                                default:
                                    summary: Example response
                                    value:
                                        cases:
                                            - overview:
                                                id: "2025-08-00125"
                                                created: "2025-07-01T09:12:45Z"
                                                updated: "2025-07-20T14:03:11Z"
                                                createdByUserID: "2720f109-0caf-4c62-af22-5d08c853711c"
                                                createdByOrgID: "cfb40d07-6160-4cbc-899e-5541dec01394"
                                                phaseID: "caseInitiation"
                                                title: "Case 2025-08-00125"
                                                claimantName: "Acme Inc"
                                                respondentName: "Mike Smith"
                                              participants:
                                                - created: "2025-07-02T10:00:00Z"
                                                  userID: "2b7bd450-342a-47c8-8759-9276e5119be4"
                                                  organizationID: "4190c6ca-647d-4d99-b8b3-991b30ebb378"
                                                  firstName: "Owen"
                                                  lastName: "Smith"
                                                  partyID: "claimant"
                                                  isPrimary: true
                                                  isObserver: false
                                                - created: "2025-07-02T10:05:00Z"
                                                  userID: "65edccfa-93f6-4dd5-9421-2b3e1ffe856c"
                                                  organizationID: null
                                                  firstName: "Kyle"
                                                  lastName: "Taskman"
                                                  partyID: "caseAdministrator"
                                                  isPrimary: false
                                                  isObserver: false
                                              partyID: claimant
                                        cursor: "2025-07-20T14:03:11Z"
                                        moreCases: true
            tags:
                - cases
    /cases/view:
        post:
            summary: View a case
            description: Returns a simple snapshot of a case the user can access.
            operationId: postCasesView
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                            properties:
                                caseID:
                                    type: string
                                    description: The identifier of the case to view.
                                    example: "2025-08-00139"
            responses:
                '200':
                    description: Case overview, participants, and timetable.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    overview:
                                        type: object
                                        properties:
                                            id:
                                                type: string
                                                description: Unique identifier for the case.
                                                example: "2025-08-00139"
                                            created:
                                                type: string
                                                format: date-time
                                                description: When the case was created.
                                                example: "2025-08-23T02:47:42Z"
                                            updated:
                                                type: string
                                                format: date-time
                                                description: When the case was last updated.
                                                example: "2025-08-23T02:47:42Z"
                                            createdByUserID:
                                                type: string
                                                description: ID of the user who created the case.
                                                example: "00c573fd-18d9-4fbe-921e-6926d2c4869e"
                                            createdByOrgID:
                                                type: string
                                                nullable: true
                                                description: ID of the organization that created the case, if any.
                                                example:
                                            phaseID:
                                                type: string
                                                description: Current phase identifier.
                                                example: "caseInitiation"
                                            title:
                                                type: string
                                                description: Human-friendly title for the case.
                                                example: "Case 2025-08-00139"
                                            claimantName:
                                                type: string
                                                nullable: true
                                                description: Name of the claimant (may be null).
                                                example: "Acme Inc"
                                            respondentName:
                                                type: string
                                                nullable: true
                                                description: Name of the respondent (may be null).
                                                example: "Mike Smith"
                                            canSubmitEvidence:
                                                type: boolean
                                                description: Whether parties can currently submit evidence.
                                                example: true
                                    participants:
                                        type: array
                                        description: List of case participants.
                                        items:
                                            type: object
                                            properties:
                                                created:
                                                    type: string
                                                    format: date-time
                                                    description: When the participant was added.
                                                    example: "2025-08-23T02:47:42Z"
                                                userID:
                                                    type: string
                                                    description: ID of the participant user.
                                                    example: "00c573fd-18d9-4fbe-921e-6926d2c4869e"
                                                organizationID:
                                                    type: string
                                                    nullable: true
                                                    description: Organization ID of the participant, if any.
                                                    example:
                                                firstName:
                                                    type: string
                                                    description: Participants first name.
                                                    example: "Owen"
                                                lastName:
                                                    type: string
                                                    nullable: true
                                                    description: Optional participants last name.
                                                    example: "Smith"
                                                partyID:
                                                    type: string
                                                    description: Role of the participant.
                                                    example: "claimant"
                                                isPrimary:
                                                    type: boolean
                                                    description: Whether the participant is the primary representative.
                                                    example: true
                                                isObserver:
                                                    type: boolean
                                                    description: Whether the participant is an observer.
                                                    example: false
                                    partyID:
                                        type: string
                                        description: Users party in the case.
                                        example: "claimant"
                                    timetable:
                                        type: object
                                        description: Case timetable details.
                                        properties:
                                            phases:
                                                type: array
                                                items:
                                                    type: object
                                                    properties:
                                                        id:
                                                            type: string
                                                            description: Phase identifier.
                                                            example: "caseInitiation"
                                                        scheduledStart:
                                                            type: string
                                                            format: date-time
                                                            description: Scheduled start of the phase.
                                                            example: "2025-08-23T02:47:42.123816Z"
                                                        scheduledEnd:
                                                            type: string
                                                            format: date-time
                                                            nullable: true
                                                            description: Scheduled end of the phase, if set.
                                                            example:
                                                        filingDeadline:
                                                            type: string
                                                            format: date-time
                                                            description: Deadline for required filings in this phase.
                                                            example: "2025-09-23T02:47:42.123816Z"
                                                        documents:
                                                            type: array
                                                            description: Documents relevant to this phase.
                                                            items:
                                                                type: object
                                                                properties:
                                                                    id:
                                                                        type: string
                                                                        description: Document identifier.
                                                                        example: "statementOfClaim"
                                                                    filedBy:
                                                                        type: string
                                                                        nullable: true
                                                                        description: Party who files the document.
                                                                        example: "claimant"
                                                                    approvedBy:
                                                                        type: string
                                                                        nullable: true
                                                                        description: Party who approves the document, if any.
                                                                        example: "caseAdministrator"
                                                                    maxAllowed:
                                                                        type: integer
                                                                        description: Maximum number of documents allowed.
                                                                        example: 1
                                                                    required:
                                                                        type: boolean
                                                                        description: Whether the document is required.
                                                                        example: true
                                    settlement:
                                        type: object
                                        description: (Optional) Contact details for settlement-related communication.
                                        properties:
                                            phone:
                                                type: string
                                                description: (Optional) Contact phone number for settlement-related communication.
                                                example: "+15555555555"
                                            email:
                                                type: string
                                                format: email
                                                description: (Optional) Contact email address for settlement-related communication.
                                                example: "settle@example.com"
                                            website:
                                                type: string
                                                format: uri
                                                description: (Optional) Website or portal link for settlement information.
                                                example: "https://example.com?ref=12345"
                                            amount:
                                                type: string
                                                description: (Optional) Total amount the claimant believes the respondent owes.
                                                example: "$1000.00"
                                            offer:
                                                type: string
                                                description: (Optional) Settlement amount the claimant is willing to accept right now.
                                                example: "$750"
                                            validForDays:
                                                type: integer
                                                description: (Optional) Number of days the settlement offer will remain valid.
                                                example: 7
                                example:
                                    overview:
                                        id: "2025-08-00139"
                                        created: "2025-08-23T02:47:42Z"
                                        updated: "2025-08-23T02:47:42Z"
                                        createdByUserID: "00c573fd-18d9-4fbe-921e-6926d2c4869e"
                                        createdByOrgID: null
                                        phaseID: "caseInitiation"
                                        title: "Case 2025-08-00139"
                                        claimantName: "Acme Inc"
                                        respondentName: "Mike Smith"
                                        canSubmitEvidence: true
                                    participants:
                                        - created: "2025-08-23T02:47:42Z"
                                          userID: "00c573fd-18d9-4fbe-921e-6926d2c4869e"
                                          organizationID: null
                                          firstName: "Owen"
                                          lastName: "Smith"
                                          partyID: "claimant"
                                          isPrimary: true
                                          isObserver: false
                                        - created: "2025-08-23T02:48:01Z"
                                          userID: "df25d20f-8042-44e2-97af-3609659c56a3"
                                          firstName: "Kyle"
                                          lastName: "Taskman"
                                          organizationID: null
                                          partyID: "caseAdministrator"
                                          isPrimary: true
                                          isObserver: false
                                    partyID: claimant
                                    timetable:
                                        phases:
                                            - id: "caseInitiation"
                                              scheduledStart: "2025-08-23T02:47:42.123816Z"
                                              scheduledEnd: null
                                              filingDeadline: "2025-09-23T02:47:42.123816Z"
                                              documents:
                                                - id: "statementOfClaim"
                                                  filedBy: "claimant"
                                                  approvedBy: "caseAdministrator"
                                                  maxAllowed: 1
                                                  required: true
                                                - id: "noticeOfArbitration"
                                                  filedBy: "caseAdministrator"
                                                  approvedBy: null
                                                  maxAllowed: 1
                                                  required: true
                                    settlement:
                                        type: object
                                        description: (Optional) Settlement details, including contact and financial terms.
                                        properties:
                                            phone:
                                                type: string
                                                description: (Optional) Contact phone number for settlement-related communication.
                                                example: "+15555555555"
                                            email:
                                                type: string
                                                format: email
                                                description: (Optional) Contact email address for settlement-related communication.
                                                example: "settle@example.com"
                                            website:
                                                type: string
                                                format: uri
                                                description: (Optional) Website or portal link for settlement information.
                                                example: "https://example.com?ref=12345"
                                            amount:
                                                type: string
                                                description: (Optional) Total amount the claimant believes the respondent owes.
                                                example: "$1000.00"
                                            offer:
                                                type: string
                                                description: (Optional) Settlement amount the claimant is willing to accept right now.
                                                example: "$750"
                                            validForDays:
                                                type: integer
                                                description: (Optional) Number of days the settlement offer will remain valid.
                                                example: 7
                '404':
                    description: The case was not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "case not found"
                '410':
                    description: The user is not a participant in the case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "user is not a participant"
            tags:
                - cases
    /docket/entries/list:
        post:
            summary: List docket entries for a case
            description: Gets a list of entries in a cases docket.
            operationId: listDocketEntries
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                            properties:
                                caseID:
                                    type: string
                                    description: The case identifier to list entries for. Max length 36.
                                    example: "2025-08-00125"
            responses:
                '200':
                    description: Docket entries successfully retrieved.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    entries:
                                        type: array
                                        description: The docket entries for the case.
                                        items:
                                            type: object
                                            properties:
                                                entryID:
                                                    type: string
                                                    description: ID for this docket entry (unique within the case).
                                                    example: "52"
                                                enteredAt:
                                                    type: string
                                                    format: date-time
                                                    description: When the entry was officially filed.
                                                    example: "2025-08-01T14:23:45Z"
                                                userID:
                                                    type: string
                                                    description: User ID of the participant who authored the entry.
                                                    example: "a2c4b6d8-1122-3344-5566-77889900aa11"
                                                organizationID:
                                                    type: string
                                                    nullable: true
                                                    description: Organization ID of the user, or null for personal accounts.
                                                    example: "51d3c8c2-9c0a-4a2e-8a9b-3e2f1d0c7b6a"
                                                phaseID:
                                                    type: string
                                                    description: Case phase at the time of filing.
                                                    example: "caseInitiation"
                                                documentID:
                                                    type: string
                                                    description: Type ID of the document filed.
                                                    example: "statementOfClaim"
                                                partyID:
                                                    type: string
                                                    description: Role of the participant (e.g., claimant, respondent).
                                                    example: "claimant"
                                                filingID:
                                                    type: string
                                                    description: ID of the filed document.
                                                    example: "42"
                                                title:
                                                    type: string
                                                    description: Short title or description of the entry.
                                                    example: "Statement of Claim Filed"
                                                strickenAt:
                                                    type: string
                                                    format: date-time
                                                    nullable: true
                                                    description: When the entry was stricken, if applicable.
                                                    example:
                                                supersededAt:
                                                    type: string
                                                    format: date-time
                                                    nullable: true
                                                    description: When the entry was replaced, if applicable.
                                                    example:
                                                supersededByEntryID:
                                                    type: string
                                                    nullable: true
                                                    description: ID of the entry that replaces this one, if any.
                                                    example: "203"
                                                rootEntryID:
                                                    type: string
                                                    nullable: true
                                                    description: ID of the first entry in the related thread, if any.
                                                    example: "32"
                                                parentEntryID:
                                                    type: string
                                                    nullable: true
                                                    description: ID of the entry this one replies to, if any.
                                                    example: "53"
                                example:
                                    entries:
                                        - entryID: "52"
                                          enteredAt: "2025-08-01T14:23:45Z"
                                          userID: "a2c4b6d8-1122-3344-5566-77889900aa11"
                                          organizationID: "51d3c8c2-9c0a-4a2e-8a9b-3e2f1d0c7b6a"
                                          phaseID: "caseInitiation"
                                          documentID: "statementOfClaim"
                                          partyID: "claimant"
                                          filingID: "25"
                                          title: "Statement of Claim Filed"
                                          strickenAt: null
                                          supersededAt: null
                                          supersededByEntryID: null
                                          rootEntryID: "90"
                                          parentEntryID: null
                                        - entryID: "55"
                                          enteredAt: "2025-08-03T10:05:12Z"
                                          userID: "c3d5e7f9-0011-2233-4455-66778899aabb"
                                          organizationID: null
                                          phaseID: "caseInitiation"
                                          documentID: "noticeOfArbitration"
                                          partyID: "caseAdministrator"
                                          filingID: "91"
                                          title: "Notice of Arbitration"
                                          strickenAt: null
                                          supersededAt: null
                                          supersededByEntryID: null
                                          rootEntryID: "91"
                                          parentEntryID: "56"
                '410':
                    description: The case could not be found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "The specified case could not be found."
                '411':
                    description: Not a participant.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Not a participant in this case."
            tags:
                - docket
    /docket/entries/pdf:
        post:
            summary: Get a signed PDF URL for a docket entry
            description: Returns a time-limited, signed URL to download the PDF for a specific docket entry within a case.
            operationId: postDocketEntriesPdf
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - entryID
                            properties:
                                caseID:
                                    type: string
                                    description: Unique identifier of the case containing the docket entry (max 36 characters).
                                    example: "2025-08-00059"
                                entryID:
                                    type: string
                                    description: Unique identifier of the docket entry whose PDF URL is requested (max 36 characters).
                                    example: "51"
                        examples:
                            validRequest:
                                summary: Example request
                                value:
                                    caseID: "2025-08-00059"
                                    entryID: "51"
            responses:
                '200':
                    description: Signed URL successfully generated.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    url:
                                        type: string
                                        format: uri
                                        description: Time-limited signed URL for downloading the PDF.
                                        example: "https://secure-storage.arb.inc/cases/dockets/2025-08-00059/51.pdf?expires=1734048000&sig=ZXhhbXBsZVNpZw"
                                    validForSeconds:
                                        type: integer
                                        description: Number of seconds the URL remains valid.
                                        example: 300
                            examples:
                                success:
                                    summary: Example success response
                                    value:
                                        url: "https://secure-storage.arb.inc/cases/dockets/2025-08-00059/51.pdf?expires=1734048000&sig=ZXhhbXBsZVNpZw"
                                        validForSeconds: 300
                '404':
                    description: The specified docket entry could not be found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "The specified docket entry could not be found."
                '410':
                    description: The specified case could not be found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "The specified case could not be found."
            tags:
                - docket
    /evidence/uploads/create:
        post:
            summary: Upload evidence to a case
            description: Upload one file to a case with a short description.
            operationId: postEvidenceUploadsCreate
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    multipart/form-data:
                        schema:
                            type: object
                            required:
                                - caseID
                                - description
                                - file
                            properties:
                                caseID:
                                    type: string
                                    description: ID of the case to attach the evidence to. Must be sent before the file part.
                                    example: "2025-08-00123"
                                description:
                                    type: string
                                    description: Short description of the evidence. Must be sent before the file part.
                                    example: "Photo from the incident on May 5, 2025"
                                makePublic:
                                    type: string
                                    description: Whether to immediately add the evidence to the docket before the evidence exchange phase.
                                    enum:
                                        - "true"
                                        - "false"
                                    example: "true"
                                file:
                                    type: string
                                    format: binary
                                    description: The evidence file to upload (single file only).
                                    example: (binary file contents)
                        encoding:
                            caseID:
                                contentType: text/plain
                            description:
                                contentType: text/plain
                            makePublic:
                                contentType: text/plain
                            file:
                                contentType: application/pdf
            responses:
                '200':
                    description: Evidence successfully uploaded.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    uploadID:
                                        type: string
                                        description: ID of the created evidence upload.
                                        example: "12"
                                    exhibitID:
                                        type: string
                                        nullable: true
                                        description: ID of the exhibit in the docket, or null if not public.
                                        example: "2"
                '403':
                    description: User is not allowed to upload in this case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "you cannot upload evidence in this case"
                '404':
                    description: Case not found or user not a participant.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "case not found"
                '410':
                    description: Evidence submission window is closed for the case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "evidence submission is currently closed"
                '411':
                    description: The party has reached the maximum number of evidence uploads.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "maximum number of evidence uploads reached"
                '412':
                    description: The uploaded file is too large.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "uploaded file size is too large"
                '413':
                    description: File not supported.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "file not supported"
            tags:
                - evidence
    /evidence/uploads/delete:
        post:
            summary: Delete an uploaded evidence file
            description: Removes a specific upload from a case if you have access.
            operationId: deleteEvidenceUpload
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - uploadID
                            properties:
                                caseID:
                                    type: string
                                    description: The case identifier.
                                    maxLength: 36
                                    example: "2025-08-00123"
                                uploadID:
                                    type: string
                                    description: The upload identifier to delete.
                                    maxLength: 36
                                    example: "32"
            responses:
                '200':
                    description: Upload deleted.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "upload successfully deleted"
                '404':
                    description: Case or upload not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "upload not found"
                '410':
                    description: Evidence submission is closed for this case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "evidence submission is currently closed"
                '411':
                    description: User is an observer and cannot delete uploads.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "you are registered as an observer and cannot delete uploads in this case"
                '412':
                    description: User is not a participant in the case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "you are not a participant in the case"
                '413':
                    description: Cannot delete evidence that has been added to the docket.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "evidence cannot be deleted because it's already been added to the docket"
            tags:
                - evidence
    /evidence/uploads/download:
        post:
            summary: Get a download link for an uploaded file
            description: Returns a short-lived URL so you can download the upload.
            operationId: getEvidenceUploadDownloadUrl
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - uploadID
                            properties:
                                caseID:
                                    type: string
                                    description: The case identifier.
                                    maxLength: 36
                                    example: "2025-08-00123"
                                uploadID:
                                    type: string
                                    description: The upload identifier for which to generate a download URL.
                                    maxLength: 36
                                    example: "3"
            responses:
                '200':
                    description: Signed download URL generated.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    url:
                                        type: string
                                        format: uri
                                        description: Time-limited URL for downloading the file.
                                        example: "https://secure-storage.arb.inc/uploads/2025-08-00123/22"
                                    validForSeconds:
                                        type: integer
                                        description: How long the URL is valid, in seconds.
                                        example: 600
                '404':
                    description: Case, participant, or upload not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Upload could not be found"
            tags:
                - evidence
    /evidence/uploads/list:
        post:
            summary: List evidence uploads for a case
            description: Returns the uploads the user is allowed to access for a given case.
            operationId: listEvidenceUploads
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                            properties:
                                caseID:
                                    type: string
                                    description: The case identifier to look up uploads for.
                                    minLength: 1
                                    maxLength: 36
                                    example: "2025-08-00123"
            responses:
                '200':
                    description: Successfully returned uploads the user is allowed to access.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    uploads:
                                        type: array
                                        description: List of evidence uploads visible to the user.
                                        items:
                                            type: object
                                            properties:
                                                created:
                                                    type: string
                                                    format: date-time
                                                    description: When the evidence was submitted (RFC 3339).
                                                    example: "2025-08-29T16:27:16Z"
                                                uploadID:
                                                    type: string
                                                    description: Unique identifier for the upload.
                                                    example: "4"
                                                exhibitID:
                                                    type: string
                                                    nullable: true
                                                    description: ID of the exhibit in the docket, or null if not public.
                                                    example: "2"
                                                categoryID:
                                                    type: string
                                                    description: Evidence category classification.
                                                    example: "document"
                                                phaseID:
                                                    type: string
                                                    description: Case phase at submission.
                                                    example: "caseInitiation"
                                                partyID:
                                                    type: string
                                                    description: Party linked to the evidence.
                                                    example: "claimant"
                                                userID:
                                                    type: string
                                                    description: User who submitted the evidence.
                                                    example: "00c573fd-18d9-4fbe-921e-6926d2c4869e"
                                                organizationID:
                                                    type: string
                                                    nullable: true
                                                    description: Organization the user belongs to, if any.
                                                    example: "8a922e11-1821-4923-a860-58683cbda9a2"
                                                description:
                                                    type: string
                                                    description: Text description of the evidence.
                                                    example: "This is my description"
                                                contentType:
                                                    type: string
                                                    description: MIME type of the uploaded file.
                                                    example: "application/pdf"
                            examples:
                                sample:
                                    summary: Example response
                                    value:
                                        uploads:
                                            - created: "2025-08-29T15:41:19Z"
                                              uploadID: "1"
                                              categoryID: "image"
                                              phaseID: "caseInitiation"
                                              partyID: "claimant"
                                              userID: "00c573fd-18d9-4fbe-921e-6926d2c4869e"
                                              organizationID: "8a922e11-1821-4923-a860-58683cbda9a2"
                                              description: "Photo of the building"
                                              contentType: "application/png"
                                            - created: "2025-08-29T15:45:09Z"
                                              uploadID: "2"
                                              categoryID: "document"
                                              phaseID: "caseInitiation"
                                              partyID: "claimant"
                                              userID: "00c573fd-18d9-4fbe-921e-6926d2c4869e"
                                              organizationID: "8a922e11-1821-4923-a860-58683cbda9a2"
                                              description: "Terms of service"
                                              contentType: "application/pdf"
                '404':
                    description: The case was not found or the user is not a participant.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "case not found"
            tags:
                - evidence
    /evidence/uploads/make-public:
        post:
            summary: Make an evidence upload public
            description: Turns a private evidence upload into a public exhibit for a case.
            operationId: makeEvidencePublic
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - uploadID
                            properties:
                                caseID:
                                    type: string
                                    description: The case ID where the evidence belongs. Max length 36.
                                    example: "2025-09-00123"
                                uploadID:
                                    type: string
                                    description: The upload ID of the evidence to make public. Max length 36.
                                    example: "4"
            responses:
                '200':
                    description: Evidence was made public and assigned an exhibit ID.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    exhibitID:
                                        type: string
                                        description: The resulting exhibit ID.
                                        example: "2"
                '404':
                    description: Case or upload not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "case not found"
                '410':
                    description: Evidence submission window is closed.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "evidence submission is currently closed"
                '411':
                    description: User is registered only as an observer for this case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "you are registered as an observer"
                '412':
                    description: User is not a participant in the specified case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "you are not a participant in the case"
            tags:
                - evidence
    /filings/documents/approve:
        post:
            summary: Approve a filed document
            description: Approves a specific filed document in a case.
            operationId: approveFilingDocument
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - filingID
                            properties:
                                caseID:
                                    type: string
                                    description: Identifier for the case.
                                    example: "2025-08-00123"
                                filingID:
                                    type: string
                                    description: Identifier for the filing to approve.
                                    example: "52"
            responses:
                '200':
                    description: Document was approved.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Successfully approved"
                '404':
                    description: Document was not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Document not found"
                '409':
                    description: Approval is not allowed for this participant.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Participant cannot approve this document"
            tags:
                - filings
    /filings/documents/create:
        post:
            summary: Create a document
            description: Creates a new document for a case using a document template.
            operationId: postFilingsDocumentsCreate
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - documentID
                            properties:
                                caseID:
                                    type: string
                                    description: ID of the case to file into.
                                    example: "2025-08-00125"
                                documentID:
                                    type: string
                                    description: Identifier of the document type/template.
                                    example: "statementOfClaim"
                                fields:
                                    type: object
                                    additionalProperties:
                                        type: string
                                    description: Key-value field inputs for the document.
                                    example:
                                        respondentName: "Mike Smith"
                                        respondentAddress: "123 Main Street"
            responses:
                '200':
                    description: Document successfully filed.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    filingID:
                                        type: string
                                        description: ID of the created filing.
                                        example: "3"
                '404':
                    description: Case not found or user not a participant.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "case not found"
                '409':
                    description: User is an observer and cannot file.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "you are registered as an observer and cannot file documents in this case"
                '410':
                    description: The document cannot be filed at this phase.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document not allowed in this phase"
                '411':
                    description: Filing deadline has passed.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "filing deadline for this document has closed"
                '412':
                    description: Filing limit reached for this document type.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "filing limit for this document type reached"
                '422':
                    description: Validation errors for submitted fields.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    validationErrors:
                                        type: array
                                        items:
                                            type: object
                                            properties:
                                                field:
                                                    type: string
                                                    description: Field or section with an error.
                                                    example: "respondentName"
                                                message:
                                                    type: string
                                                    description: Human-readable error.
                                                    example: "must be at least 20 characters."
            tags:
                - filings
    /filings/documents/delete:
        post:
            summary: Delete a filed document
            description: Removes a document from a case if it’s still eligible for deletion.
            operationId: deleteFiledDocument
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - filingID
                            properties:
                                caseID:
                                    type: string
                                    description: The case identifier.
                                    maxLength: 36
                                    example: "2025-08-00251"
                                filingID:
                                    type: string
                                    description: The filing/document identifier.
                                    maxLength: 36
                                    example: "3"
            responses:
                '200':
                    description: Document was deleted.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Document successfully deleted"
                '404':
                    description: Case participant or document not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document not found"
                '409':
                    description: Document can’t be deleted because it is already docketed.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document cannot be deleted because it's already added to the docket"
                '410':
                    description: Document is currently submitted for approval and cannot be deleted.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document cannot be deleted because it's currently submitted for approval"
                '411':
                    description: User is an observer in the case and cannot delete documents.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "you are registered as an observer and cannot delete documents in this case"
            tags:
                - filings
    /filings/documents/list:
        post:
            summary: List filed documents for a case
            description: Returns filed documents for a specific case that the signed-in user participates in.
            operationId: listFiledDocuments
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                            properties:
                                caseID:
                                    type: string
                                    description: The case ID to list filed documents for.
                                    example: "4f9b1d9e-0e7a-4b4d-9f0e-5f5f2b7d8a33"
            responses:
                '200':
                    description: Filed documents successfully retrieved.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    documents:
                                        type: array
                                        description: List of filed documents for the case.
                                        items:
                                            type: object
                                            properties:
                                                created:
                                                    type: string
                                                    format: date-time
                                                    description: Timestamp when the filing was created.
                                                    example: "2025-06-12T14:23:45Z"
                                                updated:
                                                    type: string
                                                    format: date-time
                                                    description: Timestamp when the filing was last updated.
                                                    example: "2025-06-18T09:11:02Z"
                                                filingID:
                                                    type: string
                                                    description: Unique identifier for the filing record.
                                                    example: "4"
                                                phaseID:
                                                    type: string
                                                    description: Identifier of the phase this document was filed in.
                                                    example: "caseInitiation"
                                                documentType:
                                                    type: string
                                                    description: Identifier of the type of document that was filed.
                                                    example: "statementOfClaim"
                                                userID:
                                                    type: string
                                                    description: Identifier of the user who filed the document.
                                                    example: "d7f2a1b3-4c5d-6e7f-8a90-b1c2d3e4f5a6"
                                                organizationID:
                                                    type: string
                                                    nullable: true
                                                    description: Identifier of the organization the user belongs to (null if a personal account).
                                                    example: "f3e9c5b7-8a1d-4c2e-9f0b-1a2b3c4d5e6f"
                                                isSubmitted:
                                                    type: boolean
                                                    description: Indicates whether the filing has been submitted for review.
                                                    example: true
                                                approved:
                                                    type: string
                                                    format: date-time
                                                    nullable: true
                                                    description: Timestamp when the filing was approved (null if not approved).
                                                    example: "2025-06-20T16:45:00Z"
                                                approvedBy:
                                                    type: string
                                                    nullable: true
                                                    description: Identifier of the user who approved the filing (null if not approved).
                                                    example: "9a7b6c5d-4e3f-2a1b-0c9d-8e7f6a5b4c3d"
                                                docketId:
                                                    type: string
                                                    nullable: true
                                                    description: Identifier linking the filing to a docket entry (null if not docketed).
                                                    example: "8"
                            examples:
                                success:
                                    summary: Example successful response
                                    value:
                                        documents:
                                            - created: "2025-06-12T14:23:45Z"
                                              updated: "2025-06-18T09:11:02Z"
                                              filingID: "b1f6d3f2-0a5b-48fb-8b13-2a8c9b0f6e77"
                                              phaseID: "2c9f1c1e-7e2a-4f6c-9a54-3e8d2f4c6a11"
                                              documentType: "statementOfClaim"
                                              userID: "d7f2a1b3-4c5d-6e7f-8a90-b1c2d3e4f5a6"
                                              organizationID: "f3e9c5b7-8a1d-4c2e-9f0b-1a2b3c4d5e6f"
                                              isSubmitted: true
                                              approved: "2025-06-20T16:45:00Z"
                                              approvedBy: "9a7b6c5d-4e3f-2a1b-0c9d-8e7f6a5b4c3d"
                                              docketId: "8"
                                            - created: "2025-06-10T10:05:12Z"
                                              updated: "2025-06-10T10:05:12Z"
                                              filingID: "3b7a9d5e-2c4f-4a6b-9d8e-0f1a2b3c4d5e"
                                              phaseID: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
                                              documentType: "statementOfCase"
                                              userID: "11111111-2222-3333-4444-555555555555"
                                              organizationID: null
                                              isSubmitted: false
                                              approved: null
                                              approvedBy: null
                                              docketId: null
                '404':
                    description: Case not found or user is not a participant in the case.
                    content:
                        text/plain:
                            schema:
                                type: string
                            examples:
                                caseMissing:
                                    summary: Case missing
                                    value: "case not found"
                                notParticipant:
                                    summary: Not a participant
                                    value: "not a participant in the case"
            tags:
                - filings
    /filings/documents/pdf:
        post:
            summary: Get a temporary PDF URL for a filed document
            description: Returns a short-lived URL to download the PDF of a filed document in a case.
            operationId: postFilingsDocumentsPDF
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - filingID
                            properties:
                                caseID:
                                    type: string
                                    description: Unique identifier of the case that contains the filed document.
                                    maxLength: 36
                                    example: "2025-08-00123"
                                filingID:
                                    type: string
                                    description: Unique identifier of the filed document whose PDF URL is requested.
                                    maxLength: 36
                                    example: "2"
            responses:
                '200':
                    description: Signed URL generated successfully.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    url:
                                        type: string
                                        format: uri
                                        description: Temporary URL to download the PDF.
                                        example: "https://secure-storage.arb.inc/filings/2025-08-00123/22"
                                    validForSeconds:
                                        type: integer
                                        description: Number of seconds the URL remains valid.
                                        example: 3600
                '404':
                    description: The requested document could not be found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: The specified document could not be found.
                '410':
                    description: The requested case could not be found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: The specified case could not be found.
                '411':
                    description: Permission denied.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: You do not have permission to view this document.
                '412':
                    description: The document is only available from the docket.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: The specified document is only accessible from the docket.
            tags:
                - filings
    /filings/documents/pending-approval:
        post:
            summary: Get documents waiting for approval
            description: Returns all documents submitted for approval in a case that only the calling user can approve.
            operationId: postFilingsDocumentsPendingApproval
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                            properties:
                                caseID:
                                    type: string
                                    maxLength: 36
                                    description: Case identifier to look up.
                                    example: "2025-08-00123"
            responses:
                '200':
                    description: Documents pending approval were found.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    documents:
                                        type: array
                                        description: List of documents pending approval for the caller.
                                        items:
                                            type: object
                                            properties:
                                                created:
                                                    type: string
                                                    format: date-time
                                                    description: When the filing was created.
                                                    example: "2025-08-01T14:23:45Z"
                                                updated:
                                                    type: string
                                                    format: date-time
                                                    description: When the filing was last updated.
                                                    example: "2025-08-10T09:12:30Z"
                                                filingID:
                                                    type: string
                                                    description: Unique filing record ID.
                                                    example: "4"
                                                phaseID:
                                                    type: string
                                                    description: Phase this document was filed in.
                                                    example: "caseInitiation"
                                                documentID:
                                                    type: string
                                                    description: ID of document type that was filed.
                                                    example: "statementOfClaim"
                                                userID:
                                                    type: string
                                                    description: ID of the user who filed the document.
                                                    example: "ac4a1ff3-2834-422f-9286-f8e8e5d0ca5b"
                                                organizationID:
                                                    type: string
                                                    nullable: true
                                                    description: Organization ID of the filing user (null for personal accounts).
                                                    example: "928c4307-9982-4cf7-a726-791e83a043f0"
                            examples:
                                sample:
                                    value:
                                        documents:
                                            - created: "2025-08-01T14:23:45Z"
                                              updated: "2025-08-10T09:12:30Z"
                                              filingID: "4"
                                              phaseID: "caseInitiation"
                                              documentID: "statementOfClaim"
                                              userID: "ac4a1ff3-2834-422f-9286-f8e8e5d0ca5b"
                                              organizationID: "928c4307-9982-4cf7-a726-791e83a043f0"
                                            - created: "2025-08-05T11:00:00Z"
                                              updated: "2025-08-08T16:45:10Z"
                                              filingID: "4"
                                              phaseID: "caseInitiation"
                                              documentID: "statementOfClaim"
                                              userID: "ac4a1ff3-2834-422f-9286-f8e8e5d0ca5b"
                                              organizationID: null
                '404':
                    description: Case not found or user is not a participant.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "case not found"
            tags:
                - filings
    /filings/documents/submit:
        post:
            summary: Submit a filed document
            description: Sends a filed document for approval in a case.
            operationId: submitFiledDocument
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - filingID
                            properties:
                                caseID:
                                    type: string
                                    description: The case ID.
                                    maxLength: 36
                                    example: "2025-08-00125"
                                filingID:
                                    type: string
                                    description: The filing ID.
                                    maxLength: 36
                                    example: "8"
            responses:
                '200':
                    description: Document submitted.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: Document successfully submitted
                '404':
                    description: Document not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: document not found
                '409':
                    description: Document is already docketed and cannot be submitted.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: document cannot be submitted because it's already been added to the docket
                '410':
                    description: Document has already been submitted for approval.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: document is already submitted for approval
                '411':
                    description: User is an observer and cannot file in this case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: You are registered as an observer and cannot file documents in this case
                '412':
                    description: Document type is not allowed right now.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: document not allowed in this phase
            tags:
                - filings
    /filings/documents/update:
        post:
            summary: Update a filed document
            description: Updates a document in a case with new field values.
            operationId: updateFiledDocument
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - filingID
                                - fields
                            properties:
                                caseID:
                                    type: string
                                    description: The case ID the document belongs to.
                                    example: "2025-08-00125"
                                filingID:
                                    type: string
                                    description: The filing ID of the document to update.
                                    example: "14"
                                fields:
                                    type: object
                                    additionalProperties:
                                        type: string
                                    description: Key-value fields to update on the document.
                                    example:
                                        title: "Amended Motion to Dismiss"
                                        description: "Updated summary after review"
                                        docketNumber: "2025-00123"
            responses:
                '200':
                    description: Document successfully updated.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Document successfully updated"
                '404':
                    description: The document or participant was not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document not found"
                '409':
                    description: The document is docketed and cannot be changed.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document cannot be updated because it's already been added to the docket"
                '410':
                    description: The document is currently submitted for approval.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document cannot be updated because it's currently submitted for approval"
                '411':
                    description: The user is an observer and cannot file documents.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "You are registered as an observer and cannot file documents in this case"
                '422':
                    description: One or more fields failed validation.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    validationErrors:
                                        type: array
                                        items:
                                            type: object
                                            properties:
                                                field:
                                                    type: string
                                                    description: The field or section that failed validation.
                                                    example: "title"
                                                message:
                                                    type: string
                                                    description: What went wrong with the value.
                                                    example: "title is required"
                            examples:
                                sampleValidationErrors:
                                    value:
                                        validationErrors:
                                            - field: "title"
                                              message: "title is required"
                                            - field: "docketNumber"
                                              message: "docketNumber must be numeric"
            tags:
                - filings
    /filings/documents/view:
        post:
            summary: View a filed document
            description: Returns the details of a filed document for a given case and filing.
            operationId: postFilingsDocumentsView
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - filingID
                            properties:
                                caseID:
                                    type: string
                                    description: The case identifier.
                                    example: "2025-08-00225"
                                filingID:
                                    type: string
                                    description: The filing identifier.
                                    example: "15"
            responses:
                '200':
                    description: Filed document returned.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    document:
                                        type: object
                                        properties:
                                            created:
                                                type: string
                                                format: date-time
                                                description: When the filing was created.
                                                example: "2025-06-01T14:23:45Z"
                                            updated:
                                                type: string
                                                format: date-time
                                                description: When the filing was last updated.
                                                example: "2025-06-10T09:15:00Z"
                                            caseID:
                                                type: string
                                                description: Case ID the filing belongs to.
                                                example: "2025-08-00225"
                                            filingID:
                                                type: string
                                                description: Unique filing record ID.
                                                example: "15"
                                            phaseID:
                                                type: string
                                                description: Phase in which the document was filed.
                                                example: "caseInitiation"
                                            documentId:
                                                type: string
                                                description: Type identifier of the filed document.
                                                example: "statementOfClaim"
                                            partyID:
                                                type: string
                                                description: Party on whose behalf the document was filed.
                                                example: "claimant"
                                            userID:
                                                type: string
                                                description: User who filed the document.
                                                example: "74e7a465-6865-42b9-a1cf-a241bd8896d4"
                                            organizationID:
                                                type: string
                                                nullable: true
                                                description: Organization ID of the user, if any.
                                                example: "16d1224b-8f19-44c7-bfb0-47a6a272ff33"
                                            isSubmitted:
                                                type: boolean
                                                description: Whether the filing was submitted for review.
                                                example: true
                                            fields:
                                                type: object
                                                additionalProperties:
                                                    type: string
                                                description: Map of field IDs to their text content.
                                                example:
                                                    claimantName: "Mike Smith"
                                                    claimantAddress: "123 Main Street"
                                            approved:
                                                type: string
                                                format: date-time
                                                nullable: true
                                                description: When the filing was approved, if approved.
                                                example: "2025-06-12T17:00:00Z"
                                            approvedBy:
                                                type: string
                                                nullable: true
                                                description: User ID of the approver, if approved.
                                                example: "107b5300-6f89-4934-b188-b99594cf3c55"
                                            docketId:
                                                type: string
                                                nullable: true
                                                description: Docket entry ID, if docketed.
                                                example: "42"
                '404':
                    description: The document or participant was not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: Document not found
            tags:
                - filings
    /filings/documents/withdraw:
        post:
            summary: Withdraw a filed document
            description: Removes a filed document from a case if it hasn’t been docketed.
            operationId: withdrawFiledDocument
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - filingID
                            properties:
                                caseID:
                                    type: string
                                    description: The case identifier.
                                    example: "2025-08-00124"
                                filingID:
                                    type: string
                                    description: The filed document identifier.
                                    example: "15"
            responses:
                '200':
                    description: Document successfully withdrawn.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Document successfully withdrawn"
                '404':
                    description: Document not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document not found"
                '409':
                    description: Document already docketed and cannot be withdrawn.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document cannot be withdrawn because it's already been added to the docket"
                '410':
                    description: Document was already withdrawn.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "document is already withdrawn"
                '411':
                    description: User is an observer and cannot file or withdraw documents in the case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "You are registered as an observer and cannot file documents in this case"
            tags:
                - filings
    /internal/public-api:
        post:
            summary: Call internal service endpoints
            description: Acts as a gateway to forward requests to internal endpoints like cases, schemas, and evidence uploads.
            operationId: postInternalPublicAPI
            security:
                - bearerAuth: []
            parameters:
                - name: method
                  in: query
                  required: true
                  schema:
                    type: string
                    example: POST
                  description: The HTTP method for the internal request.
                - name: endpoint
                  in: query
                  required: true
                  schema:
                    type: string
                    example: cases/create
                  description: The internal endpoint to call.
            requestBody:
                required: false
                content:
                    application/json:
                        schema:
                            type: object
                            additionalProperties: true
                            description: Body is passed directly to the chosen internal endpoint.
                            example:
                                caseID: "2025-08-00123"
                                party: "claimant"
            responses:
                '200':
                    description: Successful response from the internal endpoint.
                    content:
                        application/json:
                            schema:
                                type: object
                                additionalProperties: true
                                example:
                                    id: "c17c3433-81b3-4096-90e0-9fbb32c06204"
                                    status: "created"
                '404':
                    description: Internal endpoint not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: endpoint not found
            tags:
                - internal
    /invites/accept:
        post:
            summary: Accept an invite to a case
            description: Takes a code and accepts an invite for the signed-in user to join a case.
            operationId: acceptInvite
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - code
                            properties:
                                code:
                                    type: string
                                    description: The invite code to use. Non-letters/numbers are ignored and it is lowercased.
                                    example: "a1b2c3d4"
            responses:
                '200':
                    description: Invite accepted.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    caseID:
                                        type: string
                                        description: The ID of the case the user was added to.
                                        example: "2025-09-000123"
                '410':
                    description: Invite code is invalid.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Invite code is invalid"
            tags:
                - invites
    /invites/case/view:
        post:
            summary: View a case using an invite code
            description: Takes a simple code and returns a basic view of the case.
            operationId: viewCaseByInviteCode
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - code
                            properties:
                                code:
                                    type: string
                                    description: The invite code from the link or message.
                                    example: "ab12cd34ef"
            responses:
                '200':
                    description: Case found and returned.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    overview:
                                        type: object
                                        properties:
                                            id:
                                                type: string
                                                description: Unique identifier for the case.
                                                example: "2025-09-00123"
                                            created:
                                                type: string
                                                format: date-time
                                                description: When the case was created.
                                                example: "2025-08-21T14:07:12Z"
                                            title:
                                                type: string
                                                description: Simple title for the case.
                                                example: "Smith v. Acme Corp."
                                            claimantName:
                                                type: string
                                                nullable: true
                                                description: Name of the claimant if known.
                                                example: "Jordan Smith"
                                            respondentName:
                                                type: string
                                                nullable: true
                                                description: Name of the respondent if known.
                                                example: "Acme Corporation"
                                    settlement:
                                        type: object
                                        properties:
                                            phone:
                                                type: string
                                                description: Contact phone for settlement.
                                                example: "+1-555-0102"
                                            email:
                                                type: string
                                                format: email
                                                description: Contact email for settlement.
                                                example: "settlements@acme.example"
                                            website:
                                                type: string
                                                format: uri
                                                description: Website or portal for settlement info.
                                                example: "https://settle.example.com/case/c17c3433"
                                            amount:
                                                type: string
                                                description: Amount the claimant says is owed.
                                                example: "2500.00"
                                            offer:
                                                type: string
                                                description: Current settlement offer.
                                                example: "1800.00"
                                            validForDays:
                                                type: integer
                                                description: Days the offer stays valid.
                                                example: 14
                                    docketEntries:
                                        type: array
                                        items:
                                            type: object
                                            properties:
                                                entryID:
                                                    type: string
                                                    description: ID for this docket entry.
                                                    example: "5"
                                                enteredAt:
                                                    type: string
                                                    format: date-time
                                                    description: When the entry was filed.
                                                    example: "2025-08-22T09:15:00Z"
                                                documentID:
                                                    type: string
                                                    description: Type of document.
                                                    example: "statementOfClaim"
                                                partyID:
                                                    type: string
                                                    description: Party role tied to the entry.
                                                    example: "claimant"
                                                title:
                                                    type: string
                                                    description: Short title for the entry.
                                                    example: "Statement of Claim"
                                    evidence:
                                        type: array
                                        items:
                                            type: object
                                            properties:
                                                created:
                                                    type: string
                                                    format: date-time
                                                    description: When the evidence was submitted.
                                                    example: "2025-08-23T11:22:33Z"
                                                exhibitID:
                                                    type: string
                                                    description: Exhibit identifier in the docket.
                                                    example: "4"
                                                categoryID:
                                                    type: string
                                                    description: Evidence category.
                                                    example: "image"
                                                partyID:
                                                    type: string
                                                    description: Party linked to the evidence.
                                                    example: "claimant"
                                                description:
                                                    type: string
                                                    description: Text description of the evidence.
                                                    example: "Screenshot of invoice #INV-4452"
                                                contentType:
                                                    type: string
                                                    description: MIME type of the file.
                                                    example: "image/png"
                            example:
                                overview:
                                    id: "2025-09-00123"
                                    created: "2025-08-21T14:07:12Z"
                                    title: "Smith v. Acme Corp."
                                    claimantName: "Jordan Smith"
                                    respondentName: "Acme Corporation"
                                settlement:
                                    phone: "+1-555-0102"
                                    email: "settlements@acme.example"
                                    website: "https://settle.example.com/case/c17c3433"
                                    amount: "2500.00"
                                    offer: "1800.00"
                                    validForDays: 14
                                docketEntries:
                                    - entryID: "1"
                                      enteredAt: "2025-08-22T09:15:00Z"
                                      documentID: "statementOfClaim"
                                      partyID: "claimant"
                                      title: "Statement of Claim"
                                evidence:
                                    - exhibitID: "5"
                                      created: "2025-08-23T11:22:33Z"
                                      categoryID: "image"
                                      partyID: "claimant"
                                      description: "Screenshot of invoice #INV-4452"
                                      contentType: "image/png"
                '410':
                    description: Invite code is invalid or expired.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "invite code is invalid"
            tags:
                - invites
    /invites/docket/pdf:
        post:
            summary: Get a temporary PDF download link
            description: Returns a short-lived URL to download a docket entry PDF using an invite code.
            operationId: postInvitesDocketPDF
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - code
                                - entryID
                            properties:
                                code:
                                    type: string
                                    description: Invite code used to access the docket entry.
                                    example: "ab12cd34ef56"
                                entryID:
                                    type: string
                                    description: Unique ID of the docket entry whose PDF link is requested.
                                    example: "21"
            responses:
                '200':
                    description: Temporary link successfully created.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    url:
                                        type: string
                                        description: The signed URL to download the PDF.
                                        example: "https://files.example.com/dockets/5e9b8f1a.pdf?sig=xyz&exp=1699999999"
                                    validForSeconds:
                                        type: integer
                                        description: Number of seconds the URL will remain valid.
                                        example: 600
                '404':
                    description: Docket entry not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "The specified docket entry could not be found."
                '410':
                    description: Invite code is invalid or expired.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "invite code is invalid"
            tags:
                - invites
    /invites/evidence/download:
        post:
            summary: Get a temporary download link for evidence
            description: Returns a short-lived URL to download an evidence file using an invite code.
            operationId: postInvitesEvidenceDownload
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - code
                                - exhibitID
                            properties:
                                code:
                                    type: string
                                    description: Invite code tied to the evidence request.
                                    example: "a1b2c3d4e5"
                                exhibitID:
                                    type: string
                                    description: Unique identifier of the evidence file.
                                    maxLength: 36
                                    example: "22"
            responses:
                '200':
                    description: Temporary URL successfully generated.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    url:
                                        type: string
                                        format: uri
                                        description: The signed URL to download the file.
                                        example: "https://files.example.com/download/abc123?sig=xyz&exp=1699999999"
                                    validForSeconds:
                                        type: integer
                                        description: Number of seconds the URL remains valid.
                                        example: 900
                '404':
                    description: The specified exhibit could not be found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "The specified exhibit could not be found."
                '410':
                    description: Invite code is invalid or expired.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "invite code is invalid"
            tags:
                - invites
    /schemas/list:
        post:
            summary: List schemas
            description: Retrieves all available schemas for case phases and documents.
            operationId: listSchemas
            security:
                - bearerAuth: []
            responses:
                '200':
                    description: Schemas successfully retrieved.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    parties:
                                        type: array
                                        description: All available parties.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    description: Unique party identifier.
                                                    example: "caseAdministrator"
                                                displayName:
                                                    type: string
                                                    description: Human-readable party name.
                                                    example: "Case Administrator"
                                                description:
                                                    type: string
                                                    description: Brief explanation of the party.
                                                    example: "Responsible for handling the administrative aspects of the case."
                                    phases:
                                        type: array
                                        description: All available case phases.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    description: Unique phase identifier.
                                                    example: "caseInitiation"
                                                displayName:
                                                    type: string
                                                    description: Human-readable phase name.
                                                    example: "Case Initiation"
                                                description:
                                                    type: string
                                                    description: Brief explanation of the phase.
                                                    example: "The initial phase of the case."
                                    documents:
                                        type: array
                                        description: All available document schemas.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    description: Unique document identifier.
                                                    example: "statementOfClaim"
                                                displayName:
                                                    type: string
                                                    description: Human-readable document name.
                                                    example: "Statement of Claim"
                                                description:
                                                    type: string
                                                    description: Brief explanation of the document.
                                                    example: "A formal statement outlining the details of the claim."
                                                sections:
                                                    type: array
                                                    description: Sections belonging to this document.
                                                    items:
                                                        type: object
                                                        properties:
                                                            displayName:
                                                                type: string
                                                                description: Human-readable section name.
                                                                example: "Claim Details"
                                                            description:
                                                                type: string
                                                                description: Brief explanation of the section.
                                                                example: "This section captures the details of the claim."
                                                            sortOrder:
                                                                type: integer
                                                                description: Numeric order of this section within its parent document.
                                                                example: 1
                                                            fields:
                                                                type: array
                                                                description: Fillable fields in the section.
                                                                items:
                                                                    type: object
                                                                    properties:
                                                                        id:
                                                                            type: string
                                                                            description: Unique field identifier.
                                                                            example: "claimDetails"
                                                                        displayName:
                                                                            type: string
                                                                            description: Human-readable field name.
                                                                            example: "Claim Details"
                                                                        required:
                                                                            type: boolean
                                                                            description: Whether this field is mandatory.
                                                                            example: true
                                                                        minLength:
                                                                            type: integer
                                                                            description: Minimum required content length.
                                                                            example: 10
                                                                        maxLength:
                                                                            type: integer
                                                                            description: Maximum allowed content length.
                                                                            example: 500
                                                                        sortOrder:
                                                                            type: integer
                                                                            description: Numeric order of this field within its parent section.
                                                                            example: 1
                                    evidence:
                                        type: array
                                        description: All supported evidence types and their allowed MIME content types.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    description: Unique evidence type identifier.
                                                    example: "audio"
                                                displayName:
                                                    type: string
                                                    description: Human-readable evidence type name.
                                                    example: "Audio"
                                                contentTypes:
                                                    type: array
                                                    description: Allowed MIME content types for this evidence type.
                                                    items:
                                                        type: string
                                                    example:
                                                        - "audio/mpeg"
                                                        - "audio/wav"
                                                        - "audio/flac"
                                                        - "audio/mp4"
                                                        - "audio/ogg"
            tags:
                - schemas
    /service-of-notice/attachments/create:
        post:
            summary: Make an attachment image from a web page
            description: Takes a web page and makes a PNG image sized for the chosen mail type.
            operationId: createServiceOfNoticeAttachment
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - mailType
                                - url
                            properties:
                                mailType:
                                    type: string
                                    description: The mail type to size the screenshot for.
                                    example: "pressureSealed"
                                url:
                                    type: string
                                    format: uri
                                    description: The web page to capture.
                                    example: "https://example.com/notice/12345"
            responses:
                '200':
                    description: PNG image created successfully.
                    headers:
                        Content-Type:
                            description: Returned media type.
                            schema:
                                type: string
                                example: "image/png"
                            example: "image/png"
                    content:
                        image/png:
                            schema:
                                type: string
                                format: binary
                            example: (binary PNG content)
                '410':
                    description: The web page could not be loaded to create the image.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Failed to load webpage URL"
            tags:
                - service-of-notice
    /service-of-notice/codes/create:
        post:
            summary: Create a one-time join code
            description: Makes a short code so a respondent can join a case.
            operationId: createServiceOfNoticeCode
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                            properties:
                                caseID:
                                    type: string
                                    description: The ID of the case to create a code for.
                                    example: "2025-09-00123"
            responses:
                '200':
                    description: Code successfully created.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    code:
                                        type: string
                                        description: The join code the respondent must enter.
                                        example: "4YP-997-FWH"
                                    url:
                                        type: string
                                        description: URL where the respondent should go to enter the code.
                                        example: "https://cases.arb.inc/respond"
                '404':
                    description: Case not found or user not a participant.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "case not found"
                '410':
                    description: The participant is not a claimant on this case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "participant is not a claimant"
                '411':
                    description: The participant is only an observer on this case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "participant is an observer"
                '412':
                    description: The respondent has already joined this case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "respondent already joined"
            tags:
                - service-of-notice
    /service-of-notice/mail-types/list:
        post:
            summary: Get available mail types
            description: Returns mail types with simple fields users can customize.
            operationId: postServiceOfNoticeMailingsSchemas
            security:
                - bearerAuth: []
            responses:
                '200':
                    description: Mail types successfully retrieved.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    mailTypes:
                                        type: array
                                        description: List of available mail types.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    description: Unique identifier for the mail type.
                                                    example: "pressureSealed"
                                                displayName:
                                                    type: string
                                                    description: User-friendly name of the mail type.
                                                    example: "Pressure Sealed"
                                                description:
                                                    type: string
                                                    description: Short description of the mail type.
                                                    example: "A single sheet folded and sealed for mailing."
                                                UserFields:
                                                    type: array
                                                    description: Fields the user can customize.
                                                    items:
                                                        type: object
                                                        properties:
                                                            id:
                                                                type: string
                                                                description: Unique identifier for the user field.
                                                                example: "logo"
                                                            displayName:
                                                                type: string
                                                                description: User-friendly label for the field.
                                                                example: "Company Logo"
                                                            description:
                                                                type: string
                                                                description: Brief explanation of the field’s purpose.
                                                                example: "PNG or JPEG image displayed at the top right."
                                                            pixelWidth:
                                                                type: integer
                                                                description: Maximum image width in pixels.
                                                                example: 600
                                                            pixelHeight:
                                                                type: integer
                                                                description: Maximum image height in pixels.
                                                                example: 200
                            examples:
                                sample:
                                    summary: Example response
                                    value:
                                        mailTypes:
                                            - id: "pressureSealed"
                                              displayName: "Pressure Sealed"
                                              description: "A single sheet folded and sealed for mailing."
                                              UserFields:
                                                - id: "logo"
                                                  displayName: "Company Logo"
                                                  description: "PNG or JPEG image displayed at the top right."
                                                  pixelWidth: 600
                                                  pixelHeight: 200
                                                - id: "qrCode"
                                                  displayName: "QR Code"
                                                  description: "Scannable code linking to your website."
                                                  pixelWidth: 300
                                                  pixelHeight: 300
                                            - id: "letter"
                                              displayName: "Letter"
                                              description: "8.5x11 letter with optional header image."
                                              UserFields:
                                                - id: "headerImage"
                                                  displayName: "Header Image"
                                                  description: "Banner image displayed across the top."
                                                  pixelWidth: 1200
                                                  pixelHeight: 300
            tags:
                - service-of-notice
    /service-of-notice/mailings/create:
        post:
            summary: Create a service-of-notice mailing
            description: Creates a service-of-notice mailing for a case. Send a multipart form with required text fields first, followed by optional file uploads.
            operationId: createServiceOfNoticeMailing
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    multipart/form-data:
                        schema:
                            type: object
                            required:
                                - caseID
                                - mailType
                            properties:
                                caseID:
                                    type: string
                                    description: The case ID this mailing belongs to. Must be sent first in the multipart form.
                                    example: "2025-09-00123"
                                mailType:
                                    type: string
                                    description: The type of mail to send. Only `"pressureSealed"` is supported. Must be sent second in the multipart form.
                                    enum:
                                        - "pressureSealed"
                                    example: "pressureSealed"
                                file.attachment:
                                    type: string
                                    format: binary
                                    description: Optional PNG file mapped to a template field (example field ID `attachment`).
                                    example: (binary PNG)
                            additionalProperties:
                                type: string
                                format: binary
                                description: |
                                    Any additional optional PNG file parts named as `file.{fieldId}`.
                                    Each file must be `image/png` and ≤ 5MB.
                        encoding:
                            file.attachment:
                                contentType: image/png
            responses:
                '200':
                    description: Mailing was created.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: mailing created
                '410':
                    description: Mailing already exists.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: mailing already exists
            tags:
                - service-of-notice
    /service-of-notice/mailings/list:
        post:
            summary: List mailings for a case
            description: Returns the mailings tied to a case in a simple way.
            operationId: listMailingsForCase
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                            properties:
                                caseID:
                                    type: string
                                    minLength: 1
                                    maxLength: 50
                                    description: Case to get the mailings for.
                                    example: "2025-09-00123"
            responses:
                '200':
                    description: Mailings successfully retrieved.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    mailings:
                                        type: array
                                        description: List of mailings in the response.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    description: Unique mailing identifier.
                                                    example: "e7f6d4d1-9c7a-4c20-9d18-bb3a2c9b8b10"
                                                created:
                                                    type: string
                                                    format: date-time
                                                    description: When the mailing was created.
                                                    example: "2025-09-15T14:32:10Z"
                                                mailType:
                                                    type: string
                                                    description: Type of mailing.
                                                    example: "pressureSealed"
                                                status:
                                                    type: string
                                                    description: Current status of the mailing.
                                                    example: "Waiting to be printed and prepared for delivery."
                                                recipient:
                                                    type: object
                                                    description: Recipient details.
                                                    properties:
                                                        name:
                                                            type: string
                                                            description: Recipient's full name.
                                                            example: "Jane Doe"
                                                        address:
                                                            type: string
                                                            description: Primary street address.
                                                            example: "123 Main St"
                                                        address2:
                                                            type: string
                                                            description: Secondary address line.
                                                            example: "Apt 4B"
                                                        city:
                                                            type: string
                                                            description: City.
                                                            example: "Springfield"
                                                        state:
                                                            type: string
                                                            description: State or province.
                                                            example: "IL"
                                                        zipcode:
                                                            type: string
                                                            description: Postal/ZIP code.
                                                            example: "62704"
                            examples:
                                sample:
                                    summary: Example response
                                    value:
                                        mailings:
                                            - id: "e7f6d4d1-9c7a-4c20-9d18-bb3a2c9b8b10"
                                              created: "2025-09-15T14:32:10Z"
                                              mailType: "pressureSealed"
                                              status: "Waiting to be printed and prepared for delivery."
                                              recipient:
                                                name: "Jane Doe"
                                                address: "123 Main St"
                                                address2: "Apt 4B"
                                                city: "Springfield"
                                                state: "IL"
                                                zipcode: "62704"
                '404':
                    description: The case was not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "case not found"
            tags:
                - service-of-notice
    /service-of-notice/mailings/preview:
        post:
            summary: Generate a respondent mail preview PDF
            description: Creates a PDF of what will be mailed to the respondent. This endpoint lets users attach images (like photo IDs or signatures) and view a temporary PDF preview so they can verify and adjust before sending.
            operationId: postServiceOfNoticeMailingsPreview
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    multipart/form-data:
                        schema:
                            type: object
                            required:
                                - mailType
                            properties:
                                mailType:
                                    type: string
                                    description: The mail type identifier. Must be sent as the first form field.
                                    example: pressureSealed
                                file.attachment:
                                    type: string
                                    format: binary
                                    description: Optional PNG file mapped to a template field (example field ID `attachment`).
                                    example: (binary PNG)
                                file.signature:
                                    type: string
                                    format: binary
                                    description: Optional PNG file mapped to a template field (example field ID `signature`).
                                    example: (binary PNG)
                            additionalProperties:
                                type: string
                                format: binary
                                description: |
                                    Any additional optional PNG file parts named as `file.{fieldId}`.
                                    Each file must be `image/png` and ≤ 5MB.
                        encoding:
                            file.photoId:
                                contentType: image/png
                            file.signature:
                                contentType: image/png
            responses:
                '200':
                    description: Preview link created.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    url:
                                        type: string
                                        format: uri
                                        description: Signed URL to the temporary PDF.
                                        example: https://temp-storage.arb.inc/cases/service-of-notice/previews/7d7e0c5c.pdf?sig=abc123
                                    validForSeconds:
                                        type: integer
                                        description: How long the URL is valid, in seconds.
                                        example: 3600
                '404':
                    description: The requested mail type was not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: mailType not found
            tags:
                - service-of-notice
    /tasks/case/list:
        post:
            summary: List a user's tasks for a case
            description: Retrieves the user's tasks for the current phase of a case.
            operationId: listCaseTasks
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                            properties:
                                caseID:
                                    type: string
                                    description: The unique ID of the case.
                                    maxLength: 36
                                    example: "2025-09-00123"
            responses:
                '200':
                    description: Tasks successfully retrieved.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    filings:
                                        type: array
                                        description: List of filing tasks for this case.
                                        items:
                                            type: object
                                            properties:
                                                documentID:
                                                    type: string
                                                    description: Unique identifier for the document type.
                                                    example: "statementOfClaim"
                                                displayName:
                                                    type: string
                                                    description: Human-friendly document name.
                                                    example: "Statement of Claim"
                                                required:
                                                    type: boolean
                                                    description: True if this document is required right now.
                                                    example: true
                                                completed:
                                                    type: boolean
                                                    description: True if the user has already finished this task.
                                                    example: false
                                    approvals:
                                        type: array
                                        description: Filings the user must approve.
                                        items:
                                            type: object
                                            properties:
                                                filingID:
                                                    type: string
                                                    description: Unique ID of the filing awaiting approval.
                                                    example: "filing-7f4b9c2a"
                                                documentID:
                                                    type: string
                                                    description: Unique ID for the filing's document type.
                                                    example: "statementOfClaim"
                                                displayName:
                                                    type: string
                                                    description: Human-friendly name of the filing.
                                                    example: "Statement of Claim"
                                                partyID:
                                                    type: string
                                                    description: Party that filed the document.
                                                    example: "claimant"
                            examples:
                                sample:
                                    summary: Example response
                                    value:
                                        filings:
                                            - documentID: "statementOfClaim"
                                              displayName: "Statement of Claim"
                                              required: true
                                              completed: false
                '404':
                    description: Case not found or user is not a participant.
                    content:
                        text/plain:
                            schema:
                                type: string
                                description: Reason why the request cannot be fulfilled.
                                example: "case not found"
                            examples:
                                caseMissing:
                                    summary: Case does not exist
                                    value: "case not found"
                                notParticipant:
                                    summary: User not in the case
                                    value: "not a participant in the case"
            tags:
                - tasks
    /tasks/list:
        post:
            summary: List a user's tasks across cases
            description: Gets the user's tasks for all cases they are part of.
            operationId: listUserTasks
            security:
                - bearerAuth: []
            responses:
                '200':
                    description: Tasks successfully retrieved.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    tasks:
                                        type: array
                                        description: Tasks grouped by case.
                                        items:
                                            type: object
                                            properties:
                                                caseID:
                                                    type: string
                                                    description: Unique ID of the case.
                                                    maxLength: 36
                                                    example: "2025-09-00123"
                                                filings:
                                                    type: array
                                                    description: Documents the user may need to file.
                                                    items:
                                                        type: object
                                                        properties:
                                                            documentID:
                                                                type: string
                                                                description: Unique ID for the document type.
                                                                example: "statementOfClaim"
                                                            displayName:
                                                                type: string
                                                                description: Human-friendly document name.
                                                                example: "Statement of Claim"
                                                            required:
                                                                type: boolean
                                                                description: True if the document is required now.
                                                                example: true
                                                            completed:
                                                                type: boolean
                                                                description: True if the user already finished it.
                                                                example: false
                                                approvals:
                                                    type: array
                                                    description: Filings the user must approve.
                                                    items:
                                                        type: object
                                                        properties:
                                                            filingID:
                                                                type: string
                                                                description: Unique ID of the filing awaiting approval.
                                                                example: "filing-7f4b9c2a"
                                                            documentID:
                                                                type: string
                                                                description: Unique ID for the filing's document type.
                                                                example: "statementOfClaim"
                                                            displayName:
                                                                type: string
                                                                description: Human-friendly name of the filing.
                                                                example: "Statement of Claim"
                                                            partyID:
                                                                type: string
                                                                description: Party that filed the document.
                                                                example: "claimant"
                            examples:
                                sample:
                                    summary: Example response
                                    value:
                                        tasks:
                                            - caseID: "2025-09-00123"
                                              filings:
                                                - documentID: "statementOfClaim"
                                                  displayName: "Statement of Claim"
                                                  required: true
                                                  completed: false
                                                - documentID: "witnessList"
                                                  displayName: "Witness List"
                                                  required: false
                                                  completed: true
                                              approvals:
                                                - filingID: "filing-7f4b9c2a"
                                                  documentID: "statementOfClaim"
                                                  displayName: "Statement of Claim"
                                                  partyID: "respondent"
                                            - caseID: "2025-09-00456"
                                              filings: []
                                              approvals:
                                                - filingID: "filing-a13e88de"
                                                  documentID: "evidenceSubmission"
                                                  displayName: "Evidence Submission"
                                                  partyID: "claimant"
            tags:
                - tasks
    /timetables/replace:
        post:
            summary: Replace a case timetable
            description: Replace the whole timetable for a case with new phases and documents.
            operationId: replaceTimetable
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                                - summary
                                - phases
                            properties:
                                caseID:
                                    type: string
                                    description: Case identifier.
                                    example: "2025-10-00123"
                                summary:
                                    type: string
                                    description: Short explanation of why the timetable is being replaced.
                                    minLength: 1
                                    maxLength: 1000
                                    example: "Updating dates after venue change."
                                phases:
                                    type: array
                                    description: The ordered list of phases to set (1–25 items).
                                    minItems: 1
                                    maxItems: 25
                                    items:
                                        type: object
                                        required:
                                            - id
                                            - scheduledStart
                                            - filingDeadline
                                            - documents
                                            - allowEvidenceSubmission
                                        properties:
                                            id:
                                                type: string
                                                description: Phase ID.
                                                example: "caseInitiation"
                                            scheduledStart:
                                                type: string
                                                format: date-time
                                                description: Planned start (ISO 8601).
                                                example: "2025-11-01T09:00:00Z"
                                            scheduledEnd:
                                                type: string
                                                format: date-time
                                                nullable: true
                                                description: Planned end (ISO 8601) or null.
                                                example: "2025-11-05T17:00:00Z"
                                            filingDeadline:
                                                type: string
                                                format: date-time
                                                description: Filing deadline (ISO 8601).
                                                example: "2025-10-25T23:59:59Z"
                                            documents:
                                                type: array
                                                description: Allowed document types for this phase.
                                                items:
                                                    type: object
                                                    required:
                                                        - id
                                                        - filedBy
                                                        - maxAllowed
                                                        - required
                                                    properties:
                                                        id:
                                                            type: string
                                                            description: Document type identifier.
                                                            example: "statementOfClaim"
                                                        filedBy:
                                                            type: string
                                                            description: Party allowed to file the document.
                                                            example: "claimant"
                                                        approvedBy:
                                                            type: string
                                                            nullable: true
                                                            description: Party that must approve the document, if any.
                                                            example: "caseAdministrator"
                                                        maxAllowed:
                                                            type: integer
                                                            description: Max number of this document (0–1000).
                                                            minimum: 0
                                                            maximum: 1000
                                                            example: 3
                                                        required:
                                                            type: boolean
                                                            description: Whether filing this document is mandatory.
                                                            example: true
                                            allowEvidenceSubmission:
                                                type: boolean
                                                description: If evidence submission is allowed in this phase.
                                                example: true
                        examples:
                            simpleReplace:
                                summary: Example timetable replacement
                                value:
                                    caseID: "2025-10-00123"
                                    summary: "Updating dates after venue change."
                                    phases:
                                        - id: "caseInitiation"
                                          scheduledStart: "2025-11-01T09:00:00Z"
                                          scheduledEnd: "2025-11-05T17:00:00Z"
                                          filingDeadline: "2025-10-25T23:59:59Z"
                                          allowEvidenceSubmission: true
                                          documents:
                                            - id: "statementOfClaim"
                                              filedBy: "claimant"
                                              approvedBy: "caseAdministrator"
                                              maxAllowed: 1
                                              required: true
                                        - id: "caseFiling"
                                          scheduledStart: "2025-12-01T14:00:00Z"
                                          scheduledEnd: "2025-12-01T16:00:00Z"
                                          filingDeadline: "2025-11-20T23:59:59Z"
                                          allowEvidenceSubmission: false
                                          documents:
                                            - id: "noticeOfServiceOfProcess"
                                              filedBy: "caseAdministrator"
                                              approvedBy: null
                                              maxAllowed: 1
                                              required: false
            responses:
                '200':
                    description: Timetable successfully replaced.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Timetable successfully replaced"
                '410':
                    description: The timetable or one of its phases/documents is invalid.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "phase 'caseFiling' starts before 'caseInitiation' ends"
                '411':
                    description: The timetable cannot be replaced.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "replacement timetable is incompatible with existing timetable"
            tags:
                - timetables
    /timetables/schemas:
        post:
            summary: List available timetable schemas
            description: Returns all the basic building blocks (parties, phases, documents) you can use to build a timetable.
            operationId: postTimetablesSchemas
            security:
                - bearerAuth: []
            responses:
                '200':
                    description: Schemas successfully returned.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    parties:
                                        type: array
                                        description: All available parties you can reference.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    description: Unique ID of the party.
                                                    example: claimant
                                                label:
                                                    type: string
                                                    description: Display name for the party.
                                                    example: Claimant
                                                description:
                                                    type: string
                                                    description: Short explanation of the party’s role.
                                                    example: Person or entity that brings the claim.
                                        example:
                                            - id: claimant
                                              label: Claimant
                                              description: Person or entity that brings the claim.
                                            - id: respondent
                                              label: Respondent
                                              description: Party responding to the claim.
                                            - id: arbitrator
                                              label: Arbitrator
                                              description: Neutral decision-maker overseeing the case.
                                            - id: caseAdministrator
                                              label: Case Administrator
                                              description: Staff member managing case logistics.
                                    phases:
                                        type: array
                                        description: All available case phases.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    description: Unique ID of the phase.
                                                    example: caseInitiation
                                                label:
                                                    type: string
                                                    description: Display name for the phase.
                                                    example: Case Initiation
                                                description:
                                                    type: string
                                                    description: Short explanation of the phase.
                                                    example: Early steps to start the case.
                                        example:
                                            - id: caseInitiation
                                              label: Case Initiation
                                              description: Early steps to start the case.
                                            - id: caseFiling
                                              label: Case Filing
                                              description: Formal filing and service of key documents.
                                    documents:
                                        type: array
                                        description: All available document types.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    description: Unique ID of the document type.
                                                    example: statementOfClaim
                                                label:
                                                    type: string
                                                    description: Display name for the document type.
                                                    example: Statement of Claim
                                                description:
                                                    type: string
                                                    description: Short explanation of the document type.
                                                    example: The initial filing outlining claims and relief sought.
                                        example:
                                            - id: statementOfClaim
                                              label: Statement of Claim
                                              description: The initial filing outlining claims and relief sought.
                                            - id: noticeOfServiceOfProcess
                                              label: Notice of Service of Process
                                              description: Notice confirming the respondent was properly served.
                            examples:
                                sampleResponse:
                                    summary: Simple example set
                                    value:
                                        parties:
                                            - id: claimant
                                              label: Claimant
                                              description: Person or entity that brings the claim.
                                            - id: respondent
                                              label: Respondent
                                              description: Party responding to the claim.
                                            - id: arbitrator
                                              label: Arbitrator
                                              description: Neutral decision-maker overseeing the case.
                                            - id: caseAdministrator
                                              label: Case Administrator
                                              description: Staff member managing case logistics.
                                        phases:
                                            - id: caseInitiation
                                              label: Case Initiation
                                              description: Early steps to start the case.
                                            - id: caseFiling
                                              label: Case Filing
                                              description: Formal filing and service of key documents.
                                        documents:
                                            - id: statementOfClaim
                                              label: Statement of Claim
                                              description: The initial filing outlining claims and relief sought.
                                            - id: noticeOfServiceOfProcess
                                              label: Notice of Service of Process
                                              description: Notice confirming the respondent was properly served.
            tags:
                - timetables
    /timetables/view:
        post:
            summary: View a case timetable
            description: Returns the case’s phases split into previous, current, and next.
            operationId: viewTimetable
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - caseID
                            properties:
                                caseID:
                                    type: string
                                    description: Case identifier.
                                    example: "2025-10-00123"
            responses:
                '200':
                    description: Timetable fetched.
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    previousPhases:
                                        type: array
                                        description: Phases that finished before the current phase.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    example: "caseInitiation"
                                                scheduledStart:
                                                    type: string
                                                    format: date-time
                                                    example: "2025-09-01T09:00:00Z"
                                                scheduledEnd:
                                                    type: string
                                                    format: date-time
                                                    nullable: true
                                                    example: "2025-09-05T17:00:00Z"
                                                filingDeadline:
                                                    type: string
                                                    format: date-time
                                                    example: "2025-09-05T17:00:00Z"
                                                allowEvidenceSubmission:
                                                    type: boolean
                                                    example: false
                                                documents:
                                                    type: array
                                                    items:
                                                        type: object
                                                        properties:
                                                            id:
                                                                type: string
                                                                example: "statementOfClaim"
                                                            filedBy:
                                                                type: string
                                                                example: "claimant"
                                                            approvedBy:
                                                                type: string
                                                                nullable: true
                                                                example: "caseAdministrator"
                                                            maxAllowed:
                                                                type: integer
                                                                example: 1
                                                            required:
                                                                type: boolean
                                                                example: true
                                    currentPhase:
                                        type: object
                                        description: The phase the case is currently in.
                                        properties:
                                            id:
                                                type: string
                                                example: "caseFiling"
                                            scheduledStart:
                                                type: string
                                                format: date-time
                                                example: "2025-09-06T09:00:00Z"
                                            scheduledEnd:
                                                type: string
                                                format: date-time
                                                nullable: true
                                                example:
                                            filingDeadline:
                                                type: string
                                                format: date-time
                                                example: "2025-10-10T23:59:59Z"
                                            allowEvidenceSubmission:
                                                type: boolean
                                                example: true
                                            documents:
                                                type: array
                                                items:
                                                    type: object
                                                    properties:
                                                        id:
                                                            type: string
                                                            example: "statementOfClaim"
                                                        filedBy:
                                                            type: string
                                                            example: "claimant"
                                                        approvedBy:
                                                            type: string
                                                            nullable: true
                                                            example: "arbitrator"
                                                        maxAllowed:
                                                            type: integer
                                                            example: 1
                                                        required:
                                                            type: boolean
                                                            example: true
                                    nextPhases:
                                        type: array
                                        description: Phases scheduled after the current phase.
                                        items:
                                            type: object
                                            properties:
                                                id:
                                                    type: string
                                                    example: "preHearing"
                                                scheduledStart:
                                                    type: string
                                                    format: date-time
                                                    example: "2025-10-15T09:00:00Z"
                                                scheduledEnd:
                                                    type: string
                                                    format: date-time
                                                    nullable: true
                                                    example: "2025-10-20T17:00:00Z"
                                                filingDeadline:
                                                    type: string
                                                    format: date-time
                                                    example: "2025-10-18T23:59:59Z"
                                                allowEvidenceSubmission:
                                                    type: boolean
                                                    example: true
                                                documents:
                                                    type: array
                                                    items:
                                                        type: object
                                                        properties:
                                                            id:
                                                                type: string
                                                                example: "witnessList"
                                                            filedBy:
                                                                type: string
                                                                example: "claimant"
                                                            approvedBy:
                                                                type: string
                                                                nullable: true
                                                                example:
                                                            maxAllowed:
                                                                type: integer
                                                                example: 1
                                                            required:
                                                                type: boolean
                                                                example: false
                '404':
                    description: Case was not found.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: case not found
                '410':
                    description: User is no longer a participant in the case.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: user is not a participant
            tags:
                - timetables
components:
    securitySchemes:
        bearerAuth:
            type: http
            description: access token
            scheme: bearer
            bearerFormat: JWT
tags:
    - name: /
    - name: cases
    - name: docket
    - name: evidence
    - name: filings
    - name: internal
    - name: invites
    - name: schemas
    - name: service-of-notice
    - name: tasks
    - name: timetables
