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

# Patch service secrets

> Applies a JSON Patch document to the encrypted secrets payload, validates the result against the schema, and persists the updated secrets. The response only confirms success; secrets are never echoed back.



## OpenAPI

````yaml /cyrnel/openapi.json patch /services/{serviceId}/secrets
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:
  /services/{serviceId}/secrets:
    patch:
      tags:
        - Services
      summary: Patch service secrets
      description: >-
        Applies a JSON Patch document to the encrypted secrets payload,
        validates the result against the schema, and persists the updated
        secrets. The response only confirms success; secrets are never echoed
        back.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: Service identifier matching the installed manifest id.
          required: true
          description: Service identifier matching the installed manifest id.
          name: serviceId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      op:
                        type: string
                        enum:
                          - add
                        description: Insert a value at the target path.
                      path:
                        type: string
                        minLength: 1
                        description: JSON Pointer path to update.
                      value:
                        nullable: true
                        description: Value to insert or replace.
                    required:
                      - op
                      - path
                  - type: object
                    properties:
                      op:
                        type: string
                        enum:
                          - remove
                        description: Remove the value at the target path.
                      path:
                        type: string
                        minLength: 1
                        description: JSON Pointer path to remove.
                    required:
                      - op
                      - path
                  - type: object
                    properties:
                      op:
                        type: string
                        enum:
                          - replace
                        description: Replace the value at the target path.
                      path:
                        type: string
                        minLength: 1
                        description: JSON Pointer path to replace.
                      value:
                        nullable: true
                        description: Replacement value.
                    required:
                      - op
                      - path
                  - type: object
                    properties:
                      op:
                        type: string
                        enum:
                          - move
                        description: Move a value from one path to another.
                      path:
                        type: string
                        minLength: 1
                        description: Destination JSON Pointer path.
                      from:
                        type: string
                        minLength: 1
                        description: Source JSON Pointer path.
                    required:
                      - op
                      - path
                      - from
                  - type: object
                    properties:
                      op:
                        type: string
                        enum:
                          - copy
                        description: Copy a value from one path to another.
                      path:
                        type: string
                        minLength: 1
                        description: Destination JSON Pointer path.
                      from:
                        type: string
                        minLength: 1
                        description: Source JSON Pointer path.
                    required:
                      - op
                      - path
                      - from
                  - type: object
                    properties:
                      op:
                        type: string
                        enum:
                          - test
                        description: Assert that a path contains a value.
                      path:
                        type: string
                        minLength: 1
                        description: JSON Pointer path to inspect.
                      value:
                        nullable: true
                        description: Expected value.
                    required:
                      - op
                      - path
              description: JSON Patch operations applied in order.
      responses:
        '200':
          description: Confirmation that the secrets payload was updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceSecretsResponse'
        '400':
          description: >-
            The JSON Patch document was invalid or produced a secrets payload
            that violates the schema.
          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 service could not be found.
          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 secrets could not be persisted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    ServiceSecretsResponse:
      type: object
      properties:
        updated:
          type: boolean
          description: Acknowledges that the secrets patch was accepted and persisted.
      required:
        - updated
      description: Response returned after patching service secrets.
    ApiErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message returned by the API.
      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).

````