> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canary.effectiveai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# List an underwriting submission’s documents

> Lists a submission's documents, newest first: the files uploaded to it and those its messages added. Each is an artifact: read its details with `getArtifact`, its text with `getArtifactText` and its bytes with `downloadArtifact`, by `id`. `versionId` and `sha256` name the version listed, so a result can pin it. `folder` is the smart folder it sorts into (null when none); `source` says how it arrived, with the message and part it came from.

Repeat with `nextCursor` and the same `limit` until it is null. Documents the caller cannot open are left out. Read-only and safe to retry. A submission the caller cannot read is 404, as a missing one is. Only where the workspace has underwriting turned on (403 `feature_not_enabled`).

Alpha: this operation may change or be removed without notice.



## OpenAPI

````yaml /openapi.json get /insurance/underwriting/submissions/{submissionId}/documents
openapi: 3.0.3
info:
  title: Effective API
  version: 2.0.0
  description: The public Effective REST API. Authenticate using an Effective API key.
servers:
  - url: https://api.canary.effectiveai.app/api/v2
    description: Canary
security:
  - bearerAuth: []
paths:
  /insurance/underwriting/submissions/{submissionId}/documents:
    get:
      tags:
        - Underwriting submissions
      summary: List an underwriting submission’s documents
      description: >-
        Lists a submission's documents, newest first: the files uploaded to it
        and those its messages added. Each is an artifact: read its details with
        `getArtifact`, its text with `getArtifactText` and its bytes with
        `downloadArtifact`, by `id`. `versionId` and `sha256` name the version
        listed, so a result can pin it. `folder` is the smart folder it sorts
        into (null when none); `source` says how it arrived, with the message
        and part it came from.


        Repeat with `nextCursor` and the same `limit` until it is null.
        Documents the caller cannot open are left out. Read-only and safe to
        retry. A submission the caller cannot read is 404, as a missing one is.
        Only where the workspace has underwriting turned on (403
        `feature_not_enabled`).


        Alpha: this operation may change or be removed without notice.
      operationId: listUnderwritingSubmissionDocuments
      parameters:
        - schema:
            type: string
            format: uuid
            description: The submission’s id.
          required: true
          description: The submission’s id.
          name: submissionId
          in: path
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
            description: Documents per page, 1–100. Default 50.
          required: false
          description: Documents per page, 1–100. Default 50.
          name: limit
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 8192
            description: >-
              Opaque nextCursor from this operation. Repeat every other query
              parameter unchanged; a cursor from a different query returns
              invalid_cursor.
          required: false
          description: >-
            Opaque nextCursor from this operation. Repeat every other query
            parameter unchanged; a cursor from a different query returns
            invalid_cursor.
          name: cursor
          in: query
      responses:
        '200':
          description: A page of the submission’s documents.
          content:
            application/json:
              schema:
                type: object
                properties:
                  documents:
                    type: array
                    items:
                      $ref: '#/components/schemas/V2UnderwritingSubmissionDocument'
                  nextCursor:
                    type: string
                    nullable: true
                    description: Cursor for the next page, or null on the last page.
                required:
                  - documents
                  - nextCursor
                additionalProperties: false
        '400':
          description: >-
            invalid_request: an invalid limit or submission id. invalid_cursor:
            restart the list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '403':
          description: >-
            feature_not_enabled: underwriting is not enabled for the workspace.
            forbidden: the credential may not do this.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '404':
          description: 'not_found: no such submission, or the caller cannot read it.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2UnderwritingSubmissionDocument:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Artifact id: read it with `getArtifact`, its text with
            `getArtifactText`.
        name:
          type: string
          minLength: 1
        mimeType:
          type: string
          minLength: 1
        sizeBytes:
          type: integer
          minimum: 0
        versionId:
          type: string
          nullable: true
          description: >-
            The version listed, so a result can pin it; null for a legacy
            artifact.
        sha256:
          type: string
          nullable: true
          description: >-
            The listed version’s SHA-256, 64 lowercase hex digits; null when not
            recorded.
        folder:
          type: object
          nullable: true
          properties:
            key:
              type: string
              minLength: 1
              description: 'Opaque: the document type the folder collects.'
            label:
              type: string
              minLength: 1
          required:
            - key
            - label
          description: >-
            The smart folder the document sorts into, such as Broker submission;
            null when none.
        source:
          type: object
          properties:
            kind:
              type: string
              minLength: 1
              description: >-
                Extensible: `upload`, `email` (or a message’s other channel) or
                `web`.
            messageId:
              type: string
              description: >-
                The message it came with: its channel’s own id, such as an
                email’s Message-ID.
            part:
              type: string
              description: >-
                Which part of that message: `message`, `attachment:<n>` or
                `document:<n>`.
            originalFilename:
              type: string
              description: The filename as the message named it.
          required:
            - kind
          description: How the document reached the submission.
        addedBy:
          type: object
          properties:
            type:
              type: string
              enum:
                - user
                - system
            id:
              type: string
              minLength: 1
          required:
            - type
            - id
          description: A user, or `system` for email intake.
        addedAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - mimeType
        - sizeBytes
        - versionId
        - sha256
        - folder
        - source
        - addedBy
        - addedAt
    V2CodedError:
      allOf:
        - $ref: '#/components/schemas/V2Error'
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Stable error code. Clients must tolerate unknown future codes.
            details:
              type: array
              items:
                type: object
                properties:
                  location:
                    type: string
                    enum:
                      - path
                      - query
                      - header
                      - body
                  path:
                    type: array
                    items:
                      type: string
                      maxLength: 64
                    maxItems: 12
                  code:
                    type: string
                    enum:
                      - required
                      - invalid_type
                      - invalid_value
                      - unknown_field
                  message:
                    type: string
                    minLength: 1
                    maxLength: 200
                required:
                  - location
                  - path
                  - code
                  - message
              minItems: 1
              maxItems: 20
              description: Bounded safe validation issues; may omit some invalid fields.
            requestId:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                Existing server correlation for this HTTP attempt, when
                available.
            dataset:
              type: string
              enum:
                - naic
                - osha
              description: Dataset needed for dataset_not_enabled.
            businessCode:
              type: string
              description: The rater’s own refusal code, for business_rejection.
            violations:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                    description: Authored or built-in constraint code
                  message:
                    type: string
                    description: Authored message for the failed constraint
                  path:
                    type: string
                    description: Input path of the offending value; empty for the request
                  value:
                    nullable: true
                    description: Offending input value, size-bounded by the runtime
                  constraint:
                    type: string
                    description: The constraint the value failed, as text
                  cite:
                    type: string
                    nullable: true
                    description: >-
                      Filing citation of the constraint, when the source cites
                      one
                required:
                  - code
                  - message
                  - path
                  - value
                  - constraint
                  - cite
                additionalProperties: false
              maxItems: 256
              description: >-
                Each input constraint the submission failed, for invalid_inputs
                and business_rejection.
            violationsTruncated:
              type: boolean
              description: >-
                True when the rater reported more violations than violations
                holds.
            executionId:
              type: string
              description: >-
                The recorded execution of a failed rating, for rater rating
                failures.
            accessUrl:
              type: string
              nullable: true
              format: uri
              description: Not currently returned.
          required:
            - code
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Effective API key. Send Authorization: Bearer sk-eai-...'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.