{
  "openapi": "3.1.0",
  "info": {
    "title": "Unitly API",
    "version": "1.0.0",
    "description": "API REST di Unitly: tutto quello che si fa nell’app, da altri servizi. Autenticazione con chiave API (Authorization: Bearer unitly_…), creata da un amministratore in Impostazioni → API e webhook. Guida: https://unitly.it/sviluppatori",
    "contact": {
      "name": "Unitly",
      "email": "luca@globaly.it",
      "url": "https://unitly.it/sviluppatori"
    }
  },
  "servers": [
    {
      "url": "https://unitly.it"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Spazi, membri e inviti"
    },
    {
      "name": "Task"
    },
    {
      "name": "Calendario editoriale"
    },
    {
      "name": "Calendario ed eventi"
    },
    {
      "name": "CRM"
    },
    {
      "name": "Contabilità"
    },
    {
      "name": "Persone (ferie e permessi)"
    },
    {
      "name": "Ticket"
    },
    {
      "name": "Chat (solo canali degli spazi)"
    },
    {
      "name": "Documenti"
    },
    {
      "name": "Social: account, statistiche, campagne"
    },
    {
      "name": "Home, notifiche e ricerca"
    }
  ],
  "paths": {
    "/api/v1/key": {
      "get": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Informazioni sulla chiave in uso",
        "operationId": "get",
        "x-unitly-scope": "qualsiasi",
        "parameters": [],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}": {
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Leggi l’organizzazione",
        "operationId": "get",
        "x-unitly-scope": "qualsiasi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Modifica l’organizzazione",
        "operationId": "patch",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/calendar": {
      "get": {
        "tags": [
          "Calendario ed eventi"
        ],
        "summary": "Elenco calendario",
        "operationId": "getCalendar",
        "x-unitly-scope": "calendar:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/calendar/events": {
      "post": {
        "tags": [
          "Calendario ed eventi"
        ],
        "summary": "Crea (eventi)",
        "operationId": "postCalendarEvents",
        "x-unitly-scope": "calendar:write",
        "x-unitly-webhook-event": "event.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "startTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "endTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "location": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 5000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "workspaceId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "title",
                  "date"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/calendar/events/{id}": {
      "delete": {
        "tags": [
          "Calendario ed eventi"
        ],
        "summary": "Elimina (eventi)",
        "operationId": "deleteCalendarEventsId",
        "x-unitly-scope": "calendar:write",
        "x-unitly-webhook-event": "event.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Calendario ed eventi"
        ],
        "summary": "Modifica (eventi)",
        "operationId": "patchCalendarEventsId",
        "x-unitly-scope": "calendar:write",
        "x-unitly-webhook-event": "event.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "endDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "startTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "endTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "location": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 5000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "workspaceId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "title",
                  "date"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/channels": {
      "post": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Crea (canali)",
        "operationId": "postChatChannels",
        "x-unitly-scope": "chat:write",
        "x-unitly-webhook-event": "channel.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "pattern": "^[a-z0-9][a-z0-9-]*$"
                  },
                  "topic": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "isPrivate": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "workspaceId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/channels/{id}": {
      "delete": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Elimina (canali)",
        "operationId": "deleteChatChannelsId",
        "x-unitly-scope": "chat:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Modifica (canali)",
        "operationId": "patchChatChannelsId",
        "x-unitly-scope": "chat:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/channels/{id}/join": {
      "post": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Entra nel canale (canali)",
        "operationId": "postChatChannelsIdJoin",
        "x-unitly-scope": "chat:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/channels/{id}/leave": {
      "post": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Esci dal canale (canali)",
        "operationId": "postChatChannelsIdLeave",
        "x-unitly-scope": "chat:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/channels/{id}/members": {
      "post": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Crea (membri)",
        "operationId": "postChatChannelsIdMembers",
        "x-unitly-scope": "chat:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/channels/{id}/messages": {
      "get": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Elenco messaggi",
        "operationId": "getChatChannelsIdMessages",
        "x-unitly-scope": "chat:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Crea (messaggi)",
        "operationId": "postChatChannelsIdMessages",
        "x-unitly-scope": "chat:write",
        "x-unitly-webhook-event": "message.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/channels/{id}/messages/{messageId}": {
      "patch": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Modifica (messaggi)",
        "operationId": "patchChatChannelsIdMessagesMessageId",
        "x-unitly-scope": "chat:write",
        "x-unitly-webhook-event": "message.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/conversations": {
      "get": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Elenco conversazioni",
        "operationId": "getChatConversations",
        "x-unitly-scope": "chat:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/dm": {
      "post": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Crea (messaggi diretti)",
        "operationId": "postChatDm",
        "x-unitly-scope": "chat:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "userId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/chat/groups": {
      "post": {
        "tags": [
          "Chat (solo canali degli spazi)"
        ],
        "summary": "Crea (gruppi)",
        "operationId": "postChatGroups",
        "x-unitly-scope": "chat:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "memberIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "name",
                  "memberIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/connections/{id}": {
      "delete": {
        "tags": [
          "Calendario ed eventi"
        ],
        "summary": "Elimina (collegamenti)",
        "operationId": "deleteConnectionsId",
        "x-unitly-scope": "calendar:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Calendario ed eventi"
        ],
        "summary": "Modifica (collegamenti)",
        "operationId": "patchConnectionsId",
        "x-unitly-scope": "calendar:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "selectedCalendarIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "maxItems": 50
                  }
                },
                "required": [
                  "selectedCalendarIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/connections/{id}/sync": {
      "post": {
        "tags": [
          "Calendario ed eventi"
        ],
        "summary": "Sincronizza ora (collegamenti)",
        "operationId": "postConnectionsIdSync",
        "x-unitly-scope": "calendar:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/connectors": {
      "get": {
        "tags": [
          "Calendario ed eventi"
        ],
        "summary": "Elenco connettori",
        "operationId": "getConnectors",
        "x-unitly-scope": "calendar:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/connectors/social": {
      "get": {
        "tags": [
          "Calendario ed eventi"
        ],
        "summary": "Elenco social",
        "operationId": "getConnectorsSocial",
        "x-unitly-scope": "calendar:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/content-labels": {
      "get": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elenco etichette",
        "operationId": "getContentlabels",
        "x-unitly-scope": "social:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Crea (etichette)",
        "operationId": "postContentlabels",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  }
                },
                "required": [
                  "name",
                  "color"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/content-labels/{id}": {
      "delete": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elimina (etichette)",
        "operationId": "deleteContentlabelsId",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Modifica (etichette)",
        "operationId": "patchContentlabelsId",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  }
                },
                "required": [
                  "name",
                  "color"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/editorial/items": {
      "get": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Elenco elementi",
        "operationId": "getEditorialItems",
        "x-unitly-scope": "editorial:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workspaceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "seriesId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeUnscheduled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Crea (elementi)",
        "operationId": "postEditorialItems",
        "x-unitly-scope": "editorial:write",
        "x-unitly-webhook-event": "content.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "plannedDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "plannedTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "seriesId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "format": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stateId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "caption": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "brief": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "designUrl": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2000,
                            "pattern": "^https:\\/\\/\\S+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "assetUrl": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2000,
                            "pattern": "^https:\\/\\/\\S+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "channelIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20
                  },
                  "members": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "copywriter",
                            "designer",
                            "video_editor",
                            "talent",
                            "reviewer"
                          ]
                        }
                      },
                      "required": [
                        "userId",
                        "role"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 30
                  },
                  "customFields": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "workspaceId",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/editorial/items/{id}": {
      "delete": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Elimina (elementi)",
        "operationId": "deleteEditorialItemsId",
        "x-unitly-scope": "editorial:write",
        "x-unitly-webhook-event": "content.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "get": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Dettaglio (elementi)",
        "operationId": "getEditorialItemsId",
        "x-unitly-scope": "editorial:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Modifica (elementi)",
        "operationId": "patchEditorialItemsId",
        "x-unitly-scope": "editorial:write",
        "x-unitly-webhook-event": "content.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "plannedDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "plannedTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "seriesId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "format": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stateId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "caption": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "brief": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "designUrl": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2000,
                            "pattern": "^https:\\/\\/\\S+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "assetUrl": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2000,
                            "pattern": "^https:\\/\\/\\S+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "const": ""
                      }
                    ]
                  },
                  "channelIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20
                  },
                  "members": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "copywriter",
                            "designer",
                            "video_editor",
                            "talent",
                            "reviewer"
                          ]
                        }
                      },
                      "required": [
                        "userId",
                        "role"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 30
                  },
                  "customFields": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/editorial/items/{id}/approve": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Approva (elementi)",
        "operationId": "postEditorialItemsIdApprove",
        "x-unitly-scope": "editorial:write",
        "x-unitly-webhook-event": "content.approved",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/editorial/items/{id}/channels/{channelId}": {
      "patch": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Modifica (canali)",
        "operationId": "patchEditorialItemsIdChannelsChannelId",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "publishedUrl": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2000,
                            "pattern": "^https:\\/\\/\\S+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "const": ""
                      }
                    ]
                  }
                },
                "required": [
                  "publishedUrl"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/editorial/items/{id}/channels/{channelId}/tiktok": {
      "get": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Elenco tiktok",
        "operationId": "getEditorialItemsIdChannelsChannelIdTiktok",
        "x-unitly-scope": "editorial:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Crea (tiktok)",
        "operationId": "postEditorialItemsIdChannelsChannelIdTiktok",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "privacy",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            }
          },
          {
            "name": "allowComment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            }
          },
          {
            "name": "allowDuet",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            }
          },
          {
            "name": "allowStitch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            }
          },
          {
            "name": "brandOrganic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            }
          },
          {
            "name": "brandedContent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/editorial/items/{id}/channels/{channelId}/youtube": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Crea (youtube)",
        "operationId": "postEditorialItemsIdChannelsChannelIdYoutube",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "privacy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "public",
                "unlisted",
                "private"
              ],
              "default": "public"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/editorial/items/{id}/comments": {
      "get": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Elenco commenti",
        "operationId": "getEditorialItemsIdComments",
        "x-unitly-scope": "editorial:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Crea (commenti)",
        "operationId": "postEditorialItemsIdComments",
        "x-unitly-scope": "editorial:write",
        "x-unitly-webhook-event": "content.comment_created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/editorial/items/{id}/request-changes": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Chiedi modifiche (elementi)",
        "operationId": "postEditorialItemsIdRequestchanges",
        "x-unitly-scope": "editorial:write",
        "x-unitly-webhook-event": "content.changes_requested",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "comment": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  }
                },
                "required": [
                  "comment"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/editorial/items/{id}/submit": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Invia in revisione (elementi)",
        "operationId": "postEditorialItemsIdSubmit",
        "x-unitly-scope": "editorial:write",
        "x-unitly-webhook-event": "content.submitted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/home": {
      "get": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Elenco home",
        "operationId": "getHome",
        "x-unitly-scope": "general:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/invitations": {
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elenco inviti",
        "operationId": "getInvitations",
        "x-unitly-scope": "workspaces:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Crea (inviti)",
        "operationId": "postInvitations",
        "x-unitly-scope": "workspaces:write",
        "x-unitly-webhook-event": "member.invited",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "manager",
                      "member",
                      "junior",
                      "guest"
                    ]
                  },
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "email",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/invitations/{id}": {
      "delete": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elimina (inviti)",
        "operationId": "deleteInvitationsId",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/me/nickname": {
      "patch": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Aggiorna soprannome",
        "operationId": "patchMeNickname",
        "x-unitly-scope": "general:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nickname": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[a-z0-9_.]{2,30}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "nickname"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/me/preferences/{key}": {
      "get": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Dettaglio (preferenze)",
        "operationId": "getMePreferencesKey",
        "x-unitly-scope": "general:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Modifica (preferenze)",
        "operationId": "patchMePreferencesKey",
        "x-unitly-scope": "general:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {}
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/me/profile": {
      "get": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Elenco profilo",
        "operationId": "getMeProfile",
        "x-unitly-scope": "general:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/members": {
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elenco membri",
        "operationId": "getMembers",
        "x-unitly-scope": "workspaces:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/members/{userId}": {
      "delete": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elimina (membri)",
        "operationId": "deleteMembersUserId",
        "x-unitly-scope": "workspaces:write",
        "x-unitly-webhook-event": "member.removed",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Modifica (membri)",
        "operationId": "patchMembersUserId",
        "x-unitly-scope": "workspaces:write",
        "x-unitly-webhook-event": "member.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "manager",
                      "member",
                      "junior",
                      "guest"
                    ]
                  }
                },
                "required": [
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/members/{userId}/workspaces": {
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elenco spazi",
        "operationId": "getMembersUserIdWorkspaces",
        "x-unitly-scope": "workspaces:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/notifications": {
      "get": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Elenco notifiche",
        "operationId": "getNotifications",
        "x-unitly-scope": "general:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/notifications/read": {
      "post": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Segna come lette (notifiche)",
        "operationId": "postNotificationsRead",
        "x-unitly-scope": "general:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 200
                  },
                  "all": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/pages": {
      "get": {
        "tags": [
          "Documenti"
        ],
        "summary": "Elenco documenti",
        "operationId": "getPages",
        "x-unitly-scope": "pages:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Documenti"
        ],
        "summary": "Crea (documenti)",
        "operationId": "postPages",
        "x-unitly-scope": "pages:write",
        "x-unitly-webhook-event": "page.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "parentPageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 300,
                    "default": ""
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 8
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "fromTemplateId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "workspaceId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/pages/{id}": {
      "delete": {
        "tags": [
          "Documenti"
        ],
        "summary": "Elimina (documenti)",
        "operationId": "deletePagesId",
        "x-unitly-scope": "pages:write",
        "x-unitly-webhook-event": "page.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "get": {
        "tags": [
          "Documenti"
        ],
        "summary": "Dettaglio (documenti)",
        "operationId": "getPagesId",
        "x-unitly-scope": "pages:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Documenti"
        ],
        "summary": "Modifica (documenti)",
        "operationId": "patchPagesId",
        "x-unitly-scope": "pages:write",
        "x-unitly-webhook-event": "page.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "icon": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 8
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "content": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "doc"
                      },
                      "content": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "paragraph",
                                "heading1",
                                "heading2",
                                "bulleted_item",
                                "checklist_item",
                                "quote"
                              ]
                            },
                            "text": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "checked": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "text"
                          ],
                          "additionalProperties": false
                        },
                        "maxItems": 2000
                      }
                    },
                    "required": [
                      "type",
                      "content"
                    ],
                    "additionalProperties": false
                  },
                  "isTemplate": {
                    "type": "boolean"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "workspace",
                      "private"
                    ]
                  },
                  "parentPageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/pages/{id}/restore": {
      "post": {
        "tags": [
          "Documenti"
        ],
        "summary": "Ripristina versione (documenti)",
        "operationId": "postPagesIdRestore",
        "x-unitly-scope": "pages:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "versionId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "versionId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/pages/{id}/versions": {
      "get": {
        "tags": [
          "Documenti"
        ],
        "summary": "Elenco versioni",
        "operationId": "getPagesIdVersions",
        "x-unitly-scope": "pages:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/pages/templates": {
      "get": {
        "tags": [
          "Documenti"
        ],
        "summary": "Elenco modelli",
        "operationId": "getPagesTemplates",
        "x-unitly-scope": "pages:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/people/search": {
      "get": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Elenco ricerca",
        "operationId": "getPeopleSearch",
        "x-unitly-scope": "general:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/search": {
      "get": {
        "tags": [
          "Home, notifiche e ricerca"
        ],
        "summary": "Elenco ricerca",
        "operationId": "getSearch",
        "x-unitly-scope": "general:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/social-accounts": {
      "get": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elenco account social",
        "operationId": "getSocialaccounts",
        "x-unitly-scope": "social:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/social-accounts/assignment": {
      "put": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Aggiorna assignment",
        "operationId": "putSocialaccountsAssignment",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connectionId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "facebook",
                      "instagram",
                      "threads",
                      "youtube",
                      "tiktok"
                    ]
                  },
                  "pageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "workspaceId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "connectionId",
                  "platform",
                  "pageId",
                  "workspaceId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/social-connections/{id}": {
      "delete": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elimina (social-connections)",
        "operationId": "deleteSocialconnectionsId",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Modifica (social-connections)",
        "operationId": "patchSocialconnectionsId",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "selectedPageIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "maxItems": 50
                  }
                },
                "required": [
                  "selectedPageIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/social-content": {
      "get": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elenco contenuti social",
        "operationId": "getSocialcontent",
        "x-unitly-scope": "social:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/social-content/{connectionId}/{externalId}/labels": {
      "patch": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Aggiorna labels",
        "operationId": "patchSocialcontentConnectionIdExternalIdLabels",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "externalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "labelIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20
                  }
                },
                "required": [
                  "workspaceId",
                  "labelIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/social-insights": {
      "get": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elenco statistiche social",
        "operationId": "getSocialinsights",
        "x-unitly-scope": "social:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/social-marketing": {
      "get": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elenco campagne",
        "operationId": "getSocialmarketing",
        "x-unitly-scope": "social:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/social-marketing/campaigns": {
      "get": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elenco campagne",
        "operationId": "getSocialmarketingCampaigns",
        "x-unitly-scope": "social:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/social-marketing/campaigns/{campaignId}": {
      "patch": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Modifica (campagne)",
        "operationId": "patchSocialmarketingCampaignsCampaignId",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "adAccountId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "PAUSED"
                    ]
                  }
                },
                "required": [
                  "workspaceId",
                  "adAccountId",
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/states": {
      "get": {
        "tags": [
          "Task"
        ],
        "summary": "Elenco stati dei task",
        "operationId": "getStates",
        "x-unitly-scope": "tasks:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/tasks": {
      "get": {
        "tags": [
          "Task"
        ],
        "summary": "Elenco task",
        "operationId": "getTasks",
        "x-unitly-scope": "tasks:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "mine",
                "all"
              ],
              "default": "mine"
            }
          },
          {
            "name": "workspaceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "done",
                "all"
              ],
              "default": "open"
            }
          },
          {
            "name": "due",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "today",
                "overdue",
                "upcoming",
                "none"
              ],
              "default": "any"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Task"
        ],
        "summary": "Crea (task)",
        "operationId": "postTasks",
        "x-unitly-scope": "tasks:write",
        "x-unitly-webhook-event": "task.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4,
                    "default": 0
                  },
                  "dueDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dueTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "assigneeIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20,
                    "default": []
                  },
                  "stateId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "workspaceId",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/tasks/{id}": {
      "delete": {
        "tags": [
          "Task"
        ],
        "summary": "Elimina (task)",
        "operationId": "deleteTasksId",
        "x-unitly-scope": "tasks:write",
        "x-unitly-webhook-event": "task.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "get": {
        "tags": [
          "Task"
        ],
        "summary": "Dettaglio (task)",
        "operationId": "getTasksId",
        "x-unitly-scope": "tasks:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Task"
        ],
        "summary": "Modifica (task)",
        "operationId": "patchTasksId",
        "x-unitly-scope": "tasks:write",
        "x-unitly-webhook-event": "task.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4
                  },
                  "dueDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dueTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "assigneeIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20
                  },
                  "stateId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/tasks/{id}/comments": {
      "get": {
        "tags": [
          "Task"
        ],
        "summary": "Elenco commenti",
        "operationId": "getTasksIdComments",
        "x-unitly-scope": "tasks:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Task"
        ],
        "summary": "Crea (commenti)",
        "operationId": "postTasksIdComments",
        "x-unitly-scope": "tasks:write",
        "x-unitly-webhook-event": "task.comment_created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/tasks/{id}/comments/{commentId}": {
      "delete": {
        "tags": [
          "Task"
        ],
        "summary": "Elimina (commenti)",
        "operationId": "deleteTasksIdCommentsCommentId",
        "x-unitly-scope": "tasks:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Task"
        ],
        "summary": "Modifica (commenti)",
        "operationId": "patchTasksIdCommentsCommentId",
        "x-unitly-scope": "tasks:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/tasks/{id}/complete": {
      "post": {
        "tags": [
          "Task"
        ],
        "summary": "Completa (task)",
        "operationId": "postTasksIdComplete",
        "x-unitly-scope": "tasks:write",
        "x-unitly-webhook-event": "task.completed",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/tasks/{id}/reopen": {
      "post": {
        "tags": [
          "Task"
        ],
        "summary": "Riapri (task)",
        "operationId": "postTasksIdReopen",
        "x-unitly-scope": "tasks:write",
        "x-unitly-webhook-event": "task.reopened",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspace-channels": {
      "get": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elenco canali social dello spazio",
        "operationId": "getWorkspacechannels",
        "x-unitly-scope": "social:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspace-channels/{platform}": {
      "delete": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Elimina (canali social dello spazio)",
        "operationId": "deleteWorkspacechannelsPlatform",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "put": {
        "tags": [
          "Social: account, statistiche, campagne"
        ],
        "summary": "Modifica (canali social dello spazio)",
        "operationId": "putWorkspacechannelsPlatform",
        "x-unitly-scope": "social:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connectionId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "pageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "connectionId",
                  "pageId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces": {
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elenco spazi",
        "operationId": "getWorkspaces",
        "x-unitly-scope": "workspaces:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Crea (spazi)",
        "operationId": "postWorkspaces",
        "x-unitly-scope": "workspaces:write",
        "x-unitly-webhook-event": "workspace.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "key": {
                    "type": "string",
                    "pattern": "^[A-Z][A-Z0-9]{1,9}$"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "general",
                      "media",
                      "department",
                      "client"
                    ],
                    "default": "general"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "indigo",
                      "blue",
                      "teal",
                      "green",
                      "lime",
                      "amber",
                      "orange",
                      "red",
                      "pink",
                      "purple"
                    ],
                    "default": "indigo"
                  }
                },
                "required": [
                  "name",
                  "key"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{id}": {
      "delete": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elimina (spazi)",
        "operationId": "deleteWorkspacesId",
        "x-unitly-scope": "workspaces:write",
        "x-unitly-webhook-event": "workspace.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Dettaglio (spazi)",
        "operationId": "getWorkspacesId",
        "x-unitly-scope": "workspaces:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Modifica (spazi)",
        "operationId": "patchWorkspacesId",
        "x-unitly-scope": "workspaces:write",
        "x-unitly-webhook-event": "workspace.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "general",
                      "media",
                      "department",
                      "client"
                    ],
                    "default": "general"
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "indigo",
                      "blue",
                      "teal",
                      "green",
                      "lime",
                      "amber",
                      "orange",
                      "red",
                      "pink",
                      "purple"
                    ],
                    "default": "indigo"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{id}/logo": {
      "delete": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elimina logo",
        "operationId": "deleteWorkspacesIdLogo",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Logo (spazi)",
        "operationId": "postWorkspacesIdLogo",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{id}/members": {
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Crea (membri)",
        "operationId": "postWorkspacesIdMembers",
        "x-unitly-scope": "workspaces:write",
        "x-unitly-webhook-event": "workspace.member_added",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "userId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{id}/members/{userId}": {
      "delete": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elimina (membri)",
        "operationId": "deleteWorkspacesIdMembersUserId",
        "x-unitly-scope": "workspaces:write",
        "x-unitly-webhook-event": "workspace.member_removed",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Modifica (membri)",
        "operationId": "patchWorkspacesIdMembersUserId",
        "x-unitly-scope": "workspaces:write",
        "x-unitly-webhook-event": "workspace.member_updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "position": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 60
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "hiddenModules": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "ped",
                        "crm",
                        "finance",
                        "hr",
                        "tickets",
                        "documents",
                        "people",
                        "insights",
                        "content",
                        "marketing"
                      ]
                    }
                  }
                },
                "required": [
                  "position",
                  "hiddenModules"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{id}/module-visibility": {
      "patch": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Aggiorna module-visibility",
        "operationId": "patchWorkspacesIdModulevisibility",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "module": {
                    "type": "string",
                    "enum": [
                      "ped",
                      "crm",
                      "finance",
                      "hr",
                      "tickets",
                      "documents",
                      "people",
                      "insights",
                      "content",
                      "marketing"
                    ]
                  },
                  "hidden": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "module",
                  "hidden"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{id}/transfer": {
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Trasferisci (spazi)",
        "operationId": "postWorkspacesIdTransfer",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "userId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Elenco CRM",
        "operationId": "getWorkspacesWsIdCrm",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/activities": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Elenco attività",
        "operationId": "getWorkspacesWsIdCrmActivities",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Crea (attività)",
        "operationId": "postWorkspacesWsIdCrmActivities",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "activity.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "note",
                      "call",
                      "meeting",
                      "email"
                    ]
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "companyId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "dealId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "kind",
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/chart": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Elenco grafico",
        "operationId": "getWorkspacesWsIdCrmChart",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/companies": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Elenco aziende",
        "operationId": "getWorkspacesWsIdCrmCompanies",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Crea (aziende)",
        "operationId": "postWorkspacesWsIdCrmCompanies",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "company.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "domain": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "industry": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "notes": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "linkedinUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "sector": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "marketing",
                          "saas",
                          "ecommerce",
                          "other"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "sheetData": {
                    "type": "object",
                    "additionalProperties": {},
                    "default": {}
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/companies/{id}": {
      "delete": {
        "tags": [
          "CRM"
        ],
        "summary": "Elimina (aziende)",
        "operationId": "deleteWorkspacesWsIdCrmCompaniesId",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "company.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Dettaglio (aziende)",
        "operationId": "getWorkspacesWsIdCrmCompaniesId",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "CRM"
        ],
        "summary": "Modifica (aziende)",
        "operationId": "patchWorkspacesWsIdCrmCompaniesId",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "company.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "domain": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "industry": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "notes": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "linkedinUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "sector": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "marketing",
                          "saas",
                          "ecommerce",
                          "other"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "sheetData": {
                    "type": "object",
                    "additionalProperties": {},
                    "default": {}
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/contacts": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Elenco contatti",
        "operationId": "getWorkspacesWsIdCrmContacts",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Crea (contatti)",
        "operationId": "postWorkspacesWsIdCrmContacts",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "contact.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 100,
                    "default": ""
                  },
                  "email": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "const": ""
                      }
                    ],
                    "default": null
                  },
                  "phone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "roleTitle": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "notes": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "linkedinUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "firstName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/contacts/{id}": {
      "delete": {
        "tags": [
          "CRM"
        ],
        "summary": "Elimina (contatti)",
        "operationId": "deleteWorkspacesWsIdCrmContactsId",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "contact.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Dettaglio (contatti)",
        "operationId": "getWorkspacesWsIdCrmContactsId",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "CRM"
        ],
        "summary": "Modifica (contatti)",
        "operationId": "patchWorkspacesWsIdCrmContactsId",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "contact.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "lastName": {
                    "type": "string",
                    "maxLength": 100,
                    "default": ""
                  },
                  "email": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "const": ""
                      }
                    ],
                    "default": null
                  },
                  "phone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "roleTitle": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "notes": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "linkedinUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/contacts/{id}/thread": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Elenco conversazione",
        "operationId": "getWorkspacesWsIdCrmContactsIdThread",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/deals": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Elenco trattative",
        "operationId": "getWorkspacesWsIdCrmDeals",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Crea (trattative)",
        "operationId": "postWorkspacesWsIdCrmDeals",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "deal.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "companyId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "valueCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000000
                  },
                  "stateId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "probability": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "expectedCloseDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ownerUserId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lostReason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/deals/{id}": {
      "delete": {
        "tags": [
          "CRM"
        ],
        "summary": "Elimina (trattative)",
        "operationId": "deleteWorkspacesWsIdCrmDealsId",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "deal.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Dettaglio (trattative)",
        "operationId": "getWorkspacesWsIdCrmDealsId",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "CRM"
        ],
        "summary": "Modifica (trattative)",
        "operationId": "patchWorkspacesWsIdCrmDealsId",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "deal.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "companyId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contactId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "valueCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000000
                  },
                  "stateId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "probability": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "expectedCloseDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ownerUserId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lostReason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/deals/{id}/move": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Sposta di fase (trattative)",
        "operationId": "postWorkspacesWsIdCrmDealsIdMove",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "deal.moved",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stateId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "beforeId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "afterId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "stateId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/emails": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Elenco email",
        "operationId": "getWorkspacesWsIdCrmEmails",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Crea (email)",
        "operationId": "postWorkspacesWsIdCrmEmails",
        "x-unitly-scope": "crm:write",
        "x-unitly-webhook-event": "email.sent",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contactId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "dealId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20000
                  },
                  "threadId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "inReplyTo": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "contactId",
                  "subject",
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/enable": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Attiva il modulo (CRM)",
        "operationId": "postWorkspacesWsIdCrmEnable",
        "x-unitly-scope": "crm:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/gmail": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Elenco Gmail",
        "operationId": "getWorkspacesWsIdCrmGmail",
        "x-unitly-scope": "crm:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/stages": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Crea (fasi)",
        "operationId": "postWorkspacesWsIdCrmStages",
        "x-unitly-scope": "crm:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "backlog",
                      "in_progress",
                      "done",
                      "canceled"
                    ]
                  }
                },
                "required": [
                  "name",
                  "category"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/stages/{id}": {
      "delete": {
        "tags": [
          "CRM"
        ],
        "summary": "Elimina (fasi)",
        "operationId": "deleteWorkspacesWsIdCrmStagesId",
        "x-unitly-scope": "crm:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "CRM"
        ],
        "summary": "Modifica (fasi)",
        "operationId": "patchWorkspacesWsIdCrmStagesId",
        "x-unitly-scope": "crm:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "backlog",
                      "in_progress",
                      "done",
                      "canceled"
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/crm/stages/reorder": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Riordina (fasi)",
        "operationId": "postWorkspacesWsIdCrmStagesReorder",
        "x-unitly-scope": "crm:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "ids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial": {
      "get": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Elenco calendario editoriale",
        "operationId": "getWorkspacesWsIdEditorial",
        "x-unitly-scope": "editorial:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Aggiorna calendario editoriale",
        "operationId": "patchWorkspacesWsIdEditorial",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "formats": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "maxItems": 40
                  },
                  "deadlineRule": {
                    "type": "string",
                    "enum": [
                      "monday_before_last_week",
                      "last_day_prev_month",
                      "none"
                    ]
                  },
                  "cardFields": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "series",
                        "format",
                        "channels",
                        "owner",
                        "state"
                      ]
                    },
                    "maxItems": 5
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/channels": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Crea (canali)",
        "operationId": "postWorkspacesWsIdEditorialChannels",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "platform": {
                    "type": "string",
                    "enum": [
                      "instagram",
                      "tiktok",
                      "youtube",
                      "facebook",
                      "threads",
                      "linkedin",
                      "x",
                      "website",
                      "newsletter",
                      "podcast",
                      "other"
                    ]
                  },
                  "handle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "platform",
                  "handle"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/channels/{id}": {
      "delete": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Elimina (canali)",
        "operationId": "deleteWorkspacesWsIdEditorialChannelsId",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Modifica (canali)",
        "operationId": "patchWorkspacesWsIdEditorialChannelsId",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "platform": {
                    "type": "string",
                    "enum": [
                      "instagram",
                      "tiktok",
                      "youtube",
                      "facebook",
                      "threads",
                      "linkedin",
                      "x",
                      "website",
                      "newsletter",
                      "podcast",
                      "other"
                    ]
                  },
                  "handle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/enable": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Attiva il modulo (calendario editoriale)",
        "operationId": "postWorkspacesWsIdEditorialEnable",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/fields": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Crea (campi personalizzati)",
        "operationId": "postWorkspacesWsIdEditorialFields",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "fieldType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "date",
                      "select",
                      "multi_select",
                      "url",
                      "checkbox",
                      "user"
                    ]
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "maxItems": 50,
                    "default": []
                  }
                },
                "required": [
                  "label",
                  "fieldType"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/fields/{id}": {
      "delete": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Elimina (campi personalizzati)",
        "operationId": "deleteWorkspacesWsIdEditorialFieldsId",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Modifica (campi personalizzati)",
        "operationId": "patchWorkspacesWsIdEditorialFieldsId",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/generate": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Genera il mese (calendario editoriale)",
        "operationId": "postWorkspacesWsIdEditorialGenerate",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string",
                    "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
                  }
                },
                "required": [
                  "month"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/series": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Crea (rubriche)",
        "operationId": "postWorkspacesWsIdEditorialSeries",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "indigo",
                      "blue",
                      "teal",
                      "green",
                      "lime",
                      "amber",
                      "orange",
                      "red",
                      "pink",
                      "purple"
                    ],
                    "default": "indigo"
                  },
                  "weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    },
                    "maxItems": 7,
                    "default": []
                  },
                  "defaultTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "defaultFormat": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "defaultChannelIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20,
                    "default": []
                  },
                  "ownerUserId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/series/{id}": {
      "delete": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Elimina (rubriche)",
        "operationId": "deleteWorkspacesWsIdEditorialSeriesId",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Modifica (rubriche)",
        "operationId": "patchWorkspacesWsIdEditorialSeriesId",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "indigo",
                      "blue",
                      "teal",
                      "green",
                      "lime",
                      "amber",
                      "orange",
                      "red",
                      "pink",
                      "purple"
                    ],
                    "default": "indigo"
                  },
                  "weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    },
                    "maxItems": 7,
                    "default": []
                  },
                  "defaultTime": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "defaultFormat": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "defaultChannelIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20,
                    "default": []
                  },
                  "ownerUserId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/states": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Crea (stati dei task)",
        "operationId": "postWorkspacesWsIdEditorialStates",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "backlog",
                      "todo",
                      "in_progress",
                      "review",
                      "scheduled",
                      "done",
                      "canceled"
                    ]
                  },
                  "requiresApproval": {
                    "type": "boolean",
                    "default": false
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "indigo",
                      "blue",
                      "teal",
                      "green",
                      "lime",
                      "amber",
                      "orange",
                      "red",
                      "pink",
                      "purple"
                    ]
                  }
                },
                "required": [
                  "name",
                  "category"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/states/{id}": {
      "delete": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Elimina (stati dei task)",
        "operationId": "deleteWorkspacesWsIdEditorialStatesId",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Modifica (stati dei task)",
        "operationId": "patchWorkspacesWsIdEditorialStatesId",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "backlog",
                      "todo",
                      "in_progress",
                      "review",
                      "scheduled",
                      "done",
                      "canceled"
                    ]
                  },
                  "requiresApproval": {
                    "type": "boolean",
                    "default": false
                  },
                  "color": {
                    "type": "string",
                    "enum": [
                      "indigo",
                      "blue",
                      "teal",
                      "green",
                      "lime",
                      "amber",
                      "orange",
                      "red",
                      "pink",
                      "purple"
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/editorial/states/reorder": {
      "post": {
        "tags": [
          "Calendario editoriale"
        ],
        "summary": "Riordina (stati dei task)",
        "operationId": "postWorkspacesWsIdEditorialStatesReorder",
        "x-unitly-scope": "editorial:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "ids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/finance": {
      "get": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Elenco contabilità",
        "operationId": "getWorkspacesWsIdFinance",
        "x-unitly-scope": "finance:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/finance/accounts": {
      "post": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Crea (conti)",
        "operationId": "postWorkspacesWsIdFinanceAccounts",
        "x-unitly-scope": "finance:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "cash",
                      "bank",
                      "card",
                      "other"
                    ],
                    "default": "bank"
                  },
                  "openingBalanceCents": {
                    "type": "integer",
                    "default": 0
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/finance/accounts/{id}": {
      "delete": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Elimina (conti)",
        "operationId": "deleteWorkspacesWsIdFinanceAccountsId",
        "x-unitly-scope": "finance:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Modifica (conti)",
        "operationId": "patchWorkspacesWsIdFinanceAccountsId",
        "x-unitly-scope": "finance:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "cash",
                      "bank",
                      "card",
                      "other"
                    ],
                    "default": "bank"
                  },
                  "openingBalanceCents": {
                    "type": "integer",
                    "default": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/finance/categories": {
      "post": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Crea (categorie)",
        "operationId": "postWorkspacesWsIdFinanceCategories",
        "x-unitly-scope": "finance:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "income",
                      "expense"
                    ]
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 20
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "name",
                  "kind"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/finance/categories/{id}": {
      "delete": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Elimina (categorie)",
        "operationId": "deleteWorkspacesWsIdFinanceCategoriesId",
        "x-unitly-scope": "finance:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Modifica (categorie)",
        "operationId": "patchWorkspacesWsIdFinanceCategoriesId",
        "x-unitly-scope": "finance:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "income",
                      "expense"
                    ]
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 20
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/finance/chart": {
      "get": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Elenco grafico",
        "operationId": "getWorkspacesWsIdFinanceChart",
        "x-unitly-scope": "finance:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/finance/enable": {
      "post": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Attiva il modulo (contabilità)",
        "operationId": "postWorkspacesWsIdFinanceEnable",
        "x-unitly-scope": "finance:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/finance/transactions": {
      "get": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Elenco movimenti",
        "operationId": "getWorkspacesWsIdFinanceTransactions",
        "x-unitly-scope": "finance:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Crea (movimenti)",
        "operationId": "postWorkspacesWsIdFinanceTransactions",
        "x-unitly-scope": "finance:write",
        "x-unitly-webhook-event": "transaction.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accountId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "categoryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "income",
                      "expense"
                    ]
                  },
                  "amountCents": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "occurredOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 300,
                    "default": ""
                  }
                },
                "required": [
                  "accountId",
                  "kind",
                  "amountCents"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/finance/transactions/{id}": {
      "delete": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Elimina (movimenti)",
        "operationId": "deleteWorkspacesWsIdFinanceTransactionsId",
        "x-unitly-scope": "finance:write",
        "x-unitly-webhook-event": "transaction.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Contabilità"
        ],
        "summary": "Modifica (movimenti)",
        "operationId": "patchWorkspacesWsIdFinanceTransactionsId",
        "x-unitly-scope": "finance:write",
        "x-unitly-webhook-event": "transaction.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accountId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "categoryId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "income",
                      "expense"
                    ]
                  },
                  "amountCents": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "occurredOn": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 300,
                    "default": ""
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/hr": {
      "get": {
        "tags": [
          "Persone (ferie e permessi)"
        ],
        "summary": "Elenco persone",
        "operationId": "getWorkspacesWsIdHr",
        "x-unitly-scope": "hr:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/hr/employees": {
      "get": {
        "tags": [
          "Persone (ferie e permessi)"
        ],
        "summary": "Elenco dipendenti",
        "operationId": "getWorkspacesWsIdHrEmployees",
        "x-unitly-scope": "hr:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/hr/employees/{userId}": {
      "patch": {
        "tags": [
          "Persone (ferie e permessi)"
        ],
        "summary": "Modifica (dipendenti)",
        "operationId": "patchWorkspacesWsIdHrEmployeesUserId",
        "x-unitly-scope": "hr:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jobTitle": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "employmentType": {
                    "type": "string",
                    "enum": [
                      "full_time",
                      "part_time",
                      "contractor"
                    ],
                    "default": "full_time"
                  },
                  "startDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "leaveBalanceDays": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 365,
                    "default": 20
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/hr/enable": {
      "post": {
        "tags": [
          "Persone (ferie e permessi)"
        ],
        "summary": "Attiva il modulo (persone)",
        "operationId": "postWorkspacesWsIdHrEnable",
        "x-unitly-scope": "hr:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/hr/leave-requests": {
      "get": {
        "tags": [
          "Persone (ferie e permessi)"
        ],
        "summary": "Elenco richieste di ferie",
        "operationId": "getWorkspacesWsIdHrLeaverequests",
        "x-unitly-scope": "hr:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Persone (ferie e permessi)"
        ],
        "summary": "Crea (richieste di ferie)",
        "operationId": "postWorkspacesWsIdHrLeaverequests",
        "x-unitly-scope": "hr:write",
        "x-unitly-webhook-event": "leave_request.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "vacation",
                      "sick",
                      "other"
                    ]
                  },
                  "startDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "endDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "days": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 365
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "kind",
                  "startDate",
                  "endDate",
                  "days"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/hr/leave-requests/{id}": {
      "delete": {
        "tags": [
          "Persone (ferie e permessi)"
        ],
        "summary": "Elimina (richieste di ferie)",
        "operationId": "deleteWorkspacesWsIdHrLeaverequestsId",
        "x-unitly-scope": "hr:write",
        "x-unitly-webhook-event": "leave_request.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/hr/leave-requests/{id}/review": {
      "post": {
        "tags": [
          "Persone (ferie e permessi)"
        ],
        "summary": "Approva o rifiuta (richieste di ferie)",
        "operationId": "postWorkspacesWsIdHrLeaverequestsIdReview",
        "x-unitly-scope": "hr:write",
        "x-unitly-webhook-event": "leave_request.reviewed",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "approved",
                      "rejected"
                    ]
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/sections": {
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elenco sezioni",
        "operationId": "getWorkspacesWsIdSections",
        "x-unitly-scope": "workspaces:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Crea (sezioni)",
        "operationId": "postWorkspacesWsIdSections",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "icon": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8,
                    "default": "📁"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/sections/{id}": {
      "delete": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elimina (sezioni)",
        "operationId": "deleteWorkspacesWsIdSectionsId",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Modifica (sezioni)",
        "operationId": "patchWorkspacesWsIdSectionsId",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "icon": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8,
                    "default": "📁"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/sections/{id}/blocks": {
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elenco blocchi",
        "operationId": "getWorkspacesWsIdSectionsIdBlocks",
        "x-unitly-scope": "workspaces:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Crea (blocchi)",
        "operationId": "postWorkspacesWsIdSectionsIdBlocks",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "table",
                      "video"
                    ]
                  },
                  "title": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "content": {}
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/sections/{id}/blocks/{blockId}": {
      "delete": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elimina (blocchi)",
        "operationId": "deleteWorkspacesWsIdSectionsIdBlocksBlockId",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "blockId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Modifica (blocchi)",
        "operationId": "patchWorkspacesWsIdSectionsIdBlocksBlockId",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "blockId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "content": {}
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/sections/{id}/blocks/reorder": {
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Riordina (blocchi)",
        "operationId": "postWorkspacesWsIdSectionsIdBlocksReorder",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/sections/reorder": {
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Riordina (sezioni)",
        "operationId": "postWorkspacesWsIdSectionsReorder",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/tasks/chart": {
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elenco grafico",
        "operationId": "getWorkspacesWsIdTasksChart",
        "x-unitly-scope": "workspaces:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/tickets": {
      "get": {
        "tags": [
          "Ticket"
        ],
        "summary": "Elenco ticket",
        "operationId": "getWorkspacesWsIdTickets",
        "x-unitly-scope": "tickets:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/tickets/enable": {
      "post": {
        "tags": [
          "Ticket"
        ],
        "summary": "Attiva il modulo (ticket)",
        "operationId": "postWorkspacesWsIdTicketsEnable",
        "x-unitly-scope": "tickets:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/tickets/items": {
      "get": {
        "tags": [
          "Ticket"
        ],
        "summary": "Elenco elementi",
        "operationId": "getWorkspacesWsIdTicketsItems",
        "x-unitly-scope": "tickets:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Ticket"
        ],
        "summary": "Crea (elementi)",
        "operationId": "postWorkspacesWsIdTicketsItems",
        "x-unitly-scope": "tickets:write",
        "x-unitly-webhook-event": "ticket.created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 20000,
                    "default": ""
                  },
                  "priority": {
                    "anyOf": [
                      {
                        "const": 0
                      },
                      {
                        "const": 1
                      },
                      {
                        "const": 2
                      },
                      {
                        "const": 3
                      }
                    ],
                    "default": 1
                  },
                  "assigneeId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "subject"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/tickets/items/{id}": {
      "delete": {
        "tags": [
          "Ticket"
        ],
        "summary": "Elimina (elementi)",
        "operationId": "deleteWorkspacesWsIdTicketsItemsId",
        "x-unitly-scope": "tickets:write",
        "x-unitly-webhook-event": "ticket.deleted",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "get": {
        "tags": [
          "Ticket"
        ],
        "summary": "Dettaglio (elementi)",
        "operationId": "getWorkspacesWsIdTicketsItemsId",
        "x-unitly-scope": "tickets:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Ticket"
        ],
        "summary": "Modifica (elementi)",
        "operationId": "patchWorkspacesWsIdTicketsItemsId",
        "x-unitly-scope": "tickets:write",
        "x-unitly-webhook-event": "ticket.updated",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "priority": {
                    "anyOf": [
                      {
                        "const": 0
                      },
                      {
                        "const": 1
                      },
                      {
                        "const": 2
                      },
                      {
                        "const": 3
                      }
                    ]
                  },
                  "assigneeId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stateId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/tickets/items/{id}/comments": {
      "get": {
        "tags": [
          "Ticket"
        ],
        "summary": "Elenco commenti",
        "operationId": "getWorkspacesWsIdTicketsItemsIdComments",
        "x-unitly-scope": "tickets:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Ticket"
        ],
        "summary": "Crea (commenti)",
        "operationId": "postWorkspacesWsIdTicketsItemsIdComments",
        "x-unitly-scope": "tickets:write",
        "x-unitly-webhook-event": "ticket.comment_created",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/widgets": {
      "get": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elenco widget",
        "operationId": "getWorkspacesWsIdWidgets",
        "x-unitly-scope": "workspaces:read",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "post": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Crea (widget)",
        "operationId": "postWorkspacesWsIdWidgets",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "chartType": {
                    "type": "string",
                    "enum": [
                      "bar",
                      "line",
                      "donut"
                    ]
                  },
                  "metrics": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "minItems": 1,
                    "maxItems": 6
                  },
                  "groupBy": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "dateRange": {
                    "type": "string",
                    "enum": [
                      "last_3_months",
                      "last_6_months",
                      "last_12_months",
                      "this_year",
                      "all_time"
                    ],
                    "default": "last_6_months"
                  }
                },
                "required": [
                  "name",
                  "chartType",
                  "metrics",
                  "groupBy"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "201": {
            "description": "Creato: l’oggetto creato, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/workspaces/{wsId}/widgets/{id}": {
      "delete": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Elimina (widget)",
        "operationId": "deleteWorkspacesWsIdWidgetsId",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Fatto."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      },
      "patch": {
        "tags": [
          "Spazi, membri e inviti"
        ],
        "summary": "Modifica (widget)",
        "operationId": "patchWorkspacesWsIdWidgetsId",
        "x-unitly-scope": "workspaces:write",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "chartType": {
                    "type": "string",
                    "enum": [
                      "bar",
                      "line",
                      "donut"
                    ]
                  },
                  "metrics": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "minItems": 1,
                    "maxItems": 6
                  },
                  "groupBy": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "dateRange": {
                    "type": "string",
                    "enum": [
                      "last_3_months",
                      "last_6_months",
                      "last_12_months",
                      "this_year",
                      "all_time"
                    ],
                    "default": "last_6_months"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "L’oggetto (o l’elenco) risultante, in JSON."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "404": {
            "$ref": "#/components/responses/Problem"
          },
          "422": {
            "$ref": "#/components/responses/Problem"
          },
          "429": {
            "$ref": "#/components/responses/Problem"
          }
        }
      }
    }
  },
  "webhooks": {
    "workspace.created": {
      "post": {
        "summary": "Spazio creato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "workspace.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "workspace.updated": {
      "post": {
        "summary": "Spazio modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "workspace.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "workspace.deleted": {
      "post": {
        "summary": "Spazio eliminato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "workspace.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "workspace.member_added": {
      "post": {
        "summary": "Persona aggiunta a uno spazio",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "workspace.member_added"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "workspace.member_updated": {
      "post": {
        "summary": "Ruolo nello spazio modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "workspace.member_updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "workspace.member_removed": {
      "post": {
        "summary": "Persona tolta da uno spazio",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "workspace.member_removed"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "member.invited": {
      "post": {
        "summary": "Persona invitata nell’azienda",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "member.invited"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "member.updated": {
      "post": {
        "summary": "Ruolo nell’azienda modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "member.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "member.removed": {
      "post": {
        "summary": "Persona rimossa dall’azienda",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "member.removed"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "task.created": {
      "post": {
        "summary": "Task creato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "task.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "task.updated": {
      "post": {
        "summary": "Task modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "task.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "task.completed": {
      "post": {
        "summary": "Task completato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "task.completed"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "task.reopened": {
      "post": {
        "summary": "Task riaperto",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "task.reopened"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "task.deleted": {
      "post": {
        "summary": "Task eliminato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "task.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "task.comment_created": {
      "post": {
        "summary": "Commento a un task",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "task.comment_created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "content.created": {
      "post": {
        "summary": "Contenuto editoriale creato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "content.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "content.updated": {
      "post": {
        "summary": "Contenuto editoriale modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "content.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "content.submitted": {
      "post": {
        "summary": "Contenuto inviato in revisione",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "content.submitted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "content.approved": {
      "post": {
        "summary": "Contenuto approvato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "content.approved"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "content.changes_requested": {
      "post": {
        "summary": "Modifiche richieste su un contenuto",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "content.changes_requested"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "content.deleted": {
      "post": {
        "summary": "Contenuto editoriale eliminato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "content.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "content.comment_created": {
      "post": {
        "summary": "Commento a un contenuto",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "content.comment_created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "event.created": {
      "post": {
        "summary": "Evento creato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "event.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "event.updated": {
      "post": {
        "summary": "Evento modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "event.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "event.deleted": {
      "post": {
        "summary": "Evento eliminato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "event.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "deal.created": {
      "post": {
        "summary": "Trattativa creata",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "deal.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "deal.updated": {
      "post": {
        "summary": "Trattativa modificata",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "deal.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "deal.moved": {
      "post": {
        "summary": "Trattativa spostata di fase",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "deal.moved"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "deal.deleted": {
      "post": {
        "summary": "Trattativa eliminata",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "deal.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "company.created": {
      "post": {
        "summary": "Azienda CRM creata",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "company.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "company.updated": {
      "post": {
        "summary": "Azienda CRM modificata",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "company.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "company.deleted": {
      "post": {
        "summary": "Azienda CRM eliminata",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "company.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "contact.created": {
      "post": {
        "summary": "Contatto creato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "contact.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "contact.updated": {
      "post": {
        "summary": "Contatto modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "contact.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "contact.deleted": {
      "post": {
        "summary": "Contatto eliminato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "contact.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "activity.created": {
      "post": {
        "summary": "Attività CRM registrata",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "activity.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "email.sent": {
      "post": {
        "summary": "Email inviata dal CRM",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "email.sent"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "transaction.created": {
      "post": {
        "summary": "Movimento contabile creato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "transaction.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "transaction.updated": {
      "post": {
        "summary": "Movimento contabile modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "transaction.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "transaction.deleted": {
      "post": {
        "summary": "Movimento contabile eliminato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "transaction.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "leave_request.created": {
      "post": {
        "summary": "Richiesta di ferie o permesso",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "leave_request.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "leave_request.reviewed": {
      "post": {
        "summary": "Richiesta di ferie approvata o rifiutata",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "leave_request.reviewed"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "leave_request.deleted": {
      "post": {
        "summary": "Richiesta di ferie annullata",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "leave_request.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "ticket.created": {
      "post": {
        "summary": "Ticket aperto",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "ticket.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "ticket.updated": {
      "post": {
        "summary": "Ticket modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "ticket.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "ticket.deleted": {
      "post": {
        "summary": "Ticket eliminato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "ticket.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "ticket.comment_created": {
      "post": {
        "summary": "Commento a un ticket",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "ticket.comment_created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "channel.created": {
      "post": {
        "summary": "Canale chat creato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "channel.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "message.created": {
      "post": {
        "summary": "Messaggio in un canale",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "message.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "message.updated": {
      "post": {
        "summary": "Messaggio modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "message.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "page.created": {
      "post": {
        "summary": "Documento creato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "page.created"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "page.updated": {
      "post": {
        "summary": "Documento modificato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "page.updated"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    },
    "page.deleted": {
      "post": {
        "summary": "Documento eliminato",
        "parameters": [
          {
            "name": "Unitly-Event",
            "in": "header",
            "schema": {
              "const": "page.deleted"
            }
          },
          {
            "name": "Unitly-Event-Id",
            "in": "header",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Unitly-Signature",
            "in": "header",
            "description": "t=<secondi Unix>,v1=<HMAC-SHA256 esadecimale di \"<t>.<corpo>\" con il segreto del webhook>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Qualsiasi risposta 2xx entro 10 secondi conferma la consegna; altrimenti Unitly riprova (fino a 8 tentativi in circa 2 giorni)."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Chiave API: unitly_…"
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "Messaggio leggibile, in italiano."
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "description": "Codice stabile da usare nel codice, es. not_found, validation_error, insufficient_scope, invalid_api_key, rate_limited."
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Per validation_error: campo → messaggio."
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "WebhookEvent": {
        "type": "object",
        "required": [
          "id",
          "type",
          "createdAt",
          "organizationId",
          "actor",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID dell’evento: uguale in tutti i tentativi di consegna, usalo per ignorare i doppioni."
          },
          "type": {
            "type": "string",
            "enum": [
              "workspace.created",
              "workspace.updated",
              "workspace.deleted",
              "workspace.member_added",
              "workspace.member_updated",
              "workspace.member_removed",
              "member.invited",
              "member.updated",
              "member.removed",
              "task.created",
              "task.updated",
              "task.completed",
              "task.reopened",
              "task.deleted",
              "task.comment_created",
              "content.created",
              "content.updated",
              "content.submitted",
              "content.approved",
              "content.changes_requested",
              "content.deleted",
              "content.comment_created",
              "event.created",
              "event.updated",
              "event.deleted",
              "deal.created",
              "deal.updated",
              "deal.moved",
              "deal.deleted",
              "company.created",
              "company.updated",
              "company.deleted",
              "contact.created",
              "contact.updated",
              "contact.deleted",
              "activity.created",
              "email.sent",
              "transaction.created",
              "transaction.updated",
              "transaction.deleted",
              "leave_request.created",
              "leave_request.reviewed",
              "leave_request.deleted",
              "ticket.created",
              "ticket.updated",
              "ticket.deleted",
              "ticket.comment_created",
              "channel.created",
              "message.created",
              "message.updated",
              "page.created",
              "page.updated",
              "page.deleted",
              "ping"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "actor": {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "user",
                  "api_key"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "userId": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "data": {
            "type": "object",
            "description": "L’oggetto come lo restituisce l’API per quell’azione (per le eliminazioni: solo l’id)."
          }
        }
      }
    },
    "responses": {
      "Problem": {
        "description": "Errore (RFC 9457).",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    }
  }
}
