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

# Update Engine Config

> Replace an engine's active configuration. The full config is validated before swap.



## OpenAPI

````yaml PUT /api/v1/engines/{engine_slug}/config
openapi: 3.1.0
info:
  title: Nexio API
  version: '1.0'
  description: |
    Nexio agentic infrastructure API. Configure engines for placement,
    entity analysis, and other patterns. Submit runs, poll for results,
    or subscribe to signed webhook callbacks.
  contact:
    email: support@usenexio.com
    url: https://docs.usenexio.com
servers:
  - url: https://api.usenexio.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: EngineManagement
    description: Create, configure, and manage inference engines.
  - name: Engines
    description: Engine-scoped endpoints for submitting runs and retrieving results.
  - name: Runs
    description: Retrieve and reconcile submitted runs.
  - name: Catalog
    description: >-
      Read current carriers and products extracted for the authenticated
      organization.
  - name: Environments
    description: Isolated tenancy scopes under your org (one live plus non-live sandboxes).
  - name: Webhooks
    description: Manage webhook endpoints for push-based delivery of terminal run events.
paths:
  /api/v1/engines/{engine_slug}/config:
    put:
      tags:
        - EngineManagement
      summary: Update Engine Config
      description: |
        Replace the engine's configuration. The full config object must be
        provided: this is not a partial update.

        The config is validated against the engine's type-specific rules
        before being saved. If validation fails, the response includes a
        `details` array describing each issue.

        Cannot update config on an archived engine: reactivate it first
        via [Update Engine](/api-reference/engines/update-engine).
      operationId: updateEngineConfig
      parameters:
        - $ref: '#/components/parameters/EngineSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigUpdateRequest'
            example:
              config:
                schema_version: 1
                pack_key: insurance-personal-lines
                pack_version: 1
                scoring_dimensions:
                  - key: coverage_completeness
                    label: Coverage Completeness
                    method: deterministic
                    enabled: true
                default_appetite_bucket: balanced
      responses:
        '200':
          description: Config updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EngineConfigResponse'
        '400':
          description: Config validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                validationError:
                  summary: Config validation errors
                  value:
                    code: validation_error
                    message: Config validation failed
                    details:
                      - path: scoring_dimensions.0.key
                        message: 'duplicate dimension key: coverage_completeness'
                      - path: appetite_weight_profiles.0.weights
                        message: weights must reference valid scoring dimension keys
                missingConfig:
                  summary: Missing config field
                  value:
                    code: invalid_request
                    message: config is required
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Engine is archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: engine_archived
                message: Cannot update config on an archived engine
        '404':
          $ref: '#/components/responses/EngineNotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    EngineSlug:
      name: engine_slug
      in: path
      required: true
      description: Engine identifier slug (e.g. `default`).
      schema:
        type: string
  schemas:
    ConfigUpdateRequest:
      type: object
      required:
        - config
      properties:
        config:
          type: object
          additionalProperties: true
          description: |
            Full replacement config. Must conform to the engine's
            type-specific schema. Use the
            [validate endpoint](/api-reference/engines/validate-engine-config)
            to check before saving.
    EngineConfigResponse:
      type: object
      required:
        - config
        - config_updated_at
        - config_updated_by
        - engine_type
        - preset
      description: |
        Engine configuration with audit metadata. The `config` structure
        varies by `engine_type`. The per-engine Contract page on
        platform.usenexio.com is the canonical integration-guide surface
        for your engine's typed request schema.
      properties:
        config:
          type: object
          additionalProperties: true
          description: |
            Engine configuration object. Structure depends on `engine_type`.
        config_updated_at:
          oneOf:
            - type: string
              format: date-time
            - type: 'null'
          description: >-
            When the config was last updated, or `null` if never modified after
            creation.
        config_updated_by:
          oneOf:
            - type: string
            - type: 'null'
          description: API key identifier that last updated the config, or `null`.
        engine_type:
          type: string
          enum:
            - placement
            - entity_analysis
            - diligence
          description: Engine type.
        preset:
          type: object
          additionalProperties: true
          description: Default configuration template for this engine type.
        request_schema:
          $ref: '#/components/schemas/TypeSchemaNode'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: |
            Stable snake_case error identifier. Safe to match programmatically.

            Known codes: `invalid_request`, `invalid_input`, `unauthorized`,
            `auth_unavailable`, `rate_limited`, `missing_run_id`,
            `invalid_run_id`, `run_not_found`, `invalid_offerings`,
            `missing_input`, `queue_unreachable`,
            `engine_not_found`, `engine_slug_conflict`, `engine_archived`,
            `invalid_engine_type`, `validation_error`,
            `webhook_not_found`, `webhook_limit_exceeded`, `invalid_url`,
            `invalid_events`, `invalid_description`, `invalid_auth_token`,
            `missing_endpoint_id`, `invalid_endpoint_id`, `missing_delivery_id`,
            `invalid_delivery_id`, `delivery_not_found`,
            `delivery_not_resendable`, `insufficient_capability`,
            `engine_version_required`, `engine_version_exact_required`,
            `engine_version_not_found`, `engine_version_invalid_format`,
            `engine_version_draft_requires_sandbox_key`,
            `engine_version_none_released`, `test_scenario_sandbox_only`,
            `test_scenario_forbidden`, `test_scenario_exact_version_required`,
            `test_scenario_version_not_supported`, `invalid_test_scenario`,
            `request_bound_exceeded`, and `run_cap_exceeded`.
        message:
          type: string
          description: Human-readable error message. May change between versions.
        details:
          description: |
            Optional request-specific details. Request-bound failures use the
            `RequestBoundDetails` object. Validation failures may use an array
            of field issues or another documented object.
    TypeSchemaNode:
      type: object
      required:
        - name
        - type
        - required
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - string
            - integer
            - number
            - boolean
            - object
            - array
            - enum
            - datetime
            - uuid
            - any
        required:
          type: boolean
        nullable:
          type: boolean
        description:
          type: string
        children:
          type: array
          items:
            $ref: '#/components/schemas/TypeSchemaNode'
        enum_values:
          type: array
          items:
            type: string
        privacy:
          type: object
          additionalProperties: true
        privacy_policy:
          type: object
          additionalProperties: true
        omit_from_example:
          type: boolean
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: unauthorized
            message: Missing or invalid API key
    EngineNotFound:
      description: Engine not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: engine_not_found
            message: Engine not found
    RateLimited:
      description: Rate limit exceeded. Retry after the window resets.
      headers:
        Retry-After:
          description: Seconds until the rate limit window resets.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: rate_limited
            message: Rate limit exceeded
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Send the credential as `Authorization: Bearer <key>`.

        Scoped partner credentials use the exclusive `nxsk_v1_...` namespace.
        Each scoped key is bound at issuance to one organization, one canonical
        named environment, an explicit engine set, and a least-privilege
        capability set. A malformed, unknown, rotated, or revoked `nxsk_` key
        fails closed and is never retried as a legacy key.

        Capabilities used by this API are `runs:write`, `runs:read`,
        `engines:read`, `catalog:read`, `webhooks:manage`,
        `runs:defensibility:read`, `runs:test`, and `converse:use`. Operation
        descriptions name the required capability.
        Grandfathered `nx_live_...` and `nx_test_...` keys retain their existing
        broad access during the compatibility window.

````