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

# Accept Tool Attachment Upgrade

> Apply a previewed upgrade to one agent attachment. Uses optimistic concurrency, so if any preview hash no longer matches it returns 409, and a stale attachment returns 409 with code TOOL_ATTACHMENT_STALE.



## OpenAPI

````yaml /api-reference/agents/shared-resources.oas.yaml post /v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept
openapi: 3.1.0
info:
  title: SLNG Agent Resources API
  version: 1.0.0
  description: >-
    Public control-plane API for agent resources: tools, MCP servers, Vault
    secrets and variables, and client models.
servers:
  - url: https://api.agents.slng.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Tools
    description: Create, test, publish, version, and attach agent tools.
    x-page-icon: wrench
  - name: MCP servers
    description: Configure MCP servers and refresh their live capabilities.
    x-page-icon: plug
  - name: Vault
    description: >-
      Store organisation secrets and readable variables without exposing secret
      values.
    x-page-icon: key
  - name: Client models
    description: Manage bring-your-own LLM provider credentials.
    x-page-icon: brain
paths:
  /v1/agents/tools/agents/{agent_id}/attachments/{attachment_id}/upgrade-accept:
    post:
      tags:
        - Tools
      summary: Accept Tool Attachment Upgrade
      description: >-
        Apply a previewed upgrade to one agent attachment. Uses optimistic
        concurrency, so if any preview hash no longer matches it returns 409,
        and a stale attachment returns 409 with code TOOL_ATTACHMENT_STALE.
      operationId: acceptToolAttachmentUpgrade
      parameters:
        - name: agent_id
          in: path
          required: true
          description: The agent UUID that owns the attachment being upgraded.
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: attachment_id
          in: path
          required: true
          description: The UUID of the tool attachment on the agent.
          schema:
            type: string
            format: uuid
            title: Attachment Id
      requestBody:
        required: true
        description: The target version and preview hashes to apply.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolUpgradeAcceptRequest'
            example:
              to_version: 3
              current_config_hash: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
              current_tool_version_hash: fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210
              target_tool_version_hash: 89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567
              acceptance_hash: '1122334455667788112233445566778811223344556677881122334455667788'
      responses:
        '200':
          description: >-
            The applied upgrade, returned in the same shape as the preview, with
            the attachment now pinned to the target version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolUpgradePreview'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          $ref: '#/components/responses/ConflictError'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ToolUpgradeAcceptRequest:
      properties:
        to_version:
          type: integer
          minimum: 1
          title: To Version
        current_config_hash:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Current Config Hash
        current_tool_version_hash:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Current Tool Version Hash
        target_tool_version_hash:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Target Tool Version Hash
        dependency_proof_hash:
          anyOf:
            - type: string
              pattern: ^[0-9a-f]{64}$
            - type: 'null'
          title: Dependency Proof Hash
        acceptance_hash:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Acceptance Hash
      additionalProperties: false
      type: object
      required:
        - to_version
        - current_config_hash
        - current_tool_version_hash
        - target_tool_version_hash
        - acceptance_hash
      title: ToolUpgradeAcceptRequest
      description: >-
        Request to accept a previewed attachment upgrade, carrying the preview
        hashes for concurrency checks.
      example:
        to_version: 3
        current_config_hash: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
        current_tool_version_hash: fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210
        target_tool_version_hash: 89abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567
        acceptance_hash: '1122334455667788112233445566778811223344556677881122334455667788'
    ToolUpgradePreview:
      properties:
        agent_id:
          type: string
          format: uuid
          title: Agent Id
        attachment_id:
          type: string
          format: uuid
          title: Attachment Id
        tool_id:
          type: string
          format: uuid
          title: Tool Id
        from_version:
          type: integer
          title: From Version
        to_version:
          type: integer
          title: To Version
        current_config_hash:
          type: string
          title: Current Config Hash
        current_tool_version_hash:
          type: string
          title: Current Tool Version Hash
        target_tool_version_hash:
          type: string
          title: Target Tool Version Hash
        dependency_proof_hash:
          anyOf:
            - type: string
              pattern: ^[0-9a-f]{64}$
            - type: 'null'
          title: Dependency Proof Hash
        preparation_state:
          anyOf:
            - type: string
              enum:
                - ready
                - preparing
                - failed
            - type: 'null'
          title: Preparation State
        preparation_operation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Preparation Operation Id
        retry_after_seconds:
          anyOf:
            - type: integer
              maximum: 60
              minimum: 1
            - type: 'null'
          title: Retry After Seconds
        acceptance_hash:
          type: string
          title: Acceptance Hash
        reconciled_attachment:
          $ref: '#/components/schemas/ToolAttachment'
        added_parameters:
          items:
            type: string
          type: array
          title: Added Parameters
        removed_parameters:
          items:
            type: string
          type: array
          title: Removed Parameters
        renamed_parameters:
          additionalProperties:
            type: string
          type: object
          title: Renamed Parameters
        type_changed_parameters:
          additionalProperties:
            type: object
            additionalProperties: true
          type: object
          title: Type Changed Parameters
        issues:
          items:
            $ref: '#/components/schemas/ToolUpgradeIssue'
          type: array
          title: Issues
        can_accept:
          type: boolean
          title: Can Accept
      additionalProperties: false
      type: object
      required:
        - agent_id
        - attachment_id
        - tool_id
        - from_version
        - to_version
        - current_config_hash
        - current_tool_version_hash
        - target_tool_version_hash
        - acceptance_hash
        - reconciled_attachment
        - added_parameters
        - removed_parameters
        - renamed_parameters
        - type_changed_parameters
        - issues
        - can_accept
      title: ToolUpgradePreview
      description: >-
        Preview of upgrading an attachment to a target version, with the
        parameter diff and blocking issues.
      example:
        agent_id: 0a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9
        attachment_id: 1b2c3d4e-5f60-4718-92a3-b4c5d6e7f809
        tool_id: 7b2a1c34-5d6e-4f70-8a90-1b2c3d4e5f60
        from_version: 2
        to_version: 3
        current_config_hash: 3f1ab2c4d5e6f708
        current_tool_version_hash: 8a7b6c5d4e3f2011
        target_tool_version_hash: 9e8d7c6b5a4f3210
        acceptance_hash: a1b2c3d4e5f60718
        reconciled_attachment:
          attachment_id: 1b2c3d4e-5f60-4718-92a3-b4c5d6e7f809
          tool_id: 7b2a1c34-5d6e-4f70-8a90-1b2c3d4e5f60
          version: 3
        added_parameters: []
        removed_parameters: []
        renamed_parameters: {}
        type_changed_parameters: {}
        issues: []
        can_accept: true
    ToolAttachment:
      properties:
        attachment_id:
          type: string
          format: uuid
          title: Attachment Id
        tool_id:
          type: string
          format: uuid
          title: Tool Id
        version:
          type: integer
          minimum: 1
          title: Version
        description:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Description
        invocation:
          type: string
          enum:
            - model
            - system
          title: Invocation
          default: model
        system:
          anyOf:
            - $ref: '#/components/schemas/SystemToolConfig'
            - type: 'null'
        execution_policy:
          anyOf:
            - $ref: '#/components/schemas/ToolExecutionPolicy'
            - type: 'null'
        argument_overrides:
          additionalProperties:
            anyOf:
              - type: string
              - type: boolean
              - type: integer
              - type: number
          type: object
          title: Argument Overrides
        config_overrides:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ApiRequestOverrides'
                - $ref: '#/components/schemas/EndCallOverrides'
                - $ref: '#/components/schemas/VoicemailDetectionOverrides'
                - $ref: '#/components/schemas/TransferCallOverrides'
                - $ref: '#/components/schemas/SendSmsOverrides'
                - $ref: '#/components/schemas/CurrentDatetimeOverrides'
                - $ref: '#/components/schemas/UserPhoneNumberOverrides'
              discriminator:
                propertyName: type
                mapping:
                  api_request:
                    $ref: '#/components/schemas/ApiRequestOverrides'
                  current_datetime:
                    $ref: '#/components/schemas/CurrentDatetimeOverrides'
                  end_call:
                    $ref: '#/components/schemas/EndCallOverrides'
                  send_sms:
                    $ref: '#/components/schemas/SendSmsOverrides'
                  transfer_call:
                    $ref: '#/components/schemas/TransferCallOverrides'
                  user_phone_number:
                    $ref: '#/components/schemas/UserPhoneNumberOverrides'
                  voicemail_detection:
                    $ref: '#/components/schemas/VoicemailDetectionOverrides'
            - type: 'null'
          title: Config Overrides
      additionalProperties: false
      type: object
      required:
        - attachment_id
        - tool_id
        - version
      title: ToolAttachment
      description: A tool bound to an agent at a specific version, with any overrides.
    ToolUpgradeIssue:
      properties:
        path:
          type: string
          title: Path
        code:
          type: string
          description: >-
            Machine-readable reason an attached tool cannot be auto-upgraded to
            the target version (for example a parameter was removed, renamed, or
            changed type). Resolve each issue before upgrading.
          enum:
            - PARAMETER_REMOVED
            - PARAMETER_RENAMED
            - PARAMETER_TYPE_CHANGED
            - VALUE_INCOMPATIBLE
            - SOURCE_INCOMPATIBLE
            - CONFIG_OVERRIDE_INCOMPATIBLE
            - TRIGGER_EDGE_INVALID
          title: Code
        parameter:
          anyOf:
            - type: string
            - type: 'null'
          title: Parameter
        target_parameter:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Parameter
        message:
          type: string
          title: Message
        remediation:
          type: string
          title: Remediation
        blocking:
          type: boolean
          title: Blocking
          default: true
      additionalProperties: false
      type: object
      required:
        - path
        - code
        - message
        - remediation
      title: ToolUpgradeIssue
      description: >-
        A single reason an attachment cannot be auto-upgraded, with remediation
        guidance.
    ApiErrorResponse:
      type: object
      description: Standard error envelope returned for failed requests.
      required:
        - detail
        - error
      properties:
        detail:
          type: string
          description: Short human-readable summary of the error.
        error:
          $ref: '#/components/schemas/ApiErrorDetail'
      example:
        detail: A shared secret or variable named 'STRIPE_KEY' already exists
        error:
          code: RESOURCE_CONFLICT
          message: A shared secret or variable named 'STRIPE_KEY' already exists
          request_id: 018f9b2c-7e4a-7c3d-9a1b-2c3d4e5f6a7b
    SystemToolConfig:
      properties:
        triggers:
          items:
            $ref: '#/components/schemas/SystemTrigger'
          type: array
          minItems: 1
          title: Triggers
        arguments:
          items:
            $ref: '#/components/schemas/SystemArgument'
          type: array
          title: Arguments
      additionalProperties: false
      type: object
      required:
        - triggers
      title: SystemToolConfig
      description: >-
        System-invocation config listing the triggers that fire the tool and the
        arguments passed to it.
    ToolExecutionPolicy:
      properties:
        pre_action_message:
          anyOf:
            - $ref: '#/components/schemas/PreActionMessage'
            - type: 'null'
      additionalProperties: false
      type: object
      title: ToolExecutionPolicy
      description: >-
        Execution-time policy applied when the tool runs, such as a pre-action
        message.
    ApiRequestOverrides:
      properties:
        type:
          type: string
          const: api_request
          title: Type
        url:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Url
      additionalProperties: false
      type: object
      required:
        - type
      title: ApiRequestOverrides
      description: Per-attachment override of the API Request URL.
    EndCallOverrides:
      properties:
        type:
          type: string
          const: end_call
          title: Type
        goodbye_message:
          anyOf:
            - $ref: '#/components/schemas/TemplateStringExpression'
            - type: 'null'
        wait_for_completion:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Wait For Completion
      additionalProperties: false
      type: object
      required:
        - type
      title: EndCallOverrides
      description: Per-attachment overrides for an End Call tool.
    VoicemailDetectionOverrides:
      properties:
        type:
          type: string
          const: voicemail_detection
          title: Type
        prompt:
          anyOf:
            - $ref: '#/components/schemas/TemplateStringExpression'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - type
      title: VoicemailDetectionOverrides
      description: Per-attachment overrides for a Voicemail Detection tool.
    TransferCallOverrides:
      properties:
        type:
          type: string
          const: transfer_call
          title: Type
        destination:
          anyOf:
            - type: string
            - type: boolean
            - type: integer
            - type: number
            - type: 'null'
          title: Destination
      additionalProperties: false
      type: object
      required:
        - type
      title: TransferCallOverrides
      description: Per-attachment override of the transfer destination.
    SendSmsOverrides:
      properties:
        type:
          type: string
          const: send_sms
          title: Type
        recipient:
          anyOf:
            - type: string
            - type: boolean
            - type: integer
            - type: number
            - type: 'null'
          title: Recipient
        body:
          anyOf:
            - $ref: '#/components/schemas/TemplateStringExpression'
            - type: 'null'
        from_number:
          anyOf:
            - type: string
            - type: boolean
            - type: integer
            - type: number
            - type: 'null'
          title: From Number
      additionalProperties: false
      type: object
      required:
        - type
      title: SendSmsOverrides
      description: Per-attachment overrides for a Send SMS tool.
    CurrentDatetimeOverrides:
      properties:
        type:
          type: string
          const: current_datetime
          title: Type
        timezone:
          anyOf:
            - type: string
            - type: 'null'
          title: Timezone
        prompt:
          anyOf:
            - $ref: '#/components/schemas/TemplateStringExpression'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - type
      title: CurrentDatetimeOverrides
      description: Per-attachment overrides for a Current Date and Time tool.
    UserPhoneNumberOverrides:
      properties:
        type:
          type: string
          const: user_phone_number
          title: Type
        prompt:
          anyOf:
            - $ref: '#/components/schemas/TemplateStringExpression'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - type
      title: UserPhoneNumberOverrides
      description: Per-attachment overrides for a User Phone Number tool.
    ApiErrorDetail:
      type: object
      description: Structured error detail carried inside an error response.
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable machine-readable error code.
          example: RESOURCE_CONFLICT
        message:
          type: string
          description: Human-readable explanation of the error.
          example: A shared secret or variable named STRIPE_KEY already exists
        request_id:
          type:
            - string
            - 'null'
          description: Identifier for this request, useful when contacting support.
          example: req_01H8XY7Z9QEXAMPLE
        retryable:
          type: boolean
          description: Whether retrying the same request may succeed.
          example: false
        fields:
          type: array
          description: >-
            Per-field validation problems, when the error relates to specific
            request fields.
          items:
            type: object
            additionalProperties: true
          example: []
      example:
        code: PUBLIC_SHARED_RESOURCES_DISABLED
        message: Public shared resources are disabled for this organisation
        request_id: req_01H8XY7Z9QEXAMPLE
        retryable: false
    SystemTrigger:
      properties:
        event:
          type: string
          enum:
            - call_start
            - first_user_message
            - call_end
            - tool_succeeded
            - tool_failed
          title: Event
        source_attachment_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Attachment Id
      additionalProperties: false
      type: object
      required:
        - event
      title: SystemTrigger
      description: A call event that fires a system-invoked tool.
    SystemArgument:
      properties:
        name:
          type: string
          maxLength: 64
          minLength: 1
          title: Name
        type:
          type: string
          enum:
            - string
            - integer
            - number
            - boolean
            - string[]
            - integer[]
            - number[]
            - boolean[]
            - transcript_messages
            - transcript_text
          title: Type
        required:
          type: boolean
          title: Required
          default: false
        description:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Description
        source:
          oneOf:
            - $ref: '#/components/schemas/SystemArgumentSourceConstant'
            - $ref: '#/components/schemas/SystemArgumentSourceTemplate'
            - $ref: '#/components/schemas/SystemArgumentSourceTranscriptMessages'
            - $ref: '#/components/schemas/SystemArgumentSourceTranscriptText'
            - $ref: '#/components/schemas/SystemArgumentSourceContext'
          title: Source
          discriminator:
            propertyName: type
            mapping:
              agent_id:
                $ref: '#/components/schemas/SystemArgumentSourceContext'
              agent_name:
                $ref: '#/components/schemas/SystemArgumentSourceContext'
              call_end_reason:
                $ref: '#/components/schemas/SystemArgumentSourceContext'
              call_id:
                $ref: '#/components/schemas/SystemArgumentSourceContext'
              constant:
                $ref: '#/components/schemas/SystemArgumentSourceConstant'
              first_user_message:
                $ref: '#/components/schemas/SystemArgumentSourceContext'
              job_id:
                $ref: '#/components/schemas/SystemArgumentSourceContext'
              phone_number:
                $ref: '#/components/schemas/SystemArgumentSourceContext'
              room_name:
                $ref: '#/components/schemas/SystemArgumentSourceContext'
              template:
                $ref: '#/components/schemas/SystemArgumentSourceTemplate'
              transcript_messages:
                $ref: '#/components/schemas/SystemArgumentSourceTranscriptMessages'
              transcript_text:
                $ref: '#/components/schemas/SystemArgumentSourceTranscriptText'
              trigger_event:
                $ref: '#/components/schemas/SystemArgumentSourceContext'
      additionalProperties: false
      type: object
      required:
        - name
        - type
        - source
      title: SystemArgument
      description: >-
        One argument passed to a system-invoked tool, with its type and value
        source.
    PreActionMessage:
      properties:
        enabled:
          type: boolean
          title: Enabled
          default: false
        text:
          anyOf:
            - $ref: '#/components/schemas/TemplateStringExpression'
            - type: 'null'
        wait:
          type: boolean
          title: Wait
          default: false
      additionalProperties: false
      type: object
      title: PreActionMessage
      description: Optional message spoken before the tool runs.
    TemplateStringExpression:
      properties:
        segments:
          items:
            oneOf:
              - $ref: '#/components/schemas/TemplateStringLiteralSegment'
              - $ref: '#/components/schemas/TemplateStringValueSegment'
            discriminator:
              propertyName: type
              mapping:
                expression:
                  $ref: '#/components/schemas/TemplateStringValueSegment'
                literal:
                  $ref: '#/components/schemas/TemplateStringLiteralSegment'
          type: array
          maxItems: 64
          minItems: 1
          title: Segments
      additionalProperties: false
      type: object
      required:
        - segments
      title: TemplateStringExpression
      description: A string built from literal and expression segments resolved at runtime.
    SystemArgumentSourceConstant:
      properties:
        type:
          type: string
          const: constant
          title: Type
        value:
          $ref: '#/components/schemas/JsonValue'
      additionalProperties: false
      type: object
      required:
        - type
        - value
      title: Constant value
      description: A fixed value supplied to the argument.
    SystemArgumentSourceTemplate:
      properties:
        type:
          type: string
          const: template
          title: Type
        template:
          type: string
          maxLength: 2000
          minLength: 1
          title: Template
      additionalProperties: false
      type: object
      required:
        - type
        - template
      title: Template string
      description: A template string resolved to the argument value.
    SystemArgumentSourceTranscriptMessages:
      properties:
        type:
          type: string
          const: transcript_messages
          title: Type
        max_messages:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Messages
          default: 200
      additionalProperties: false
      type: object
      required:
        - type
      title: Transcript messages
      description: The recent conversation transcript as a list of messages.
    SystemArgumentSourceTranscriptText:
      properties:
        type:
          type: string
          const: transcript_text
          title: Type
        max_messages:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Messages
          default: 200
      additionalProperties: false
      type: object
      required:
        - type
      title: Transcript text
      description: The recent conversation transcript as plain text.
    SystemArgumentSourceContext:
      properties:
        type:
          type: string
          enum:
            - first_user_message
            - call_id
            - room_name
            - job_id
            - agent_id
            - agent_name
            - phone_number
            - trigger_event
            - call_end_reason
          title: Type
      additionalProperties: false
      type: object
      required:
        - type
      title: Call-context value
      description: >-
        A value drawn from the call context, such as call_id, phone_number, or
        agent_id.
    TemplateStringLiteralSegment:
      properties:
        type:
          type: string
          const: literal
          title: Type
        value:
          type: string
          maxLength: 2000
          title: Value
      additionalProperties: false
      type: object
      required:
        - type
        - value
      title: Literal text
      description: A fixed span of text in the template.
    TemplateStringValueSegment:
      properties:
        type:
          type: string
          const: expression
          title: Type
        expression:
          type: string
          title: Expression
      additionalProperties: false
      type: object
      required:
        - type
        - expression
      title: Expression
      description: An expression span resolved at runtime to a value.
    JsonValue:
      description: >-
        Any JSON value, including strings, numbers, booleans, null, arrays, and
        nested objects.
      anyOf:
        - type: string
        - type: boolean
        - type: integer
        - type: number
        - items:
            $ref: '#/components/schemas/JsonValue'
          type: array
        - additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          type: object
        - type: 'null'
  responses:
    UnauthorizedError:
      description: The API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            detail: Invalid API key
            error:
              code: AUTH_REQUIRED
              message: Invalid API key
              request_id: 018f9b2c-7e4a-7c3d-9a1b-2c3d4e5f6a7b
              retryable: false
    ForbiddenError:
      description: >-
        The caller lacks permission, or the public shared-resource API is
        disabled for the organisation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          examples:
            permission_denied:
              summary: Owner or admin access required
              value:
                detail: Organisation owner or admin access required
                error:
                  code: PERMISSION_DENIED
                  message: Organisation owner or admin access required
                  request_id: 018f9b2c-7e4a-7c3d-9a1b-2c3d4e5f6a7b
                  retryable: false
            api_disabled:
              summary: Public shared-resource API disabled for the organisation
              value:
                detail: >-
                  Public shared-resource API access is disabled for this
                  organisation
                error:
                  code: PUBLIC_SHARED_RESOURCES_DISABLED
                  message: >-
                    Public shared-resource API access is disabled for this
                    organisation
                  request_id: 018f9b2c-7e4a-7c3d-9a1b-2c3d4e5f6a7b
                  retryable: false
    NotFoundError:
      description: The requested resource does not exist for this organisation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            detail: The requested resource was not found.
            error:
              code: RESOURCE_NOT_FOUND
              message: The requested resource was not found.
              request_id: 018f9b2c-7e4a-7c3d-9a1b-2c3d4e5f6a7b
    ConflictError:
      description: The request conflicts with the current state of the resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            detail: The request conflicts with the current state of the resource.
            error:
              code: RESOURCE_CONFLICT
              message: The request conflicts with the current state of the resource.
              request_id: 018f9b2c-7e4a-7c3d-9a1b-2c3d4e5f6a7b
    ValidationError:
      description: Request validation failed. See error.fields for the offending fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            detail: >-
              Request validation failed. Fix the highlighted fields and try
              again.
            error:
              code: VALIDATION_FAILED
              message: >-
                Request validation failed. Fix the highlighted fields and try
                again.
              request_id: 018f9b2c-7e4a-7c3d-9a1b-2c3d4e5f6a7b
              retryable: false
              fields:
                - path: name
                  message: >-
                    Name must be SCREAMING_SNAKE_CASE: start with a letter, then
                    letters, digits, or underscores (e.g. STRIPE_API_KEY)
    RateLimitError:
      description: >-
        The organisation exceeded its request rate limit. Retry after the window
        resets.
      headers:
        Retry-After:
          schema:
            type: integer
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            detail: Rate limit exceeded. Maximum 60 requests per 60 seconds.
            error:
              code: INTERNAL_ERROR
              message: Rate limit exceeded. Maximum 60 requests per 60 seconds.
              request_id: 018f9b2c-7e4a-7c3d-9a1b-2c3d4e5f6a7b
              retryable: false
    InternalServerError:
      description: The request failed unexpectedly. Secret values are never exposed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            detail: An unexpected error occurred.
            error:
              code: INTERNAL_ERROR
              message: An unexpected error occurred.
              request_id: 018f9b2c-7e4a-7c3d-9a1b-2c3d4e5f6a7b
              retryable: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: SLNG API key
      description: Your SLNG consumer API key.

````