> ## 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 Field Model V1 quote.

The `quote` and `exposures` fields contain custom field data where keys
are field `referenceId`s defined in the company's field configuration.
Use the [Configuration endpoint](/api-reference/field-model-quotes/get-quotes-configuration)
to discover available fields.

**Required fields in `quote`:** `policyStartDate`, `policyEndDate`,
`policyType`, `policyTimeZone`. Fields like `policyNumber` and
`policyEffectiveDate` are not required.

**Lifecycle fields** (`quoteType`, `quoteStatus`, `quoteNumber`,
`quoteBindErrors`, `quoteSubmissionId`) are system-managed and will be
rejected with a 400 error if included in the request.

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




## OpenAPI

````yaml /openapi/generated-external-api.yaml post /api/v1/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/v1/external/companies/{companyId}/quotes:
    post:
      tags:
        - Field Model Quotes
      summary: Create Quote
      description: >
        Creates a new Field Model V1 quote.


        The `quote` and `exposures` fields contain custom field data where keys

        are field `referenceId`s defined in the company's field configuration.

        Use the [Configuration
        endpoint](/api-reference/field-model-quotes/get-quotes-configuration)

        to discover available fields.


        **Required fields in `quote`:** `policyStartDate`, `policyEndDate`,

        `policyType`, `policyTimeZone`. Fields like `policyNumber` and

        `policyEffectiveDate` are not required.


        **Lifecycle fields** (`quoteType`, `quoteStatus`, `quoteNumber`,

        `quoteBindErrors`, `quoteSubmissionId`) are system-managed and will be

        rejected with a 400 error if included in the request.


        **Required permission:** `company.quote:create`
      operationId: createQuoteV1
      parameters:
        - $ref: '#/components/parameters/companyId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - submissionId
                - quote
                - exposures
              properties:
                submissionId:
                  type: string
                  format: uuid
                  description: Submission to associate the quote with
                quote:
                  type: object
                  additionalProperties: true
                  description: Quote-level custom field data (lifecycle fields rejected)
                exposures:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                  description: Array of exposure objects with custom field data
            examples:
              basic:
                summary: Create a basic quote
                value:
                  submissionId: 550e8400-e29b-41d4-a716-446655440010
                  quote:
                    policyStartDate: '2025-01-01'
                    policyEndDate: '2026-01-01'
                    policyType: new_business
                    policyTimeZone: America/New_York
                    premium: 15000
                  exposures:
                    - exposureName: Acme Corp
                      employeeCount: 150
      responses:
        '201':
          description: Quote created
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Newly created quote ID
              examples:
                success:
                  summary: Quote created successfully
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
        '400':
          description: Bad Request — validation error or lifecycle fields included
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                lifecycleField:
                  summary: Lifecycle field rejected
                  value:
                    error:
                      code: VALIDATION_ERROR
                      message: 'Lifecycle fields cannot be set on create: quoteStatus'
        '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:
    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
  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.

````