> ## 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.

# Resolve a held email

> Decide what becomes of a held email. discard keeps it out. For a program address, attach adds it, with its attachments and .eml, to a submission you may edit (submissionId), and create makes a new submission of it, as an email to the address makes one; when its thread has no submission yet, the sender’s later replies join the new one. Safe to repeat: the same resolution answers the email as resolved; a different one is held_email_resolved. attach or create on an address that is not a program’s is held_email_action_unavailable. A program address’s held email needs edit on the program; another address’s needs workspace administration.



## OpenAPI

````yaml /openapi.json post /email/addresses/{addressId}/held-emails/{heldEmailId}/resolve
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:
  /email/addresses/{addressId}/held-emails/{heldEmailId}/resolve:
    post:
      tags:
        - Email addresses
      summary: Resolve a held email
      description: >-
        Decide what becomes of a held email. discard keeps it out. For a program
        address, attach adds it, with its attachments and .eml, to a submission
        you may edit (submissionId), and create makes a new submission of it, as
        an email to the address makes one; when its thread has no submission
        yet, the sender’s later replies join the new one. Safe to repeat: the
        same resolution answers the email as resolved; a different one is
        held_email_resolved. attach or create on an address that is not a
        program’s is held_email_action_unavailable. A program address’s held
        email needs edit on the program; another address’s needs workspace
        administration.
      operationId: resolveEmailAddressHeldEmail
      parameters:
        - schema:
            type: string
            format: uuid
            description: The address’s id.
          required: true
          description: The address’s id.
          name: addressId
          in: path
        - schema:
            type: string
            format: uuid
            description: The held email’s id.
          required: true
          description: The held email’s id.
          name: heldEmailId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2ResolveEmailHeldEmail'
      responses:
        '200':
          description: The held email as resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2EmailHeldEmail'
        '400':
          description: Invalid request, query or cursor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '403':
          description: The required permission is missing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '404':
          description: The address or held email is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '409':
          description: The request conflicts with the address or held email as it stands.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '422':
          description: The email could not be added to the submission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '503':
          description: Email address creation is unavailable in this environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2ResolveEmailHeldEmail:
      oneOf:
        - type: object
          properties:
            action:
              type: string
              enum:
                - attach
            submissionId:
              type: string
              format: uuid
          required:
            - action
            - submissionId
          additionalProperties: false
        - type: object
          properties:
            action:
              type: string
              enum:
                - create
          required:
            - action
          additionalProperties: false
        - type: object
          properties:
            action:
              type: string
              enum:
                - discard
          required:
            - action
          additionalProperties: false
    V2EmailHeldEmail:
      type: object
      properties:
        id:
          type: string
          format: uuid
        addressId:
          type: string
          format: uuid
        sender:
          type: string
          nullable: true
          description: The sender’s address; null when it could not be read.
        subject:
          type: string
          nullable: true
        reason:
          type: string
          enum:
            - different_sender
            - spam
            - unauthenticated
            - blocked
            - desk_disabled
            - sender_not_admitted
            - destination_unavailable
            - delivery_failed
          description: >-
            Why it reached no destination: different_sender (a reply on a
            submission’s thread from someone else), spam, unauthenticated or
            blocked (as the mail provider judged it), desk_disabled
            (underwriting was off), sender_not_admitted (the sender may not use
            the destination), destination_unavailable, or delivery_failed (it
            could not be delivered after repeated tries).
        receivedAt:
          type: string
          format: date-time
        heldAt:
          type: string
          format: date-time
        resolution:
          type: object
          nullable: true
          properties:
            action:
              type: string
              enum:
                - attached
                - created
                - discarded
            submissionId:
              type: string
              nullable: true
              format: uuid
            resolvedBy:
              type: string
            resolvedAt:
              type: string
              format: date-time
          required:
            - action
            - submissionId
            - resolvedBy
            - resolvedAt
          additionalProperties: false
          description: What was done with it; null while it waits.
      required:
        - id
        - addressId
        - sender
        - subject
        - reason
        - receivedAt
        - heldAt
        - resolution
      additionalProperties: false
    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.