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

# List emails

> List all emails sent for a case, including delivery status and receipts.



## OpenAPI

````yaml GET /cases/{case_id}/emails
openapi: 3.1.0
info:
  title: Sunset API
  description: >
    Estate and probate management platform API. Manage cases, track assets,
    handle bank accounts, and navigate probate proceedings across all US states
    and counties.


    ## Key Features


    - **Full Estate Lifecycle** — Case creation through final asset distribution

    - **Identity Verification** — Verify deceased (SSDI, vital records) and
    executor (government ID, KBA) identity

    - **Real Estate Valuations** — Automated property valuations with comparable
    sales and lien tracking

    - **Communication Tools** — Recorded phone calls, emails, faxes, and online
    notarization

    - **Probate Reference Data** — Requirements for all 50 states, DC, and US
    territories

    - **Multi-Estate Management** — Pro and Enterprise tiers for managing
    multiple cases


    ## API Quality


    - **Idempotency** — `Idempotency-Key` header on all POST endpoints to
    prevent duplicate operations

    - **Rate Limiting** — Tiered rate limits (Pro: 300/min, Enterprise:
    1,000/min)

    - **Conditional Requests** — ETag support with `If-None-Match` and
    `If-Match` headers

    - **Request Tracing** — `X-Request-Id` header on every response

    - **Cursor Pagination** — Optional cursor-based pagination for high-volume
    resources

    - **JSON Merge Patch** — All PATCH endpoints use JSON Merge Patch semantics
    (RFC 7396)
  version: 1.0.0
  contact:
    name: Sunset API Support
servers:
  - url: https://api.example.com/v1
    description: Production
  - url: https://staging-api.example.com/v1
    description: Staging
security: []
tags:
  - name: Cases
    description: Estate/probate case management
  - name: Deceased
    description: Deceased person information
  - name: Executor
    description: Estate executor information
  - name: Authority
    description: Authority verification
  - name: EIN
    description: Employer Identification Number
  - name: Financial Accounts
    description: Estate financial accounts and assets
  - name: Documents
    description: Case document management
  - name: Searches
    description: Asset and background searches
  - name: Persons
    description: Interested persons and beneficiaries
  - name: Goals
    description: Estate management goals
  - name: Bank Accounts
    description: Bank account management
  - name: Signers
    description: Bank account holders and signers
  - name: Transactions
    description: Bank account transactions
  - name: Recurring Payments
    description: Recurring payments and deposits
  - name: Account Beneficiaries
    description: POD/TOD beneficiary designations
  - name: Statements
    description: Bank account statements
  - name: Balance History
    description: Historical balance snapshots
  - name: Probate Reference
    description: State and county probate reference data
  - name: Probate Forms
    description: State-level probate forms
  - name: Probate Case
    description: Case-level probate tracking
  - name: Probate Deadlines
    description: Probate deadlines and due dates
  - name: Probate Filings
    description: Court filings
  - name: Creditor Claims
    description: Creditor claims against the estate
  - name: Distributions
    description: Beneficiary distributions
  - name: Pro Users
    description: Pro user multi-estate management
  - name: Collaborators
    description: Multi-user collaboration and estate sharing
  - name: Closure
    description: Estate closure steps and status tracking
  - name: Institution Contacts
    description: Financial institution contact information and departments
  - name: Phone Calls
    description: Twilio-powered phone calls with recording and summarization
  - name: Emails
    description: Email tool for sending forms and attachments
  - name: Notarization
    description: DocuSign-powered online notarization
  - name: Faxes
    description: One-click fax sending with receipts
  - name: Identity Verification
    description: Verify deceased and executor identity
  - name: Real Estate Valuations
    description: Automated property valuations and tax assessments
  - name: Life Insurance
    description: Life insurance policies and claims
  - name: Credit Cards & Debts
    description: Credit cards, loans, and debt management
  - name: Retirement Accounts
    description: 401(k), IRA, pension, and retirement account management
  - name: Investment Accounts
    description: Brokerage, stocks, bonds, and investment accounts
  - name: Real Estate Properties
    description: Real estate ownership, titles, and property management
  - name: Unclaimed Property
    description: Unclaimed property search and claims
  - name: Vehicles
    description: Vehicles, boats, and titled property
  - name: Business Ownership
    description: Business entities, ownership interests, and succession
