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

# List Gmail bill candidates

> Paged list of attachments classified by the backfill consumer. Defaults to State=Candidate (review queue). Pass State=Imported/Dismissed/Failed/Filtered to see past activity, or State=All to skip filtering. Cursor follows the standard keyset pagination convention.



## OpenAPI

````yaml get /gmail-connections/{id}/candidates
openapi: 3.1.1
info:
  title: Dolfin API
  description: >-
    Dolfin API for AR & AP. Authenticate using the `x-dolfin-api-key` header
    with the API key distributed to your organisation.
  version: v1
servers:
  - url: https://api.dolfinai.co
    description: Production
security:
  - {}
tags:
  - name: Webhooks
  - name: Users
  - name: TaxRates
  - name: Suppliers
  - name: Supplier Credit Notes
  - name: Bills
  - name: SpendCategories
  - name: Payables
  - name: RecurringInvoices
  - name: Receivables
  - name: Purchase Orders
  - name: Products
  - name: Payments
  - name: Invoices
  - name: Organisations
  - name: Members
  - name: MCP
  - name: Matching
  - name: Invoice Reminders
  - name: Industries
  - name: Gmail
  - name: Delivery Notes
  - name: Customers
  - name: Currencies
  - name: Credit Notes
  - name: Clients
  - name: ClientInvites
  - name: BankPayments
  - name: Bank details
  - name: Auth
  - name: ApprovalPolicies
  - name: ApiKeys
  - name: Agent
paths:
  /gmail-connections/{id}/candidates:
    get:
      tags:
        - Gmail
      summary: List Gmail bill candidates
      description: >-
        Paged list of attachments classified by the backfill consumer. Defaults
        to State=Candidate (review queue). Pass
        State=Imported/Dismissed/Failed/Filtered to see past activity, or
        State=All to skip filtering. Cursor follows the standard keyset
        pagination convention.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Cursor
          in: query
          schema:
            type: string
        - name: PageSize
          in: query
          required: true
          schema:
            pattern: ^-?(?:0|[1-9]\d*)$
            type:
              - integer
              - string
            format: int32
        - name: State
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/GmailCandidateStateFilter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseOfGmailCandidateResponse'
        '400':
          description: Pagination.InvalidCursor — the cursor value is invalid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Gmail.ConnectionNotFound — connection does not exist
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    GmailCandidateStateFilter:
      enum:
        - Candidate
        - Imported
        - Dismissed
        - Failed
        - Filtered
        - All
    PagedResponseOfGmailCandidateResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/GmailCandidateResponse'
        meta:
          $ref: '#/components/schemas/PagedResponseMeta'
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
    GmailCandidateResponse:
      required:
        - id
        - gmailConnectionId
        - messageInternalDate
        - fileName
        - contentType
        - fileSizeBytes
        - classifierConfidence
        - state
        - createdAt
      type: object
      properties:
        id:
          type: string
          format: uuid
        gmailConnectionId:
          type: string
          format: uuid
        messageInternalDate:
          type: string
          format: date-time
        senderEmail:
          type:
            - 'null'
            - string
        subject:
          type:
            - 'null'
            - string
        fileName:
          type: string
        contentType:
          type: string
        fileSizeBytes:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int64
        classifierConfidence:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          type:
            - number
            - string
          format: float
        classifierReason:
          type:
            - 'null'
            - string
        state:
          $ref: '#/components/schemas/GmailIngestedAttachmentState'
        billId:
          type:
            - 'null'
            - string
          format: uuid
        createdAt:
          type: string
          format: date-time
    PagedResponseMeta:
      type: object
      properties:
        cursors:
          $ref: '#/components/schemas/PagedResponseCursors'
    GmailIngestedAttachmentState:
      enum:
        - Candidate
        - Imported
        - Filtered
        - Failed
        - Dismissed
    PagedResponseCursors:
      type: object
      properties:
        current:
          type:
            - 'null'
            - string
        next:
          type:
            - 'null'
            - string
        previous:
          type:
            - 'null'
            - string

````