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

> ## Agent Instructions
> Documentazione di Business Insider. Il testo completo, incluso il riferimento API, è in /llms-full.txt. Per endpoint, campi e codici di errore la fonte di verità è openapi.json: non usare endpoint o campi non documentati.

# Cambia un webhook

> Con `active: false` le consegne si fermano: gli eventi intanto restano in attesa e partono alla riaccensione.



## OpenAPI

````yaml /openapi.json patch /webhooks/{id}
openapi: 3.1.0
info:
  title: Business Insider API
  version: 1.0.0
  description: >-
    L'API pubblica di Business Insider: archivio, documenti, file, trascrizioni,
    ricerca, chat, membri, credito e webhook di un'organizzazione. Ogni
    richiesta porta `Authorization: Bearer <chiave>`; la chiave la crea un
    Proprietario in Impostazioni.
servers:
  - url: https://businessinsider.squaddcrm.com/api/v1
security:
  - chiave: []
tags:
  - name: Organizzazione
  - name: Credito
  - name: Archivio
  - name: File
  - name: Chat
  - name: Webhook ed eventi
paths:
  /webhooks/{id}:
    patch:
      tags:
        - Webhook ed eventi
      summary: Cambia un webhook
      description: >-
        Con `active: false` le consegne si fermano: gli eventi intanto restano
        in attesa e partono alla riaccensione.
      operationId: updateWebhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  minLength: 9
                  maxLength: 2000
                  format: uri
                  pattern: ^https:\/\/
                  description: >-
                    Un indirizzo https con un nome (niente IP, niente reti
                    private).
                events:
                  type: array
                  items:
                    type: string
                    enum:
                      - '*'
                      - item.created
                      - item.updated
                      - item.trashed
                      - item.restored
                      - item.deleted
                      - content.updated
                      - file.read
                      - file.failed
                      - member.joined
                      - member.updated
                      - member.removed
                      - chat.answer.completed
                  minItems: 1
                  maxItems: 20
                  description: I tipi di evento da ricevere; `*` per tutti.
                active:
                  type: boolean
                description:
                  type: string
                  maxLength: 200
              additionalProperties: false
      responses:
        '200':
          description: Il webhook.
          headers:
            X-RateLimit-Limit:
              description: Richieste ammesse nella finestra più vicina al tetto.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Richieste rimaste in quella finestra.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Quando la finestra riparte (secondi epoch).
              schema:
                type: integer
            X-Request-Id:
              description: L'id della richiesta.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '400':
          description: 'Codici: `invalid_request`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Codici: `unauthenticated`, `api_key_invalid`, `api_key_revoked`,
            `api_key_expired`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'Codici: `insufficient_scope`, `organization_suspended`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'Codici: `not_found`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Codici: `rate_limited`.'
          headers:
            X-RateLimit-Limit:
              description: Richieste ammesse nella finestra più vicina al tetto.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Richieste rimaste in quella finestra.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Quando la finestra riparte (secondi epoch).
              schema:
                type: integer
            X-Request-Id:
              description: L'id della richiesta.
              schema:
                type: string
            Retry-After:
              description: Secondi da aspettare.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'Codici: `internal_error`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - chiave:
            - webhooks:write
components:
  schemas:
    Webhook:
      type: object
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
          maxLength: 2000
        description:
          type:
            - string
            - 'null'
          maxLength: 200
        events:
          type: array
          items:
            type: string
            maxLength: 40
          maxItems: 20
        active:
          type: boolean
        createdBy:
          type:
            - string
            - 'null'
          maxLength: 200
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        failing:
          type: integer
          description: Consegne arrese negli ultimi 7 giorni.
      required:
        - id
        - url
        - description
        - events
        - active
        - createdBy
        - createdAt
        - updatedAt
        - failing
      additionalProperties: false
    Error:
      type: object
      required:
        - error
      additionalProperties: false
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
            - requestId
          additionalProperties: false
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - unauthenticated
                - api_key_invalid
                - api_key_revoked
                - api_key_expired
                - credits_exhausted
                - forbidden
                - insufficient_scope
                - organization_suspended
                - spending_limit
                - not_found
                - conflict
                - revision_conflict
                - name_taken
                - already_member
                - last_owner
                - answer_in_progress
                - idempotency_in_progress
                - payload_too_large
                - unsupported_format
                - idempotency_key_reused
                - rate_limited
                - internal_error
                - upstream_error
                - unavailable
              description: 'Codice stabile: decidi da questo, non dal testo.'
            message:
              type: string
              description: Spiegazione in italiano, per chi legge i log.
            details:
              type:
                - object
                - 'null'
              description: Il campo sbagliato (`field`), il limite superato e simili.
            requestId:
              type: string
              description: 'Lo stesso di `X-Request-Id`: citalo quando chiedi aiuto.'
  securitySchemes:
    chiave:
      type: http
      scheme: bearer
      bearerFormat: bik_live_… / bik_test_…
      description: >-
        Chiave API dell'organizzazione. Scope: `archive:read`, `archive:write`,
        `files:read`, `files:write`, `chat:read`, `chat:write`, `members:read`,
        `members:write`, `credits:read`, `webhooks:read`, `webhooks:write`;
        `<area>:write` comprende `<area>:read`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.