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

# Delete Configuration Rating Field

> Deletes a rating input field by ID. The field definition, its application field
association, and its entry in the rating engine revision's `config.applicationFields`
are all permanently removed.

**Required permission:** `company:update`




## OpenAPI

````yaml /openapi/generated-external-api.yaml delete /api/external/companies/{companyId}/configuration/rating/fields/{fieldId}
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}/configuration/rating/fields/{fieldId}:
    delete:
      tags:
        - Configuration Rating Fields
      summary: Delete Configuration Rating Field
      description: >
        Deletes a rating input field by ID. The field definition, its
        application field

        association, and its entry in the rating engine revision's
        `config.applicationFields`

        are all permanently removed.


        **Required permission:** `company:update`
      operationId: deleteConfigurationRatingField
      parameters:
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/configurationFieldId'
        - $ref: '#/components/parameters/ratingEngineRevisionId'
        - $ref: '#/components/parameters/revisionStrategy'
      responses:
        '200':
          description: Configuration rating field deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The ID of the deleted rating field
                  deleted:
                    type: boolean
                    description: Confirmation that the field was deleted
              examples:
                success:
                  summary: Field deleted
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440100
                    deleted: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Field or revision not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                fieldNotFound:
                  summary: Rating field not found
                  value:
                    error:
                      code: NotFoundError
                      message: >-
                        Configuration rating field not found:
                        550e8400-e29b-41d4-a716-446655440100
                revisionNotFound:
                  summary: Rating engine revision not found
                  value:
                    error:
                      code: NotFoundError
                      message: >-
                        Rating engine revision not found:
                        550e8400-e29b-41d4-a716-446655440200
        '500':
          $ref: '#/components/responses/InternalServerError'
        '501':
          description: Not Implemented - CreateNewRevision is not yet supported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notImplemented:
                  summary: CreateNewRevision not yet implemented
                  value:
                    error:
                      code: NotImplemented
                      message: CreateNewRevision is not yet implemented
components:
  parameters:
    companyId:
      name: companyId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Company identifier
    configurationFieldId:
      name: fieldId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Configuration field identifier
    ratingEngineRevisionId:
      name: ratingEngineRevisionId
      in: query
      required: true
      schema:
        type: string
        format: uuid
      description: The rating engine revision ID (must exist and belong to the company)
    revisionStrategy:
      name: revisionStrategy
      in: query
      required: true
      schema:
        type: string
        enum:
          - UpdateExistingRevision
          - CreateNewRevision
      description: >
        Controls how the rating engine revision is updated.
        `UpdateExistingRevision` modifies the specified revision in place.
        `CreateNewRevision` is not yet implemented.
  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.
  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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````