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

# Create Quote

> Creates a new quote for an existing submission.

Only `submissionId` is required - all other fields are optional.
The quote will be initialized with default values based on the submission type
(new_business, renewal, endorsement, cancellation, or reinstatement).

**Note:** The `applicant` field is not supported for external API. The concept
of "applicant" (human who initiated an insurance application) doesn't apply to
programmatic API calls. Use `recipients` to track who should receive the quote.

**Required permission:** `company.quote:create`




## OpenAPI

````yaml /openapi/generated-external-api.yaml post /api/external/companies/{companyId}/quotes
openapi: 3.0.3
info:
  title: AI Insurance External API
  description: External API for AI Insurance platform
  version: 1.0.0
  contact:
    email: support@aiinsurance.io
servers:
  - url: https://app.aiinsurance.io
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/external/companies/{companyId}/quotes:
    post:
      tags:
        - Quotes
      summary: Create Quote
      description: >
        Creates a new quote for an existing submission.


        Only `submissionId` is required - all other fields are optional.

        The quote will be initialized with default values based on the
        submission type

        (new_business, renewal, endorsement, cancellation, or reinstatement).


        **Note:** The `applicant` field is not supported for external API. The
        concept

        of "applicant" (human who initiated an insurance application) doesn't
        apply to

        programmatic API calls. Use `recipients` to track who should receive the
        quote.


        **Required permission:** `company.quote:create`
      operationId: createQuote
      parameters:
        - $ref: '#/components/parameters/companyId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQuoteRequest'
            examples:
              minimal:
                summary: Minimal request (required fields only)
                value:
                  submissionId: 550e8400-e29b-41d4-a716-446655440001
              withPolicyInfo:
                summary: With policy information
                value:
                  submissionId: 550e8400-e29b-41d4-a716-446655440001
                  policyInfo:
                    description: General Liability Coverage
                    currency: USD
                    startsAtDate: '2024-02-01'
                    endsAtDate: '2025-02-01'
              withPolicyInsureds:
                summary: With policy insureds (exposures)
                value:
                  submissionId: 550e8400-e29b-41d4-a716-446655440001
                  policyInfo:
                    startsAtDate: '2024-02-01'
                    endsAtDate: '2025-02-01'
                  policyInsureds:
                    - insuredId: 550e8400-e29b-41d4-a716-446655440010
                      name: Acme Corporation
                      insuredType: primary
                      coveragePeriods:
                        - id: 550e8400-e29b-41d4-a716-446655440020
                          joinDate: '2024-02-01'
                          terminationDate: '2025-02-01'
                    - insuredId: 550e8400-e29b-41d4-a716-446655440011
                      name: Jane Smith
                      insuredType: additional
                      coveragePeriods:
                        - id: 550e8400-e29b-41d4-a716-446655440021
                          joinDate: '2024-02-01'
                      insuredData:
                        role: Director
                        department: Engineering
      responses:
        '201':
          description: Quote created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The ID of the created quote
              example:
                id: 550e8400-e29b-41d4-a716-446655440003
        '400':
          description: Bad Request - Invalid request body or submissionId not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingRequiredField:
                  summary: Missing required field
                  value:
                    error:
                      code: KeyMissing
                      message: 'submissionId: Required keys were missing'
                      details:
                        - field: submissionId
                          message: Required keys were missing
                invalidUuid:
                  summary: Invalid UUID format
                  value:
                    error:
                      code: NotUUID
                      message: 'submissionId: Value is not a valid UUID'
                      details:
                        - field: submissionId
                          message: Value is not a valid UUID
                submissionNotFound:
                  summary: Submission not found
                  value:
                    error:
                      code: Submission not found
                      message: Submission not found
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    companyId:
      name: companyId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Company identifier
  schemas:
    CreateQuoteRequest:
      type: object
      required:
        - submissionId
      properties:
        submissionId:
          type: string
          format: uuid
          description: The submission to add this quote to
        policyInfo:
          $ref: '#/components/schemas/PolicyInfo'
        policyInsureds:
          type: array
          items:
            $ref: '#/components/schemas/CreateQuotePolicyInsured'
          description: >
            Policy insureds (exposures) to include on this quote.

            Each insured must exist in the system - use the Create Insured
            endpoint first if needed.
        coverages:
          type: array
          items:
            type: object
          description: Line of coverage configurations
        policyAggregateLimits:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              limitName:
                type: string
              amount:
                oneOf:
                  - type: number
                  - type: string
          description: Aggregate limits at policy level
        billing:
          type: object
          properties:
            type:
              type: string
              enum:
                - annual
                - monthly
                - quarterly
                - semi-annual
            config:
              type: object
              description: Billing configuration
            customBillItems:
              type: array
              items:
                type: object
          description: Billing configuration
        customAdjustments:
          type: array
          items:
            $ref: '#/components/schemas/QuoteCustomAdjustment'
          description: Custom premium adjustments
        recipients:
          type: array
          items:
            type: object
            properties:
              email:
                type: string
                format: email
              name:
                type: string
              type:
                type: string
          description: Quote recipients
        bindingSettings:
          type: object
          properties:
            allowInsuredBrokerToBind:
              type: boolean
            bindingConditions:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  bindingCondition:
                    type: string
          description: Binding settings for the quote
        noRatingPremium:
          type: number
          description: Manual premium (for non-rating-engine customers)
    ErrorResponse:
      type: object
      description: Standard error response for all external API endpoints
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human-readable error message
              example: 'submissionId: Required field is missing'
            details:
              type: array
              description: Additional details for validation errors (field-level errors)
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: The field that caused the error
                    example: submissionId
                  message:
                    type: string
                    description: Description of the field error
                    example: Required field is missing
    PolicyInfo:
      type: object
      properties:
        number:
          type: string
          description: Policy number
        type:
          type: string
          description: Policy type code
        startsAtDate:
          type: string
          format: date
          description: Policy effective date (ISO 8601)
        endsAtDate:
          type: string
          format: date
          description: Policy expiration date (ISO 8601)
        coverageTimezone:
          type: string
          description: Timezone for coverage dates
        broker:
          type: object
          description: Broker information
        description:
          type: string
          description: Policy description
        currency:
          type: string
          example: USD
        ratingData:
          type: object
          description: Custom rating data for the rating engine
        ratingInfo:
          type: object
          description: Rating calculation results
    CreateQuotePolicyInsured:
      type: object
      description: >
        Policy insured (exposure) for creating a quote. Represents an insured
        entity

        attached to the quote with coverage period information.
      required:
        - insuredId
        - name
        - insuredType
        - coveragePeriods
      properties:
        insuredId:
          type: string
          format: uuid
          description: The ID of an existing insured in the system
        name:
          type: string
          description: Display name of the insured
        insuredType:
          type: string
          description: >
            The insured's role on the policy. Common values: "primary" (main
            insured),

            "additional" (extra insureds), "named" (named insureds). Note: This
            is different

            from entityType on the insured record, which describes what kind of
            entity it is.
        coveragePeriods:
          type: array
          items:
            $ref: '#/components/schemas/CreateQuoteCoveragePeriod'
          description: One or more coverage periods for this insured
        insuredData:
          type: object
          additionalProperties: true
          description: Custom data fields for this policy insured (optional)
    QuoteCustomAdjustment:
      type: object
      properties:
        id:
          type: string
        description:
          type: string
        amount:
          type: string
        insuredId:
          type: string
        sectionRank:
          type: integer
        format:
          type: string
          enum:
            - percent
            - currency
    CreateQuoteCoveragePeriod:
      type: object
      description: Coverage period for a policy insured when creating a quote
      required:
        - id
        - joinDate
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this coverage period
        joinDate:
          type: string
          format: date
          description: Date when coverage begins (ISO 8601 format YYYY-MM-DD)
        terminationDate:
          type: string
          format: date
          description: >-
            Date when coverage ends (ISO 8601 format YYYY-MM-DD). If not
            provided, coverage extends to policy end date.
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingApiKey:
              summary: Missing API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: Authorization header is required
            bearerTokenNotAllowed:
              summary: Bearer token used instead of API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: External API endpoints require API key authentication
    Forbidden:
      description: Forbidden - Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientPermissions:
              summary: Insufficient permissions
              value:
                error:
                  code: FORBIDDEN
                  message: Insufficient permissions to perform this action
    InternalServerError:
      description: Internal Server Error - Unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internalError:
              summary: Unexpected server error
              value:
                error:
                  code: INTERNAL_ERROR
                  message: An unexpected error occurred. Please try again later.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````