paths:
  /cases/{case_id}/emails:
    parameters:
      - $ref: '#/components/parameters/CaseId'
    get:
      tags:
        - Emails
      summary: List emails
      description: List all emails sent for a case, including delivery status and receipts.
      operationId: listEmails
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PerPage'
        - name: status
          in: query
          schema:
            type: string
            enum:
              - draft
              - queued
              - sent
              - delivered
              - bounced
              - failed
        - name: institution_contact_id
          in: query
          schema:
            type: string
        - name: sort_by
          in: query
          schema:
            type: string
            enum:
              - created_at
              - sent_at
            default: created_at
        - $ref: '#/components/parameters/SortOrder'
      responses:
        '200':
          description: List of emails.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Email'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    CaseId:
      name: case_id
      in: path
      required: true
      schema:
        type: string
      description: Unique case identifier (ULID format).
      example: 01K5WF06MJ6T99HRYE78AN7XM8
    Page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
        minimum: 1
      description: Page number for pagination.
    PerPage:
      name: per_page
      in: query
      schema:
        type: integer
        default: 25
        minimum: 1
        maximum: 100
      description: Number of items per page.
    SortOrder:
      name: sort_order
      in: query
      schema:
        type: string
        enum:
          - asc
          - desc
        default: desc
      description: Sort direction.
  schemas:
    Email:
      type: object
      properties:
        id:
          type: string
          example: 01K8EM06FJ5T22HRYE78AN7FFF
        institution_contact_id:
          type:
            - string
            - 'null'
          description: Reference to the institution contact emailed.
        to_addresses:
          type: array
          items:
            type: string
            format: email
          example:
            - estates@chase.com
        cc_addresses:
          type: array
          items:
            type: string
            format: email
          example: []
        from_address:
          type: string
          format: email
          description: Sunset-managed sender address.
          example: cases@mail.example.com
        subject:
          type: string
          example: >-
            Estate of John J. Johnson - Death Certificate and Account Closure
            Request
        body_text:
          type: string
          description: Plain text version of the email body.
        body_html:
          type:
            - string
            - 'null'
          description: HTML version of the email body.
        attachments:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              file_name:
                type: string
                example: death_certificate.pdf
              file_size_bytes:
                type: integer
                example: 245000
              mime_type:
                type: string
                example: application/pdf
              document_id:
                type:
                  - string
                  - 'null'
                description: Reference to a case document, if attached from the case.
        status:
          type: string
          enum:
            - draft
            - queued
            - sent
            - delivered
            - bounced
            - failed
          example: delivered
        sent_at:
          type:
            - string
            - 'null'
          format: date-time
        delivered_at:
          type:
            - string
            - 'null'
          format: date-time
        opened_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp when the recipient opened the email (if tracking is
            available).
        bounce_reason:
          type:
            - string
            - 'null'
        sent_by:
          type:
            - string
            - 'null'
          description: User ID of the person who sent the email.
        receipt:
          type:
            - object
            - 'null'
          description: Delivery receipt details.
          properties:
            message_id:
              type: string
              example: msg_01abc123def456
            provider:
              type: string
              example: sendgrid
            status:
              type: string
              enum:
                - accepted
                - delivered
                - bounced
                - deferred
            status_detail:
              type:
                - string
                - 'null'
            timestamp:
              type: string
              format: date-time
        notes:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PaginationMeta:
      type: object
      properties:
        page:
          type: integer
          example: 1
        per_page:
          type: integer
          example: 25
        total_count:
          type: integer
          example: 142
        total_pages:
          type: integer
          example: 6
        next_cursor:
          type:
            - string
            - 'null'
          description: >-
            Opaque cursor for fetching the next page. Pass as the `cursor` query
            parameter. Null when on the last page.
          example: eyJpZCI6IjAxSzVXRjA2TUo2VDk5SFJZRTQ4QU43WE04In0=
        has_more:
          type: boolean
          description: Whether more results exist beyond this page.
          example: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: The request body contains invalid fields.
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: The requested resource was not found.

````