{
  "openapi": "3.1.0",
  "info": {
    "title": "API REST autenticada da İncele",
    "version": "1.0.0",
    "description": "Gestão autenticada de contas e espaços de trabalho. Todas as operações exigem uma chave API da conta com permissões delimitadas. As permissões do espaço de trabalho são verificadas em cada pedido.",
    "contact": {
      "name": "İncele support",
      "email": "info@incele.ai"
    }
  },
  "externalDocs": {
    "url": "https://docs.incele.ai/developers/"
  },
  "servers": [
    {
      "url": "https://api.incele.ai"
    }
  ],
  "components": {
    "schemas": {
      "Product": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "information": {
            "type": "string"
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fileName": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "size": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "kind": {
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "usageCount": {
                  "default": 0,
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "url": {
                  "default": "",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "fileName",
                "mimeType",
                "size",
                "kind",
                "key",
                "createdAt",
                "usageCount",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "externalImageUrls": {
            "description": "External catalog image URLs, separate from uploaded owner-media IDs.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ],
              "additionalProperties": false
            }
          },
          "sourceProvider": {
            "type": "string"
          },
          "sourceProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "channelPresence": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "connectionId": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "linked": {
                  "type": "boolean"
                },
                "listingIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "LINKED",
                    "UNLINKED",
                    "NOT_CHECKED",
                    "ERROR",
                    "REVIEW"
                  ]
                },
                "observedAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "nativeAbsenceVerified": {
                  "type": "boolean",
                  "const": false
                },
                "warehouseMode": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "ALL",
                        "SELECTED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warehouseNames": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "stockSyncActivatedAt": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "outboundPaused": {
                  "default": 1,
                  "type": "number"
                },
                "stockSyncAvailable": {
                  "default": false,
                  "type": "boolean"
                },
                "listings": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "sync": {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "SETUP",
                              "COUNTS",
                              "ACCESS",
                              "OFF",
                              "PAUSED",
                              "ATTENTION",
                              "QUEUED",
                              "SENDING",
                              "CONFIRMING",
                              "WAITING",
                              "UNKNOWN",
                              "CURRENT"
                            ]
                          },
                          "reason": {
                            "type": "string"
                          },
                          "target": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastError": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "jobStatus": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "nextAttemptAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "state",
                          "reason",
                          "lastError",
                          "jobStatus",
                          "updatedAt",
                          "nextAttemptAt"
                        ],
                        "additionalProperties": false
                      },
                      "stock": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "target": {
                        "default": null,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "pending": {
                        "default": 0,
                        "type": "number"
                      },
                      "saleMinor": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "listMinor": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "currency": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "stock",
                      "target",
                      "pending",
                      "saleMinor",
                      "listMinor",
                      "currency"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "connectionId",
                "provider",
                "label",
                "linked",
                "listingIds",
                "state",
                "observedAt",
                "reason",
                "nativeAbsenceVerified",
                "warehouseMode",
                "warehouseNames",
                "stockSyncActivatedAt",
                "outboundPaused",
                "stockSyncAvailable",
                "listings"
              ],
              "additionalProperties": false
            }
          },
          "commercePrices": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string"
                  },
                  "saleMinor": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "listMinor": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "currency",
                  "saleMinor",
                  "listMinor"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "sales": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "link": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "name",
                "link"
              ],
              "additionalProperties": false
            }
          },
          "sku": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          },
          "stock": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "inventoryInitialized": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE",
              "DELETED"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "brand",
          "slug",
          "description",
          "information",
          "images",
          "tags",
          "sales",
          "sku",
          "barcode",
          "stock",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ProductList": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "products": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "brand": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "information": {
                  "type": "string"
                },
                "images": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "fileName": {
                        "type": "string"
                      },
                      "mimeType": {
                        "type": "string"
                      },
                      "size": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "kind": {
                        "type": "string"
                      },
                      "key": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "usageCount": {
                        "default": 0,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "url": {
                        "default": "",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "fileName",
                      "mimeType",
                      "size",
                      "kind",
                      "key",
                      "createdAt",
                      "usageCount",
                      "url"
                    ],
                    "additionalProperties": false
                  }
                },
                "externalImageUrls": {
                  "description": "External catalog image URLs, separate from uploaded owner-media IDs.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "sourceProvider": {
                  "type": "string"
                },
                "sourceProviders": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "channelPresence": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "connectionId": {
                        "type": "string"
                      },
                      "provider": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "linked": {
                        "type": "boolean"
                      },
                      "listingIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "LINKED",
                          "UNLINKED",
                          "NOT_CHECKED",
                          "ERROR",
                          "REVIEW"
                        ]
                      },
                      "observedAt": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "reason": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "nativeAbsenceVerified": {
                        "type": "boolean",
                        "const": false
                      },
                      "warehouseMode": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "ALL",
                              "SELECTED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "warehouseNames": {
                        "default": [],
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "stockSyncActivatedAt": {
                        "default": null,
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "outboundPaused": {
                        "default": 1,
                        "type": "number"
                      },
                      "stockSyncAvailable": {
                        "default": false,
                        "type": "boolean"
                      },
                      "listings": {
                        "default": [],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "sync": {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "SETUP",
                                    "COUNTS",
                                    "ACCESS",
                                    "OFF",
                                    "PAUSED",
                                    "ATTENTION",
                                    "QUEUED",
                                    "SENDING",
                                    "CONFIRMING",
                                    "WAITING",
                                    "UNKNOWN",
                                    "CURRENT"
                                  ]
                                },
                                "reason": {
                                  "type": "string"
                                },
                                "target": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastError": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "jobStatus": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "updatedAt": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "nextAttemptAt": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "state",
                                "reason",
                                "lastError",
                                "jobStatus",
                                "updatedAt",
                                "nextAttemptAt"
                              ],
                              "additionalProperties": false
                            },
                            "stock": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "target": {
                              "default": null,
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "pending": {
                              "default": 0,
                              "type": "number"
                            },
                            "saleMinor": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "listMinor": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "currency": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "stock",
                            "target",
                            "pending",
                            "saleMinor",
                            "listMinor",
                            "currency"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "connectionId",
                      "provider",
                      "label",
                      "linked",
                      "listingIds",
                      "state",
                      "observedAt",
                      "reason",
                      "nativeAbsenceVerified",
                      "warehouseMode",
                      "warehouseNames",
                      "stockSyncActivatedAt",
                      "outboundPaused",
                      "stockSyncAvailable",
                      "listings"
                    ],
                    "additionalProperties": false
                  }
                },
                "commercePrices": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string"
                        },
                        "saleMinor": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "listMinor": {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "currency",
                        "saleMinor",
                        "listMinor"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sales": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "link": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "name",
                      "link"
                    ],
                    "additionalProperties": false
                  }
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "type": "string"
                },
                "stock": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "inventoryInitialized": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "INACTIVE",
                    "DELETED"
                  ]
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "brand",
                "slug",
                "description",
                "information",
                "images",
                "tags",
                "sales",
                "sku",
                "barcode",
                "stock",
                "status",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "provider",
                "label",
                "status"
              ],
              "additionalProperties": false
            }
          },
          "channelsTruncated": {
            "type": "boolean"
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "hasNextPage": {
                "type": "boolean"
              },
              "hasPreviousPage": {
                "type": "boolean"
              }
            },
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNextPage",
              "hasPreviousPage"
            ],
            "additionalProperties": false
          },
          "summary": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "active": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "inactive": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "outOfStock": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "total",
              "active",
              "inactive",
              "outOfStock"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "products",
          "pagination",
          "summary"
        ],
        "additionalProperties": false
      },
      "Collection": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "imageId": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "fileName": {
                    "type": "string"
                  },
                  "mimeType": {
                    "type": "string"
                  },
                  "size": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "kind": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "usageCount": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "url": {
                    "default": "",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "fileName",
                  "mimeType",
                  "size",
                  "kind",
                  "key",
                  "createdAt",
                  "usageCount",
                  "url"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "workspaceId": {
            "type": "string"
          },
          "productIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ],
              "additionalProperties": false
            }
          },
          "products": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "brand": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "sku": {
                  "type": "string"
                },
                "stock": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "INACTIVE",
                    "DELETED"
                  ]
                },
                "images": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "fileName": {
                        "type": "string"
                      },
                      "mimeType": {
                        "type": "string"
                      },
                      "size": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "kind": {
                        "type": "string"
                      },
                      "key": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "usageCount": {
                        "default": 0,
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "url": {
                        "default": "",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "fileName",
                      "mimeType",
                      "size",
                      "kind",
                      "key",
                      "createdAt",
                      "usageCount",
                      "url"
                    ],
                    "additionalProperties": false
                  }
                },
                "externalImageUrls": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "brand",
                "slug",
                "sku",
                "stock",
                "status",
                "images",
                "tags",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "description",
          "imageId",
          "image",
          "workspaceId",
          "productIds",
          "tags",
          "products",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "CollectionList": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "collections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "imageId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "image": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "fileName": {
                          "type": "string"
                        },
                        "mimeType": {
                          "type": "string"
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "kind": {
                          "type": "string"
                        },
                        "key": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "usageCount": {
                          "default": 0,
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "url": {
                          "default": "",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "fileName",
                        "mimeType",
                        "size",
                        "kind",
                        "key",
                        "createdAt",
                        "usageCount",
                        "url"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "workspaceId": {
                  "type": "string"
                },
                "productIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                },
                "products": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "brand": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "sku": {
                        "type": "string"
                      },
                      "stock": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "ACTIVE",
                          "INACTIVE",
                          "DELETED"
                        ]
                      },
                      "images": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "fileName": {
                              "type": "string"
                            },
                            "mimeType": {
                              "type": "string"
                            },
                            "size": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "kind": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "createdAt": {
                              "type": "string"
                            },
                            "usageCount": {
                              "default": 0,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "url": {
                              "default": "",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "fileName",
                            "mimeType",
                            "size",
                            "kind",
                            "key",
                            "createdAt",
                            "usageCount",
                            "url"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "externalImageUrls": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "brand",
                      "slug",
                      "sku",
                      "stock",
                      "status",
                      "images",
                      "tags",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": false
                  }
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "slug",
                "description",
                "imageId",
                "image",
                "workspaceId",
                "productIds",
                "tags",
                "products",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "hasNextPage": {
                "type": "boolean"
              },
              "hasPreviousPage": {
                "type": "boolean"
              }
            },
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNextPage",
              "hasPreviousPage"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "collections",
          "pagination"
        ],
        "additionalProperties": false
      },
      "Tag": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "TagList": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ],
              "additionalProperties": false
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "hasNextPage": {
                "type": "boolean"
              },
              "hasPreviousPage": {
                "type": "boolean"
              }
            },
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNextPage",
              "hasPreviousPage"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "tags",
          "pagination"
        ],
        "additionalProperties": false
      },
      "MediaList": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "media": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "fileName": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string"
                },
                "size": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "kind": {
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "usageCount": {
                  "default": 0,
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "url": {
                  "default": "",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "fileName",
                "mimeType",
                "size",
                "kind",
                "key",
                "createdAt",
                "usageCount",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "hasNextPage": {
                "type": "boolean"
              },
              "hasPreviousPage": {
                "type": "boolean"
              }
            },
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNextPage",
              "hasPreviousPage"
            ],
            "additionalProperties": false
          },
          "summary": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "unused": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "linked": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "multiLinked": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "total",
              "unused",
              "linked",
              "multiLinked"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "media",
          "pagination",
          "summary"
        ],
        "additionalProperties": false
      },
      "Error": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "fieldErrors": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "service": {
                "type": "string",
                "enum": [
                  "account",
                  "authorization",
                  "catalog",
                  "listings",
                  "questions",
                  "orders",
                  "returns"
                ]
              },
              "provider": {
                "type": "string",
                "enum": [
                  "TRENDYOL",
                  "HEPSIBURADA",
                  "PAZARAMA",
                  "N11",
                  "CICEKSEPETI",
                  "PTTAVM",
                  "AMAZON_TR"
                ]
              },
              "nativeStatus": {
                "type": "integer",
                "minimum": 100,
                "maximum": 599
              }
            },
            "required": [
              "service"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "status",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ChatbotSettings": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "templateKey": {
            "default": "support-v1",
            "type": "string",
            "enum": [
              "support-v1",
              "support-v2",
              "support-v3",
              "support-v4",
              "ecommerce-v1",
              "ecommerce-v2",
              "ecommerce-v3",
              "ecommerce-v4",
              "cosmetics-v1",
              "cosmetics-v2",
              "cosmetics-v3",
              "cosmetics-v4"
            ]
          },
          "enabled": {
            "default": true,
            "type": "boolean"
          },
          "templateSettings": {
            "default": {},
            "type": "object",
            "propertyNames": {
              "type": "string",
              "enum": [
                "support-v1",
                "support-v2",
                "support-v3",
                "support-v4",
                "ecommerce-v1",
                "ecommerce-v2",
                "ecommerce-v3",
                "ecommerce-v4",
                "cosmetics-v1",
                "cosmetics-v2",
                "cosmetics-v3",
                "cosmetics-v4"
              ]
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "compactIntro": {
                  "type": "boolean"
                },
                "showArticles": {
                  "type": "boolean"
                },
                "showContact": {
                  "type": "boolean"
                },
                "showProductSearch": {
                  "type": "boolean"
                },
                "showRoutine": {
                  "type": "boolean"
                },
                "showManualProfile": {
                  "type": "boolean"
                },
                "showPhoto": {
                  "type": "boolean"
                },
                "density": {
                  "type": "string",
                  "enum": [
                    "comfortable",
                    "compact"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "launcherIcon": {
            "default": "sparkles",
            "type": "string",
            "enum": [
              "sparkles",
              "message-circle",
              "bot",
              "headset",
              "help-circle",
              "shopping-bag",
              "heart",
              "flower",
              "stars",
              "smile"
            ]
          },
          "launcherDisplay": {
            "default": "icon-text",
            "type": "string",
            "enum": [
              "icon",
              "text",
              "icon-text"
            ]
          },
          "launcherSize": {
            "default": "medium",
            "type": "string",
            "enum": [
              "small",
              "medium",
              "large"
            ]
          },
          "launcherHighlight": {
            "default": "orbit",
            "type": "string",
            "enum": [
              "none",
              "orbit",
              "halo",
              "pulse",
              "ripple",
              "aurora",
              "gradient",
              "sparkle",
              "beacon",
              "float",
              "outline"
            ]
          },
          "draggable": {
            "default": true,
            "type": "boolean"
          },
          "captureMode": {
            "default": "manual",
            "type": "string",
            "enum": [
              "manual",
              "automatic"
            ]
          },
          "authenticationMode": {
            "default": "DISABLED",
            "type": "string",
            "enum": [
              "DISABLED",
              "OPTIONAL",
              "REQUIRED"
            ]
          },
          "allowedOrigins": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "position": {
            "default": "bottom-right",
            "type": "string",
            "enum": [
              "bottom-right",
              "bottom-left"
            ]
          },
          "color": {
            "default": "#635bff",
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "textColor": {
            "default": "#ffffff",
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "title": {
            "default": "Help & Support",
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "launcherText": {
            "default": "Ask AI",
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "welcomeText": {
            "default": "Ask AI a question or choose an available support option.",
            "type": "string",
            "minLength": 1,
            "maxLength": 600
          },
          "placeholder": {
            "default": "Ask a support question…",
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "defaultLanguage": {
            "default": "en",
            "type": "string",
            "enum": [
              "en",
              "tr",
              "de",
              "es",
              "fr"
            ]
          },
          "messages": {
            "default": {},
            "type": "object",
            "propertyNames": {
              "type": "string",
              "enum": [
                "en",
                "tr",
                "de",
                "es",
                "fr"
              ]
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "launcherText": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "welcomeText": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 600
                },
                "placeholder": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "required": [
                "title",
                "launcherText",
                "welcomeText",
                "placeholder"
              ],
              "additionalProperties": false
            }
          },
          "productBrowsingEnabled": {
            "default": true,
            "type": "boolean"
          },
          "photoAnalysisEnabled": {
            "default": true,
            "type": "boolean"
          },
          "contactEmailNotifications": {
            "default": false,
            "type": "boolean"
          },
          "contactForms": {
            "default": [],
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "fields": {
                  "minItems": 1,
                  "maxItems": 12,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_-]{0,39}$"
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "TEXT",
                          "TEXTAREA",
                          "EMAIL",
                          "PHONE",
                          "SELECT",
                          "RADIO",
                          "CHECKBOX",
                          "BOOLEAN"
                        ]
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "options": {
                        "default": [],
                        "maxItems": 12,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        }
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "type",
                      "required",
                      "options"
                    ],
                    "additionalProperties": false
                  }
                },
                "translations": {
                  "default": {},
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "enum": [
                      "en",
                      "tr",
                      "de",
                      "es",
                      "fr"
                    ]
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "fields": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_-]{0,39}$"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "options": {
                              "maxItems": 12,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  }
                                },
                                "required": [
                                  "value",
                                  "label"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "title",
                "fields",
                "translations"
              ],
              "additionalProperties": false
            }
          },
          "activeContactFormId": {
            "default": "default",
            "anyOf": [
              {
                "type": "string",
                "const": "default"
              },
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            ]
          },
          "starterQuestions": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "translations": {
                  "default": {},
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "enum": [
                      "en",
                      "tr",
                      "de",
                      "es",
                      "fr"
                    ]
                  },
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                }
              },
              "required": [
                "id",
                "text",
                "translations"
              ],
              "additionalProperties": false
            }
          },
          "selectedStarterIds": {
            "default": [
              "about",
              "services",
              "contact",
              "getting-started"
            ],
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            }
          },
          "socialLinks": {
            "default": [],
            "maxItems": 7,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "platform": {
                  "type": "string",
                  "enum": [
                    "instagram",
                    "facebook",
                    "youtube",
                    "tiktok",
                    "linkedin",
                    "x",
                    "website"
                  ]
                },
                "url": {
                  "type": "string",
                  "maxLength": 2048,
                  "format": "uri"
                },
                "visible": {
                  "default": true,
                  "type": "boolean"
                }
              },
              "required": [
                "platform",
                "url",
                "visible"
              ],
              "additionalProperties": false
            }
          },
          "offset": {
            "default": 20,
            "type": "integer",
            "minimum": 8,
            "maximum": 100
          }
        },
        "required": [
          "templateKey",
          "enabled",
          "templateSettings",
          "launcherIcon",
          "launcherDisplay",
          "launcherSize",
          "launcherHighlight",
          "draggable",
          "captureMode",
          "authenticationMode",
          "allowedOrigins",
          "position",
          "color",
          "textColor",
          "title",
          "launcherText",
          "welcomeText",
          "placeholder",
          "defaultLanguage",
          "messages",
          "productBrowsingEnabled",
          "photoAnalysisEnabled",
          "contactEmailNotifications",
          "contactForms",
          "activeContactFormId",
          "starterQuestions",
          "selectedStarterIds",
          "socialLinks",
          "offset"
        ],
        "additionalProperties": false
      },
      "ChatbotReport": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "totals": {
            "type": "object",
            "properties": {
              "visitors": {
                "type": "number"
              },
              "opens": {
                "type": "number"
              },
              "messages": {
                "type": "number"
              },
              "conversations": {
                "type": "number"
              },
              "customers": {
                "type": "number"
              },
              "productReplies": {
                "type": "number"
              },
              "routineReplies": {
                "type": "number"
              }
            },
            "required": [
              "visitors",
              "opens",
              "messages",
              "conversations",
              "customers",
              "productReplies",
              "routineReplies"
            ],
            "additionalProperties": false
          },
          "daily": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "visitors": {
                  "type": "number"
                },
                "opens": {
                  "type": "number"
                },
                "messages": {
                  "type": "number"
                },
                "conversations": {
                  "type": "number"
                },
                "customers": {
                  "type": "number"
                },
                "productReplies": {
                  "type": "number"
                },
                "routineReplies": {
                  "type": "number"
                },
                "day": {
                  "type": "string"
                }
              },
              "required": [
                "visitors",
                "opens",
                "messages",
                "conversations",
                "customers",
                "productReplies",
                "routineReplies",
                "day"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "from",
          "to",
          "totals",
          "daily"
        ],
        "additionalProperties": false
      },
      "ProductQuestion": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "text"
        ],
        "additionalProperties": false
      },
      "ProductQuestionSet": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "questions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "text"
              ],
              "additionalProperties": false
            }
          },
          "usesDefaults": {
            "type": "boolean"
          }
        },
        "required": [
          "questions",
          "usesDefaults"
        ],
        "additionalProperties": false
      },
      "QuestionLibrary": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "questions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "questions"
        ],
        "additionalProperties": false
      },
      "AiSettings": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "chatIdleTimeoutSeconds": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "level": {
            "type": "string",
            "enum": [
              "SMART",
              "SMARTER",
              "SMARTEST"
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "pricing": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "enum": [
                "SMART",
                "SMARTER",
                "SMARTEST"
              ]
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "multiplier": {
                  "type": "number"
                },
                "product": {
                  "type": "number"
                },
                "general": {
                  "type": "number"
                },
                "routine": {
                  "type": "number"
                },
                "photo": {
                  "type": "number"
                }
              },
              "required": [
                "multiplier",
                "product",
                "general",
                "routine",
                "photo"
              ],
              "additionalProperties": false
            },
            "required": [
              "SMART",
              "SMARTER",
              "SMARTEST"
            ]
          },
          "sector": {
            "type": "string",
            "enum": [
              "AUTO",
              "GENERAL",
              "BEAUTY",
              "TEXTILE"
            ]
          }
        },
        "required": [
          "chatIdleTimeoutSeconds",
          "level",
          "revision",
          "pricing",
          "sector"
        ],
        "additionalProperties": false
      },
      "FeedbackList": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "feedbacks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "workspaceId": {
                  "type": "string"
                },
                "userId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "message": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "workspaceName": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "workspaceId",
                "userId",
                "message",
                "createdAt",
                "workspaceName"
              ],
              "additionalProperties": false
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "hasNextPage": {
                "type": "boolean"
              },
              "hasPreviousPage": {
                "type": "boolean"
              }
            },
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNextPage",
              "hasPreviousPage"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "feedbacks",
          "pagination"
        ],
        "additionalProperties": false
      },
      "UsageReport": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "usage": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "actorType": {
                  "type": "string"
                },
                "userId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "lastUsedAt": {
                  "type": "string"
                },
                "events": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "requests": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "credits": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "productRequests": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "routineRequests": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "faceAnalyses": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "comprehensiveRequests": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "productViews": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "visits": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "actorType",
                "userId",
                "name",
                "lastUsedAt",
                "events",
                "requests",
                "credits",
                "productRequests",
                "routineRequests",
                "faceAnalyses",
                "comprehensiveRequests",
                "productViews",
                "visits"
              ],
              "additionalProperties": false
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "hasNextPage": {
                "type": "boolean"
              },
              "hasPreviousPage": {
                "type": "boolean"
              }
            },
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNextPage",
              "hasPreviousPage"
            ],
            "additionalProperties": false
          },
          "totals": {
            "type": "object",
            "properties": {
              "events": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "requests": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "credits": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "events",
              "requests",
              "credits"
            ],
            "additionalProperties": false
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        },
        "required": [
          "usage",
          "pagination",
          "totals",
          "from",
          "to"
        ],
        "additionalProperties": false
      },
      "UsageEvents": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "userId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "actorType": {
                  "type": "string"
                },
                "eventName": {
                  "type": "string"
                },
                "endpoint": {
                  "type": "string"
                },
                "resourceType": {
                  "type": "string"
                },
                "resourceId": {
                  "type": "string"
                },
                "creditDelta": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "modelKey": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "userId",
                "name",
                "actorType",
                "eventName",
                "endpoint",
                "resourceType",
                "resourceId",
                "creditDelta",
                "modelKey",
                "status",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "hasNextPage": {
                "type": "boolean"
              },
              "hasPreviousPage": {
                "type": "boolean"
              }
            },
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNextPage",
              "hasPreviousPage"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "events",
          "pagination"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "integrationToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Create a scoped account API key in Home → Integrations. Keep write keys on your backend."
      }
    }
  },
  "paths": {
    "/v1/workspaces/{workspaceId}/products": {
      "get": {
        "operationId": "list_products",
        "summary": "Produtos: Listar",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Inclui produtos inativos; permite paginação, pesquisa e filtros de estado."
      },
      "post": {
        "operationId": "create_product",
        "summary": "Produto: Criar",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "sku": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "barcode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "stock": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "INACTIVE",
                      "DELETED"
                    ]
                  },
                  "description": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100000
                  },
                  "information": {
                    "type": "string",
                    "maxLength": 500000
                  },
                  "questionIds": {
                    "minItems": 0,
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "imageIds": {
                    "default": [],
                    "description": "Uploaded image identifiers in gallery order. Only the first five unique images are retained.",
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    }
                  },
                  "tagIds": {
                    "default": [],
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    }
                  },
                  "sales": {
                    "default": [],
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "link": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "name",
                        "link"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "name",
                  "brand",
                  "sku",
                  "barcode",
                  "stock",
                  "status",
                  "description",
                  "information",
                  "imageIds",
                  "tagIds",
                  "sales"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Campos: name, brand, sku, barcode, stock, status (ACTIVE/INACTIVE/DELETED), description, information, imageIds, tagIds, sales. Aplicam-se as validações de negócio."
      }
    },
    "/v1/workspaces/{workspaceId}/products/{id}": {
      "get": {
        "operationId": "get_product",
        "summary": "Produto: Consultar",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "product"
                  ],
                  "properties": {
                    "product": {
                      "$ref": "#/components/schemas/Product"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve um produto pertencente ao espaço selecionado, mesmo que esteja inativo."
      },
      "put": {
        "operationId": "update_product",
        "summary": "Produto: Atualizar",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "sku": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "barcode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "stock": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999999
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "INACTIVE",
                      "DELETED"
                    ]
                  },
                  "description": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100000
                  },
                  "information": {
                    "type": "string",
                    "maxLength": 500000
                  },
                  "questionIds": {
                    "minItems": 0,
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "imageIds": {
                    "default": [],
                    "description": "Uploaded image identifiers in gallery order. Only the first five unique images are retained.",
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    }
                  },
                  "tagIds": {
                    "default": [],
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    }
                  },
                  "sales": {
                    "default": [],
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "link": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "name",
                        "link"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "name",
                  "brand",
                  "sku",
                  "barcode",
                  "stock",
                  "status",
                  "description",
                  "information",
                  "imageIds",
                  "tagIds",
                  "sales"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Consulte primeiro o produto e envie todos os valores editáveis atuais. Usa os mesmos campos de create_product."
      },
      "delete": {
        "operationId": "delete_product",
        "summary": "Produto: Eliminar definitivamente",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Elimina definitivamente o produto e as respetivas associações."
      }
    },
    "/v1/workspaces/{workspaceId}/collections": {
      "get": {
        "operationId": "list_collections",
        "summary": "Coleções: Listar",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Permite paginação e pesquisa."
      },
      "post": {
        "operationId": "create_collection",
        "summary": "Coleção: Criar",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100000
                  },
                  "imageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tagIds": {
                    "default": [],
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    }
                  }
                },
                "required": [
                  "name",
                  "description",
                  "tagIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Campos: name, description, tagIds, imageId. Adicione os produtos separadamente com add_collection_product."
      }
    },
    "/v1/workspaces/{workspaceId}/collections/{id}": {
      "put": {
        "operationId": "update_collection",
        "summary": "Coleção: Atualizar",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100000
                  },
                  "imageId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tagIds": {
                    "default": [],
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    }
                  }
                },
                "required": [
                  "name",
                  "description",
                  "tagIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Envie todos os valores editáveis atuais."
      },
      "delete": {
        "operationId": "delete_collection",
        "summary": "Coleção: Eliminar definitivamente",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "A eliminação é permanente."
      },
      "get": {
        "operationId": "get_collection",
        "summary": "Coleção: Consultar",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Inclui as associações de produtos e etiquetas da coleção."
      }
    },
    "/v1/workspaces/{workspaceId}/tags": {
      "get": {
        "operationId": "list_tags",
        "summary": "Etiquetas: Listar",
        "tags": [
          "tags"
        ],
        "x-required-scope": "tags:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Permite paginação e pesquisa."
      },
      "post": {
        "operationId": "create_tag",
        "summary": "Etiqueta: Criar",
        "tags": [
          "tags"
        ],
        "x-required-scope": "tags:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Indique o campo name."
      }
    },
    "/v1/workspaces/{workspaceId}/tags/{id}": {
      "put": {
        "operationId": "update_tag",
        "summary": "Etiqueta: Atualizar",
        "tags": [
          "tags"
        ],
        "x-required-scope": "tags:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Envie todos os valores editáveis atuais."
      },
      "delete": {
        "operationId": "delete_tag",
        "summary": "Etiqueta: Eliminar definitivamente",
        "tags": [
          "tags"
        ],
        "x-required-scope": "tags:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "A eliminação é permanente."
      },
      "get": {
        "operationId": "get_tag",
        "summary": "Etiqueta: Consultar",
        "tags": [
          "tags"
        ],
        "x-required-scope": "tags:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve o registo selecionado."
      }
    },
    "/v1/templates": {
      "get": {
        "operationId": "list_templates",
        "summary": "Modelos de site: Listar",
        "tags": [
          "Account"
        ],
        "x-required-scope": "website:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve apenas os modelos de site públicos disponíveis para criar um espaço de trabalho."
      }
    },
    "/v1/workspaces/{workspaceId}/website/templates": {
      "get": {
        "operationId": "list_workspace_templates",
        "summary": "Modelos de site do espaço de trabalho: Listar",
        "tags": [
          "website"
        ],
        "x-required-scope": "website:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve os modelos públicos e os modelos privados atribuídos ao espaço de trabalho selecionado. A concessão de acesso não altera o design selecionado."
      }
    },
    "/v1/workspaces/{workspaceId}/collections/{id}/products": {
      "get": {
        "operationId": "list_collection_products",
        "summary": "Produtos de uma coleção: Listar",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve os produtos associados à coleção selecionada."
      }
    },
    "/v1/workspaces/{workspaceId}/collections/{id}/products/{productId}": {
      "post": {
        "operationId": "add_collection_product",
        "summary": "Produtos de uma coleção: Adicionar",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Ambos os registos associados devem pertencer ao mesmo espaço de trabalho."
      },
      "delete": {
        "operationId": "remove_collection_product",
        "summary": "Produtos de uma coleção: Remover associação",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Ambos os registos associados devem pertencer ao mesmo espaço de trabalho."
      }
    },
    "/v1/workspaces/{workspaceId}/products/{id}/tags/{tagId}": {
      "post": {
        "operationId": "add_product_tag",
        "summary": "Etiqueta de produto: Adicionar",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Ambos os registos associados devem pertencer ao mesmo espaço de trabalho."
      },
      "delete": {
        "operationId": "remove_product_tag",
        "summary": "Etiqueta de produto: Remover associação",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Ambos os registos associados devem pertencer ao mesmo espaço de trabalho."
      }
    },
    "/v1/workspaces/{workspaceId}/collections/{id}/tags/{tagId}": {
      "post": {
        "operationId": "add_collection_tag",
        "summary": "Etiqueta de coleção: Adicionar",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Ambos os registos associados devem pertencer ao mesmo espaço de trabalho."
      },
      "delete": {
        "operationId": "remove_collection_tag",
        "summary": "Etiqueta de coleção: Remover associação",
        "tags": [
          "collections"
        ],
        "x-required-scope": "collections:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Ambos os registos associados devem pertencer ao mesmo espaço de trabalho."
      }
    },
    "/v1/workspaces/{workspaceId}/media": {
      "get": {
        "operationId": "list_media",
        "summary": "Média: Listar",
        "tags": [
          "media"
        ],
        "x-required-scope": "media:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Permite paginação, informações de utilização e pesquisa."
      },
      "post": {
        "operationId": "upload_media",
        "summary": "Imagem: Carregar",
        "tags": [
          "media"
        ],
        "x-required-scope": "media:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "fileName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "mimeType": {
                    "type": "string",
                    "enum": [
                      "image/jpeg",
                      "image/png",
                      "image/webp",
                      "image/gif",
                      "image/avif"
                    ]
                  },
                  "base64": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 4194304
                  }
                },
                "required": [
                  "fileName",
                  "mimeType",
                  "base64"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Envie uma imagem em base64, até 3 MiB após descodificação. Devolve o ID do ficheiro para imageIds. REST também aceita envios multipart em /v1/media/upload."
      }
    },
    "/v1/workspaces/{workspaceId}/media/{id}": {
      "get": {
        "operationId": "get_media",
        "summary": "Média: Consultar",
        "tags": [
          "media"
        ],
        "x-required-scope": "media:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve os metadados dos ficheiros carregados."
      },
      "put": {
        "operationId": "replace_media",
        "summary": "Imagem: Substituir",
        "tags": [
          "media"
        ],
        "x-required-scope": "media:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "fileName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "mimeType": {
                    "type": "string",
                    "enum": [
                      "image/jpeg",
                      "image/png",
                      "image/webp",
                      "image/gif",
                      "image/avif"
                    ]
                  },
                  "base64": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 4194304
                  }
                },
                "required": [
                  "fileName",
                  "mimeType",
                  "base64"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Mantém o ID do ficheiro existente."
      },
      "delete": {
        "operationId": "delete_media",
        "summary": "Média: Eliminar definitivamente",
        "tags": [
          "media"
        ],
        "x-required-scope": "media:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Remove o ficheiro carregado e todas as referências ao mesmo."
      }
    },
    "/v1/workspaces/{workspaceId}/workspace": {
      "get": {
        "operationId": "get_workspace",
        "summary": "Espaço de trabalho: Consultar",
        "tags": [
          "workspace"
        ],
        "x-required-scope": "workspace:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve o perfil, os contactos empresariais e as instruções para agentes do espaço selecionado."
      },
      "put": {
        "operationId": "update_workspace",
        "summary": "Espaço de trabalho: Atualizar",
        "tags": [
          "workspace"
        ],
        "x-required-scope": "workspace:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 80
                  },
                  "subDomain": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 32,
                    "pattern": "^(?!-)[a-z0-9-]+(?<!-)$"
                  },
                  "billingEmail": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "billingEmailOtpCode": {
                    "type": "string",
                    "pattern": "^\\d{6}$"
                  },
                  "billingPhone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "billingGsmCountryCode": {
                    "type": "string"
                  },
                  "hostedSitePublished": {
                    "type": "boolean"
                  },
                  "chatIdleTimeoutSeconds": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Campos: name, subDomain, billingEmail, billingPhone, billingGsmCountryCode, hostedSitePublished. O email de faturação exige um código de verificação existente. Aplicam-se a validação e os intervalos de espera do subdomínio. Propriedade, carteira e política de acesso não são delegadas."
      }
    },
    "/v1/workspaces/{workspaceId}/website/{templateKey}": {
      "get": {
        "operationId": "get_website",
        "summary": "Site: Consultar",
        "tags": [
          "website"
        ],
        "x-required-scope": "website:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "templateKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Antes de atualizar, consulte conteúdo editável, tema, recursos, traduções, disposição do modelo e esquema JSON."
      },
      "put": {
        "operationId": "update_website",
        "summary": "Site: Atualizar",
        "tags": [
          "website"
        ],
        "x-required-scope": "website:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "templateKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Use editable e editorSchema devolvidos por get_website. Os campos meta/template só de leitura são excluídos. São permitidas atualizações parciais; o modelo é validado."
      }
    },
    "/v1/workspaces/{workspaceId}/knowledge": {
      "get": {
        "operationId": "list_knowledge_sources",
        "summary": "Fontes de conhecimento: Listar",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve resumos de fontes privadas e estado de publicação, com pesquisa integral opcional. Carregue os rascunhos completos com get_knowledge_source."
      },
      "post": {
        "operationId": "create_knowledge_source",
        "summary": "Fonte de conhecimento: Criar",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "ARTICLE",
                      "FAQ"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 160
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "en",
                      "tr",
                      "de",
                      "es",
                      "fr"
                    ]
                  },
                  "question": {
                    "default": "",
                    "type": "string",
                    "maxLength": 400
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1
                  },
                  "keywords": {
                    "default": [],
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    }
                  },
                  "shareOriginal": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "title",
                  "language",
                  "question",
                  "body",
                  "keywords",
                  "shareOriginal"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Cria um rascunho de artigo ou de perguntas frequentes sem o publicar."
      }
    },
    "/v1/workspaces/{workspaceId}/knowledge/{id}": {
      "get": {
        "operationId": "get_knowledge_source",
        "summary": "Fonte de conhecimento: Consultar",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve um rascunho privado completo para revisão. Exige o proprietário atual e uma permissão explícita de leitura de conhecimento."
      },
      "put": {
        "operationId": "update_knowledge_source",
        "summary": "Fonte de conhecimento: Atualizar",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "ARTICLE",
                      "FAQ"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 160
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "en",
                      "tr",
                      "de",
                      "es",
                      "fr"
                    ]
                  },
                  "question": {
                    "default": "",
                    "type": "string",
                    "maxLength": 400
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1
                  },
                  "keywords": {
                    "default": [],
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    }
                  },
                  "shareOriginal": {
                    "default": false,
                    "type": "boolean"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "kind",
                  "title",
                  "language",
                  "question",
                  "body",
                  "keywords",
                  "shareOriginal",
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Usa a revisão atual do rascunho. O texto publicado não é alterado."
      },
      "delete": {
        "operationId": "delete_knowledge_source",
        "summary": "Fonte de conhecimento: Eliminar definitivamente",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:publish",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Revoga a publicação e elimina definitivamente a fonte. Os originais são acompanhados para limpeza privada."
      }
    },
    "/v1/workspaces/{workspaceId}/business/profile": {
      "get": {
        "operationId": "get_business_profile",
        "summary": "Perfil público da empresa: Consultar",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve o rascunho independente do perfil público e o estado de publicação. Exclui a identidade da conta e da faturação."
      },
      "put": {
        "operationId": "save_business_profile",
        "summary": "Perfil público da empresa: Guardar rascunho",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "profile": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 120
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "supportEmail": {
                        "default": "",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 254,
                            "format": "email",
                            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          },
                          {
                            "type": "string",
                            "const": ""
                          }
                        ]
                      },
                      "supportPhone": {
                        "default": "",
                        "type": "string",
                        "maxLength": 50,
                        "pattern": "^[+()\\d .-]*$"
                      },
                      "links": {
                        "default": [],
                        "maxItems": 8,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "url": {
                              "type": "string",
                              "maxLength": 1000,
                              "format": "uri"
                            }
                          },
                          "required": [
                            "label",
                            "url"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "locations": {
                        "default": [],
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "maxLength": 100
                            },
                            "address": {
                              "type": "string",
                              "maxLength": 600
                            },
                            "hours": {
                              "type": "string",
                              "maxLength": 1000
                            }
                          },
                          "required": [
                            "name",
                            "address",
                            "hours"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "facts": {
                        "default": [],
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            }
                          },
                          "required": [
                            "label",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "language": {
                        "type": "string",
                        "enum": [
                          "en",
                          "tr",
                          "de",
                          "es",
                          "fr"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "description",
                      "supportEmail",
                      "supportPhone",
                      "links",
                      "locations",
                      "facts",
                      "language"
                    ],
                    "additionalProperties": false
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "profile",
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Guarda um rascunho privado sem o publicar."
      }
    },
    "/v1/workspaces/{workspaceId}/knowledge/{id}/publish": {
      "post": {
        "operationId": "publish_knowledge_source",
        "summary": "Fonte de conhecimento: Publicar explicitamente",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:publish",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Exige uma ação explícita sobre a fonte revista na sua revisão atual."
      }
    },
    "/v1/workspaces/{workspaceId}/business/profile/publish": {
      "post": {
        "operationId": "publish_business_profile",
        "summary": "Perfil público da empresa: Publicar explicitamente",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:publish",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Altera a publicação apenas através de uma operação explícita."
      }
    },
    "/v1/workspaces/{workspaceId}/knowledge/{id}/unpublish": {
      "post": {
        "operationId": "unpublish_knowledge_source",
        "summary": "Fonte de conhecimento: Retirar explicitamente",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:publish",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Exige uma ação explícita sobre a fonte revista na sua revisão atual."
      }
    },
    "/v1/workspaces/{workspaceId}/business/profile/unpublish": {
      "post": {
        "operationId": "unpublish_business_profile",
        "summary": "Perfil público da empresa: Retirar explicitamente",
        "tags": [
          "knowledge"
        ],
        "x-required-scope": "knowledge:publish",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Altera a publicação apenas através de uma operação explícita."
      }
    },
    "/v1/account": {
      "get": {
        "operationId": "get_account",
        "summary": "Conta: Consultar",
        "tags": [
          "Account"
        ],
        "x-required-scope": "account:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve o perfil da sua conta e o limite de criação de espaços."
      },
      "put": {
        "operationId": "update_account",
        "summary": "Conta: Atualizar",
        "tags": [
          "Account"
        ],
        "x-required-scope": "account:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "emailOtpCode": {
                    "type": "string",
                    "pattern": "^\\d{6}$"
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "language": {
                    "default": "",
                    "type": "string",
                    "maxLength": 24
                  }
                },
                "required": [
                  "name",
                  "email",
                  "phone",
                  "language"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Consulte primeiro o perfil. Alterar o email exige um código obtido no painel. Não permite alterar funções, verificação nem limites de espaços."
      }
    },
    "/v1/workspaces": {
      "get": {
        "operationId": "list_workspaces",
        "summary": "Espaços de trabalho: Listar",
        "tags": [
          "Account"
        ],
        "x-required-scope": "workspaces:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve os espaços ativos de que é proprietário e o limite de criação. Use um dos IDs devolvidos nas ferramentas seguintes."
      },
      "post": {
        "operationId": "create_workspace",
        "summary": "Espaço de trabalho: Criar",
        "tags": [
          "Account"
        ],
        "x-required-scope": "workspaces:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 80
                  },
                  "subDomain": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 32,
                    "pattern": "^(?!-)[a-z0-9-]+(?<!-)$"
                  },
                  "templateKey": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "support-v1",
                          "support-v2",
                          "support-v3",
                          "support-v4",
                          "ecommerce-v2",
                          "ecommerce-v3",
                          "ecommerce-v4",
                          "cosmetics-v2",
                          "beauty-v1",
                          "beauty-v3",
                          "beauty-v4",
                          "yossco-v1",
                          "textile-v1",
                          "customized"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "experienceMode": {
                    "default": "HOSTED",
                    "type": "string",
                    "enum": [
                      "HOSTED",
                      "ASSISTANT_ONLY"
                    ]
                  },
                  "commerceEnabled": {
                    "type": "boolean"
                  },
                  "knowledgeEnabled": {
                    "type": "boolean"
                  },
                  "businessCategories": {
                    "maxItems": 94,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "ACCOUNTING",
                        "ADVERTISING",
                        "AGRICULTURE",
                        "AI",
                        "AIRLINES",
                        "ANIMAL_CARE",
                        "ANTIQUES",
                        "ARCHITECTURE",
                        "ARTS",
                        "AUTOMOTIVE",
                        "BAKERY",
                        "BANKING",
                        "BEAUTY",
                        "BIOTECHNOLOGY",
                        "BOOKS",
                        "BUSINESS_SERVICES",
                        "CAFE",
                        "CHARITY",
                        "CHEMICALS",
                        "CHILDCARE",
                        "CLEANING",
                        "CLOTHING",
                        "COMPUTERS",
                        "CONSTRUCTION",
                        "CONSULTING",
                        "COSMETICS",
                        "CRAFT_TRADE",
                        "DENTAL",
                        "DISTRIBUTION",
                        "ECOMMERCE",
                        "EDUCATION",
                        "ELECTRONICS",
                        "ENERGY",
                        "ENGINEERING",
                        "ENTERTAINMENT",
                        "ENVIRONMENT",
                        "EVENTS",
                        "FISHING",
                        "FITNESS",
                        "FLORIST",
                        "FOOD",
                        "FORESTRY",
                        "FURNITURE",
                        "GAMING",
                        "GIFTS",
                        "GOVERNMENT",
                        "GROCERY",
                        "HAIR",
                        "HARDWARE",
                        "HEALTHCARE",
                        "HOSPITALITY",
                        "HOUSEHOLD",
                        "IMPORT_EXPORT",
                        "INSURANCE",
                        "INTERIOR_DESIGN",
                        "JEWELRY",
                        "LEGAL",
                        "LOGISTICS",
                        "MANUFACTURING",
                        "MARINE",
                        "MEDIA",
                        "MINING",
                        "MUSEUMS",
                        "MUSIC",
                        "OFFICE",
                        "OPTICS",
                        "PACKAGING",
                        "PARKING",
                        "PERSONAL_SERVICES",
                        "PET_RETAIL",
                        "PHARMACY",
                        "PHOTOGRAPHY",
                        "PROPERTY",
                        "PUBLISHING",
                        "RECRUITMENT",
                        "RELIGION",
                        "RENTAL",
                        "RESEARCH",
                        "RESTAURANTS",
                        "RETAIL",
                        "SECURITY",
                        "SHOES_BAGS",
                        "SOFTWARE",
                        "SPORTS",
                        "STORAGE",
                        "TELECOM",
                        "TEXTILES",
                        "TOBACCO",
                        "TOYS",
                        "TRANSPORT",
                        "TRAVEL",
                        "UNIVERSITIES",
                        "WELLNESS",
                        "OTHER"
                      ]
                    }
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "hostedSitePublished": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "experienceMode",
                  "businessCategories",
                  "hostedSitePublished"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Cria um espaço sem créditos, sujeito ao limite de propriedade do administrador. Escolha HOSTED com um modelo de list_templates ou ASSISTANT_ONLY com templateKey=null, se disponível. Selecione explicitamente as capacidades Commerce/Knowledge. Os sites personalizados exigem telefone e notificam a equipa."
      }
    },
    "/v1/workspaces/{workspaceId}/feedbacks": {
      "get": {
        "operationId": "list_feedbacks",
        "summary": "Comentários dos clientes: Listar",
        "tags": [
          "workspace"
        ],
        "x-required-scope": "workspace:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "workspaceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          },
          {
            "name": "visitor",
            "in": "query",
            "required": false,
            "schema": {
              "default": "ALL",
              "type": "string",
              "enum": [
                "ALL",
                "GUEST",
                "USER"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Permite paginação, pesquisa e filtros de visitante e data."
      }
    },
    "/v1/workspaces/{workspaceId}/ai-settings": {
      "get": {
        "operationId": "get_ai_settings",
        "summary": "Definições de IA: Consultar",
        "tags": [
          "workspace"
        ],
        "x-required-scope": "workspace:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve o nível de resposta escolhido pelo proprietário, a política de respostas Knowledge, a revisão das definições e os preços em créditos."
      },
      "put": {
        "operationId": "update_ai_settings",
        "summary": "Definições de IA: Atualizar",
        "tags": [
          "workspace"
        ],
        "x-required-scope": "workspace:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "level": {
                    "type": "string",
                    "enum": [
                      "SMART",
                      "SMARTER",
                      "SMARTEST"
                    ]
                  },
                  "answerPolicy": {
                    "type": "string",
                    "enum": [
                      "SOURCE_BASED_REASONING",
                      "SOURCE_ONLY"
                    ]
                  },
                  "revision": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "chatIdleTimeoutSeconds": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "sector": {
                    "type": "string",
                    "enum": [
                      "AUTO",
                      "GENERAL",
                      "BEAUTY",
                      "TEXTILE"
                    ]
                  }
                },
                "required": [
                  "level",
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Só o proprietário escolhe o nível de resposta e a política Knowledge com a revisão atual. Os clientes não podem sobrepô-los."
      }
    },
    "/v1/workspaces/{workspaceId}/questions": {
      "get": {
        "operationId": "list_product_questions",
        "summary": "Perguntas de produto reutilizáveis: Listar",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionLibrary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "A pergunta pertence a este espaço e pode ser reutilizada em vários produtos."
      },
      "post": {
        "operationId": "create_product_question",
        "summary": "Pergunta de produto reutilizável: Criar",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductQuestion"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "A pergunta pertence a este espaço e pode ser reutilizada em vários produtos."
      }
    },
    "/v1/workspaces/{workspaceId}/questions/{id}": {
      "put": {
        "operationId": "update_product_question",
        "summary": "Pergunta de produto reutilizável: Atualizar",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductQuestion"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Altera a pergunta reutilizável em todos os produtos a que está atribuída."
      },
      "delete": {
        "operationId": "delete_product_question",
        "summary": "Pergunta de produto reutilizável: Eliminar definitivamente",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Remove a pergunta reutilizável e todas as suas atribuições."
      }
    },
    "/v1/workspaces/{workspaceId}/products/{id}/questions": {
      "get": {
        "operationId": "get_product_questions",
        "summary": "Seleção de perguntas do produto: Consultar",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductQuestionSet"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve uma seleção ordenada, uma lista intencionalmente vazia ou as três perguntas predefinidas do modelo."
      },
      "put": {
        "operationId": "assign_product_questions",
        "summary": "Seleção de perguntas do produto: Atribuir",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "questionIds": {
                    "minItems": 0,
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "questionIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductQuestionSet"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Atribua entre zero e cinco IDs de perguntas do espaço na ordem específica do produto. Uma lista vazia oculta as perguntas iniciais."
      },
      "delete": {
        "operationId": "reset_product_questions",
        "summary": "Seleção de perguntas do produto: Repor predefinições",
        "tags": [
          "products"
        ],
        "x-required-scope": "products:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Repõe as três perguntas predefinidas do modelo do produto."
      }
    },
    "/v1/workspaces/{workspaceId}/usage-report": {
      "get": {
        "operationId": "list_usage_report",
        "summary": "Relatório de utilização: Consultar",
        "tags": [
          "workspace"
        ],
        "x-required-scope": "workspace:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "surface",
            "in": "query",
            "required": false,
            "schema": {
              "default": "ALL",
              "type": "string",
              "enum": [
                "ALL",
                "HOSTED"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "actorType",
            "in": "query",
            "required": false,
            "schema": {
              "default": "ALL",
              "type": "string",
              "enum": [
                "ALL",
                "AUTH_USER",
                "WORKSPACE_USER",
                "WORKSPACE_KIOSK_DEVICE",
                "GUEST"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "default": "credits",
              "type": "string",
              "enum": [
                "credits",
                "requests",
                "lastUsedAt",
                "name"
              ]
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageReport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve utilização por utilizador, créditos de IA, modelos e atividade paginados, com filtros de data, pesquisa e interveniente."
      }
    },
    "/v1/workspaces/{workspaceId}/usage-report/events": {
      "get": {
        "operationId": "list_usage_events",
        "summary": "Eventos de atividade: Consultar",
        "tags": [
          "workspace"
        ],
        "x-required-scope": "workspace:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "surface",
            "in": "query",
            "required": false,
            "schema": {
              "default": "ALL",
              "type": "string",
              "enum": [
                "ALL",
                "HOSTED"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "actorType",
            "in": "query",
            "required": false,
            "schema": {
              "default": "ALL",
              "type": "string",
              "enum": [
                "ALL",
                "AUTH_USER",
                "WORKSPACE_USER",
                "WORKSPACE_KIOSK_DEVICE",
                "GUEST"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "default": "credits",
              "type": "string",
              "enum": [
                "credits",
                "requests",
                "lastUsedAt",
                "name"
              ]
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageEvents"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve eventos paginados com filtros de utilizador, data e interveniente. Exclui metadados internos de sessão e rede."
      }
    },
    "/v1/workspaces/{workspaceId}/chatbot-templates": {
      "get": {
        "operationId": "list_chatbot_templates",
        "summary": "Disposições do chatbot: Listar",
        "tags": [
          "website"
        ],
        "x-required-scope": "website:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve as disposições versionadas suportadas e os metadados de apresentação."
      }
    },
    "/v1/workspaces/{workspaceId}/chatbot-template": {
      "put": {
        "operationId": "update_chatbot_template",
        "summary": "Disposição do chatbot: Atualizar",
        "tags": [
          "website"
        ],
        "x-required-scope": "website:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "templateKey": {
                    "type": "string",
                    "enum": [
                      "support-v1",
                      "support-v2",
                      "support-v3",
                      "support-v4",
                      "ecommerce-v1",
                      "ecommerce-v2",
                      "ecommerce-v3",
                      "ecommerce-v4",
                      "cosmetics-v1",
                      "cosmetics-v2",
                      "cosmetics-v3",
                      "cosmetics-v4"
                    ]
                  }
                },
                "required": [
                  "templateKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Altera apenas a disposição. Mantém a marca, as origens permitidas, a disponibilidade, os links sociais e as conversas."
      }
    },
    "/v1/workspaces/{workspaceId}/chatbot-settings": {
      "get": {
        "operationId": "get_chatbot_settings",
        "summary": "Definições do chatbot: Consultar",
        "tags": [
          "website"
        ],
        "x-required-scope": "website:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatbotSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve a configuração do chatbot do espaço selecionado."
      },
      "put": {
        "operationId": "update_chatbot_settings",
        "summary": "Definições do chatbot: Atualizar",
        "tags": [
          "website"
        ],
        "x-required-scope": "website:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "templateKey": {
                    "type": "string",
                    "enum": [
                      "support-v1",
                      "support-v2",
                      "support-v3",
                      "support-v4",
                      "ecommerce-v1",
                      "ecommerce-v2",
                      "ecommerce-v3",
                      "ecommerce-v4",
                      "cosmetics-v1",
                      "cosmetics-v2",
                      "cosmetics-v3",
                      "cosmetics-v4"
                    ]
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "templateSettings": {
                    "default": {},
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "enum": [
                        "support-v1",
                        "support-v2",
                        "support-v3",
                        "support-v4",
                        "ecommerce-v1",
                        "ecommerce-v2",
                        "ecommerce-v3",
                        "ecommerce-v4",
                        "cosmetics-v1",
                        "cosmetics-v2",
                        "cosmetics-v3",
                        "cosmetics-v4"
                      ]
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "compactIntro": {
                          "type": "boolean"
                        },
                        "showArticles": {
                          "type": "boolean"
                        },
                        "showContact": {
                          "type": "boolean"
                        },
                        "showProductSearch": {
                          "type": "boolean"
                        },
                        "showRoutine": {
                          "type": "boolean"
                        },
                        "showManualProfile": {
                          "type": "boolean"
                        },
                        "showPhoto": {
                          "type": "boolean"
                        },
                        "density": {
                          "type": "string",
                          "enum": [
                            "comfortable",
                            "compact"
                          ]
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "launcherIcon": {
                    "default": "sparkles",
                    "type": "string",
                    "enum": [
                      "sparkles",
                      "message-circle",
                      "bot",
                      "headset",
                      "help-circle",
                      "shopping-bag",
                      "heart",
                      "flower",
                      "stars",
                      "smile"
                    ]
                  },
                  "launcherDisplay": {
                    "default": "icon-text",
                    "type": "string",
                    "enum": [
                      "icon",
                      "text",
                      "icon-text"
                    ]
                  },
                  "launcherSize": {
                    "default": "medium",
                    "type": "string",
                    "enum": [
                      "small",
                      "medium",
                      "large"
                    ]
                  },
                  "launcherHighlight": {
                    "default": "orbit",
                    "type": "string",
                    "enum": [
                      "none",
                      "orbit",
                      "halo",
                      "pulse",
                      "ripple",
                      "aurora",
                      "gradient",
                      "sparkle",
                      "beacon",
                      "float",
                      "outline"
                    ]
                  },
                  "draggable": {
                    "default": true,
                    "type": "boolean"
                  },
                  "captureMode": {
                    "default": "manual",
                    "type": "string",
                    "enum": [
                      "manual",
                      "automatic"
                    ]
                  },
                  "authenticationMode": {
                    "type": "string",
                    "enum": [
                      "DISABLED",
                      "OPTIONAL",
                      "REQUIRED"
                    ]
                  },
                  "allowedOrigins": {
                    "default": [],
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  },
                  "position": {
                    "default": "bottom-right",
                    "type": "string",
                    "enum": [
                      "bottom-right",
                      "bottom-left"
                    ]
                  },
                  "color": {
                    "default": "#635bff",
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  },
                  "textColor": {
                    "default": "#ffffff",
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  },
                  "title": {
                    "default": "Help & Support",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "launcherText": {
                    "default": "Ask AI",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "welcomeText": {
                    "default": "Ask AI a question or choose an available support option.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 600
                  },
                  "placeholder": {
                    "default": "Ask a support question…",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "defaultLanguage": {
                    "default": "en",
                    "type": "string",
                    "enum": [
                      "en",
                      "tr",
                      "de",
                      "es",
                      "fr"
                    ]
                  },
                  "messages": {
                    "default": {},
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "enum": [
                        "en",
                        "tr",
                        "de",
                        "es",
                        "fr"
                      ]
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "launcherText": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "welcomeText": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 600
                        },
                        "placeholder": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        }
                      },
                      "required": [
                        "title",
                        "launcherText",
                        "welcomeText",
                        "placeholder"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "productBrowsingEnabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "photoAnalysisEnabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "contactEmailNotifications": {
                    "default": false,
                    "type": "boolean"
                  },
                  "contactForms": {
                    "default": [],
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "fields": {
                          "minItems": 1,
                          "maxItems": 12,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-z][a-z0-9_-]{0,39}$"
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "TEXT",
                                  "TEXTAREA",
                                  "EMAIL",
                                  "PHONE",
                                  "SELECT",
                                  "RADIO",
                                  "CHECKBOX",
                                  "BOOLEAN"
                                ]
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "options": {
                                "default": [],
                                "maxItems": 12,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 80
                                }
                              }
                            },
                            "required": [
                              "id",
                              "label",
                              "type",
                              "required",
                              "options"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "translations": {
                          "default": {},
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "enum": [
                              "en",
                              "tr",
                              "de",
                              "es",
                              "fr"
                            ]
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "fields": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "pattern": "^[a-z][a-z0-9_-]{0,39}$"
                                },
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "label": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 100
                                    },
                                    "options": {
                                      "maxItems": 12,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "value": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 80
                                          },
                                          "label": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 80
                                          }
                                        },
                                        "required": [
                                          "value",
                                          "label"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "fields",
                        "translations"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "activeContactFormId": {
                    "default": "default",
                    "anyOf": [
                      {
                        "type": "string",
                        "const": "default"
                      },
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    ]
                  },
                  "starterQuestions": {
                    "default": [],
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "translations": {
                          "default": {},
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "enum": [
                              "en",
                              "tr",
                              "de",
                              "es",
                              "fr"
                            ]
                          },
                          "additionalProperties": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        }
                      },
                      "required": [
                        "id",
                        "text",
                        "translations"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "selectedStarterIds": {
                    "default": [
                      "about",
                      "services",
                      "contact",
                      "getting-started"
                    ],
                    "maxItems": 8,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    }
                  },
                  "socialLinks": {
                    "default": [],
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "platform": {
                          "type": "string",
                          "enum": [
                            "instagram",
                            "facebook",
                            "youtube",
                            "tiktok",
                            "linkedin",
                            "x",
                            "website"
                          ]
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2048,
                          "format": "uri"
                        },
                        "visible": {
                          "default": true,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "platform",
                        "url",
                        "visible"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "offset": {
                    "default": 20,
                    "type": "integer",
                    "minimum": 8,
                    "maximum": 100
                  }
                },
                "required": [
                  "enabled",
                  "templateSettings",
                  "launcherIcon",
                  "launcherDisplay",
                  "launcherSize",
                  "launcherHighlight",
                  "draggable",
                  "captureMode",
                  "allowedOrigins",
                  "position",
                  "color",
                  "textColor",
                  "title",
                  "launcherText",
                  "welcomeText",
                  "placeholder",
                  "defaultLanguage",
                  "messages",
                  "productBrowsingEnabled",
                  "photoAnalysisEnabled",
                  "contactEmailNotifications",
                  "contactForms",
                  "activeContactFormId",
                  "starterQuestions",
                  "selectedStarterIds",
                  "socialLinks",
                  "offset"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatbotSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Configura o chatbot de adesão opcional e as origens HTTPS exatas permitidas do site."
      }
    },
    "/v1/workspaces/{workspaceId}/chatbot-analytics": {
      "get": {
        "operationId": "get_chatbot_analytics",
        "summary": "Estatísticas do chatbot: Consultar",
        "tags": [
          "workspace"
        ],
        "x-required-scope": "workspace:read",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation; resource or paginated resource list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatbotReport"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting resource or duplicate identity.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Seconds to wait before retrying."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected service failure. Internal details are hidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Devolve totais agregados de visitantes, mensagens e utilização de rotinas/produtos. Nunca devolve identificadores de visitantes nem texto das mensagens."
      }
    },
    "/v1/workspaces/{workspaceId}/media/upload": {
      "post": {
        "operationId": "upload_media_files",
        "tags": [
          "media"
        ],
        "summary": "Ficheiros de imagem: Carregar",
        "x-required-scope": "media:write",
        "security": [
          {
            "integrationToken": []
          }
        ],
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "files"
                ],
                "properties": {
                  "files": {
                    "type": "array",
                    "maxItems": 12,
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Uploaded media records."
          },
          "400": {
            "description": "Invalid image or input."
          },
          "401": {
            "description": "Invalid token."
          },
          "403": {
            "description": "Missing media:write scope or ownership."
          },
          "413": {
            "description": "File too large."
          },
          "429": {
            "description": "Rate limit exceeded."
          }
        },
        "description": "Carregue até 12 imagens raster com multipart/form-data. Envie as imagens no campo files; cada ficheiro pode ter, no máximo, 10 MiB. São necessários media:write e a propriedade atual do espaço de trabalho selecionado."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/bootstrap": {
      "get": {
        "operationId": "storefront_bootstrap",
        "summary": "Acesso dos visitantes: Inicializar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Inicializa o acesso do visitante, um token de convidado e a configuração Turnstile."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/products": {
      "get": {
        "operationId": "storefront_products",
        "summary": "Produtos publicados: Listar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os dados publicados do catálogo permitidos pela política de acesso dos visitantes."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/products/{productId}": {
      "get": {
        "operationId": "storefront_products_productId",
        "summary": "Produto publicado: Consultar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os dados publicados do catálogo permitidos pela política de acesso dos visitantes."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/products/{productId}/questions": {
      "get": {
        "operationId": "storefront_products_productId_questions",
        "summary": "Perguntas publicadas do produto: Listar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os dados publicados do catálogo permitidos pela política de acesso dos visitantes."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/products/slug/{productSlug}": {
      "get": {
        "operationId": "storefront_products_slug_productSlug",
        "summary": "Produto publicado: Consultar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os dados publicados do catálogo permitidos pela política de acesso dos visitantes."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/collections": {
      "get": {
        "operationId": "storefront_collections",
        "summary": "Coleções publicadas: Listar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os dados publicados do catálogo permitidos pela política de acesso dos visitantes."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/collections/{collectionId}/products": {
      "get": {
        "operationId": "storefront_collections_collectionId_products",
        "summary": "Produtos de uma coleção: Listar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os dados publicados do catálogo permitidos pela política de acesso dos visitantes."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/tags": {
      "get": {
        "operationId": "storefront_tags",
        "summary": "Etiquetas publicadas: Listar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os dados publicados do catálogo permitidos pela política de acesso dos visitantes."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/tags/{tagId}/products": {
      "get": {
        "operationId": "storefront_tags_tagId_products",
        "summary": "Produtos publicados: Listar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os dados publicados do catálogo permitidos pela política de acesso dos visitantes."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/tags/{tagId}/collections": {
      "get": {
        "operationId": "storefront_tags_tagId_collections",
        "summary": "Coleções publicadas: Listar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "storefront:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os dados publicados do catálogo permitidos pela política de acesso dos visitantes."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/customer/otp/request": {
      "post": {
        "operationId": "customer_otp_request",
        "summary": "Código por email do visitante: Solicitar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "turnstileToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                },
                "required": [
                  "name",
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Solicita um código por email. Aplicam-se Turnstile, validação do email e limites de reenvio."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/customer/otp/verify": {
      "post": {
        "operationId": "customer_otp_verify",
        "summary": "Código por email do visitante: Verificar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^\\d{6}$"
                  }
                },
                "required": [
                  "email",
                  "code"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Valida um código de utilização única e devolve uma sessão de visitante limitada ao negócio, nunca uma sessão de gestão."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/customer/session": {
      "get": {
        "operationId": "customer_session",
        "summary": "Sessão do visitante: Consultar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Forneça X-Visitor-Token para a sessão de visitante do negócio atual."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/customer/refresh": {
      "post": {
        "operationId": "customer_refresh",
        "summary": "Sessão do visitante: Renovar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Forneça X-Visitor-Token para a sessão de visitante do negócio atual."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/customer/logout": {
      "post": {
        "operationId": "customer_logout",
        "summary": "Sessão do visitante: Revogar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Forneça X-Visitor-Token para a sessão de visitante do negócio atual."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/customer/profile": {
      "get": {
        "operationId": "customer_profile",
        "summary": "Perfil do visitante: Consultar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:read",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Devolve apenas os campos públicos do perfil do visitante. Forneça X-Visitor-Token."
      },
      "put": {
        "operationId": "customer_profile_update",
        "summary": "Perfil do visitante: Atualizar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string",
                    "maxLength": 24
                  }
                },
                "required": [
                  "name",
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Atualiza nome, telefone e idioma do visitante. O email não pode ser alterado aqui; alterações ao email da conta exigem início de sessão na conta."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/chat/general": {
      "post": {
        "operationId": "storefront_ai_general",
        "summary": "Assistente empresarial: Executar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "ai:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "contextToken": {
                    "type": "string",
                    "maxLength": 32000
                  },
                  "threadId": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "turnstileToken": {
                    "type": "string",
                    "maxLength": 4096
                  }
                },
                "required": [
                  "message"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Usa provas publicadas atuais e citações, com segurança dos visitantes e contabilização explícita de créditos; só de leitura. Nas mensagens seguintes devolva threadId assinado e contextToken opaco exatamente como recebidos. Nunca envie histórico criado pelo cliente. Um contexto expirado ou limitado exige uma nova conversa explícita."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/chat/product": {
      "post": {
        "operationId": "storefront_ai_product",
        "summary": "Orientação de produtos por IA: Executar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "ai:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "message": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "threadId": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "thinkingLevel": {
                    "type": "string",
                    "enum": [
                      "LOW",
                      "MEDIUM",
                      "HIGH"
                    ]
                  },
                  "images": {
                    "default": [],
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 4194368
                    }
                  },
                  "turnstileToken": {
                    "type": "string",
                    "maxLength": 4096
                  },
                  "productId": {
                    "default": "",
                    "type": "string",
                    "maxLength": 128
                  },
                  "productName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 200
                  },
                  "userProfile": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 4000
                          }
                        }
                      ]
                    }
                  },
                  "userSelectedRoutineProducts": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "productName": {
                          "type": "string",
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "id",
                        "productName"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "message",
                  "images",
                  "productId",
                  "productName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Exige acesso de visitante, Turnstile e quotas, com reserva atómica de créditos do espaço. Consome créditos reais."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/chat/routine": {
      "post": {
        "operationId": "storefront_ai_routine",
        "summary": "Orientação de rotinas por IA: Executar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "ai:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "message": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "threadId": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "thinkingLevel": {
                    "type": "string",
                    "enum": [
                      "LOW",
                      "MEDIUM",
                      "HIGH"
                    ]
                  },
                  "images": {
                    "default": [],
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 4194368
                    }
                  },
                  "turnstileToken": {
                    "type": "string",
                    "maxLength": 4096
                  },
                  "userProfile": {
                    "default": {},
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 4000
                          }
                        }
                      ]
                    }
                  },
                  "userSelectedRoutineProducts": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "productName": {
                          "type": "string",
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "id",
                        "productName"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "allowAiSuggestions": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "message",
                  "images",
                  "userProfile",
                  "userSelectedRoutineProducts",
                  "allowAiSuggestions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Exige acesso de visitante, Turnstile e quotas, com reserva atómica de créditos do espaço. Consome créditos reais."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/chat/analyze-face": {
      "post": {
        "operationId": "storefront_ai_analyze_face",
        "summary": "Análise de fotografias por IA: Executar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "ai:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string",
                    "maxLength": 4194368
                  },
                  "turnstileToken": {
                    "type": "string",
                    "maxLength": 4096
                  }
                },
                "required": [
                  "image"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Exige acesso de visitante, Turnstile e quotas, com reserva atómica de créditos do espaço. Consome créditos reais."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/threads/{threadId}": {
      "delete": {
        "operationId": "storefront_thread_delete",
        "summary": "Conversa do visitante: Eliminar definitivamente",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Elimina apenas uma conversa assinada para o espaço e visitante selecionados."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/feedback": {
      "post": {
        "operationId": "storefront_feedback",
        "summary": "Comentário do visitante: Enviar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "message"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Usa o mesmo contrato validado do site alojado."
      }
    },
    "/v1/workspaces/{workspaceId}/experience/events": {
      "post": {
        "operationId": "storefront_event",
        "summary": "Evento de atividade do visitante: Registar",
        "tags": [
          "Customer experience"
        ],
        "security": [
          {
            "integrationToken": []
          }
        ],
        "x-required-scope": "visitors:write",
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Visitor-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tenant-scoped visitor session; never the integration owner credential."
          },
          {
            "name": "X-Guest-Device-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          },
          {
            "name": "X-Guest-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Preserve guest identity across requests."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "eventName": {
                    "type": "string",
                    "enum": [
                      "WEBSITE_VISIT",
                      "PRODUCT_VIEW",
                      "CONTACT_CLICK",
                      "BUY_CLICK",
                      "PHONE_CLICK",
                      "DIRECTION_CLICK",
                      "CUSTOMER_SIGNUP"
                    ]
                  },
                  "productId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "source": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "eventName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Visitor result; chat returns threadId, response and access information where applicable."
          },
          "201": {
            "description": "Visitor event recorded."
          },
          "204": {
            "description": "Submission accepted."
          },
          "400": {
            "description": "Invalid input."
          },
          "401": {
            "description": "Missing/invalid integration or visitor credential."
          },
          "403": {
            "description": "Scope, ownership, visitor policy or credit access denied."
          },
          "429": {
            "description": "Rate limit or visitor quota reached."
          },
          "500": {
            "description": "Safe service error."
          }
        },
        "description": "Regista apenas eventos permitidos, com validação no servidor e atribuição do interveniente."
      }
    }
  }
}