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

# Opt a module into background auto-updates

> Sets whether the module is re-resolved from its stored registry source on the background auto-update sweep. The optional constraint is a semver range pinning which registry version is selected (omitted or null means latest); invalid ranges are rejected with 400. If the sweep interval is 0 the flag is still stored but nothing runs. Only works for registry-installed modules.



## OpenAPI

````yaml /openapi.json post /modules/{moduleId}/auto-update
openapi: 3.0.0
info:
  title: Cyrnel API
  description: >-
    Cyrnel is a universal layer that connects AI agents and LLM applications to
    any external service, API, or device regardless of protocol or standard. It
    acts as an adaptive bridge between your AI and the outside world, enabling
    seamless integrations through code execution, async operation handling, and
    built-in observability and security controls.
  version: 1.0.0
servers:
  - url: http://localhost:9371
security: []
paths:
  /modules/{moduleId}/auto-update:
    post:
      tags:
        - Modules
      summary: Opt a module into background auto-updates
      description: >-
        Sets whether the module is re-resolved from its stored registry source
        on the background auto-update sweep. The optional constraint is a semver
        range pinning which registry version is selected (omitted or null means
        latest); invalid ranges are rejected with 400. If the sweep interval is
        0 the flag is still stored but nothing runs. Only works for
        registry-installed modules.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: Module identifier.
          required: true
          description: Module identifier.
          name: moduleId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModuleAutoUpdateRequest'
      responses:
        '200':
          description: The auto-update opt-in state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModuleAutoUpdateResponse'
        '400':
          description: >-
            The moduleId path parameter, request body, or constraint was
            invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: A bearer token was required but missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: The module could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '409':
          description: >-
            The module has no stored registry source and cannot enable
            auto-update.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '429':
          description: >-
            Rate limit exceeded. The request was throttled. Check Retry-After
            header.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum requests allowed in the current window.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the window resets.
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '500':
          description: The auto-update state could not be stored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    ModuleAutoUpdateRequest:
      type: object
      properties:
        autoUpdate:
          type: boolean
          description: Whether the module opts into the background auto-update sweep.
        constraint:
          type: string
          nullable: true
          description: >-
            Optional semver range pinning which registry version is selected.
            Omitted or null means latest. Invalid ranges are rejected with 400.
      required:
        - autoUpdate
      description: Request body used to opt a module into auto-updates.
    ModuleAutoUpdateResponse:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          description: Identifier of the module whose auto-update flag was set.
        autoUpdate:
          type: boolean
          description: The stored auto-update opt-in state.
        constraint:
          type: string
          nullable: true
          description: >-
            The normalized semver range stored for the sweep, or null for
            latest.
      required:
        - id
        - autoUpdate
        - constraint
      description: Response returned by the module auto-update endpoint.
    ApiErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message returned by the API.
        code:
          type: string
          description: >-
            Stable machine-readable error code (e.g. invalid_cursor,
            cursor_expired).
      required:
        - error
      description: Standard error envelope returned by the HTTP error middleware.
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          type: string
          enum:
            - rate_limit_exceeded
          description: Error code identifying rate-limit rejection.
        message:
          type: string
          description: Human-readable message with retry instructions.
        retryAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Number of seconds to wait before retrying.
      required:
        - error
        - message
        - retryAfter
      description: Error body returned when a request is rate-limited (HTTP 429).

````