{
  "openapi" : "3.0.1",
  "info" : {
    "title" : "Botmaker API",
    "description" : "The Botmaker API enables you to:\n- start a WhatsApp conversation by sending a template message\n- trigger intents and send messages to open conversations\n- download messages from chats\n- download chats state (tags and variables)\n- manage agents and roles\n- manage WhatsApp account and templates\n- inspect WhatsApp conversations to know which were billed\n- start calls\n- and much more!\n#### Try it!\nYou can test the endpoints by entering your `access-token` in the text box to the right.<br>\nOr you can download the [Postman Collection](https://storage.googleapis.com/botmaker/api/botmaker_api_v2.postman_collection). You only need to configure the [collection vars](https://learning.postman.com/docs/sending-requests/variables/#defining-collection-variables) `token`, `channelId` and `contactId` with your own values.",
    "contact" : {
      "email" : "support@botmaker.io"
    },
    "license" : {
      "name" : "Apache 2.0",
      "url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version" : "2.0"
  },
  "externalDocs" : {
    "description" : "A Postman Collection. You need to setup the [collection vars](https://learning.postman.com/docs/sending-requests/variables/#defining-collection-variables) `token`, `channelId` and `contactId`.",
    "url" : "https://storage.googleapis.com/botmaker/api/botmaker_api_v2.postman_collection"
  },
  "servers" : [ {
    "url" : "https://api.botmaker.com/v2.0"
  } ],
  "security" : [ {
    "access-token" : [ ]
  } ],
  "tags" : [ {
    "name" : "chats",
    "description" : "Know and modify chats state (variables and tags)"
  }, {
    "name" : "chats actions",
    "description" : "Send templates, messages, trigger intents.<br> You can also assign to agent, mute bot, and more"
  }, {
    "name" : "messages",
    "description" : "Download messages history."
  }, {
    "name" : "channels",
    "description" : "Get chat channels ids (other endpoints need this data)"
  }, {
    "name" : "agents",
    "description" : "Add or remove agents to attend chats.< br/>Logout absent agents"
  }, {
    "name" : "roles",
    "description" : "Create, edit and delete agent roles"
  }, {
    "name" : "calls",
    "description" : "List and start calls"
  }, {
    "name" : "billing",
    "description" : "Inspect consumptions"
  }, {
    "name" : "whatsapp accounts",
    "description" : "Start account creation process. Know line status and quality"
  }, {
    "name" : "whatsapp templates",
    "description" : "Create, list and delete templates."
  }, {
    "name" : "whatsapp products",
    "description" : "Send products via whatsapp."
  }, {
    "name" : "ecommerce/catalogs",
    "description" : "Build a catalog of your products and offer them via WhatsApp and Google Business Messages."
  }, {
    "name" : "ecommerce/categories",
    "description" : "Upload your categories and organize them."
  }, {
    "name" : "ecommerce/products",
    "description" : "Upload your products and organize them with categories."
  }, {
    "name" : "ecommerce/stores",
    "description" : "Upload your inventory and organize them with stores."
  }, {
    "name" : "ecommerce/zones",
    "description" : "Upload your zones and organize them."
  }, {
    "name" : "ecommerce/price-schemas",
    "description" : "Upload your price schemas and organize them."
  }, {
    "name" : "intents",
    "description" : "List, create or update intents"
  }, {
    "name" : "contacts",
    "description" : "Download contacts (CRM entities) with their WhatsApp BSUIDs."
  }, {
    "name" : "audits",
    "description" : "Find when and who changed an entity of your project."
  }, {
    "name" : "webhooks",
    "description" : "Manage your webhooks. Redirect webhooks for certain users"
  }, {
    "name" : "bot config",
    "description" : "Configure bot variables and constants"
  } ],
  "paths" : {
    "/agents" : {
      "get" : {
        "tags" : [ "agents" ],
        "summary" : "List agents",
        "description" : "List all agents with access to the bot.",
        "operationId" : "list-agents",
        "parameters" : [ {
          "name" : "online",
          "in" : "query",
          "description" : "Filter online agents with `true`. Use `false` to filter the offline users.",
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "emails",
          "in" : "query",
          "description" : "Fetch agents by email. A list of emails can be used, separated by comma or repeating the `emails` query param.",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of bot agents.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AgentsPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 200 requests per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "agents" ],
        "summary" : "Create agent",
        "description" : "Creates an agent.",
        "operationId" : "create-agent",
        "requestBody" : {
          "description" : "The agent to create.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AgentRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "The id of the created agent.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AgentIdResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid agent body.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403" : {
            "description" : "Missing permissions to create agent."
          },
          "429" : {
            "description" : "Only 400 requests per second allowed."
          }
        }
      }
    },
    "/agents/{id}/actions/logout" : {
      "post" : {
        "tags" : [ "agents" ],
        "summary" : "Logout agent",
        "description" : "Logs out an agent from Botmaker.",
        "operationId" : "logout-agent",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "The agent id on botmaker. You can get it from `/agents?emails=agent.name@exampleorg.com`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "*/*" : { }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Agent was logged out."
          },
          "404" : {
            "description" : "Agent not found."
          },
          "429" : {
            "description" : "Only 10 requests per second allowed."
          }
        }
      }
    },
    "/agents/{id}" : {
      "delete" : {
        "tags" : [ "agents" ],
        "summary" : "Remove agent from bot",
        "description" : "Disallows the agent to access to bot.",
        "operationId" : "remove-agent",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "The agent id on botmaker. You can get it from `/agents?emails=agent.name@exampleorg.com`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A list of the remaining bots the agent can access.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IdListReqRes"
                }
              }
            }
          },
          "403" : {
            "description" : "Can't modify agent with provided access-token.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Agent not found."
          },
          "429" : {
            "description" : "Only 10 requests per second allowed."
          }
        }
      }
    },
    "/agents/{idOrEmail}" : {
      "patch" : {
        "tags" : [ "agents" ],
        "summary" : "Update agent",
        "operationId" : "update-agent",
        "parameters" : [ {
          "name" : "idOrEmail",
          "in" : "path",
          "description" : "The agent id or email on botmaker.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The agent to update.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AgentRequest"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Agent correctly updated."
          },
          "400" : {
            "description" : "Invalid agent body.",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403" : {
            "description" : "Missing permissions to modify password (if no password change was intented, don't send password field)."
          },
          "404" : {
            "description" : "Agent not found."
          },
          "429" : {
            "description" : "Only 10 requests per second allowed."
          }
        }
      }
    },
    "/audits/{auditSection}" : {
      "get" : {
        "tags" : [ "audits" ],
        "summary" : "List change history",
        "description" : "Search and see changes of your project.<br>**This endpoint will increase your BI data sources costs, so use it with care (save the response to avoid retrieving the same period every time).**",
        "operationId" : "list-section-changes",
        "parameters" : [ {
          "name" : "auditSection",
          "in" : "path",
          "description" : "The audit section to inspect.",
          "required" : true,
          "schema" : {
            "$ref" : "#/components/schemas/AuditSectionPretty"
          }
        }, {
          "name" : "from",
          "in" : "query",
          "description" : "Min change datetime. Defaults to start of month.",
          "schema" : {
            "type" : "string",
            "format" : "date-time",
            "example" : "2022-01-01T00:00:00Z"
          }
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Max change datetime. Defaults to `now()`.",
          "schema" : {
            "type" : "string",
            "format" : "date-time",
            "example" : "2022-01-05T00:00:00Z"
          }
        }, {
          "name" : "authors",
          "in" : "query",
          "description" : "The ids or emails of the agents that changed the entity, separated by commas.",
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "Email" : {
              "description" : "Email",
              "value" : "agent_a@exampleorg.com,agent_b@exampleorg.com,agent_x@exampleorg.com"
            },
            "Ids" : {
              "description" : "Ids",
              "value" : "d3Sgpkg8R1zDxfJYYxpAWLxL1hv7,27mLxWSTEHbEtehb9fgzO5S4Y55V,IyA8r9cO1IKjWbkx3V4BaHU1Inhp"
            }
          }
        }, {
          "name" : "authors-roles",
          "in" : "query",
          "description" : "The role ids of the agents that made the change, separated by commas. It can be a predefined role or a custom role id or name.",
          "schema" : {
            "type" : "string",
            "enum" : [ "ADMIN", "CONFIGURATOR", "SUPERVISOR", "OPERATOR" ]
          },
          "examples" : {
            "Default" : {
              "description" : "Default",
              "value" : "OPERATOR,CONFIGURATOR"
            },
            "Custom" : {
              "description" : "Custom",
              "value" : "CUSTOM123ROL456ID,ANOTHER123CUSTOM123ROL"
            }
          }
        }, {
          "name" : "actions",
          "in" : "query",
          "description" : "The type of change you are searching for. By default, every type of change is searched.",
          "schema" : {
            "type" : "string",
            "enum" : [ "CREATE", "UPDATE", "DELETE" ]
          },
          "examples" : {
            "Change" : {
              "description" : "Change",
              "value" : "UPDATE,DELETE"
            },
            "Delete" : {
              "description" : "Delete",
              "value" : "DELETE"
            }
          }
        }, {
          "name" : "search-keyword",
          "in" : "query",
          "description" : "Keyword to search in audit. For example, the id of an intent, agent, queue, etc. that has changed.",
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "Intent" : {
              "description" : "Intent",
              "value" : "Some Intent Name"
            },
            "Queue" : {
              "description" : "Queue",
              "value" : "QueueId"
            }
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The changes to the section.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AuditsPage"
                }
              }
            }
          },
          "400" : {
            "description" : "Missing or invalid query params.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403" : {
            "description" : "Missing permissions to get audit."
          },
          "429" : {
            "description" : "Only one request per minute allowed."
          }
        }
      }
    },
    "/auth/credentials" : {
      "get" : {
        "tags" : [ "auth" ],
        "summary" : "Get API credentials",
        "description" : "Gets the API credentials associated with the `access-token` from the request",
        "operationId" : "get-api-credentials",
        "responses" : {
          "200" : {
            "description" : "The credentials to call Botmaker API and to refresh token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AuthResponse"
                }
              }
            }
          },
          "401" : {
            "description" : "Not authorized"
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "auth" ],
        "summary" : "Refresh API credentials",
        "description" : "Generates new API credentials from the refreshToken",
        "operationId" : "refresh-api-credentials",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RefreshCredentialsRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Credentials returned",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AuthResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 3 requests per minute allowed."
          }
        }
      },
      "delete" : {
        "tags" : [ "auth" ],
        "summary" : "Remove current API credentials",
        "operationId" : "deleteAPICredentials",
        "responses" : {
          "204" : {
            "description" : "Credentials invalidated"
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/billing/consumptions" : {
      "get" : {
        "tags" : [ "billing" ],
        "summary" : "List consumptions",
        "description" : "List consumptions for a specific month",
        "operationId" : "get-consumptions",
        "parameters" : [ {
          "name" : "billing-period",
          "in" : "query",
          "description" : "Month for which consumptions will be retrieved",
          "schema" : {
            "type" : "string",
            "format" : "yyyy-MM"
          },
          "examples" : {
            "Year-Month" : {
              "description" : "Year-Month",
              "value" : "2024-01"
            }
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "List of consumptions",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConsumptionsResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per month allowed."
          }
        }
      }
    },
    "/billing/whatsapp/billed-conversations" : {
      "get" : {
        "tags" : [ "billing" ],
        "summary" : "List WhatsApp billed conversations",
        "description" : "List WhatsApp conversations with their billing info monthly.<br>**This endpoint will increase your BI data sources costs, so use it with care (save the response to avoid retrieving the same period every time).**",
        "operationId" : "get-billing-whatsapp-conversations-details",
        "parameters" : [ {
          "name" : "billingPeriod",
          "in" : "query",
          "description" : "Billed period",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "examples" : {
            "Year-Month" : {
              "description" : "Year-Month",
              "value" : "2023-12"
            }
          }
        }, {
          "name" : "businessId",
          "in" : "query",
          "description" : "Filter by specific business ID",
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "Business ID" : {
              "description" : "Business ID",
              "value" : "my-business-id"
            }
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of conversationsEach response carries 2500 conversations max. You should keep fetching the next page of conversations while `nextPage` is not null.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WhatsAppDetailedConversationsPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/calls" : {
      "get" : {
        "tags" : [ "calls" ],
        "summary" : "List calls",
        "description" : "List calls by date. (To start a call, use /chats-actions/start-call)\nYou can inspect:\n- all the calls in a given period (using `from` and `to`)\n- the calls for a particular chat (using `chat-id` or `channel-id` together with `contact-id`)",
        "operationId" : "list-calls",
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Min call datetime. It not sent, it will default to one day before `to`. (Not required when searching a chat calls)",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2021-01-01T00:00:00Z"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Max call datetime. The default is `now()`. (Not required when searching a chat calls)",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2022-01-05T12:30:42Z"
        }, {
          "name" : "channel-id",
          "in" : "query",
          "description" : "Required to fetch a chat's calls by contact id. You must also provide `contact-id` param.",
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "Channel id" : {
              "description" : "Channel id",
              "value" : "botproject-whatsapp-5491147038***"
            },
            "WhatsApp Line" : {
              "description" : "WhatsApp Line",
              "value" : "5491147038***"
            },
            "Recipient id" : {
              "description" : "Recipient id",
              "value" : "5125186904100***"
            }
          }
        }, {
          "name" : "contact-id",
          "in" : "query",
          "description" : "The chat id in the chat platform. You must also provide `channel-id` param.",
          "schema" : {
            "type" : "string"
          },
          "example" : "5491147038***"
        }, {
          "name" : "chat-id",
          "in" : "query",
          "description" : "The id of the chat in Botmaker. (If you use this parameter, `channel-id` and `contact-id` won't be used).",
          "schema" : {
            "type" : "string"
          },
          "example" : "ABC123DEF456GHI789JK"
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of calls, sorted by creation time. Each response carries 250 calls max; if there are more calls, the next page *url* will be returned in `nextPage`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CallsPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/platform-integrations" : {
      "post" : {
        "tags" : [ "ecommerce/catalogs" ],
        "summary" : "Connect to external catalog platform",
        "description" : "Connects the Botmaker catalog (`catalogId`) to a chat platform catalog (WhatsApp, Google Business Messages).\n You can provide an external Catalog Id that represents an existing catalog in the external platform.",
        "operationId" : "catalog-platform-connect",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CatalogPlatformConnectRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "Catalog successfully connected to platform.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CatalogPlatformIntegration"
                }
              }
            }
          },
          "400" : {
            "description" : "Platform catalog already connected.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per minute allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs" : {
      "get" : {
        "tags" : [ "ecommerce/catalogs" ],
        "summary" : "List catalogs",
        "description" : "List all catalogs.",
        "operationId" : "list-catalogs",
        "responses" : {
          "200" : {
            "description" : "A page of 250 catalogs. You should keep calling the `nextPageURL` until it comes `null`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CatalogPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "ecommerce/catalogs" ],
        "summary" : "Create catalog",
        "description" : "Create a catalog.",
        "operationId" : "create-catalog",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CatalogRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "The id of the new catalog.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IdResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Request is missing `title` or catalog already existed with that `title`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per minute allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/products" : {
      "get" : {
        "tags" : [ "ecommerce/products" ],
        "summary" : "List/Search catalog products",
        "description" : "List or search catalog products.",
        "operationId" : "list-search-catalog-products",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "The botmaker catalog id. You can get it at [/ecommerce/catalogs](https://api.botmaker.com/v2/#/list-catalogs)",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "categoryCode",
          "in" : "query",
          "description" : "Filter products by category.",
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The catalog products.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ProductsPage"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "ecommerce/products" ],
        "summary" : "Create/Update products",
        "description" : "Create or Update a catalog products.",
        "operationId" : "create-catalog-products",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "The botmaker catalog id. You can get it at [/ecommerce/catalogs](https://api.botmaker.com/v2/#/list-catalogs)",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ProductsRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "The products were successfully created or updated. Note that after you created/updated all the products you needed, you need to `POST /ecommerce/catalogs/{catalogId}/platform-integrations/{platformOrPlatformCatalogId}/sync` to publish the products to the platform the catalog is linked to."
          },
          "400" : {
            "description" : "Missing or invalid product field.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/stores" : {
      "get" : {
        "tags" : [ "ecommerce/stores" ],
        "summary" : "List stores",
        "description" : "List all stores.",
        "operationId" : "list-stores",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The catalog stores.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/StoresRequest"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "ecommerce/stores" ],
        "summary" : "Create/Update stores inventory",
        "description" : "Create or Update a stores inventory.",
        "operationId" : "create-stores-inventory",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "The botmaker catalog id. You can get it at [/ecommerce/catalogs](https://api.botmaker.com/v2/#/list-catalogs)",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/StoresRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "The inventory stores were successfully created or updated. "
          },
          "400" : {
            "description" : "Missing or invalid inventory field.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/categories" : {
      "get" : {
        "tags" : [ "ecommerce/categories" ],
        "summary" : "List categories",
        "description" : "List categories of a catalog.",
        "operationId" : "list-catalog-categories",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "The botmaker catalog id. You can get it at [/ecommerce/catalogs](https://api.botmaker.com/v2/#/list-catalogs)",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The catalog categories.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CategoryRequest"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "ecommerce/categories" ],
        "summary" : "Create/Update categories",
        "description" : "Create or Update catalog categories.",
        "operationId" : "create-catalog-categories",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "The botmaker catalog id. You can get it at [/ecommerce/catalogs](https://api.botmaker.com/v2/#/list-catalogs)",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CategoryRequest"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Categories successfully created or updated."
          },
          "400" : {
            "description" : "Category is missing code or title.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/zones" : {
      "get" : {
        "tags" : [ "ecommerce/zones" ],
        "summary" : "List zones",
        "description" : "Gets the zones associated with `catalogId` catalog.",
        "operationId" : "list-zones",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "id of the catalog.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of zones.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ZonePage"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "ecommerce/zones" ],
        "summary" : "Create/Update zones",
        "description" : "Creates new zones or updates them. A zone is a geographic area with price overrides for product prices that includes a group of stores.",
        "operationId" : "create-update-zones",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ZoneRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "Zones created."
          },
          "400" : {
            "description" : "Invalid zones request."
          },
          "404" : {
            "description" : "Catalog not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/categories/{categoryCode}" : {
      "delete" : {
        "tags" : [ "ecommerce/categories" ],
        "summary" : "Delete category",
        "description" : "Delete a category by code.",
        "operationId" : "delete-catalog-category",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "categoryCode",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "Category successfully deleted."
          },
          "404" : {
            "description" : "Category not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 10 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/products/{sku}" : {
      "get" : {
        "tags" : [ "ecommerce/products" ],
        "summary" : "Get product by sku",
        "description" : "Get product data by SKU.",
        "operationId" : "get-product",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "The botmaker catalog id. You can get it at [/ecommerce/catalogs](https://api.botmaker.com/v2/#/list-catalogs)",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sku",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The product.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ProductReqRes"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog or product not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "delete" : {
        "tags" : [ "ecommerce/products" ],
        "summary" : "Delete product by sku",
        "description" : "Delete a product by its SKU.",
        "operationId" : "delete-catalog-product",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sku",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "Product successfully deleted."
          },
          "404" : {
            "description" : "Product not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 30 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/products/batch/delete" : {
      "post" : {
        "tags" : [ "ecommerce/products" ],
        "summary" : "Delete products",
        "description" : "Delete products of specific catalog by list of skus, max size to delete is 50. Get Catalog ID from /ecommerce/catalogs.",
        "operationId" : "delete-catalog-products",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SkuListReqRes"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Product successfully deleted."
          },
          "404" : {
            "description" : "Product not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 30 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/stores/{code}" : {
      "delete" : {
        "tags" : [ "ecommerce/stores" ],
        "summary" : "Delete catalog store",
        "description" : "Delete store by store code.",
        "operationId" : "delete-catalog-store",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "Store successfully deleted."
          },
          "404" : {
            "description" : "Store not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 30 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/stores/batch/delete" : {
      "post" : {
        "tags" : [ "ecommerce/stores" ],
        "summary" : "Delete catalog stores",
        "description" : "Delete stores by list of stores codes.",
        "operationId" : "delete-catalog-stores",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/IdListReqRes"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Product successfully deleted."
          },
          "404" : {
            "description" : "Product not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 30 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/platform-integrations/{platformOrPlatformCatalogId}" : {
      "delete" : {
        "tags" : [ "ecommerce/catalogs" ],
        "summary" : "Disconnect from external catalog platform",
        "description" : "Disconnects the Botmaker catalog (`catalogId`) from a chat platform catalog.",
        "operationId" : "catalog-platform-disconnect",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "The botmaker catalog id. You can get it at [/ecommerce/catalogs](https://api.botmaker.com/v2/#/list-catalogs)",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "platformOrPlatformCatalogId",
          "in" : "path",
          "description" : "The catalog platform you want to sync with or the catalog id in that platform. You can get these at [/ecommerce/catalogs/{catalogId}](https://api.botmaker.com/v2/#/get-catalog).",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "platform" : {
              "description" : "platform",
              "value" : "meta"
            },
            "catalogId" : {
              "description" : "catalogId",
              "value" : 423260175108813
            },
            "platform:catalogId" : {
              "description" : "platform:catalogId",
              "value" : "meta:423260175108813"
            }
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "Catalog disconnected from platform."
          },
          "404" : {
            "description" : "Catalog or integration not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per minute allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/zones/{zoneCode}" : {
      "get" : {
        "tags" : [ "ecommerce/zones" ],
        "summary" : "Get zone by code",
        "description" : "Gets a list of zone by code. A zone is a geographic area with price overrides for product prices that includes a group of stores.",
        "operationId" : "get-zone",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "The botmaker catalog id. You can get it at [/ecommerce/catalogs](https://api.botmaker.com/v2/#/list-catalogs)",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "zoneCode",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The zone.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ZonesReqRes"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog or Zone not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "delete" : {
        "tags" : [ "ecommerce/zones" ],
        "summary" : "Delete zone by code",
        "description" : "Delete zone by code. A zone is a geographic area with price overrides for product prices that includes a group of stores.",
        "operationId" : "delete-zone",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "zoneCode",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "Zone deleted."
          },
          "404" : {
            "description" : "Catalog not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/price-schemas" : {
      "get" : {
        "tags" : [ "ecommerce/price-schemas" ],
        "summary" : "List Price Schemas from Catalog",
        "description" : "This endpoint returns a list of the price-schemas available for the specified catalog.The price schemas are an overwriting of the current prices of the products by zone.",
        "operationId" : "list-price-schemas",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The price schemas.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PriceSchemasResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Price schemas not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "ecommerce/price-schemas" ],
        "summary" : "Create or Update new price schema",
        "description" : "Create new price schema or Update an existing price schema. The price schemas are an overwriting of the current prices of the products by zone.",
        "operationId" : "create-price-schemas",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : { }
          }
        },
        "responses" : {
          "201" : {
            "description" : "The products schemas were successfully created or updated. "
          },
          "400" : {
            "description" : "Missing or invalid Price schemas.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Price schemas not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200" : {
            "description" : "created/updated",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/Pricing"
                  }
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/price-schemas/{zoneCode}" : {
      "get" : {
        "tags" : [ "ecommerce/price-schemas" ],
        "summary" : "List Price Schemas by zone",
        "description" : "This endpoint returns a list of the price-schemas available for the specified catalog and zone code.  The price schemas are an overwriting of the current prices of the products by zone",
        "operationId" : "list-price-schemas-by-zone",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "zoneCode",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The price schemas.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PriceSchemasResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Price schemas not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/platform-integrations/{platformOrPlatformCatalogId}/sync" : {
      "post" : {
        "tags" : [ "ecommerce/catalogs" ],
        "summary" : "Sync catalog with external catalog platform",
        "description" : "Syncs a Catalog with an outgoing External Catalog. This will push all products to an external catalog such as Facebook Catalog in order to feed special ChatChannels like WhatsApp or Google Business Messages. Update is done async, it may take up to 5 minutes to reflect change.",
        "operationId" : "catalog-platform-sync",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "description" : "The botmaker catalog id. You can get it at [/ecommerce/catalogs](https://api.botmaker.com/v2/#/list-catalogs)",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "platformOrPlatformCatalogId",
          "in" : "path",
          "description" : "The catalog platform you want to sync with or the catalog id in that platform. You can get these at [/ecommerce/catalogs/{catalogId}](https://api.botmaker.com/v2/#/get-catalog).",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "platform" : {
              "description" : "platform",
              "value" : "meta"
            },
            "catalogId" : {
              "description" : "catalogId",
              "value" : 423260175108813
            },
            "platform:catalogId" : {
              "description" : "platform:catalogId",
              "value" : "meta:423260175108813"
            }
          }
        } ],
        "responses" : {
          "202" : {
            "description" : "A webhook id and url to track the outcome of the sync process.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookNotificationIdWithResultResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Catalog or platform integration not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per minute allowed."
          }
        }
      }
    },
    "/ecommerce/catalogs/{catalogId}/zones/batch/delete" : {
      "post" : {
        "tags" : [ "ecommerce/zones" ],
        "summary" : "Delete zones",
        "description" : "Delete list of zones (including the price schema if it has an empty array of attachedZoneCodes) based on the requested list of codes and matching them with the specific catalog. A zone is a geographic area with price overrides for product prices that includes a group of stores.",
        "operationId" : "batch-delete-zones",
        "parameters" : [ {
          "name" : "catalogId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The list of zone codes to delete.",
          "content" : {
            "*/*" : {
              "schema" : {
                "$ref" : "#/components/schemas/ZonesBatchReqRes"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Zones deleted."
          },
          "404" : {
            "description" : "Catalog not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/channels" : {
      "get" : {
        "tags" : [ "channels" ],
        "summary" : "List channels",
        "operationId" : "list-channels",
        "parameters" : [ {
          "name" : "platform",
          "in" : "query",
          "description" : "Fetch channels from `platform` only.",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "active",
          "in" : "query",
          "description" : "Filter only active channels.",
          "schema" : {
            "type" : "boolean"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The channels of the bot project.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ChannelsListResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid platform.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/channels/{id}" : {
      "patch" : {
        "tags" : [ "channels" ],
        "summary" : "Update channel",
        "description" : "Toggle channel's active state. You can also change its name.",
        "operationId" : "updateChannel",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "The channel id.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The modifications to apply to the channel.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ChannelPatch"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "The channel was updated correctly."
          },
          "404" : {
            "description" : "Channel not found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IChannelResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/chats/{chatReference}" : {
      "get" : {
        "tags" : [ "chats" ],
        "summary" : "Get chat",
        "description" : "Gets the state of a chat.<br>*Note: this endpoint searches chats whose last activity occurred less than 2 months ago. (To search older chats, use [search chats endpoint](list-search-chats)).*",
        "operationId" : "get-chat",
        "parameters" : [ {
          "name" : "chatReference",
          "in" : "path",
          "description" : "One of:\n- The `chatId` (You get the `chatId` from other endpoints of the api or from the url of a chat in Botmaker, e. g. go.botmaker.com/#/chat/{chatId})\n- Concatenation of `channelId` + `:` + `contactId`. `channelId` can be one of those you get at [GET /channels](https://api.botmaker.com/v2.0/#/operations/getChannels) endpoint, a WhatsApp phone line, the recipient id (in Messenger, Workplace) or a Telegram token.\n- An external id (some bots load users from an organization's internal database, and each of these users has an id in that organization; this id is the externalId)",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "chatId" : {
              "description" : "chatId",
              "value" : "BBXP3U1BXSTSNDTN8PIN"
            },
            "channel" : {
              "description" : "channel",
              "value" : "botproject-whatsapp-12185208***:5491147038***"
            },
            "contactId" : {
              "description" : "contactId",
              "value" : "botproject-whatsapp-12185208***:CO.2474653243023927"
            }
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The chat state.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ChatWithMessagesResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Chat not found."
          },
          "429" : {
            "description" : "Only 3 requests per second allowed."
          }
        }
      },
      "patch" : {
        "tags" : [ "chats" ],
        "summary" : "Update chat",
        "description" : "Change chat variables, tags, name, email or country.",
        "operationId" : "update-chat",
        "parameters" : [ {
          "name" : "chatReference",
          "in" : "path",
          "description" : "One of:\n- The `chatId` (You get the `chatId` from other endpoints of the api or from the url of a chat in Botmaker, e. g. go.botmaker.com/#/chat/{chatId})\n- Concatenation of `channelId` + `:` + `contactId`. `channelId` can be one of those you get at [GET /channels](https://api.botmaker.com/v2.0/#/operations/getChannels) endpoint, a WhatsApp phone line, the recipient id (in Messenger, Workplace) or a Telegram token.\n- An external id (some bots load users from an organization's internal database, and each of these users has an id in that organization; this id is the externalId)",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "chatId" : {
              "description" : "chatId",
              "value" : "BBXP3U1BXSTSNDTN8PIN"
            },
            "channel" : {
              "description" : "channel",
              "value" : "botproject-whatsapp-12185208***:5491147038***"
            },
            "contactId" : {
              "description" : "contactId",
              "value" : "botproject-whatsapp-12185208***:CO.2474653243023927"
            }
          }
        } ],
        "requestBody" : {
          "description" : "The changes to apply to the chat. Send only the fields you want to change, the rest can be omitted.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ChatUpdateRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "Chat successfully updated."
          },
          "400" : {
            "description" : "Chat body problems.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Chat not found."
          },
          "429" : {
            "description" : "Only 3 requests per second allowed."
          }
        }
      }
    },
    "/chats/variables" : {
      "get" : {
        "tags" : [ "chats" ],
        "summary" : "Get chat variable assignations",
        "description" : "Returns the most recent assignment for each variable in a chat, limited to the last 31 days.",
        "operationId" : "get-chat-variables",
        "parameters" : [ {
          "name" : "chat-id",
          "in" : "query",
          "description" : "The chat id.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "from",
          "in" : "query",
          "description" : "Start of the time range. Defaults to 1 day before `to`. Cannot be older than 31 days",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2024-03-01T00:00:00Z"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "End of the time range. Defaults to now.",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2024-03-31T23:59:59Z"
        } ],
        "responses" : {
          "200" : {
            "description" : "Last assignation per variable.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ChatVariableAssignationsPage"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid parameters.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Chat not found."
          },
          "429" : {
            "description" : "Only 20 requests per second allowed."
          }
        }
      }
    },
    "/chats" : {
      "get" : {
        "tags" : [ "chats" ],
        "summary" : "List and Search chats",
        "description" : "With this endpoint you can:\n- **list all the chats** states, ordered by the chat last activity time.\n- **Search for a specific chat** state. You can search by `contact-id`, user's `name` and by `email`.\nEach request returns a max of 250 chats elements and a `nextPage` url to get the next chats. You should keep calling this endpoint until `nextPage` returns null.",
        "operationId" : "list-search-chats",
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Filter chats with last activity greater than `from`. If not passed, it default to one day before `to`.",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2021-01-01T00:00:00Z"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Filter chats with last activity minor than `to`. If not passed, it default to `now()`.",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2022-01-05T12:30:42Z"
        }, {
          "name" : "name",
          "in" : "query",
          "description" : "Search chat by user first and last name (separated by ' ' or '-').",
          "schema" : {
            "type" : "string"
          },
          "example" : "Dante Fulanito"
        }, {
          "name" : "emails",
          "in" : "query",
          "description" : "Search chat by user's email. A comma separated list of emails is allowed.",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "channel-id",
          "in" : "query",
          "description" : "Filter chats from a particular channel. Also, this param is required if you're searching by `contact-id`.",
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "Channel id" : {
              "description" : "Channel id",
              "value" : "botproject-whatsapp-5491147038***"
            },
            "WhatsApp Line" : {
              "description" : "WhatsApp Line",
              "value" : "5491147038***"
            },
            "Recipient id" : {
              "description" : "Recipient id",
              "value" : "5125186904100***"
            }
          }
        }, {
          "name" : "contact-id",
          "in" : "query",
          "description" : "Search chat by user's contact (in WhatsApp, the user's phone number). You must also provide `channel-id` query param.",
          "schema" : {
            "type" : "string"
          },
          "example" : "5491147038..."
        }, {
          "name" : "long-term-search",
          "in" : "query",
          "description" : "Send this param as `true` when you want to list beyond the last 7 days.<br>**This endpoint adds up bytes to your BI data sources consumptions. You must explicitly state you are aware of this by sending this param in `true`.**",
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "only-users-never-talked",
          "in" : "query",
          "description" : "Only search chats with that never initiated a conversation (no session)",
          "schema" : {
            "type" : "boolean"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of chats.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ChatsPage"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid channel id.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 3 requests per second allowed."
          }
        }
      }
    },
    "/chats-actions/send-read-typing-feedback" : {
      "post" : {
        "tags" : [ "chats actions" ],
        "summary" : "Send read/typing feedback",
        "description" : "Inform the user that their message was read and/or a response is being generated..<br>Depending on the value of the `isTyping` parameter, the service will mark previous messages as read or send a typing indicator to the user.",
        "operationId" : "send-read-typing-feedback",
        "requestBody" : {
          "description" : "Request object to update the state of a conversation in the messaging platform.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/MessageStateUpdateRequest"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Request accepted and processed ok. No content in the body",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "The channel is not available.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "410" : {
            "description" : "The contact has no incoming message on this channel to give feedback about.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500" : {
            "description" : "There was a problem setting a new message status.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 45 requests per second allowed."
          }
        }
      }
    },
    "/chats-actions/send-messages" : {
      "post" : {
        "tags" : [ "chats actions" ],
        "summary" : "Send messages",
        "description" : "Send messages to a chat.<br>_Currently supported platforms: Whatsapp, Telegram, Messenger, Gbm, Webchat, Googlechat, Instagram_chat, MS Teams, Facebook Page._<br><br>For WhatsApp, the `whatsappInteractive` field supports CTA URL buttons, intent quick-reply buttons, location requests, and **interactive list messages** (sections + rows). See the field description on `whatsappInteractive` for the full per-type contract.",
        "operationId" : "send-messages",
        "requestBody" : {
          "description" : "A chat reference and the messages to send to it.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/MessagesRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "description" : "The message sending Job.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookNotificationIdResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Chat reference or message body problem.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 350 requests per second allowed."
          }
        }
      }
    },
    "/chats-actions/start-call" : {
      "post" : {
        "tags" : [ "chats actions", "calls" ],
        "summary" : "Start Call",
        "description" : "Creates a call, returning a list of links to join the call.",
        "operationId" : "start-call",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/StartCallRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/StartCallResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Chat reference or agent not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/chats-actions/trigger-intent" : {
      "post" : {
        "tags" : [ "chats actions" ],
        "summary" : "Trigger intent",
        "description" : "Triggers an intent or WhatsApp template in a chat.",
        "operationId" : "trigger-intent",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/TriggerIntentRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookNotificationIdResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Chat reference or message body problem.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/chats-actions/batch/trigger-intent" : {
      "post" : {
        "tags" : [ "chats actions" ],
        "summary" : "Trigger intent batch",
        "description" : "Trigger intent in many (up to 500) chats. Use this endpoint to send WhatsApp templates.",
        "operationId" : "batch-trigger-intent",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/TriggerIntentBatchRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "description" : "An array of either a response id to track intent execution or an error.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/TriggerIntentBatchResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Request count is greater than 500.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 60 requests per second allowed."
          }
        }
      }
    },
    "/chats-actions/commerce/checkout-cart" : {
      "post" : {
        "tags" : [ "chats actions" ],
        "summary" : "Commerce/Checkout Cart",
        "description" : "Checkout the current active cart for the specified contact.<br>If a Cart was found, this operation will close it, calculate the totals, and return its details.<br>If a Cart is not found for the user, this operation will return 404 NOT FOUND.<br>_Currently supported platforms: Whatsapp._",
        "operationId" : "checkout-cart",
        "requestBody" : {
          "description" : "A chat reference with an active cart in its state. ",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CartRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "A closed cart",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CartResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Chat reference or message body problem.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "There is no active cart for the chat reference",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 60 requests per second allowed."
          }
        }
      }
    },
    "/chats-actions/commerce/send-products-message" : {
      "post" : {
        "tags" : [ "chats actions" ],
        "summary" : "Commerce/Send product messages",
        "description" : "Send products to a given number.<br>If a cart is currently active/open, any products selected by the user will be appended. <br>_Currently supported platforms: Whatsapp._",
        "operationId" : "send-products",
        "requestBody" : {
          "description" : "A chat reference and the messages to send to it.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ProductRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "description" : "The message sending Job.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookNotificationIdResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Chat reference or message body problem.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 60 requests per second allowed."
          }
        }
      }
    },
    "/chats-actions/send-products" : {
      "post" : {
        "tags" : [ "chats actions" ],
        "summary" : "Send products (Deprecated)",
        "description" : "Will be removed on 31/07/2024. Change your API calls to use /chats-actions/commerce/send-products.<br>Send products to a given number.<br>_Currently supported platforms: Whatsapp._",
        "operationId" : "send-products_1",
        "requestBody" : {
          "description" : "A chat reference and the messages to send to it.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ProductRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "description" : "The message sending Job.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookNotificationIdResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Chat reference or message body problem.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 60 requests per second allowed."
          }
        },
        "deprecated" : true
      }
    },
    "/chats-actions/send-reaction" : {
      "post" : {
        "tags" : [ "chats actions" ],
        "summary" : "Create reaction",
        "operationId" : "create-reaction",
        "requestBody" : {
          "description" : "The reaction to create.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateReactionRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "description" : "Create reaction request was accepted. It will be processed asynchronously"
          },
          "400" : {
            "description" : "Invalid reaction body.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "delete" : {
        "tags" : [ "chats actions" ],
        "summary" : "Delete reaction",
        "operationId" : "delete-reaction",
        "requestBody" : {
          "description" : "The reaction to delete.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteReactionRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "description" : "Delete reaction request was accepted. It will be processed asynchronously"
          },
          "400" : {
            "description" : "Invalid reaction body.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/constants/{id}" : {
      "get" : {
        "tags" : [ "bot config" ],
        "summary" : "Get constant",
        "description" : "Get the constant.",
        "operationId" : "get-constant-value-by-id",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Constant id on botmaker. You can check them on [constants page](https://go.botmaker.com/#/variables).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Shows constant data.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstantResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Constant not found."
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      },
      "patch" : {
        "tags" : [ "bot config" ],
        "summary" : "Update constant",
        "description" : "Update constant value.",
        "operationId" : "update-constant-by-id",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Constant id on botmaker. You can check them on [constants page](https://go.botmaker.com/#/variables).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "Constant value to update.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ConstantRequest"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Constant correctly updated."
          },
          "400" : {
            "description" : "Invalid constant body.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Constant not found."
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/constants" : {
      "get" : {
        "tags" : [ "bot config" ],
        "summary" : "List constants",
        "description" : "List all constants of this bot.",
        "operationId" : "list-constants",
        "responses" : {
          "200" : {
            "description" : "A list of bot constants.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ConstantResponseList"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/contacts" : {
      "get" : {
        "tags" : [ "contacts" ],
        "summary" : "List contacts",
        "description" : "Returns a paginated list of contacts. <br>Supports optional filters: `channel-id` restricts results to contacts with a chat in a specific channel; `platform` restricts results to contacts with at least one chat on a given platform (e.g. `whatsapp`, `messenger`, `instagram_chat`); `has-whastapp-bsuid` restricts results to contacts that have a WhatsApp BSUID linked. `channel-id` and `platform` are mutually exclusive.",
        "operationId" : "list-contacts",
        "parameters" : [ {
          "name" : "channel-id",
          "in" : "query",
          "description" : "Filter contacts that have a chat in this specific channel. Cannot be combined with `platform`.",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "platform",
          "in" : "query",
          "description" : "Filter contacts by platform (e.g. `whatsapp`, `messenger`, `instagram_chat`). Cannot be combined with `channel-id`.",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "has-whastapp-bsuid",
          "in" : "query",
          "description" : "When `true`, only returns contacts that have at least one WhatsApp BSUID linked.",
          "schema" : {
            "type" : "boolean",
            "default" : false
          }
        }, {
          "name" : "next-page-token",
          "in" : "query",
          "description" : "Opaque token for fetching the next page. Use the value returned in the nextPage field of a previous response.",
          "schema" : {
            "type" : "string",
            "default" : ""
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of contacts.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ContactsPage"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid parameters.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 3 requests per second allowed."
          }
        }
      }
    },
    "/dashboards/agent-performance" : {
      "get" : {
        "tags" : [ "dashboards" ],
        "summary" : "List Agents performance",
        "description" : "Retrieve Agents Performance (as in <a href=\"https://go.botmaker.com/#/dashboards\">Agent Performance page</a>).\nBy default, it retrieves today metrics.You can filter by:\n- Specific range of time\n- Specific group\n- Specific queue\n- Specific agent\n- Specific role\n**This endpoint will increase your BI data sources costs, so use it with care (save the response to avoid retrieving the same period every time).**",
        "operationId" : "agent-performance",
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Min datetime. It not sent, it will default to the last hour.",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2021-01-01T00:00:00.000Z"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Max datetime. Requires \"from\"",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2022-01-05T12:30:42.000Z"
        }, {
          "name" : "groups",
          "in" : "query",
          "description" : "A list of groups to filter with.",
          "schema" : {
            "uniqueItems" : true,
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "example" : [ "ABC123DEF456GHI789JK", "ABC123DEF456GHI789JK" ]
        }, {
          "name" : "operatorsIds",
          "in" : "query",
          "description" : "A list of operators id to filter with.",
          "schema" : {
            "uniqueItems" : true,
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "example" : [ "ABC123DEF456GHI789JK", "ABC123DEF456GHI789JK" ]
        }, {
          "name" : "rolesIds",
          "in" : "query",
          "description" : "A list of roles to filter with.",
          "schema" : {
            "uniqueItems" : true,
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }, {
          "name" : "queues",
          "in" : "query",
          "description" : "A list of queues to filter with.",
          "schema" : {
            "uniqueItems" : true,
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }, {
          "name" : "includeSubgroups",
          "in" : "query",
          "description" : "Include Subgroups.",
          "schema" : {
            "type" : "boolean"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of metrics, sorted by session creation time. Each response carries 5000 metrics max; if there are more metrics, the next page *url* will be returned in `nextPage`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DashboardAgentPerformancePage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/dashboards/agent-metrics" : {
      "get" : {
        "tags" : [ "dashboards" ],
        "summary" : "List Agents metrics",
        "description" : "List agents metrics by conversation (as in <a href=\"https://go.botmaker.com/#/dashboards\">Agent Metrics page</a>).\nBy default, it retrieves today metrics.You can filter by:\n- Specific range of time\n- List of Channel IDs\n- List of Agent IDs\n- List of Queues\n- Agent Online Status\n- Session Status (open, closed, both)\n**This endpoint will increase your BI data sources costs, so use it with care (save the response to avoid retrieving the same period every time).**",
        "operationId" : "agents-metrics",
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Min datetime. It not sent, it will default to the last hour.",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2021-01-01T00:00:00.000Z"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Max datetime. Requires \"from\"",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2022-01-05T12:30:42.000Z"
        }, {
          "name" : "channel-ids",
          "in" : "query",
          "description" : "Required to filter metrics by channel id.",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "examples" : {
            "Channel id" : {
              "description" : "Channel id",
              "value" : "botproject-whatsapp-5491147038***"
            },
            "WhatsApp Line" : {
              "description" : "WhatsApp Line",
              "value" : "5491147038***"
            },
            "Recipient id" : {
              "description" : "Recipient id",
              "value" : "5125186904100***"
            }
          }
        }, {
          "name" : "agent-ids",
          "in" : "query",
          "description" : "A list of agents id to filter with.",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "example" : [ "ABC123DEF456GHI789JK", "ABC123DEF456GHI789JK" ]
        }, {
          "name" : "queues",
          "in" : "query",
          "description" : "A list of queues to filter with.",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "example" : [ "ABC123DEF456GHI789JK", "ABC123DEF456GHI789JK" ]
        }, {
          "name" : "online-status",
          "in" : "query",
          "description" : "The operator online status to filter with",
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "Online" : {
              "description" : "Online",
              "value" : "online"
            },
            "Offline" : {
              "description" : "Offline",
              "value" : "offline"
            },
            "All" : {
              "description" : "All",
              "value" : "all"
            }
          }
        }, {
          "name" : "session-status",
          "in" : "query",
          "description" : "Filter metrics by session status",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "Open" : {
              "description" : "Open",
              "value" : "open"
            },
            "Closed" : {
              "description" : "Closed",
              "value" : "closed"
            }
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of metrics, sorted by session creation time. Each response carries 5000 metrics max; if there are more metrics, the next page *url* will be returned in `nextPage`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DashboardMetricsPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/entities/{entityName}" : {
      "get" : {
        "tags" : [ "entities" ],
        "summary" : "Get entity",
        "description" : "Gets entity by name",
        "operationId" : "get-entity",
        "parameters" : [ {
          "name" : "entityName",
          "in" : "path",
          "description" : "id or name of the entity.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The entity."
          },
          "404" : {
            "description" : "Entity not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "entities" ],
        "summary" : "Create/Update entity",
        "description" : "Creates a new entity or updates an entity",
        "operationId" : "create-entity",
        "parameters" : [ {
          "name" : "entityName",
          "in" : "path",
          "description" : "Entity name",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The entity request.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/EntityResponse"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "Entity created."
          },
          "400" : {
            "description" : "Invalid entity data."
          },
          "404" : {
            "description" : "Entity not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "delete" : {
        "tags" : [ "entities" ],
        "summary" : "Delete entity",
        "description" : "Deletes an entity by name.",
        "operationId" : "delete-entity",
        "parameters" : [ {
          "name" : "entityName",
          "in" : "path",
          "description" : "Entity name",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "Entity deleted."
          },
          "404" : {
            "description" : "Entity not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        },
        "security" : [ {
          "access-token" : [ ]
        } ]
      }
    },
    "/intents/{idOrName}" : {
      "get" : {
        "tags" : [ "intents" ],
        "summary" : "Get intent",
        "operationId" : "get-intent",
        "parameters" : [ {
          "name" : "idOrName",
          "in" : "path",
          "description" : "Id or name of the intent.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The intent with id or name.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IntentResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Intent not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/intents" : {
      "get" : {
        "tags" : [ "intents" ],
        "summary" : "List intents",
        "description" : "List all intents. This helps to find out intents ids or names needed as param in `/chat-actions/trigger-intent`.",
        "operationId" : "list-intents",
        "responses" : {
          "200" : {
            "description" : "A page of 200 intents. You should keep calling the `nextPageURL` until it comes `null`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IntentsPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/knowledge-bases" : {
      "get" : {
        "tags" : [ "knowledge bases" ],
        "summary" : "Get Knowledge Bases",
        "description" : "Retrieves all knowledge bases for the current business",
        "operationId" : "knowledge-base-get",
        "responses" : {
          "200" : {
            "content" : {
              "application/json" : { }
            }
          },
          "400" : {
            "description" : "BAD_REQUEST",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500" : {
            "description" : "INTERNAL_SERVER_ERROR",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 10 requests per second allowed."
          }
        }
      },
      "put" : {
        "tags" : [ "knowledge bases" ],
        "summary" : "Upload Knowledge Base",
        "description" : "Update a Knowledge Base based on the specified content",
        "operationId" : "knowledge-base-update",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UploadKnowledgeBaseRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "content" : {
              "application/json" : { }
            }
          },
          "400" : {
            "description" : "BAD_REQUEST",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "knowledge bases" ],
        "summary" : "Upload and create a new Knowledge Base.",
        "description" : "Creates a knowledge base based on the specified content.",
        "operationId" : "knowledge-base-upload",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UploadKnowledgeBaseRequest"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "content" : {
              "application/json" : { }
            }
          },
          "400" : {
            "description" : "BAD_REQUEST",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409" : {
            "description" : "CONFLICT - Knowledge Base already exists. Use PUT to update or the Upsert parameter to force an update if the KB already exists.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/private-media/temp-access-link" : {
      "get" : {
        "tags" : [ "media" ],
        "summary" : "Get temporary access link for private file",
        "description" : "Generates a temporal link to download a private file. The link will expire in `expire-minutes` minutes.\n(Use this endpoint only if your project has restricted storage access enabled)",
        "operationId" : "private-file-temp-access-link",
        "parameters" : [ {
          "name" : "file-url",
          "in" : "query",
          "description" : "File private url",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "https://storage.googleapis.com/storage.botmaker.com/public/res/<BusinessId>/users/rand/path/a1b2/3816649bf102f0243d243099b0d32bec.jpeg"
        }, {
          "name" : "expire-minutes",
          "in" : "query",
          "description" : "The access link duration in minutes. Default is 3.",
          "schema" : {
            "maximum" : 15,
            "minimum" : 1,
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The temporary access link (with expire token)"
          },
          "400" : {
            "description" : "No file-url sent."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/messages" : {
      "get" : {
        "tags" : [ "chats" ],
        "summary" : "List messages",
        "description" : "With this endpoint you can:\n- Get the **entire message history** from all chats.\n- Get the message history for **one particular chat**. To select a chat, use either `chatId` alone or both `channelId` and `contactId`.<br>To filter by datetime, use `from` and `to`.<br>**This endpoint will increase your BI data sources costs, so use it with care (save the response to avoid retrieving the same period every time).**",
        "operationId" : "list-messages",
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Min message datetime. Defaults to:\n- **1 day ago** for long-term searches.\n- **3 days ago** for non long-term searches without chat or customer filters (maximum range for non long-term searches).\n- **90 days ago** for non long-term searches with chat or customer filters (maximum range for non long-term searches).",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2021-01-01T00:00:00Z"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Max message datetime. Defaults to:\n- **one hour ago** for long-term searches.\n- **now** for non long-term searches",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2022-01-05T12:30:42Z"
        }, {
          "name" : "channel-id",
          "in" : "query",
          "description" : "Required to fetch a chat's messages by contact id. You must also provide `contact-id` param.",
          "schema" : {
            "type" : "string"
          },
          "examples" : {
            "Channel id" : {
              "description" : "Channel id",
              "value" : "botproject-whatsapp-5491147038***"
            },
            "WhatsApp Line" : {
              "description" : "WhatsApp Line",
              "value" : "5491147038***"
            },
            "Recipient id" : {
              "description" : "Recipient id",
              "value" : "5125186904100***"
            }
          }
        }, {
          "name" : "contact-id",
          "in" : "query",
          "description" : "The chat id in the chat platform. You must also provide `channel-id` param.",
          "schema" : {
            "type" : "string"
          },
          "example" : "5491147038***"
        }, {
          "name" : "chat-id",
          "in" : "query",
          "description" : "The id of the chat in Botmaker. (If you use this parameter, `channel-id` and `contact-id` won't be used).",
          "schema" : {
            "type" : "string"
          },
          "example" : "ABC123DEF456GHI789JK"
        }, {
          "name" : "chat-platform",
          "in" : "query",
          "description" : "Retrieves messages sent in `chat-platform` only.",
          "schema" : {
            "$ref" : "#/components/schemas/ChatPlatformQueryParam"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "schema" : {
            "maximum" : 1500,
            "minimum" : 250,
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "long-term-search",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "description" : "**This endpoint adds up bytes to your BI data sources consumptions. You must explicitly state you are aware of this by sending this param in `true`.**"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of messages, sorted by creation time. Each response carries 1000 messages max; if there are more messages, the next page *url* will be returned in `nextPage`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MessagesPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/notifications/contacts-blacklist" : {
      "get" : {
        "tags" : [ "notifications" ],
        "summary" : "List blacklisted contacts",
        "description" : "Retrieve contacts from blacklist. The blacklist prevents notifications from being sent to certain telephone numbers.",
        "operationId" : "contacts-blacklist_2",
        "responses" : {
          "200" : {
            "description" : "A page of contacts in blacklist",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BlackListPage"
                }
              }
            }
          },
          "404" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 30 requests per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "notifications" ],
        "summary" : "Add contacts to blacklist",
        "description" : "Add one or more contacts to the notifications blacklist with a limit of 1000 contacts per request. The blacklist prevents notifications from being sent to certain telephone numbers.",
        "operationId" : "contacts-blacklist",
        "requestBody" : {
          "description" : "List of contacts to add in the blacklist.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BlackListReqRes"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Contacts have been added to blacklist successfully."
          },
          "400" : {
            "description" : "No contacts sent.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 30 requests per second allowed."
          }
        }
      }
    },
    "/notifications/campaigns" : {
      "get" : {
        "tags" : [ "notifications" ],
        "summary" : "List notification campaigns",
        "description" : "List all notification campaigns",
        "operationId" : "list-campaigns",
        "responses" : {
          "200" : {
            "description" : "A page of 250 notification campaigns. You should keep calling the `nextPageURL` until it comes `null`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CampaignPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "notifications" ],
        "summary" : "Create campaign",
        "description" : "Creates a new notification campaign",
        "operationId" : "create-campaign",
        "requestBody" : {
          "description" : "The campaign to create.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CampaignRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "Campaign created."
          },
          "400" : {
            "description" : "Invalid campaign data."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/notifications" : {
      "post" : {
        "tags" : [ "notifications" ],
        "summary" : "Send notification",
        "description" : "Creates and send a new notification in a campaign or send to more contacts of an existing one",
        "operationId" : "send-notification",
        "requestBody" : {
          "description" : "The notification to be sent.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NotificationRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "Notification sent."
          },
          "400" : {
            "description" : "Invalid campaign data."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/notifications/contacts-blacklist/{contact}" : {
      "delete" : {
        "tags" : [ "notifications" ],
        "summary" : "Remove contact from blacklist",
        "description" : "Remove a contact from blacklist. The blacklist prevents notifications from being sent to certain telephone numbers.",
        "operationId" : "contacts-blacklist_1",
        "parameters" : [ {
          "name" : "contact",
          "in" : "path",
          "description" : "The contact to remove from blacklist",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : 5491199995555
        } ],
        "responses" : {
          "204" : {
            "description" : "Contacts has been removed to blacklist successfully."
          },
          "400" : {
            "description" : "No contacts sent.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 30 requests per second allowed."
          }
        }
      }
    },
    "/notifications/sent-results/{notificationInstanceId}" : {
      "get" : {
        "tags" : [ "notifications" ],
        "summary" : "Get notification instance detail with customers",
        "description" : "Get the detail of customers for a notification instance. The path parameter accepts either the notification instance id or the notification name Returns 2000 customers per page, with pagination support via the 'nextPage' parameter.<br>**This endpoint will increase your BI data sources costs, so use it with care (save the response to avoid retrieving the same period every time).**",
        "operationId" : "get-notification-instance-detail",
        "parameters" : [ {
          "name" : "notificationInstanceId",
          "in" : "path",
          "description" : "Notification instance id, or notification name (returns the latest instance for that notification). A notification instance represents one delivery of a notification.",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : "notif_123456"
        } ],
        "responses" : {
          "200" : {
            "description" : "Notification instance detail with customers. Each response carries up to 2000 customers max; if there are more customers, the next page URL will be returned in `nextPage`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NotificationInstanceDetailResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid parameters.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Notification not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 3 requests per minute allowed."
          }
        }
      }
    },
    "/notifications/sent-results" : {
      "get" : {
        "tags" : [ "notifications" ],
        "summary" : "List sent notifications results",
        "description" : "List sent notifications and their status counters (sent, delivered, read, answered). If `notification-name` is provided, returns instances for that notification (ignoring date filters). If no `notification-name` is provided, returns instances within the date range (max 3 months back). Returns up to 500 instances per page, sorted by start datetime in descending order.",
        "operationId" : "list-sent-notifications-results",
        "parameters" : [ {
          "name" : "notification-name",
          "in" : "query",
          "description" : "Notification name (optional). If provided, date filters are ignored.",
          "schema" : {
            "type" : "string"
          },
          "example" : "Welcome Message"
        }, {
          "name" : "from",
          "in" : "query",
          "description" : "Min instance start datetime. Required when `notification-name` is not provided. Max 3 months back.",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2024-01-15T00:00:00Z"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Max instance start datetime. Required when `notification-name` is not provided. Defaults to `now()` minus one day.",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2024-01-16T00:00:00Z"
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of notification instances with counters. Each response carries 500 instances max; if there are more instances, the next page *url* will be returned in `nextPage`. The instances are in the `items` field.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NotificationInstancesPage"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid parameters.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Notification not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 30 requests per second allowed."
          }
        }
      }
    },
    "/attention-queues/{id}" : {
      "get" : {
        "tags" : [ "attention-queues" ],
        "summary" : "Get queue",
        "description" : "Get a queue of this bot by id.",
        "operationId" : "get-queue",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "The queue id. You can get it from `/queues`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The queue.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AttentionQueuesResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Queue not found."
          },
          "429" : {
            "description" : "Only 5 requests per minute allowed."
          }
        }
      }
    },
    "/attention-queues" : {
      "get" : {
        "tags" : [ "attention-queues" ],
        "summary" : "List queues",
        "description" : "List all queues of this bot. Each response carries 500 queues max; if there are more queues, the next page url will be returned in `nextPage`.",
        "operationId" : "list-queues",
        "responses" : {
          "200" : {
            "description" : "A page of queues.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AttentionQueuesPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per minute allowed."
          }
        }
      },
      "patch" : {
        "tags" : [ "attention-queues" ],
        "summary" : "Update queue",
        "description" : "Update a queue of this bot by id.",
        "operationId" : "update-queue",
        "parameters" : [ {
          "name" : "id",
          "in" : "query",
          "description" : "The queue id. You can get it from `/queues`.",
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The queue fields to update. Only the fields sent are changed.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AttentionQueueUpdateRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "The updated queue.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AttentionQueuesResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "The body is invalid.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Queue not found."
          },
          "429" : {
            "description" : "Only 5 requests per minute allowed."
          }
        }
      }
    },
    "/roles" : {
      "get" : {
        "tags" : [ "roles" ],
        "summary" : "List custom roles",
        "description" : "List all custom roles.",
        "operationId" : "list-roles",
        "responses" : {
          "200" : {
            "description" : "All the custom roles.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RolesPageResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "roles" ],
        "summary" : "Create a custom role",
        "description" : "Create a custom role. First it checks the role exists by `name`; if it doesn't, it creates the role.",
        "operationId" : "create-role",
        "requestBody" : {
          "description" : "The role to create.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RoleRequestResponse"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "The new role.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RoleRequestResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "The role already exists or the body is invalid.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/roles/{idOrName}" : {
      "get" : {
        "tags" : [ "roles" ],
        "summary" : "Get custom role",
        "description" : "Get custom role by id or name.",
        "operationId" : "get-role",
        "parameters" : [ {
          "name" : "idOrName",
          "in" : "path",
          "description" : "The role id or the name. You can get it from `/roles`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The role.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RoleRequestResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Role not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "patch" : {
        "tags" : [ "roles" ],
        "summary" : "Update custom role",
        "description" : "Update custom role.",
        "operationId" : "update-role",
        "parameters" : [ {
          "name" : "idOrName",
          "in" : "path",
          "description" : "The role id or the name. You can get it from `/roles`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The role to update.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RoleRequestResponse"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "Role updated succesfully."
          },
          "400" : {
            "description" : "The body is invalid.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Role not found.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/sessions" : {
      "get" : {
        "tags" : [ "chats" ],
        "summary" : "List sessions",
        "description" : "List sessions in a period, sorted by start datetime.\nFor each session, you can fetch its messages, final variables ,events and AI analysis by passing `include-messages`, `include-variables`, `include-events`, `include-ai-analysis`. Each one of these will increase your BI data sources costs.<br>**This endpoint will increase your BI data sources costs, so use it with care (save the response to avoid retrieving the same period every time).**",
        "operationId" : "list-sessions",
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Min session start datetime. If not sent, it will default to one day before `to`.",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2021-01-01T00:00:00Z"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Max session start datetime. When `include-open-sessions` is `false`, it defaults to `now()` minus one day; when `true`, it defaults to `now()`.",
          "schema" : {
            "type" : "string",
            "format" : "date-time"
          },
          "example" : "2022-01-05T12:30:42Z"
        }, {
          "name" : "long-term-search",
          "in" : "query",
          "description" : "**This endpoint adds up bytes to your BI data sources consumptions. You must explicitly state you are aware of this by sending this param in `true`.**",
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "include-open-sessions",
          "in" : "query",
          "description" : "By default, only finished sessions are returned. If you also need ongoing sessions, send this param in `true`.",
          "schema" : {
            "type" : "boolean",
            "default" : false
          }
        }, {
          "name" : "include-messages",
          "in" : "query",
          "description" : "Passing `true` will retrieve each session's messages.",
          "schema" : {
            "type" : "boolean",
            "default" : false
          }
        }, {
          "name" : "include-variables",
          "in" : "query",
          "description" : "Passing `true` will retrieve each session's final variable state.",
          "schema" : {
            "type" : "boolean",
            "default" : false
          }
        }, {
          "name" : "include-events",
          "in" : "query",
          "description" : "Passing `true` will retrieve each session's events.",
          "schema" : {
            "type" : "boolean",
            "default" : false
          }
        }, {
          "name" : "include-ai-analysis",
          "in" : "query",
          "description" : "Passing `true` will retrieve each session's AI Analysis.",
          "schema" : {
            "type" : "boolean",
            "default" : false
          }
        }, {
          "name" : "timestamp-precision",
          "in" : "query",
          "description" : "Select timestamp precision ( seconds | milliseconds )",
          "schema" : {
            "type" : "string",
            "default" : "seconds"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A page of sessions, sorted by creation time. Each response carries 500 sessions max; if there are more sessions, the next page *url* will be returned in `nextPage`.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SessionsPage"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/tickets" : {
      "get" : {
        "tags" : [ "tickets" ],
        "summary" : "List existing tickets",
        "operationId" : "list-tickets",
        "parameters" : [ {
          "name" : "limit",
          "in" : "query",
          "description" : "The page size.",
          "schema" : {
            "maximum" : 500,
            "minimum" : 1,
            "type" : "integer",
            "format" : "int32",
            "default" : 50
          }
        }, {
          "name" : "offset",
          "in" : "query",
          "description" : "Skip n results.",
          "schema" : {
            "minimum" : 0,
            "type" : "integer",
            "format" : "int64",
            "default" : 0
          }
        }, {
          "name" : "daysBeforeNow",
          "in" : "query",
          "description" : "Show tickets created N days before.",
          "schema" : {
            "minimum" : 1,
            "type" : "integer",
            "format" : "int32",
            "default" : 60
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Retrieve a list of tickets.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/TicketsResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Missing or invalid query params.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 60 requests per minute allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "tickets" ],
        "summary" : "Create ticket",
        "operationId" : "create-ticket",
        "requestBody" : {
          "description" : "The ticket to create.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateTicketRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "Ticket was created successfully. The new ticket attributes are returned including its new id.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/TicketResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid ticket body.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 60 requests per minute allowed."
          }
        }
      }
    },
    "/tickets/{ticketCode}" : {
      "get" : {
        "tags" : [ "tickets" ],
        "summary" : "Find existing ticket by code",
        "operationId" : "find-ticket",
        "parameters" : [ {
          "name" : "ticketCode",
          "in" : "path",
          "description" : "The ticket code.",
          "required" : true,
          "schema" : {
            "type" : "string"
          },
          "example" : 123
        } ],
        "responses" : {
          "200" : {
            "description" : "Retrieve a ticket.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/TicketResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Ticket not found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 60 requests per minute allowed."
          }
        }
      },
      "put" : {
        "tags" : [ "tickets" ],
        "summary" : "Update a ticket",
        "operationId" : "update-tickets",
        "parameters" : [ {
          "name" : "ticketCode",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The ticket to update.",
          "content" : {
            "*/*" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateTicketRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "The updated ticket.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/TicketResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid ticket body.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 60 requests per minute allowed."
          }
        }
      }
    },
    "/tickets/field-definitions" : {
      "get" : {
        "tags" : [ "tickets" ],
        "summary" : "List existing field definitions with entity type = TICKET",
        "operationId" : "list-field-definitions-tickets",
        "responses" : {
          "200" : {
            "description" : "Retrieve a list of field definitions with entity type = TICKET.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/FieldDefinitionResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only 60 requests per minute allowed."
          }
        }
      }
    },
    "/typifications" : {
      "get" : {
        "tags" : [ "bot config" ],
        "summary" : "List typifications",
        "operationId" : "list-typifications",
        "parameters" : [ {
          "name" : "agent-email",
          "in" : "query",
          "description" : "Filter typfications by agent email.",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "queue",
          "in" : "query",
          "description" : "Filter typfications by queue.",
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A list of typifications.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/TypificationResponseList"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/variables" : {
      "get" : {
        "tags" : [ "bot config" ],
        "summary" : "List variables",
        "operationId" : "list-variables",
        "parameters" : [ {
          "name" : "onlyTags",
          "in" : "query",
          "description" : "Filter only tags variables.",
          "schema" : {
            "type" : "boolean"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "A list of variables.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/VariablesListResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/webhooks/{id}/redirection-rules" : {
      "post" : {
        "tags" : [ "webhooks" ],
        "summary" : "Create redirection rule",
        "description" : "Redirection rules help testing a webhook being developed. They consist in the dev `URL` and a list of users (`chatsMatchProps`) to which the redirection applies. The messages from `chatsMatchProps` will be notified using the redirection rule's `URL`.",
        "operationId" : "create-webhook-redirection-rule",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "The webhook id. You can get it from `/webhooks`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "The redirection rule to create.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RedirectionRule"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "The new rule with id.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RedirectionRule"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid redirection rule body.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Webhook not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/webhooks/{webhookId}/redirection-rules/{ruleId}" : {
      "get" : {
        "tags" : [ "webhooks" ],
        "summary" : "Get webhook redirection rule",
        "description" : "Get webhook redirection rule.",
        "operationId" : "get-webhook-redirection-rule",
        "parameters" : [ {
          "name" : "webhookId",
          "in" : "path",
          "description" : "The webhook id. You can get it from `/webhooks`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "ruleId",
          "in" : "path",
          "description" : "The redirection rule id. You can get it from `/webhooks` or `/webhooks/{id}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The redirection rule.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RedirectionRule"
                }
              }
            }
          },
          "404" : {
            "description" : "Webhook or rule not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "delete" : {
        "tags" : [ "webhooks" ],
        "summary" : "Delete redirection rule",
        "description" : "Delete redirection rule.",
        "operationId" : "delete-webhook-redirection-rule",
        "parameters" : [ {
          "name" : "webhookId",
          "in" : "path",
          "description" : "The webhook id. You can get it from `/webhooks`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "ruleId",
          "in" : "path",
          "description" : "The redirection rule id. You can get it from `/webhooks` or `/webhooks/{id}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "Rule deleted."
          },
          "404" : {
            "description" : "Webhook or rule not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "patch" : {
        "tags" : [ "webhooks" ],
        "summary" : "Update redirection rule",
        "description" : "Redirection rules help testing a webhook being developed. They consist in the dev `URL` and a list of users (`chatsMatchProps`) to which the redirection applies. The messages from `chatsMatchProps` will be notified using the redirection rule's `URL`.",
        "operationId" : "update-webhook-redirection-rule",
        "parameters" : [ {
          "name" : "webhookId",
          "in" : "path",
          "description" : "The webhook id. You can get it from `/webhooks`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "ruleId",
          "in" : "path",
          "description" : "The redirection rule id. You can get it from `/webhooks` or `/webhooks/{id}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "You can change the `URL`, `name` or `chats` of a rule.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RedirectionRule"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "A redirection rule.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RedirectionRule"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid redirection rule body.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Webhook or rule not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/webhooks/{id}" : {
      "get" : {
        "tags" : [ "webhooks" ],
        "summary" : "Get webhook",
        "description" : "Get webhook by id.",
        "operationId" : "get-webhook",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "The webhook id. You can get it from `/webhooks`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The webhook.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookFullResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Webhook not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/webhooks" : {
      "get" : {
        "tags" : [ "webhooks" ],
        "summary" : "List webhooks",
        "description" : "List all webhooks.",
        "operationId" : "list-webhooks",
        "responses" : {
          "200" : {
            "description" : "All the webhooks.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WebhookListResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/whatsapp/accounts" : {
      "get" : {
        "tags" : [ "whatsapp accounts" ],
        "summary" : "List Whatsapp accounts",
        "description" : "List whatsapp accounts.",
        "operationId" : "list-whatsapp-accounts",
        "responses" : {
          "200" : {
            "description" : "The list of WhatsApp accounts.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WhatsAppAccountListResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "whatsapp accounts" ],
        "summary" : "Create WhatsApp Account",
        "description" : "This endpoint will create a temporary invitation link that can be shared with a customer. The client can then use that link to access the Onboarding Flow, create Business Manager (or select an existing one), and then register a new WhatsApp Number. If the number passes successfully Meta's approval stage, then it will be connected automatically to Botmaker.",
        "operationId" : "create-whatsapp-account",
        "requestBody" : {
          "description" : "The number of the WhatsApp account",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/WhatsAppAccountRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "An invitation link to the WhatsApp Onboarding Flow.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WhatsAppCreateAccountLinkResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid number.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request every 5 seconds allowed."
          }
        }
      }
    },
    "/whatsapp/accounts/{number}" : {
      "get" : {
        "tags" : [ "whatsapp accounts" ],
        "summary" : "Get WhatsApp account",
        "description" : "Get whatsapp account by Phone Number.",
        "operationId" : "get-whatsapp-account",
        "parameters" : [ {
          "name" : "number",
          "in" : "path",
          "description" : "The whatsapp number.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The WhatsApp account.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WhatsAppAccountResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Whatsapp account not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      }
    },
    "/whatsapp/accounts/{number}/status" : {
      "get" : {
        "tags" : [ "whatsapp accounts" ],
        "summary" : "Get WhatsApp Account Status",
        "description" : "Get WhatsApp account status and details by Phone Number. Retrieve the general status, the name status, verification status, and the certificate status.",
        "operationId" : "get-whatsapp-account-status",
        "parameters" : [ {
          "name" : "number",
          "in" : "path",
          "description" : "The whatsapp number",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The WhatsApp phone number and its details.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WhatsAppAccountStatusResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Whatsapp phone number not found."
          },
          "429" : {
            "description" : "Only one request every 5 seconds allowed."
          }
        }
      }
    },
    "/whatsapp/templates" : {
      "get" : {
        "tags" : [ "whatsapp templates" ],
        "summary" : "List Whatsapp Templates",
        "description" : "List whatsapp templates.",
        "operationId" : "list-whatsapp-templates",
        "parameters" : [ {
          "name" : "state",
          "in" : "query",
          "description" : "Optional status to filter.",
          "schema" : {
            "type" : "string",
            "enum" : [ "APPROVED", "REJECTED" ]
          }
        }, {
          "name" : "queues",
          "in" : "query",
          "description" : "Optional queues to filter.",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }, {
          "name" : "isPaginated",
          "in" : "query",
          "description" : "It divides the responses into pages (200 templates per page), so that each call runs faster. If there is more templates remaining, the response includes the url to get the next page.",
          "schema" : {
            "type" : "boolean"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The list of whatsapp templates.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WhatsAppTemplatesListResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      },
      "post" : {
        "tags" : [ "whatsapp templates" ],
        "summary" : "Create Whatsapp Template",
        "description" : "Create a Whatsapp Template.",
        "operationId" : "create-whatsapp-template",
        "requestBody" : {
          "description" : "The WhatsApp template to create.",
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/WhatsAppTemplateRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "The WhatsApp template was successfully created.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WhatsAppTemplateResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid WhatsApp template body.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429" : {
            "description" : "Only one request per second allowed."
          }
        }
      }
    },
    "/whatsapp/templates/{idOrName}" : {
      "get" : {
        "tags" : [ "whatsapp templates" ],
        "summary" : "Get Whatsapp Template",
        "description" : "Get whatsapp template by id or name",
        "operationId" : "get-whatsapp-template",
        "parameters" : [ {
          "name" : "idOrName",
          "in" : "path",
          "description" : "The whatsapp template id or name. You can get it from `/whatsapp/templates`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "The whatsapp template.",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WhatsAppTemplateResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Whatsapp template not found."
          },
          "429" : {
            "description" : "Only 5 requests per second allowed."
          }
        }
      },
      "delete" : {
        "tags" : [ "whatsapp templates" ],
        "summary" : "Delete WhatsApp Template",
        "description" : "Delete Whatsapp Template by id or name",
        "operationId" : "delete-whatsapp-template",
        "parameters" : [ {
          "name" : "idOrName",
          "in" : "path",
          "description" : "The whatsapp template id or name. You can get it from `/whatsapp/templates`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "WhatsApp template deleted."
          },
          "404" : {
            "description" : "WhatsApp template not found."
          },
          "429" : {
            "description" : "Only 10 requests per second allowed."
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "ChatReferenceReq" : {
        "description" : "Type union that identifies a chat; either\n- `{ chatId }` or\n- `{ channelId, contactId }`\n(that is, you must use only `chatId` or both `channelId` and `contactId`).",
        "oneOf" : [ {
          "type" : "object",
          "properties" : {
            "channelId" : {
              "type" : "string",
              "description" : "The id of the chat channel. It can be known at [GET /channels](https://api.botmaker.com/v2.0/#/operations/getChannels) endpoint. It also can be:\n- a WhatsApp phone line number\n- a recipient id (in Messenger, Workplace)\n- a Telegram token\n",
              "example" : "botproject-whatsapp-5491147038***"
            },
            "contactId" : {
              "type" : "string",
              "description" : "The id of the chat in the chat platform.",
              "example" : "5491147038***"
            }
          }
        }, {
          "type" : "object",
          "properties" : {
            "chatId" : {
              "type" : "string",
              "description" : "The id of the chat in [Botmaker Chats](https://go.botmaker.com/#/chats), that is: https://go.botmaker.com/#/{chatId}.",
              "example" : "ABC123DEF456GHI789JK"
            }
          }
        } ]
      },
      "ChatReferenceRes" : {
        "type" : "object",
        "properties" : {
          "chatId" : {
            "type" : "string",
            "description" : "The id of the chat in [Botmaker Chats](https://go.botmaker.com/#/chats), that is: https://go.botmaker.com/#/{chatId}.",
            "example" : "ABC123DEF456GHI789JK"
          },
          "channelId" : {
            "type" : "string",
            "description" : "The id of the chat channel.",
            "example" : "botproject-whatsapp-5491147038***"
          },
          "contactId" : {
            "type" : "string",
            "description" : "The id of the chat in the chat platform.",
            "example" : "5491147038***"
          }
        }
      },
      "TriggerIntentBatchResponse" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "anyOf" : [ {
                "$ref" : "#/components/schemas/RequestIdResponse"
              }, {
                "$ref" : "#/components/schemas/ErrorResponse"
              } ]
            }
          }
        }
      },
      "RolePermissions" : {
        "type" : "object",
        "properties" : {
          "home" : {
            "type" : "boolean"
          },
          "chats" : {
            "type" : "object",
            "properties" : {
              "view" : {
                "type" : "boolean"
              },
              "filter" : {
                "type" : "boolean"
              },
              "muteBot" : {
                "type" : "boolean"
              },
              "tags" : {
                "type" : "boolean"
              },
              "userNotes" : {
                "type" : "boolean"
              },
              "variables" : {
                "type" : "boolean"
              },
              "uploadMedia" : {
                "type" : "boolean"
              },
              "mic" : {
                "type" : "boolean"
              },
              "gif" : {
                "type" : "boolean"
              },
              "emoji" : {
                "type" : "boolean"
              },
              "sendChat" : {
                "type" : "boolean"
              },
              "closeConversation" : {
                "type" : "boolean"
              },
              "lockToUser" : {
                "type" : "boolean"
              },
              "assignToQueue" : {
                "type" : "boolean"
              },
              "AssignToAgent" : {
                "type" : "boolean"
              },
              "transferToAgent" : {
                "type" : "boolean"
              },
              "transferToQueue" : {
                "type" : "boolean"
              },
              "releaseAssignedToMe" : {
                "type" : "boolean"
              },
              "releaseAssignedToOthers" : {
                "type" : "boolean"
              },
              "markAsSpam" : {
                "type" : "boolean"
              },
              "downloadChat" : {
                "type" : "boolean"
              },
              "markAsTester" : {
                "type" : "boolean"
              },
              "whatsappTemplate" : {
                "type" : "boolean"
              },
              "putOnHold" : {
                "type" : "boolean"
              },
              "userMedia" : {
                "type" : "boolean"
              },
              "userVariables" : {
                "type" : "boolean"
              },
              "showUpdateChats" : {
                "type" : "boolean"
              },
              "showIntentSuggestions" : {
                "type" : "boolean"
              },
              "showShortcut" : {
                "type" : "boolean"
              },
              "redirectAfterWspTemplate" : {
                "type" : "boolean"
              },
              "blockMessage" : {
                "type" : "boolean"
              },
              "viewMedia" : {
                "type" : "boolean"
              },
              "createTags" : {
                "type" : "boolean"
              },
              "editStarredMessages" : {
                "type" : "boolean"
              },
              "showStarredMessages" : {
                "type" : "boolean"
              },
              "pinCustomer" : {
                "type" : "boolean"
              },
              "manageContacts" : {
                "type" : "boolean"
              },
              "newEmail" : {
                "type" : "boolean"
              },
              "markChatAsUnread" : {
                "type" : "boolean"
              },
              "showSuggestWithAI" : {
                "type" : "boolean"
              },
              "showPromptsAI" : {
                "type" : "boolean"
              },
              "showExecuteFlows" : {
                "type" : "boolean"
              },
              "showEcommerceInChats" : {
                "type" : "boolean"
              },
              "massiveActions" : {
                "type" : "boolean"
              },
              "showQuickButtons" : {
                "type" : "boolean"
              },
              "favouriteTemplates" : {
                "type" : "boolean"
              },
              "viewEvents" : {
                "type" : "boolean"
              }
            }
          },
          "calls" : {
            "type" : "object",
            "properties" : {
              "startWhatsAppCall" : {
                "type" : "boolean"
              },
              "startPhoneCall" : {
                "type" : "boolean"
              },
              "startWeblinkCall" : {
                "type" : "boolean"
              },
              "startWeblinkVideoCall" : {
                "type" : "boolean"
              }
            }
          },
          "queues" : {
            "type" : "object",
            "properties" : {
              "assignMultiple" : {
                "type" : "boolean"
              },
              "unassignMultiple" : {
                "type" : "boolean"
              }
            }
          },
          "supportTeams" : {
            "type" : "object",
            "properties" : {
              "edit" : {
                "type" : "boolean"
              },
              "create" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              },
              "manageAll" : {
                "type" : "boolean"
              }
            }
          },
          "contacts" : {
            "type" : "object",
            "properties" : {
              "view" : {
                "type" : "boolean"
              },
              "add" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              }
            }
          },
          "metrics" : {
            "type" : "boolean"
          },
          "knowledgeBase" : {
            "type" : "object",
            "properties" : {
              "add" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              }
            }
          },
          "rule" : {
            "type" : "object",
            "properties" : {
              "view" : {
                "type" : "boolean"
              },
              "add" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              }
            }
          },
          "dashboards" : {
            "type" : "object",
            "properties" : {
              "create" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              },
              "showRealTime" : {
                "type" : "boolean"
              },
              "showUserAndSessions" : {
                "type" : "boolean"
              },
              "showOperatorsActivity" : {
                "type" : "boolean"
              },
              "showOperatorsRealTime" : {
                "type" : "boolean"
              },
              "showFunnels" : {
                "type" : "boolean"
              },
              "showStartingCauses" : {
                "type" : "boolean"
              }
            }
          },
          "segments" : {
            "type" : "boolean"
          },
          "audiences" : {
            "type" : "object",
            "properties" : {
              "view" : {
                "type" : "boolean"
              },
              "create" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              }
            }
          },
          "inbox" : {
            "type" : "boolean"
          },
          "actions" : {
            "type" : "object",
            "properties" : {
              "publish" : {
                "type" : "boolean"
              },
              "create" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              },
              "logs" : {
                "type" : "boolean"
              },
              "getTokenSecret" : {
                "type" : "boolean"
              },
              "saveTokenSecret" : {
                "type" : "boolean"
              },
              "deleteTokenSecret" : {
                "type" : "boolean"
              }
            }
          },
          "pusheswa" : {
            "type" : "object",
            "properties" : {
              "view" : {
                "type" : "boolean"
              },
              "create" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              },
              "publish" : {
                "type" : "boolean"
              }
            }
          },
          "entities" : {
            "type" : "boolean"
          },
          "shortcut" : {
            "type" : "object",
            "properties" : {
              "create" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              },
              "editGlobalShortcuts" : {
                "type" : "boolean"
              }
            }
          },
          "dialog" : {
            "type" : "boolean"
          },
          "integrations" : {
            "type" : "object",
            "properties" : {
              "connections" : {
                "type" : "boolean"
              },
              "crm" : {
                "type" : "boolean"
              },
              "api" : {
                "type" : "boolean"
              }
            }
          },
          "configuration" : {
            "type" : "object",
            "properties" : {
              "general" : {
                "type" : "boolean"
              },
              "livechat" : {
                "type" : "boolean"
              },
              "notifications" : {
                "type" : "boolean"
              },
              "automation" : {
                "type" : "boolean"
              },
              "payment" : {
                "type" : "boolean"
              },
              "security" : {
                "type" : "boolean"
              }
            }
          },
          "users" : {
            "type" : "object",
            "properties" : {
              "view" : {
                "type" : "boolean"
              },
              "admin" : {
                "type" : "boolean"
              },
              "modify" : {
                "type" : "boolean"
              },
              "downloadAgents" : {
                "type" : "boolean"
              },
              "deleteAgents" : {
                "type" : "boolean"
              },
              "configureOoo" : {
                "type" : "boolean"
              }
            }
          },
          "roles" : {
            "type" : "boolean"
          },
          "variables" : {
            "type" : "object",
            "properties" : {
              "variablesTab" : {
                "type" : "boolean"
              },
              "createVariables" : {
                "type" : "boolean"
              },
              "editVariables" : {
                "type" : "boolean"
              },
              "deleteVariables" : {
                "type" : "boolean"
              },
              "constantsTab" : {
                "type" : "boolean"
              },
              "createConstants" : {
                "type" : "boolean"
              },
              "editConstants" : {
                "type" : "boolean"
              },
              "deleteConstants" : {
                "type" : "boolean"
              }
            }
          },
          "platforms" : {
            "type" : "boolean"
          },
          "webhooks" : {
            "type" : "boolean"
          },
          "audit" : {
            "type" : "boolean"
          },
          "flowManager" : {
            "type" : "object",
            "properties" : {
              "visualizeFlowManager" : {
                "type" : "boolean"
              },
              "editFlowManager" : {
                "type" : "boolean"
              },
              "publishFlowManager" : {
                "type" : "boolean"
              }
            }
          },
          "multibot" : {
            "type" : "object",
            "properties" : {
              "view" : {
                "type" : "boolean"
              },
              "addBots" : {
                "type" : "boolean"
              },
              "deleteBots" : {
                "type" : "boolean"
              },
              "configureBots" : {
                "type" : "boolean"
              },
              "viewBotsIntents" : {
                "type" : "boolean"
              },
              "addBotsIntents" : {
                "type" : "boolean"
              },
              "editBotsIntents" : {
                "type" : "boolean"
              },
              "deleteBotsIntents" : {
                "type" : "boolean"
              },
              "publishBotsIntents" : {
                "type" : "boolean"
              }
            }
          },
          "importContacts" : {
            "type" : "boolean"
          },
          "account" : {
            "type" : "boolean"
          },
          "help" : {
            "type" : "object",
            "properties" : {
              "contactSupport" : {
                "type" : "boolean"
              }
            }
          },
          "contactgroups" : {
            "type" : "object",
            "properties" : {
              "create" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              }
            }
          },
          "campaigns" : {
            "type" : "object",
            "properties" : {
              "create" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "archive" : {
                "type" : "boolean"
              }
            }
          },
          "notifications" : {
            "type" : "object",
            "properties" : {
              "create" : {
                "type" : "boolean"
              },
              "archive" : {
                "type" : "boolean"
              },
              "cancel" : {
                "type" : "boolean"
              },
              "active" : {
                "type" : "boolean"
              }
            }
          },
          "mobileApp" : {
            "type" : "boolean"
          },
          "tickets" : {
            "type" : "object",
            "properties" : {
              "create" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "readConversation" : {
                "type" : "boolean"
              },
              "addComments" : {
                "type" : "boolean"
              },
              "addAttachments" : {
                "type" : "boolean"
              },
              "config" : {
                "type" : "boolean"
              },
              "changeState" : {
                "type" : "boolean"
              }
            }
          },
          "flows" : {
            "type" : "object",
            "properties" : {
              "upsert" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              },
              "publish" : {
                "type" : "boolean"
              }
            }
          },
          "orders" : {
            "type" : "boolean"
          },
          "ecommerceconfig" : {
            "type" : "boolean"
          },
          "customWidgets" : {
            "type" : "object",
            "properties" : {
              "view" : {
                "type" : "boolean"
              },
              "create" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              }
            }
          },
          "agents" : {
            "type" : "object",
            "properties" : {
              "create" : {
                "type" : "boolean"
              },
              "delete" : {
                "type" : "boolean"
              },
              "edit" : {
                "type" : "boolean"
              },
              "publishAgent" : {
                "type" : "boolean"
              }
            }
          },
          "tasks" : {
            "type" : "object",
            "properties" : {
              "edit" : {
                "type" : "boolean"
              },
              "addComments" : {
                "type" : "boolean"
              },
              "addAttachments" : {
                "type" : "boolean"
              },
              "customizeFields" : {
                "type" : "boolean"
              }
            }
          },
          "humanInTheLoop" : {
            "type" : "boolean"
          },
          "AIAssistant" : {
            "type" : "boolean"
          }
        },
        "description" : "The permissions that an agent with this role has. Permissions allow an agent to access sections in Botmaker (chats, bots, templates, etc).<br>A permission in turn can have **actions**, that give more granular control over what actions can be performed on a section."
      },
      "AuditSectionPretty" : {
        "type" : "string",
        "enum" : [ "agent", "variables", "webhook", "role", "bot", "quick-response", "channel", "whatsapp-template", "intent", "out-of-office", "contacts-group", "console-user-invitation", "notification", "agent-state", "code-action", "agent-login", "campaign", "constants", "config", "typification", "queue", "webchat", "audience-push" ]
      },
      "EventName" : {
        "type" : "string",
        "enum" : [ "conversation-close", "notification-read", "notification-error", "notification-delivered", "go-to", "url-click", "user-note", "find-intent", "set-variable", "bot-change", "set-bsuid", "queue-set", "agent-action", "central-redirect-entry", "blacklist-word-found", "unassigned-agent", "assigned-to-agent", "blocked-content-message", "notification-sent" ]
      },
      "EventInfo" : {
        "oneOf" : [ {
          "title" : "NotificationRead",
          "type" : "object",
          "properties" : {
            "messageId" : {
              "type" : "string"
            },
            "whatsappTemplate" : {
              "type" : "string"
            },
            "webhookPayload" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "NotificationRead"
        }, {
          "title" : "NotificationError",
          "type" : "object",
          "properties" : {
            "error" : {
              "type" : "string"
            },
            "reason" : {
              "type" : "string"
            },
            "messageId" : {
              "type" : "string"
            },
            "whatsappTemplate" : {
              "type" : "string"
            },
            "webhookPayload" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "NotificationError"
        }, {
          "title" : "ConversationClose",
          "type" : "object",
          "properties" : {
            "typification" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "agentEmail" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "ConversationClose"
        }, {
          "title" : "NotificationDelivered",
          "type" : "object",
          "properties" : {
            "messageId" : {
              "type" : "string"
            },
            "whatsappTemplate" : {
              "type" : "string"
            },
            "webhookPayload" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "NotificationDelivered"
        }, {
          "title" : "GoTo",
          "type" : "object",
          "properties" : {
            "intentId" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "GoTo"
        }, {
          "title" : "UrlClick",
          "type" : "object",
          "properties" : {
            "url" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "UrlClick"
        }, {
          "title" : "UserNote",
          "type" : "object",
          "properties" : {
            "operatorId" : {
              "type" : "string"
            },
            "operatorName" : {
              "type" : "string"
            },
            "value" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "UserNote"
        }, {
          "title" : "FindIntent",
          "type" : "object",
          "properties" : {
            "intentId" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "FindIntent"
        }, {
          "title" : "SetVariable",
          "type" : "object",
          "properties" : {
            "previousVariableValue" : {
              "type" : "string"
            },
            "variableValue" : {
              "type" : "string"
            },
            "variableName" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "SetVariable"
        }, {
          "title" : "BotChange",
          "type" : "object",
          "properties" : {
            "currentBotId" : {
              "type" : "string"
            },
            "previousBotId" : {
              "type" : "string"
            },
            "reason" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "BotChange"
        }, {
          "title" : "SetBsuid",
          "type" : "object",
          "properties" : {
            "previousBsuid" : {
              "type" : "string"
            },
            "bsuid" : {
              "type" : "string"
            },
            "variableName" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "SetBsuid"
        }, {
          "title" : "QueueSet",
          "type" : "object",
          "properties" : {
            "queue" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "QueueSet"
        }, {
          "title" : "AgentAction",
          "type" : "object",
          "properties" : {
            "intentName" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "intentId" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "AgentAction"
        }, {
          "title" : "CentralRedirectEntry",
          "type" : "object",
          "properties" : {
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "CentralRedirectEntry"
        }, {
          "title" : "BlacklistWordFound",
          "type" : "object",
          "properties" : {
            "foundWord" : {
              "type" : "string"
            },
            "messageText" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "BlacklistWordFound"
        }, {
          "title" : "UnassignedAgent",
          "type" : "object",
          "properties" : {
            "explain" : {
              "type" : "string"
            },
            "unassignedByAgent" : {
              "type" : "string"
            },
            "unassignedByAgentId" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "UnassignedAgent"
        }, {
          "title" : "AssignedToAgent",
          "type" : "object",
          "properties" : {
            "explain" : {
              "type" : "string"
            },
            "assignedByAgent" : {
              "type" : "string"
            },
            "previousAgentName" : {
              "type" : "string"
            },
            "previousAgentId" : {
              "type" : "string"
            },
            "assignedByAgentId" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "AssignedToAgent"
        }, {
          "title" : "BlockedContentMessage",
          "type" : "object",
          "properties" : {
            "reason" : {
              "type" : "string"
            },
            "consoleUserName" : {
              "type" : "string"
            },
            "consoleUserId" : {
              "type" : "string"
            },
            "messageId" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "BlockedContentMessage"
        }, {
          "title" : "NotificationSent",
          "type" : "object",
          "properties" : {
            "messageId" : {
              "type" : "string"
            },
            "whatsappTemplate" : {
              "type" : "string"
            },
            "webhookPayload" : {
              "type" : "string"
            },
            "agentId" : {
              "type" : "string"
            },
            "agentName" : {
              "type" : "string"
            },
            "executingIntents" : {
              "type" : "string"
            }
          },
          "description" : "NotificationSent"
        } ]
      },
      "ChatPlatformQueryParam" : {
        "type" : "string",
        "enum" : [ "whatsapp", "googlechat", "messenger", "webchat", "voice-text", "telegram", "msteams", "workplace", "google-business-messages", "twitter", "webhook", "assistant", "skyhub", "conversational-web", "gmail" ]
      },
      "CatalogPlatform" : {
        "type" : "string",
        "description" : "Chat platform to connect a catalog with.",
        "enum" : [ "META" ]
      },
      "CatalogCategory" : {
        "required" : [ "code", "description", "title" ],
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string",
            "description" : "The id of the category in your business."
          },
          "title" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "iconImageUrl" : {
            "type" : "string",
            "description" : "The URL of an imaged that will be used as icon of the category on the e-commerce web view"
          },
          "parentCategoryCode" : {
            "type" : "string",
            "description" : "It is used to create sub-categories. This is the code of the parent category."
          },
          "order" : {
            "type" : "number",
            "description" : "The number to display the categories in ascending ordering"
          }
        },
        "description" : "A category organizes products into groups.<br>When creating, you must pass all required fields; when updating, only `code` is required."
      },
      "ZonesUpsertRequest" : {
        "type" : "object",
        "items" : {
          "required" : [ "code" ],
          "type" : "object",
          "properties" : {
            "code" : {
              "type" : "string",
              "description" : "The id of the zone in your business."
            },
            "description" : {
              "type" : "string"
            },
            "radius" : {
              "type" : "number",
              "description" : "The radius of the attention zone. Use either this or `zoneCoordinates`.",
              "format" : "double"
            },
            "zoneCoordinates" : {
              "type" : "array",
              "description" : "A list of point that define the polygon that is attended by this zone. Use either this or `radius`.",
              "items" : {
                "type" : "object",
                "properties" : {
                  "lat" : {
                    "type" : "string"
                  },
                  "lon" : {
                    "type" : "string"
                  }
                }
              }
            },
            "excludedZoneCoordinates" : {
              "type" : "array",
              "description" : "A list of point that define the polygon that is *not* attended by this zone.",
              "items" : {
                "type" : "object",
                "properties" : {
                  "lat" : {
                    "type" : "string"
                  },
                  "lon" : {
                    "type" : "string"
                  }
                }
              }
            },
            "storeCodes" : {
              "type" : "array",
              "description" : "The stores that belong to the zone.",
              "items" : {
                "type" : "string"
              }
            },
            "zones" : {
              "type" : "array"
            }
          }
        }
      },
      "InventoryReference" : {
        "properties" : {
          "sku" : {
            "type" : "string",
            "description" : "The id of the product. It can be known at [GET /products] (https://api.botmaker.com/v2.0/commerce/catalogs/{catalogId}/products endpoint."
          },
          "availability" : {
            "type" : "string",
            "description" : "The product availability inside of store. The possible values are IN_STOCK or OUT_OF_STOCK"
          }
        },
        "description" : "This object describes a list of key-value pairs, where the key represents the product's SKU, and the value represents its availability (IN_STOCK or OUT_OF_STOCK).\n- `{ sku: availability }`\n- `Example: { \"12345\": \"IN_STOCK\" }` \n",
        "oneOf" : [ {
          "type" : "object"
        } ]
      },
      "MainAccount" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "alias" : {
            "type" : "string"
          },
          "contacts" : {
            "type" : "array"
          }
        },
        "description" : "The main account information."
      },
      "Money" : {
        "type" : "object",
        "properties" : {
          "total" : {
            "type" : "number"
          },
          "currency" : {
            "type" : "string"
          }
        },
        "description" : "Total with currency"
      },
      "Contact" : {
        "type" : "object",
        "properties" : {
          "firstName" : {
            "type" : "string"
          },
          "middleName" : {
            "type" : "string"
          },
          "lastName" : {
            "type" : "string"
          },
          "emails" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "phones" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        },
        "description" : "Only available for whatsapp"
      },
      "Account" : {
        "type" : "object",
        "properties" : {
          "accountId" : {
            "type" : "string"
          },
          "accountName" : {
            "type" : "string"
          },
          "contacts" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "email" : {
                  "type" : "string"
                },
                "phone" : {
                  "type" : "string"
                }
              },
              "description" : "Contact mail and phone number"
            }
          },
          "totalSpend" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "total" : {
                  "type" : "number"
                },
                "currency" : {
                  "type" : "string"
                }
              },
              "description" : "Total with currency"
            }
          },
          "productUsage" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "productId" : {
                  "type" : "string"
                },
                "usage" : {
                  "type" : "number"
                },
                "totalSpend" : {
                  "type" : "object",
                  "properties" : {
                    "total" : {
                      "type" : "number"
                    },
                    "currency" : {
                      "type" : "string"
                    }
                  },
                  "description" : "Total with currency"
                }
              },
              "description" : "product usage information"
            }
          },
          "projects" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "projectName" : {
                  "type" : "string"
                },
                "productUsage" : {
                  "type" : "array",
                  "items" : {
                    "type" : "object",
                    "properties" : {
                      "productId" : {
                        "type" : "string"
                      },
                      "usage" : {
                        "type" : "number"
                      }
                    },
                    "description" : "product usage information"
                  }
                }
              },
              "description" : "project information"
            }
          }
        },
        "description" : "Account information"
      },
      "CustomFields" : {
        "type" : "object",
        "properties" : {
          "fieldId" : {
            "type" : "string"
          },
          "fieldValues" : {
            "type" : "array"
          }
        },
        "description" : "Custom fields that can be added to any ticket. Each customField is a map with the keys `fieldId` and `fieldValues`. Use the [GET /v2.0/tickets/field-definitions] endpoint to find them. The fieldId is the id of the field definition and the fieldValues are the selected values in the valid options array in the field definition resource."
      },
      "Attachment" : {
        "type" : "object",
        "properties" : {
          "url" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          }
        },
        "description" : "A list of attachments to be added to the ticket. Each attachment is a map with the keys `name` (ex: 'an image name.jpg') and `url` (ex: 'https://example.com/image.jpeg')."
      },
      "AgentIdResponse" : {
        "type" : "object",
        "properties" : {
          "agentId" : {
            "type" : "string"
          }
        }
      },
      "ErrorResponse" : {
        "type" : "object",
        "properties" : {
          "errors" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Item"
            }
          }
        }
      },
      "Item" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string"
          },
          "source" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          }
        }
      },
      "AgentRequest" : {
        "type" : "object",
        "properties" : {
          "email" : {
            "type" : "string",
            "example" : "agent.name@exampleorg.com"
          },
          "name" : {
            "type" : "string"
          },
          "alias" : {
            "type" : "string",
            "description" : "A name used to prefix agent messages in a conversation."
          },
          "role" : {
            "type" : "string",
            "description" : "The role of the operator. Either a default role (`ADMIN`, `CONFIGURATOR`, `SUPERVISOR`, `OPERATOR`) or a custom role name."
          },
          "creationTime" : {
            "type" : "string",
            "description" : "The creation time of the operator",
            "format" : "date-time",
            "example" : "2025-08-18T14:52:30Z"
          },
          "queues" : {
            "type" : "array",
            "description" : "The queues ids this agent receives conversations from.",
            "example" : [ "sales", "returns" ],
            "items" : {
              "type" : "string",
              "description" : "The queues ids this agent receives conversations from.",
              "example" : "[\"sales\",\"returns\"]"
            }
          },
          "slots" : {
            "maximum" : 30,
            "minimum" : 0,
            "type" : "integer",
            "description" : "The amount of users an agent can attend at a given moment",
            "format" : "int32"
          },
          "priority" : {
            "type" : "string",
            "description" : "The agent assignment priority.",
            "enum" : [ "never", "low", "normal", "high" ]
          },
          "groups" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "additionalInfo" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            }
          },
          "tags" : {
            "type" : "array",
            "description" : "Filter conversations by tag names.",
            "example" : [ "filaComercialSP", "filaComercialRJ" ],
            "items" : {
              "type" : "string",
              "description" : "Filter conversations by tag names.",
              "example" : "[\"filaComercialSP\",\"filaComercialRJ\"]"
            }
          },
          "password" : {
            "minLength" : 8,
            "type" : "string",
            "description" : "Only allowed when creating agent."
          },
          "showMyChatsFilter" : {
            "type" : "boolean"
          },
          "lang" : {
            "type" : "string",
            "description" : "The language to use in Botmaker.",
            "enum" : [ "en", "es", "pt", "fr" ]
          }
        }
      },
      "AgentResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "email" : {
            "type" : "string",
            "example" : "agent.name@exampleorg.com"
          },
          "name" : {
            "type" : "string"
          },
          "alias" : {
            "type" : "string",
            "description" : "A name used to prefix agent messages in a conversation."
          },
          "isOnline" : {
            "type" : "boolean"
          },
          "status" : {
            "type" : "string"
          },
          "role" : {
            "type" : "string",
            "description" : "The role of the operator. Either a default role (`ADMIN`, `CONFIGURATOR`, `SUPERVISOR`, `OPERATOR`) or a custom role name."
          },
          "queues" : {
            "type" : "array",
            "description" : "The queues ids this agent receives conversations from.",
            "example" : [ "sales", "returns" ],
            "items" : {
              "type" : "string",
              "description" : "The queues ids this agent receives conversations from.",
              "example" : "[\"sales\",\"returns\"]"
            }
          },
          "slots" : {
            "maximum" : 30,
            "minimum" : 0,
            "type" : "integer",
            "description" : "The amount of users an agent can attend at a given moment",
            "format" : "int32"
          },
          "priority" : {
            "type" : "string",
            "description" : "The agent assignment priority.",
            "enum" : [ "never", "low", "normal", "high" ]
          },
          "groups" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "additionalInfo" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            }
          },
          "creationTime" : {
            "type" : "string",
            "description" : "The creation time of the operator",
            "format" : "date-time",
            "example" : "2025-08-18T14:52:30Z"
          },
          "tags" : {
            "type" : "array",
            "description" : "Filter conversations by tag names.",
            "example" : [ "filaComercialSP", "filaComercialRJ" ],
            "items" : {
              "type" : "string",
              "description" : "Filter conversations by tag names.",
              "example" : "[\"filaComercialSP\",\"filaComercialRJ\"]"
            }
          }
        }
      },
      "AgentsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/AgentResponse"
            }
          }
        }
      },
      "IdListReqRes" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "AuditResponse" : {
        "type" : "object",
        "properties" : {
          "creationTime" : {
            "type" : "string",
            "description" : "The datetime of the change.",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "authorName" : {
            "type" : "string"
          },
          "authorEmail" : {
            "type" : "string"
          },
          "authorRole" : {
            "type" : "string"
          },
          "action" : {
            "type" : "string",
            "description" : "The type of change.",
            "enum" : [ "CREATE", "CREATE_MULTIPLE", "UPDATE", "UPDATE_MULTIPLE", "DELETE", "DELETE_MULTIPLE", "PUBLISH", "PUBLISH_MULTIPLE", "REVERT", "REVERT_MULTIPLE", "ROLLBACK", "SKIP_SEND_NS", "CREATE", "UPDATE", "DELETE" ]
          },
          "entityId" : {
            "type" : "string",
            "description" : "The id of the entity that was changed."
          },
          "change" : {
            "$ref" : "#/components/schemas/JSONObject"
          }
        }
      },
      "AuditsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/AuditResponse"
            }
          }
        }
      },
      "JSONObject" : {
        "type" : "object",
        "properties" : {
          "map" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            }
          }
        }
      },
      "AuthResponse" : {
        "type" : "object",
        "properties" : {
          "clientId" : {
            "type" : "string",
            "description" : "Unique identifier of the client",
            "example" : "123456"
          },
          "secretId" : {
            "type" : "string",
            "description" : "Client secret used to authenticate",
            "example" : "abcdef"
          },
          "accessToken" : {
            "type" : "string",
            "description" : "The JWT token to access the API.\n Expiration time: 5 years.",
            "example" : "jwt.token.here"
          },
          "refreshToken" : {
            "type" : "string",
            "description" : "The JWT token to get new credentials.",
            "example" : "jwt.token.here"
          }
        },
        "description" : "API authentication credentials response"
      },
      "RefreshCredentialsRequest" : {
        "required" : [ "clientId", "refreshToken", "secretId" ],
        "type" : "object",
        "properties" : {
          "clientId" : {
            "type" : "string",
            "description" : "Client Id from Botmaker platform",
            "example" : "AmericanIslands"
          },
          "secretId" : {
            "type" : "string",
            "description" : "Secret ID",
            "example" : "E1COHNBWY0PZWBVR53IXKPY0ODN5MA"
          },
          "refreshToken" : {
            "type" : "string",
            "description" : "A JWT required",
            "example" : "eyJhb.eyJzd.KMUFs"
          }
        },
        "description" : "These fields can be consulted at:\n- [Botmaker API section](https://go.botmaker.com/#/api)\n- through api calling GET https://api.botmaker.com/v2.0/auth/credentials\n"
      },
      "ConsumptionsResponse" : {
        "type" : "object",
        "properties" : {
          "billingPeriod" : {
            "type" : "string",
            "description" : "The billing period in the format 'YYYY-MM'."
          },
          "mainAccount" : {
            "$ref" : "#/components/schemas/MainAccount"
          },
          "balance" : {
            "$ref" : "#/components/schemas/Money"
          },
          "totalSpend" : {
            "$ref" : "#/components/schemas/Money"
          },
          "accounts" : {
            "$ref" : "#/components/schemas/Account"
          }
        }
      },
      "WhatsAppDetailedConversationResponse" : {
        "type" : "object",
        "properties" : {
          "startDatetime" : {
            "type" : "string"
          },
          "wabaId" : {
            "type" : "string"
          },
          "businessId" : {
            "type" : "string",
            "description" : "The bot's business name."
          },
          "phoneNumber" : {
            "type" : "string",
            "description" : "The bot's phone number."
          },
          "country" : {
            "type" : "string",
            "description" : "A 2 letter [ISO country code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)."
          },
          "userPhoneNumber" : {
            "type" : "string",
            "description" : "Customer Whatsapp Number"
          },
          "whatsappConversationId" : {
            "type" : "string",
            "description" : "The conversation id in WhatsApp."
          },
          "customerId" : {
            "type" : "string",
            "description" : "Botmaker Customer Id / Chat Id"
          },
          "linkToChat" : {
            "type" : "string",
            "description" : "Link to chat in [Botmaker](https://go.botmaker.com/#/chats)."
          },
          "origin" : {
            "type" : "string",
            "description" : "How the conversation started.",
            "enum" : [ "user-initiated", "business-initiated", "referral-initiated" ]
          },
          "templateName" : {
            "type" : "string",
            "description" : "The name of the Whatsapp template sent"
          }
        }
      },
      "WhatsAppDetailedConversationsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/WhatsAppDetailedConversationResponse"
            }
          }
        }
      },
      "CallParticipantDTO" : {
        "type" : "object",
        "properties" : {
          "participantId" : {
            "type" : "string"
          },
          "initiatedByType" : {
            "type" : "string"
          },
          "assignedTs" : {
            "type" : "string"
          },
          "supportTeamId" : {
            "type" : "string"
          },
          "joinedDatetime" : {
            "type" : "string"
          },
          "leftDatetime" : {
            "type" : "string"
          }
        },
        "description" : "The meeting participants.."
      },
      "CallResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "chat" : {
            "$ref" : "#/components/schemas/ChatReference"
          },
          "agentId" : {
            "type" : "string"
          },
          "creationDatetime" : {
            "type" : "string"
          },
          "startDatetime" : {
            "type" : "string"
          },
          "endDatetime" : {
            "type" : "string"
          },
          "recording" : {
            "$ref" : "#/components/schemas/Recording"
          },
          "type" : {
            "type" : "string",
            "enum" : [ "audio", "video" ]
          },
          "participants" : {
            "type" : "array",
            "description" : "The meeting participants..",
            "items" : {
              "$ref" : "#/components/schemas/CallParticipantDTO"
            }
          }
        }
      },
      "CallsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CallResponse"
            }
          }
        }
      },
      "ChatReference" : {
        "$ref" : "#/components/schemas/ChatReferenceRes"
      },
      "Recording" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "url" : {
            "type" : "string"
          }
        },
        "description" : "The meeting recording. The `url` is only accessible passing the `access-token` header (use the same `access-token` you use for this API)."
      },
      "CatalogPlatformIntegration" : {
        "type" : "object",
        "properties" : {
          "platform" : {
            "$ref" : "#/components/schemas/CatalogPlatform"
          },
          "catalogId" : {
            "type" : "string",
            "description" : "The id of the catalog in the platform."
          }
        }
      },
      "CatalogPlatformConnectRequest" : {
        "type" : "object",
        "properties" : {
          "platform" : {
            "$ref" : "#/components/schemas/CatalogPlatform"
          },
          "externalCatalogId" : {
            "type" : "string",
            "description" : "The catalog Id of the external platform"
          }
        },
        "description" : "The platform to connect the catalog to."
      },
      "IdResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          }
        }
      },
      "CatalogRequest" : {
        "required" : [ "description", "title" ],
        "type" : "object",
        "properties" : {
          "title" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          }
        }
      },
      "Option" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "optionCode" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string",
            "enum" : [ "GROUP", "SELECT", "AMOUNT", "CHECK" ]
          },
          "title" : {
            "type" : "string"
          },
          "image" : {
            "type" : "string"
          },
          "extraPrice" : {
            "type" : "number"
          },
          "min" : {
            "type" : "integer",
            "format" : "int32"
          },
          "max" : {
            "type" : "integer",
            "format" : "int32"
          },
          "defaultValue" : {
            "type" : "integer",
            "format" : "int32"
          },
          "options" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Option"
            }
          },
          "values" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Option"
            }
          },
          "quantity" : {
            "type" : "number"
          },
          "itemPrice" : {
            "type" : "number"
          },
          "itemOriginalPrice" : {
            "type" : "number"
          },
          "totalPrice" : {
            "type" : "number"
          },
          "extra" : {
            "type" : "boolean"
          },
          "hidden" : {
            "type" : "boolean"
          },
          "isExtra" : {
            "type" : "boolean"
          }
        },
        "description" : "Options define configurable attributes of a product (like color or size) and list the possible values a customer can choose from. This attribute is *only* meant for products in the Botmaker Ecommerce. If this attribute is present, the attribute variants can't be used.",
        "example" : [ {
          "hidden" : false,
          "values" : [ {
            "image" : "",
            "hidden" : false,
            "optionCode" : "Color",
            "extra" : false,
            "id" : "White",
            "title" : "White"
          }, {
            "image" : "",
            "hidden" : false,
            "optionCode" : "Color",
            "extra" : false,
            "id" : "Graphite",
            "title" : "Graphite"
          }, {
            "image" : "",
            "hidden" : false,
            "optionCode" : "Color",
            "extra" : false,
            "id" : "Apricot",
            "title" : "Apricot"
          } ],
          "extra" : false,
          "id" : "Color",
          "type" : "SELECT",
          "title" : "Color"
        } ]
      },
      "ProductReqRes" : {
        "required" : [ "categories", "currency", "description", "image", "price", "priceAsString", "sku", "title" ],
        "type" : "object",
        "properties" : {
          "sku" : {
            "type" : "string",
            "description" : "The id of the product in your business."
          },
          "title" : {
            "maxLength" : 50,
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "brand" : {
            "type" : "string"
          },
          "condition" : {
            "type" : "string",
            "default" : "NEW",
            "enum" : [ "NEW", "USED" ]
          },
          "link" : {
            "type" : "string",
            "description" : "A link with a more detailed description about the product."
          },
          "image" : {
            "type" : "string",
            "description" : "The main image of the product.",
            "example" : "https://www.company.com/products/product-name.png"
          },
          "additionalImages" : {
            "maxLength" : 5,
            "type" : "array",
            "description" : "Other image details of the product.",
            "example" : [ "https://www.company.com/products/product-name-detail-1.png", "https://www.company.com/products/product-name-detail-2.png" ],
            "items" : {
              "maxLength" : 5,
              "type" : "string",
              "description" : "Other image details of the product.",
              "example" : "[\"https://www.company.com/products/product-name-detail-1.png\",\"https://www.company.com/products/product-name-detail-2.png\"]"
            }
          },
          "price" : {
            "type" : "number",
            "format" : "double"
          },
          "priceAsString" : {
            "type" : "string"
          },
          "salePrice" : {
            "type" : "number",
            "description" : "An override of the current price.",
            "format" : "double"
          },
          "salePriceAsString" : {
            "type" : "string",
            "description" : "An override of the current price."
          },
          "salePeriods" : {
            "type" : "array",
            "description" : "A list of sales prices for a date range (startDate, endDate, salePrice).",
            "items" : {
              "$ref" : "#/components/schemas/SalePeriod"
            }
          },
          "currency" : {
            "type" : "string",
            "description" : "The currency code (ISO 4217).",
            "enum" : [ "ARS", "BRL", "CLP", "COP", "MXN", "PEN", "USD", "UYU" ]
          },
          "availability" : {
            "type" : "string",
            "default" : "IN_STOCK",
            "enum" : [ "IN_STOCK", "OUT_OF_STOCK" ]
          },
          "inventory" : {
            "minimum" : 1,
            "type" : "integer",
            "description" : "An approximate of the stock count of the product.",
            "format" : "int64"
          },
          "color" : {
            "type" : "string"
          },
          "size" : {
            "type" : "string"
          },
          "gender" : {
            "type" : "string",
            "enum" : [ "FEMALE", "MALE", "UNISEX" ]
          },
          "categories" : {
            "minLength" : 1,
            "type" : "array",
            "description" : "The category codes under which the product will be listed. You can get the codes at `GET /ecommerce/catalogs/{catalogId}/categories`",
            "items" : {
              "minLength" : 1,
              "type" : "string",
              "description" : "The category codes under which the product will be listed. You can get the codes at `GET /ecommerce/catalogs/{catalogId}/categories`"
            }
          },
          "group" : {
            "type" : "string",
            "description" : "A string to group variants of the same product model into one display. *Only for Meta*.",
            "example" : "polo_shirt"
          },
          "order" : {
            "type" : "integer",
            "description" : "The products are sorted in ASC order.",
            "format" : "int64",
            "default" : 0
          },
          "tags" : {
            "type" : "array",
            "description" : "Tags of product. These tags are used to filter on ecommerce website",
            "example" : [ "green", "medium" ],
            "items" : {
              "type" : "string",
              "description" : "Tags of product. These tags are used to filter on ecommerce website",
              "example" : "[\"green\",\"medium\"]"
            }
          },
          "variants" : {
            "type" : "array",
            "description" : "Variants are different versions of a product that share the same core identity but vary by attributes like size, color, or model. This attribute is *only* meant for products in the Botmaker Ecommerce. If this attribute is present, the attribute options can't be used.",
            "example" : [ {
              "sku" : "101",
              "productId" : "501",
              "variantProperties" : {
                "Color" : [ "Red" ]
              }
            }, {
              "sku" : "102",
              "productId" : "501",
              "variantProperties" : {
                "Color" : [ "Blue" ]
              }
            } ],
            "items" : {
              "$ref" : "#/components/schemas/Variant"
            }
          },
          "options" : {
            "type" : "array",
            "description" : "Options define configurable attributes of a product (like color or size) and list the possible values a customer can choose from. This attribute is *only* meant for products in the Botmaker Ecommerce. If this attribute is present, the attribute variants can't be used.",
            "example" : [ {
              "hidden" : false,
              "values" : [ {
                "image" : "",
                "hidden" : false,
                "optionCode" : "Color",
                "extra" : false,
                "id" : "White",
                "title" : "White"
              }, {
                "image" : "",
                "hidden" : false,
                "optionCode" : "Color",
                "extra" : false,
                "id" : "Graphite",
                "title" : "Graphite"
              }, {
                "image" : "",
                "hidden" : false,
                "optionCode" : "Color",
                "extra" : false,
                "id" : "Apricot",
                "title" : "Apricot"
              } ],
              "extra" : false,
              "id" : "Color",
              "type" : "SELECT",
              "title" : "Color"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/Option"
            }
          },
          "score" : {
            "type" : "number",
            "format" : "double"
          }
        }
      },
      "ProductsRequest" : {
        "type" : "object",
        "properties" : {
          "products" : {
            "maxLength" : 2500,
            "type" : "array",
            "description" : "When creating a product, respect all **required** fields. When updating, you must send the product `sku` (and only the properties you need to change).",
            "items" : {
              "$ref" : "#/components/schemas/ProductReqRes"
            }
          }
        }
      },
      "SalePeriod" : {
        "type" : "object",
        "properties" : {
          "startDate" : {
            "type" : "string",
            "description" : "Sale start date (ISO)",
            "example" : "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
          },
          "endDate" : {
            "type" : "string",
            "description" : "Sale end date (ISO)",
            "example" : "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
          },
          "salePrice" : {
            "type" : "number",
            "description" : "Sale price for a date range",
            "format" : "double"
          }
        },
        "description" : "A list of sales prices for a date range (startDate, endDate, salePrice)."
      },
      "Variant" : {
        "type" : "object",
        "properties" : {
          "sku" : {
            "type" : "string"
          },
          "productId" : {
            "type" : "string"
          },
          "variantProperties" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "array",
              "items" : {
                "type" : "string"
              }
            }
          }
        },
        "description" : "Variants are different versions of a product that share the same core identity but vary by attributes like size, color, or model. This attribute is *only* meant for products in the Botmaker Ecommerce. If this attribute is present, the attribute options can't be used.",
        "example" : [ {
          "sku" : "101",
          "productId" : "501",
          "variantProperties" : {
            "Color" : [ "Red" ]
          }
        }, {
          "sku" : "102",
          "productId" : "501",
          "variantProperties" : {
            "Color" : [ "Blue" ]
          }
        } ]
      },
      "StoreReqRes" : {
        "maxLength" : 2500,
        "required" : [ "code", "inventory", "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "maxLength" : 50,
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "code" : {
            "type" : "string",
            "description" : "The store code in your catalog"
          },
          "address" : {
            "maxLength" : 50,
            "type" : "string",
            "description" : "The store address in your catalog"
          },
          "inventory" : {
            "$ref" : "#/components/schemas/InventoryReference"
          }
        },
        "description" : "When creating a store, respect all **required** fields. When updating, you must send the list of inventory (and only the properties you need to change)."
      },
      "StoresRequest" : {
        "type" : "object",
        "properties" : {
          "stores" : {
            "maxLength" : 2500,
            "type" : "array",
            "description" : "When creating a store, respect all **required** fields. When updating, you must send the list of inventory (and only the properties you need to change).",
            "items" : {
              "$ref" : "#/components/schemas/StoreReqRes"
            }
          }
        }
      },
      "CategoryRequest" : {
        "type" : "object",
        "properties" : {
          "categories" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CatalogCategory"
            }
          }
        }
      },
      "Coord" : {
        "type" : "object",
        "properties" : {
          "lat" : {
            "type" : "string"
          },
          "lon" : {
            "type" : "string"
          }
        },
        "description" : "The list of excluded coordinates of zones",
        "example" : [ {
          "lat" : "-151346246.0",
          "lon" : "13566246246.23"
        } ]
      },
      "ZoneRequest" : {
        "type" : "object",
        "properties" : {
          "zones" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ZonesReqRes"
            }
          }
        }
      },
      "ZonesReqRes" : {
        "required" : [ "attachedStores", "code", "description" ],
        "type" : "object",
        "properties" : {
          "description" : {
            "maxLength" : 50,
            "type" : "string"
          },
          "code" : {
            "type" : "string",
            "description" : "The store code in your catalog"
          },
          "radius" : {
            "type" : "number",
            "description" : "The radius define the specific zone geographic area",
            "format" : "double"
          },
          "includedZoneCoordinates" : {
            "type" : "array",
            "description" : "The list of coordinates of zones",
            "example" : [ {
              "lat" : "-13566246246.0",
              "lon" : "151346246.23423"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/Coord"
            }
          },
          "excludedZoneCoordinates" : {
            "type" : "array",
            "description" : "The list of excluded coordinates of zones",
            "example" : [ {
              "lat" : "-151346246.0",
              "lon" : "13566246246.23"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/Coord"
            }
          },
          "attachedStores" : {
            "type" : "array",
            "description" : "Store codes included in this zone. Get store code from /ecommerce/catalogs/{catalogId}/stores",
            "items" : {
              "type" : "string",
              "description" : "Store codes included in this zone. Get store code from /ecommerce/catalogs/{catalogId}/stores"
            }
          }
        },
        "description" : "List of zones."
      },
      "SkuListReqRes" : {
        "type" : "object",
        "properties" : {
          "skus" : {
            "type" : "array",
            "description" : "List of sku numbers that is a unique identifier of Product.",
            "example" : [ "LG20k", "LG30k" ],
            "items" : {
              "type" : "string",
              "description" : "List of sku numbers that is a unique identifier of Product.",
              "example" : "[\"LG20k\",\"LG30k\"]"
            }
          }
        }
      },
      "CatalogPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CatalogResponse"
            }
          }
        }
      },
      "CatalogResponse" : {
        "required" : [ "description", "title" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "title" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "integrations" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CatalogPlatformIntegration"
            }
          }
        }
      },
      "ProductsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ProductReqRes"
            }
          }
        }
      },
      "PriceSchema" : {
        "type" : "object",
        "properties" : {
          "currency" : {
            "type" : "string"
          },
          "price" : {
            "type" : "number",
            "format" : "double"
          },
          "salePrice" : {
            "type" : "number",
            "format" : "double"
          }
        }
      },
      "PriceSchemaReqRes" : {
        "required" : [ "code" ],
        "type" : "object",
        "properties" : {
          "code" : {
            "type" : "string",
            "description" : "The code of the price schema in your business catalog."
          },
          "attachedZoneCodes" : {
            "type" : "array",
            "description" : "Store codes that used this schema prices. Get store code from /ecommerce/catalogs/{catalogId}/stores",
            "items" : {
              "type" : "string",
              "description" : "Store codes that used this schema prices. Get store code from /ecommerce/catalogs/{catalogId}/stores"
            }
          },
          "priceSchemas" : {
            "type" : "object",
            "additionalProperties" : {
              "$ref" : "#/components/schemas/PriceSchema"
            }
          }
        }
      },
      "PriceSchemasResponse" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "priceSchemas" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PriceSchemaReqRes"
            }
          }
        }
      },
      "AbstractPropertyBuilder" : {
        "type" : "object",
        "properties" : {
          "sendToClient" : {
            "type" : "boolean"
          },
          "mandatory" : {
            "type" : "boolean"
          },
          "numberInclusiveMin" : {
            "type" : "integer",
            "format" : "int64"
          },
          "numberInclusiveMax" : {
            "type" : "integer",
            "format" : "int64"
          },
          "stringMinLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringMaxLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringWithoutSpaces" : {
            "type" : "boolean"
          },
          "stringIsOnlyLowerCase" : {
            "type" : "boolean"
          },
          "initialValue" : {
            "type" : "object"
          },
          "compressGzip" : {
            "type" : "boolean"
          },
          "indexable" : {
            "type" : "boolean"
          }
        }
      },
      "AbstractPropertyBuilderPropertyMetaListStringListString" : {
        "type" : "object",
        "properties" : {
          "sendToClient" : {
            "type" : "boolean"
          },
          "mandatory" : {
            "type" : "boolean"
          },
          "numberInclusiveMin" : {
            "type" : "integer",
            "format" : "int64"
          },
          "numberInclusiveMax" : {
            "type" : "integer",
            "format" : "int64"
          },
          "stringMinLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringMaxLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringWithoutSpaces" : {
            "type" : "boolean"
          },
          "stringIsOnlyLowerCase" : {
            "type" : "boolean"
          },
          "initialValue" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "compressGzip" : {
            "type" : "boolean"
          },
          "indexable" : {
            "type" : "boolean"
          }
        }
      },
      "AbstractPropertyBuilderPropertyMetaMapStringJSONObjectMapStringJSONObject" : {
        "type" : "object",
        "properties" : {
          "sendToClient" : {
            "type" : "boolean"
          },
          "mandatory" : {
            "type" : "boolean"
          },
          "numberInclusiveMin" : {
            "type" : "integer",
            "format" : "int64"
          },
          "numberInclusiveMax" : {
            "type" : "integer",
            "format" : "int64"
          },
          "stringMinLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringMaxLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringWithoutSpaces" : {
            "type" : "boolean"
          },
          "stringIsOnlyLowerCase" : {
            "type" : "boolean"
          },
          "initialValue" : {
            "type" : "object",
            "additionalProperties" : {
              "$ref" : "#/components/schemas/JSONObject"
            }
          },
          "compressGzip" : {
            "type" : "boolean"
          },
          "indexable" : {
            "type" : "boolean"
          }
        }
      },
      "AbstractPropertyBuilderPropertyMetaObjectObject" : {
        "type" : "object",
        "properties" : {
          "sendToClient" : {
            "type" : "boolean"
          },
          "mandatory" : {
            "type" : "boolean"
          },
          "numberInclusiveMin" : {
            "type" : "integer",
            "format" : "int64"
          },
          "numberInclusiveMax" : {
            "type" : "integer",
            "format" : "int64"
          },
          "stringMinLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringMaxLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringWithoutSpaces" : {
            "type" : "boolean"
          },
          "stringIsOnlyLowerCase" : {
            "type" : "boolean"
          },
          "initialValue" : {
            "type" : "object"
          },
          "compressGzip" : {
            "type" : "boolean"
          },
          "indexable" : {
            "type" : "boolean"
          }
        }
      },
      "AbstractPropertyBuilderPropertyMetaStringString" : {
        "type" : "object",
        "properties" : {
          "sendToClient" : {
            "type" : "boolean"
          },
          "mandatory" : {
            "type" : "boolean"
          },
          "numberInclusiveMin" : {
            "type" : "integer",
            "format" : "int64"
          },
          "numberInclusiveMax" : {
            "type" : "integer",
            "format" : "int64"
          },
          "stringMinLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringMaxLength" : {
            "type" : "integer",
            "format" : "int32"
          },
          "stringWithoutSpaces" : {
            "type" : "boolean"
          },
          "stringIsOnlyLowerCase" : {
            "type" : "boolean"
          },
          "initialValue" : {
            "type" : "string"
          },
          "compressGzip" : {
            "type" : "boolean"
          },
          "indexable" : {
            "type" : "boolean"
          }
        }
      },
      "DataObject" : {
        "type" : "object",
        "properties" : {
          "map" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            }
          },
          "type" : {
            "type" : "string"
          },
          "internalMap" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            }
          }
        }
      },
      "DateProperty" : {
        "type" : "object",
        "properties" : {
          "temporalBuilder" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilder"
          },
          "ticks" : {
            "type" : "integer",
            "format" : "int64"
          },
          "propertyName" : {
            "type" : "string"
          },
          "indexable" : {
            "type" : "boolean"
          },
          "uniqueIndex" : {
            "type" : "boolean"
          },
          "optionsImpl" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilderPropertyMetaStringString"
          },
          "fromStringValue" : {
            "type" : "string",
            "writeOnly" : true
          }
        }
      },
      "ListPrimitiveObjectPropertyString" : {
        "type" : "array",
        "properties" : {
          "temporalBuilder" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilder"
          },
          "empty" : {
            "type" : "boolean"
          },
          "first" : {
            "type" : "string"
          },
          "last" : {
            "type" : "string"
          },
          "propertyName" : {
            "type" : "string"
          },
          "indexable" : {
            "type" : "boolean"
          },
          "uniqueIndex" : {
            "type" : "boolean"
          },
          "optionsImpl" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilderPropertyMetaListStringListString"
          },
          "fromStringValue" : {
            "type" : "string",
            "writeOnly" : true
          }
        },
        "items" : {
          "type" : "string"
        }
      },
      "MapPropertyJSONObject" : {
        "type" : "object",
        "properties" : {
          "temporalBuilder" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilder"
          },
          "empty" : {
            "type" : "boolean"
          },
          "propertyName" : {
            "type" : "string"
          },
          "indexable" : {
            "type" : "boolean"
          },
          "uniqueIndex" : {
            "type" : "boolean"
          },
          "optionsImpl" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilderPropertyMetaMapStringJSONObjectMapStringJSONObject"
          },
          "fromStringValue" : {
            "type" : "string",
            "writeOnly" : true
          }
        },
        "additionalProperties" : {
          "$ref" : "#/components/schemas/JSONObject"
        }
      },
      "Pricing" : {
        "type" : "object",
        "properties" : {
          "propertiesMetadata" : {
            "type" : "object",
            "additionalProperties" : {
              "$ref" : "#/components/schemas/PropertyMeta"
            }
          },
          "changedProperties" : {
            "uniqueItems" : true,
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "dataObject" : {
            "$ref" : "#/components/schemas/DataObject"
          },
          "entityName" : {
            "type" : "string"
          },
          "secondsToExpire" : {
            "type" : "integer",
            "format" : "int32"
          },
          "LAST_MODIFICATION" : {
            "$ref" : "#/components/schemas/DateProperty"
          },
          "OBJECT_TYPE" : {
            "$ref" : "#/components/schemas/StringProperty"
          },
          "BUSINESS_ID" : {
            "$ref" : "#/components/schemas/StringProperty"
          },
          "CATALOG_ID" : {
            "$ref" : "#/components/schemas/StringProperty"
          },
          "CODE" : {
            "$ref" : "#/components/schemas/StringProperty"
          },
          "PRICE_SCHEMA" : {
            "type" : "object",
            "properties" : {
              "temporalBuilder" : {
                "$ref" : "#/components/schemas/AbstractPropertyBuilder"
              },
              "empty" : {
                "type" : "boolean"
              },
              "propertyName" : {
                "type" : "string"
              },
              "indexable" : {
                "type" : "boolean"
              },
              "uniqueIndex" : {
                "type" : "boolean"
              },
              "optionsImpl" : {
                "$ref" : "#/components/schemas/AbstractPropertyBuilderPropertyMetaMapStringJSONObjectMapStringJSONObject"
              },
              "fromStringValue" : {
                "type" : "string",
                "writeOnly" : true
              }
            },
            "additionalProperties" : {
              "$ref" : "#/components/schemas/JSONObject"
            }
          },
          "ATTACHED_ZONE_CODES" : {
            "type" : "array",
            "properties" : {
              "temporalBuilder" : {
                "$ref" : "#/components/schemas/AbstractPropertyBuilder"
              },
              "empty" : {
                "type" : "boolean"
              },
              "first" : {
                "type" : "string"
              },
              "last" : {
                "type" : "string"
              },
              "propertyName" : {
                "type" : "string"
              },
              "indexable" : {
                "type" : "boolean"
              },
              "uniqueIndex" : {
                "type" : "boolean"
              },
              "optionsImpl" : {
                "$ref" : "#/components/schemas/AbstractPropertyBuilderPropertyMetaListStringListString"
              },
              "fromStringValue" : {
                "type" : "string",
                "writeOnly" : true
              }
            },
            "items" : {
              "type" : "string"
            }
          },
          "businessID" : {
            "$ref" : "#/components/schemas/StringProperty"
          },
          "id" : {
            "type" : "string"
          },
          "indexableProperties" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PropertyMeta"
            }
          },
          "sortingScore" : {
            "type" : "number",
            "format" : "double"
          },
          "dataObjectForClient" : {
            "$ref" : "#/components/schemas/DataObject"
          },
          "lastModificationAsDate" : {
            "type" : "string",
            "format" : "date-time"
          },
          "daysSinceLastModification" : {
            "type" : "integer",
            "format" : "int32"
          },
          "minutesSinceLastModification" : {
            "type" : "integer",
            "format" : "int32"
          },
          "persisted" : {
            "type" : "boolean"
          }
        }
      },
      "PropertyMeta" : {
        "type" : "object",
        "properties" : {
          "temporalBuilder" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilder"
          },
          "propertyName" : {
            "type" : "string"
          },
          "indexable" : {
            "type" : "boolean"
          },
          "uniqueIndex" : {
            "type" : "boolean"
          },
          "optionsImpl" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilderPropertyMetaObjectObject"
          },
          "fromStringValue" : {
            "type" : "string",
            "writeOnly" : true
          }
        }
      },
      "StringProperty" : {
        "type" : "object",
        "properties" : {
          "temporalBuilder" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilder"
          },
          "propertyName" : {
            "type" : "string"
          },
          "indexable" : {
            "type" : "boolean"
          },
          "uniqueIndex" : {
            "type" : "boolean"
          },
          "optionsImpl" : {
            "$ref" : "#/components/schemas/AbstractPropertyBuilderPropertyMetaStringString"
          },
          "fromStringValue" : {
            "type" : "string",
            "writeOnly" : true
          }
        }
      },
      "PriceOverrideDTO" : {
        "required" : [ "currency", "price", "salePrice", "sku" ],
        "type" : "object",
        "properties" : {
          "sku" : {
            "type" : "string",
            "description" : "The SKU of the product"
          },
          "price" : {
            "type" : "number",
            "description" : "The override price of the product",
            "format" : "double"
          },
          "salePrice" : {
            "type" : "number",
            "description" : "The override sale price of the product",
            "format" : "double"
          },
          "currency" : {
            "type" : "string",
            "description" : "The override currency of product price"
          }
        }
      },
      "PriceSchemaRequest" : {
        "required" : [ "attachedZoneCodes" ],
        "type" : "object",
        "properties" : {
          "priceOverrides" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PriceOverrideDTO"
            }
          },
          "attachedZoneCodes" : {
            "type" : "array",
            "description" : "List of zones code related to the price schema",
            "items" : {
              "type" : "string",
              "description" : "List of zones code related to the price schema"
            }
          }
        }
      },
      "WebhookNotificationIdWithResultResponse" : {
        "type" : "object",
        "properties" : {
          "webhookNotificationId" : {
            "type" : "string",
            "description" : "An identifier to track this request result, via webhook notification."
          },
          "resultURL" : {
            "type" : "string",
            "description" : "An API endpoint where to get the result of this request (after some seconds)."
          }
        }
      },
      "ZonePage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "zones" : {
            "type" : "array",
            "description" : "List of zones.",
            "items" : {
              "$ref" : "#/components/schemas/ZonesReqRes"
            }
          }
        }
      },
      "ZonesBatchReqRes" : {
        "type" : "object",
        "properties" : {
          "zonesCode" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "ChannelResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id of this channel in Botmaker.<br>_(This id will be needed when a `chatReference` or `channelId` is required in an endpoint of the API)_."
          },
          "platform" : {
            "type" : "string"
          },
          "active" : {
            "type" : "boolean"
          },
          "name" : {
            "type" : "string"
          },
          "webhookId" : {
            "type" : "string",
            "description" : "The id of the webhook to which this channel notifies messages to"
          }
        },
        "discriminator" : {
          "propertyName" : "platform"
        }
      },
      "ChannelsListResponse" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/IChannelResponse"
            }
          }
        }
      },
      "FacebookMessengerChannelResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id of this channel in Botmaker.<br>_(This id will be needed when a `chatReference` or `channelId` is required in an endpoint of the API)_."
          },
          "platform" : {
            "type" : "string"
          },
          "active" : {
            "type" : "boolean"
          },
          "name" : {
            "type" : "string"
          },
          "webhookId" : {
            "type" : "string",
            "description" : "The id of the webhook to which this channel notifies messages to"
          },
          "recipientId" : {
            "type" : "string",
            "description" : "Facebook recipient id"
          },
          "daysToExpire" : {
            "type" : "integer",
            "description" : "Messenger days to expire",
            "format" : "int64"
          }
        },
        "description" : "Facebook Messenger"
      },
      "IChannelResponse" : {
        "type" : "object",
        "description" : "Chat Channel",
        "oneOf" : [ {
          "$ref" : "#/components/schemas/ChannelResponse"
        }, {
          "$ref" : "#/components/schemas/WhatsAppChannelResponse"
        }, {
          "$ref" : "#/components/schemas/FacebookMessengerChannelResponse"
        }, {
          "$ref" : "#/components/schemas/TelegramChannelResponse"
        }, {
          "$ref" : "#/components/schemas/InstagramChannelResponse"
        } ]
      },
      "InstagramChannelResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id of this channel in Botmaker.<br>_(This id will be needed when a `chatReference` or `channelId` is required in an endpoint of the API)_."
          },
          "platform" : {
            "type" : "string"
          },
          "active" : {
            "type" : "boolean"
          },
          "name" : {
            "type" : "string"
          },
          "webhookId" : {
            "type" : "string",
            "description" : "The id of the webhook to which this channel notifies messages to"
          },
          "pageId" : {
            "type" : "string",
            "description" : "Instagram page id"
          },
          "recipientId" : {
            "type" : "string",
            "description" : "Instagram recipient id"
          }
        },
        "description" : "Instagram"
      },
      "TelegramChannelResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id of this channel in Botmaker.<br>_(This id will be needed when a `chatReference` or `channelId` is required in an endpoint of the API)_."
          },
          "platform" : {
            "type" : "string"
          },
          "active" : {
            "type" : "boolean"
          },
          "name" : {
            "type" : "string"
          },
          "webhookId" : {
            "type" : "string",
            "description" : "The id of the webhook to which this channel notifies messages to"
          },
          "token" : {
            "type" : "string",
            "description" : "The telegram token"
          }
        },
        "description" : "Telegram"
      },
      "WhatsAppChannelResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id of this channel in Botmaker.<br>_(This id will be needed when a `chatReference` or `channelId` is required in an endpoint of the API)_."
          },
          "platform" : {
            "type" : "string"
          },
          "active" : {
            "type" : "boolean"
          },
          "name" : {
            "type" : "string"
          },
          "webhookId" : {
            "type" : "string",
            "description" : "The id of the webhook to which this channel notifies messages to"
          },
          "number" : {
            "type" : "string",
            "description" : "The line number."
          },
          "status" : {
            "type" : "string",
            "description" : "Line status."
          },
          "quality" : {
            "type" : "string",
            "description" : "Line quality."
          },
          "wabaId" : {
            "type" : "string",
            "description" : "Waba Id of the line number"
          },
          "trial" : {
            "type" : "boolean"
          }
        },
        "description" : "WhatsApp"
      },
      "ChannelPatch" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string"
          },
          "active" : {
            "type" : "boolean"
          }
        }
      },
      "ChatWithMessagesResponse" : {
        "type" : "object",
        "properties" : {
          "chat" : {
            "$ref" : "#/components/schemas/ChatReferenceRes"
          },
          "creationTime" : {
            "type" : "string",
            "description" : "When did the chat conversation begun.",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "lastSessionCreationTime" : {
            "type" : "string"
          },
          "externalId" : {
            "type" : "string"
          },
          "firstName" : {
            "type" : "string"
          },
          "lastName" : {
            "type" : "string"
          },
          "country" : {
            "type" : "string"
          },
          "email" : {
            "type" : "string"
          },
          "whatsAppWindowCloseDatetime" : {
            "type" : "string",
            "description" : "In WhatsApp, until when you can keep sending messages without charge. After that datetime, you have to use a template.",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "variables" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string",
              "example" : "{\"varName\":\"some value\",\"numVar\":\"12345\"}"
            },
            "example" : {
              "varName" : "some value",
              "numVar" : "12345"
            }
          },
          "tags" : {
            "type" : "array",
            "description" : "The tags this chat is tagged with.",
            "example" : [ "returningCustomer", "buyer" ],
            "items" : {
              "type" : "string",
              "description" : "The tags this chat is tagged with.",
              "example" : "[\"returningCustomer\",\"buyer\"]"
            }
          },
          "queueId" : {
            "type" : "string",
            "description" : "The queue the chat was derived."
          },
          "agentId" : {
            "type" : "string",
            "description" : "The chat's assigned agent."
          },
          "onHoldAgentId" : {
            "type" : "string"
          },
          "lastUserMessageDatetime" : {
            "type" : "string",
            "description" : "Datetime of the last message sent by the user.",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "listMessagesURL" : {
            "type" : "string",
            "description" : "An API URL where to fetch this chat messages."
          },
          "isBanned" : {
            "type" : "boolean"
          },
          "isTester" : {
            "type" : "boolean"
          },
          "isBotMuted" : {
            "type" : "boolean"
          }
        }
      },
      "ChatVariableAssignationsPage" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Last variable assignation per variable within the requested time range.",
            "items" : {
              "$ref" : "#/components/schemas/VariableAssignation"
            }
          }
        }
      },
      "VariableAssignation" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string"
          },
          "value" : {
            "type" : "string"
          },
          "date" : {
            "type" : "string"
          }
        },
        "description" : "Last variable assignation per variable within the requested time range."
      },
      "ChatsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ChatWithMessagesResponse"
            }
          }
        }
      },
      "ChatUpdateRequest" : {
        "type" : "object",
        "properties" : {
          "firstName" : {
            "type" : "string"
          },
          "lastName" : {
            "type" : "string"
          },
          "country" : {
            "type" : "string"
          },
          "email" : {
            "type" : "string"
          },
          "variables" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string",
              "example" : "{\"varName\":\"some value\",\"numVar\":\"12345\"}"
            },
            "example" : {
              "varName" : "some value",
              "numVar" : "12345"
            }
          },
          "tags" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "boolean",
              "example" : false
            },
            "example" : {
              "tagName" : true,
              "anotherTag" : false
            }
          },
          "isTester" : {
            "type" : "boolean"
          }
        }
      },
      "MessageStateUpdateRequest" : {
        "required" : [ "channelId", "contactId" ],
        "type" : "object",
        "properties" : {
          "channelId" : {
            "type" : "string",
            "description" : "The id of the chat channel. It can be known at [GET /channels](https://api.botmaker.com/v2.0/#/operations/getChannels) endpoint.",
            "example" : "botproject-whatsapp-5491147038***"
          },
          "contactId" : {
            "type" : "string",
            "description" : "The id of the chat in the chat platform.",
            "example" : "5491147038***"
          },
          "typing" : {
            "type" : "boolean",
            "description" : "Indicates whether the typing indicator should be shown or will mark previous messages as read to the WhatsApp user.<br>When set to `true`, the user will see that the system is preparing a response.<br>When set to `false`, previous messages are marked as read.",
            "example" : true
          }
        },
        "description" : "Represents a request to update the status of a message on Botmaker platform"
      },
      "WebhookNotificationIdResponse" : {
        "type" : "object",
        "properties" : {
          "webhookNotificationId" : {
            "type" : "string",
            "description" : "An identifier to track this request result, via webhook notification."
          }
        }
      },
      "HeaderInteractive" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : [ "text", "image", "video", "document" ]
          },
          "content" : {
            "type" : "string",
            "description" : "The header text when `type` is \"text\"; a public media URL otherwise."
          }
        },
        "description" : "Optional header shown above the body. Not allowed when `action.type` is \"requestLocation\". For \"url\" actions only PNG/JPEG images are supported."
      },
      "Location" : {
        "type" : "object",
        "properties" : {
          "latitude" : {
            "type" : "string"
          },
          "longitude" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "address" : {
            "type" : "string"
          }
        }
      },
      "MessageButton" : {
        "type" : "object",
        "properties" : {
          "label" : {
            "type" : "string"
          },
          "intentIdOrName" : {
            "type" : "string"
          },
          "webhookPayload" : {
            "type" : "string"
          },
          "linkUrl" : {
            "type" : "string"
          },
          "phoneNumber" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          }
        }
      },
      "MessageMediaRequest" : {
        "type" : "object",
        "properties" : {
          "filename" : {
            "type" : "string",
            "description" : "Name of the file."
          },
          "mimeType" : {
            "type" : "string",
            "externalDocs" : {
              "description" : "WhatsApp supported file types.",
              "url" : "https://developers.facebook.com/docs/whatsapp/on-premises/reference/media#supported-files"
            },
            "enum" : [ "image/jpeg", "image/png", "audio/aac", "audio/ogg", "audio/mp4", "audio/amr", "audio/mpeg", "application/pdf", "file/pdf", "file/vnd.ms-excel", "video/mp4", "video/3gpp" ]
          },
          "url" : {
            "type" : "string"
          }
        }
      },
      "MessageRequest" : {
        "type" : "object",
        "properties" : {
          "text" : {
            "type" : "string",
            "description" : "Any text.\nSome platforms allow bolding surrounding text with '*' and italics surrounding with '_'.\nFor mailing (email) channels this is the plain-text body of the email."
          },
          "subject" : {
            "type" : "string",
            "description" : "Email subject. Only for mailing (email) channels, where it is required."
          },
          "html" : {
            "type" : "string",
            "description" : "HTML body of the email. Only for mailing (email) channels. When both html and text are provided, text is used as the plain-text alternative part."
          },
          "buttons" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/MessageButton"
            }
          },
          "media" : {
            "$ref" : "#/components/schemas/MessageMediaRequest"
          },
          "location" : {
            "$ref" : "#/components/schemas/Location"
          },
          "contact" : {
            "$ref" : "#/components/schemas/Contact"
          },
          "whatsappInteractive" : {
            "$ref" : "#/components/schemas/WhatsappInteractive"
          },
          "webhookPayload" : {
            "type" : "string",
            "description" : "Custom data you want to receive in a webhook notification. It can be any string you like to track this request by your side."
          }
        }
      },
      "MessagesRequest" : {
        "required" : [ "chat" ],
        "type" : "object",
        "properties" : {
          "chat" : {
            "$ref" : "#/components/schemas/ChatReferenceReq"
          },
          "messages" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/MessageRequest"
            }
          }
        }
      },
      "Row" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "title" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "intentNameOrId" : {
            "type" : "string"
          }
        }
      },
      "Section" : {
        "type" : "object",
        "properties" : {
          "title" : {
            "type" : "string"
          },
          "rows" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Row"
            }
          }
        }
      },
      "WhatsappInteractive" : {
        "required" : [ "body", "action" ],
        "type" : "object",
        "properties" : {
          "body" : {
            "type" : "string",
            "description" : "Main message text."
          },
          "footer" : {
            "type" : "string",
            "description" : "Optional footer text. Max 1024 characters (60 when `action.type` is \"list\"). Not allowed when `action.type` is \"requestLocation\"."
          },
          "header" : {
            "$ref" : "#/components/schemas/HeaderInteractive"
          },
          "action" : {
            "$ref" : "#/components/schemas/WhatsappInteractiveAction"
          }
        },
        "description" : "Sends an interactive message: a text `body` plus an `action` — URL button, quick-reply intent buttons, a location request or a sectioned list, chosen by `action.type` — optionally framed by a `header` and a `footer`. Only available for WhatsApp chats.",
        "externalDocs" : {
          "description" : "Meta WhatsApp interactive messages",
          "url" : "https://developers.facebook.com/docs/whatsapp/cloud-api/messages/interactive-list-messages"
        }
      },
      "WhatsappInteractiveAction" : {
        "required" : [ "type" ],
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "description" : "Selects the interactive variant and which sibling fields it requires:\n- `url` — a single CTA button that opens a link. Requires `urlLink` and `label`.\n- `intent` — up to 3 quick-reply buttons that trigger Botmaker intents. Requires `buttons`.\n- `requestLocation` — asks the user to share their location. No other fields.\n- `list` — a modal with a sectioned list of options. Requires `button` and `sections`.",
            "enum" : [ "url", "intent", "requestLocation", "list" ]
          },
          "urlLink" : {
            "type" : "string",
            "description" : "The URL the button opens. _Only for `url` type._"
          },
          "label" : {
            "type" : "string",
            "description" : "The button label. _Only for `url` type._"
          },
          "buttons" : {
            "maxItems" : 3,
            "type" : "array",
            "description" : "The quick-reply buttons, max 3. _Only for `intent` type._",
            "items" : {
              "required" : [ "label", "intent" ],
              "type" : "object",
              "properties" : {
                "label" : {
                  "type" : "string"
                },
                "intent" : {
                  "type" : "string",
                  "description" : "Intent name or ID to trigger."
                }
              }
            }
          },
          "button" : {
            "maxLength" : 20,
            "type" : "string",
            "description" : "Label of the button that opens the list modal (e.g. \"View Options\"). _Only for `list` type._"
          },
          "sections" : {
            "maxItems" : 10,
            "minItems" : 1,
            "type" : "array",
            "description" : "1-10 sections; aggregate row count across all sections must be between 1 and 10. _Only for `list` type._",
            "items" : {
              "required" : [ "rows" ],
              "type" : "object",
              "properties" : {
                "title" : {
                  "maxLength" : 24,
                  "type" : "string",
                  "description" : "Section title. Required when there is more than one section."
                },
                "rows" : {
                  "minItems" : 1,
                  "type" : "array",
                  "items" : {
                    "required" : [ "id", "title" ],
                    "type" : "object",
                    "properties" : {
                      "id" : {
                        "maxLength" : 200,
                        "type" : "string",
                        "description" : "Unique row identifier. Returned to your webhook as `buttonPayload` when the user taps the row."
                      },
                      "title" : {
                        "maxLength" : 24,
                        "type" : "string",
                        "description" : "Row display title."
                      },
                      "description" : {
                        "maxLength" : 72,
                        "type" : "string",
                        "description" : "Optional row description shown below the title."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description" : "What the interactive message does. `type` selects the variant and determines which of the other fields must be sent."
      },
      "CallParticipantLink" : {
        "type" : "object",
        "properties" : {
          "callLink" : {
            "type" : "string"
          },
          "chat" : {
            "$ref" : "#/components/schemas/ChatReference"
          },
          "isAgent" : {
            "type" : "boolean"
          }
        },
        "description" : "The links to join the conversation. Each link carries either the `agent` or `chat` to which the link should be assigned."
      },
      "StartCallResponse" : {
        "type" : "object",
        "properties" : {
          "roomName" : {
            "type" : "string"
          },
          "links" : {
            "type" : "array",
            "description" : "The links to join the conversation. Each link carries either the `agent` or `chat` to which the link should be assigned.",
            "items" : {
              "$ref" : "#/components/schemas/CallParticipantLink"
            }
          }
        }
      },
      "CallAgent" : {
        "required" : [ "email", "id" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id of the agent. You must send either this or `email`."
          },
          "email" : {
            "type" : "string",
            "description" : "The agent's email. You must send either this or `id`."
          },
          "name" : {
            "type" : "string",
            "description" : "The name that will be displayed in the call. This field is **optional**; If not passed, the agent's alias will be used."
          },
          "avatarURL" : {
            "type" : "string",
            "description" : "The image that will be showed in the call. This field is **optional**; If not passed, the agent's picture configured in Botmaker will be used."
          }
        },
        "description" : "One or more agents that ... the conversation."
      },
      "StartCallRequest" : {
        "type" : "object",
        "properties" : {
          "agents" : {
            "type" : "array",
            "description" : "One or more agents that ... the conversation.",
            "items" : {
              "$ref" : "#/components/schemas/CallAgent"
            }
          },
          "chat" : {
            "$ref" : "#/components/schemas/ChatReference"
          },
          "isAudioOnly" : {
            "type" : "boolean"
          }
        }
      },
      "TriggerIntentRequest" : {
        "required" : [ "chat" ],
        "type" : "object",
        "properties" : {
          "chat" : {
            "$ref" : "#/components/schemas/ChatReferenceReq"
          },
          "intentIdOrName" : {
            "type" : "string",
            "description" : "The intent id or name. You can get the id at the `/intents` endpoint; the name is the one found at [Botmaker bots page](https://go.botmaker.com/#/bots).",
            "example" : "Intent Display Name | some_whatsapp_template_name"
          },
          "variables" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string",
              "description" : "Variables to set before the intent execution starts.",
              "example" : "{\"varName\":\"some value\",\"numVar\":\"12345\"}"
            },
            "description" : "Variables to set before the intent execution starts.",
            "example" : {
              "varName" : "some value",
              "numVar" : "12345"
            }
          },
          "tags" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "boolean",
              "description" : "Tags to set before the intent execution starts.",
              "example" : false
            },
            "description" : "Tags to set before the intent execution starts.",
            "example" : {
              "tagName" : true,
              "anotherTag" : false
            }
          },
          "webhookPayload" : {
            "type" : "string",
            "description" : "Custom data you want to receive in a webhook notification. It can be any string you like to track this request by your side."
          },
          "postActionIntentIdOrName" : {
            "type" : "string",
            "description" : "An optional action that can be executed after the main intent. A intent id or name is expected. You can get the id at the `/intents` endpoint; the name is the one found at [Botmaker bots page](https://go.botmaker.com/#/bots).",
            "example" : "Intent Display Name | some_whatsapp_template_name"
          }
        },
        "description" : "A chat reference and the intent to trigger."
      },
      "TriggerIntentBatchRequest" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/TriggerIntentRequest"
            }
          }
        },
        "description" : "A list of trigger intent requests."
      },
      "CartResponse" : {
        "type" : "object",
        "properties" : {
          "cartId" : {
            "type" : "string"
          },
          "origin" : {
            "type" : "string"
          },
          "notes" : {
            "type" : "string"
          },
          "totalPriceWithDiscounts" : {
            "type" : "string"
          },
          "totalOriginalPrice" : {
            "type" : "string"
          },
          "totalQuantity" : {
            "type" : "string"
          },
          "products" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/JSONObject"
            }
          }
        }
      },
      "CartRequest" : {
        "required" : [ "chat", "clientPayload" ],
        "type" : "object",
        "properties" : {
          "chat" : {
            "$ref" : "#/components/schemas/ChatReferenceReq"
          },
          "clientPayload" : {
            "type" : "string",
            "description" : "Custom data you want to receive in a webhook notification. It can be any string you like to track this request by your side."
          }
        }
      },
      "ProductRequest" : {
        "required" : [ "body", "catalogId", "chat", "clientPayload", "createNewCart", "headerText", "skus" ],
        "type" : "object",
        "properties" : {
          "chat" : {
            "$ref" : "#/components/schemas/ChatReferenceReq"
          },
          "clientPayload" : {
            "type" : "string",
            "description" : "Custom data you want to receive in a webhook notification. It can be any string you like to track this request by your side."
          },
          "headerText" : {
            "type" : "string",
            "description" : "Header text for the message."
          },
          "body" : {
            "type" : "string",
            "description" : "Body of the message."
          },
          "catalogId" : {
            "type" : "string",
            "description" : "Id of the Botmaker catalog, must be connected to META catalog"
          },
          "skus" : {
            "type" : "array",
            "description" : "The SKUs that will be sent in the message. This SKUs must exist in the provided catalogId. The amount of products should be between 1 and 30 products max.",
            "example" : [ "123", "124", "125" ],
            "items" : {
              "type" : "string",
              "description" : "The SKUs that will be sent in the message. This SKUs must exist in the provided catalogId. The amount of products should be between 1 and 30 products max.",
              "example" : "[\"123\",\"124\",\"125\"]"
            }
          },
          "createNewCart" : {
            "type" : "boolean",
            "description" : "If true, a new cart will be created for the user and if there is an existing cart, it will be abandoned. By default, this behaviour is set to false, and carts are kept open until a checkout operation is performed by the ChatBot, by the Agent, or through an API call.",
            "example" : false
          }
        }
      },
      "CreateReactionRequest" : {
        "required" : [ "messageId", "reaction" ],
        "type" : "object",
        "properties" : {
          "messageId" : {
            "type" : "string",
            "description" : "The unique identifier of the message to which you want to add a reaction. The messageId can be obtained using the List Messages API [GET /v2.0/messages](https://api.botmaker.com/v2.0/messages) by searching for the id values in the items array.",
            "example" : "ABC123DEF456GHI789JK"
          },
          "reaction" : {
            "type" : "string",
            "description" : "The emoji that represents the reaction. This should be a valid emoji string.",
            "example" : "👍️"
          }
        }
      },
      "DeleteReactionRequest" : {
        "required" : [ "messageId" ],
        "type" : "object",
        "properties" : {
          "messageId" : {
            "type" : "string",
            "description" : "The unique identifier of the message to which you want to delete a reaction. The messageId can be obtained using the List Messages API [GET /v2.0/messages](https://api.botmaker.com/v2.0/messages) by searching for the id values in the items array.",
            "example" : "ABC123DEF456GHI789JK"
          }
        }
      },
      "ConstantResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The Botmaker id of the constant."
          },
          "name" : {
            "type" : "string",
            "description" : "The Botmaker name of the constant."
          },
          "type" : {
            "type" : "string",
            "description" : "The Botmaker type of the constant."
          },
          "value" : {
            "type" : "string",
            "description" : "The Botmaker value of the constant."
          }
        }
      },
      "ConstantResponseList" : {
        "type" : "object",
        "properties" : {
          "constants" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ConstantResponse"
            }
          }
        }
      },
      "ConstantRequest" : {
        "type" : "object",
        "properties" : {
          "value" : {
            "type" : "string",
            "description" : "The Botmaker value to update a constant."
          }
        }
      },
      "ChatEntry" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The customer's internal ID.",
            "example" : "B6H5TVN6UTM1V8TVPG7Z"
          },
          "platformContactId" : {
            "type" : "string",
            "description" : "The platform-specific contact identifier (e.g. a phone number for WhatsApp).",
            "example" : "5491190901212"
          },
          "chatChannelId" : {
            "type" : "string",
            "description" : "The chat channel identifier.",
            "example" : "boti20-whatsapp-541192929292"
          },
          "bsuid" : {
            "type" : "string",
            "description" : "WhatsApp BSUID linked to this chat session, if available.",
            "example" : "AbCdEfGhIjK"
          }
        },
        "description" : "A linked chat session on a specific channel."
      },
      "ContactField" : {
        "type" : "object",
        "properties" : {
          "value" : {
            "type" : "string",
            "description" : "The field value (e.g. a phone number, e-mail address, postal address or URL).",
            "example" : "5491190901212"
          },
          "label" : {
            "type" : "string",
            "description" : "An optional label for this entry (e.g. \"Home\", \"Work\").",
            "example" : "Home"
          }
        },
        "description" : "A value/label pair used for phone numbers, emails, addresses and websites."
      },
      "ContactResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "firstName" : {
            "type" : "string"
          },
          "lastName" : {
            "type" : "string"
          },
          "birthday" : {
            "type" : "string"
          },
          "pictureUrl" : {
            "type" : "string"
          },
          "language" : {
            "type" : "string"
          },
          "country" : {
            "type" : "string"
          },
          "companyId" : {
            "type" : "string"
          },
          "jobTitle" : {
            "type" : "string"
          },
          "phoneNumbers" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ContactField"
            }
          },
          "emails" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ContactField"
            }
          },
          "addresses" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ContactField"
            }
          },
          "websites" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ContactField"
            }
          },
          "instagramIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "facebookIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "twitterIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "notes" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "chats" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ChatEntry"
            }
          },
          "whatsappBsuids" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "ContactsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ContactResponse"
            }
          }
        }
      },
      "DashboardAgentPerformancePage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DashboardAgentPerformanceResponse"
            }
          }
        }
      },
      "DashboardAgentPerformanceResponse" : {
        "type" : "object",
        "properties" : {
          "agentEmail" : {
            "type" : "string",
            "example" : "example@botmaker.io"
          },
          "agentName" : {
            "type" : "string",
            "example" : "Example Botmaker"
          },
          "role" : {
            "type" : "string",
            "example" : "ADMIN"
          },
          "queue" : {
            "type" : "array",
            "example" : [ "suporteOso", "suporteOsoEmail", "HelpCenter_OSO_BR" ],
            "items" : {
              "type" : "string",
              "example" : "[\"suporteOso\",\"suporteOsoEmail\",\"HelpCenter_OSO_BR\"]"
            }
          },
          "state" : {
            "type" : "string",
            "example" : "Busy"
          },
          "checkin" : {
            "type" : "string"
          },
          "checkout" : {
            "type" : "string"
          }
        }
      },
      "DashboardMetricsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DashboardMetricsResponse"
            }
          }
        }
      },
      "DashboardMetricsResponse" : {
        "type" : "object",
        "properties" : {
          "chatId" : {
            "type" : "string",
            "example" : "DN5SFU5TP46YHJXVAX3F"
          },
          "sessionCreationTime" : {
            "type" : "string",
            "format" : "date-time",
            "example" : "2023-04-17T00:00:00Z"
          },
          "avgAttendingTime" : {
            "type" : "string",
            "example" : "3358"
          },
          "avgResponseTime" : {
            "type" : "string",
            "example" : "3358"
          },
          "queue" : {
            "type" : "string",
            "example" : "Customer Service"
          },
          "agentName" : {
            "type" : "string",
            "example" : "Juan Perez"
          },
          "agentId" : {
            "type" : "string",
            "example" : "DrSDR1DauHPbRCBZshDTW5wcYS63"
          },
          "sessionId" : {
            "type" : "string",
            "example" : "DN5SFU5TP46YHJXVAX3F_2023-04-17T00:00:00.000Z"
          },
          "typification" : {
            "type" : "string",
            "example" : "Typification"
          },
          "closedTime" : {
            "type" : "string",
            "format" : "date-time",
            "example" : "2023-04-17T12:00:00Z"
          },
          "openSessions" : {
            "type" : "string",
            "example" : "2"
          },
          "closedSessions" : {
            "type" : "string",
            "example" : "3"
          },
          "onHold" : {
            "type" : "string",
            "example" : "1"
          },
          "opResponseTime" : {
            "type" : "string",
            "example" : "223"
          },
          "operatorResponses" : {
            "type" : "string",
            "example" : "5"
          },
          "sessionTransferIn" : {
            "type" : "string",
            "example" : "1"
          },
          "sessionTransferOut" : {
            "type" : "string",
            "example" : "2"
          },
          "sessionTransferOutNoMessages" : {
            "type" : "string",
            "example" : "1"
          },
          "closedWithNoMessages" : {
            "type" : "string",
            "example" : "2"
          },
          "timeoutNoMessages" : {
            "type" : "string",
            "example" : "3"
          },
          "agentTimeout" : {
            "type" : "string",
            "example" : "2"
          },
          "userTimeout" : {
            "type" : "string",
            "example" : "2"
          },
          "fromQueueAsignToOpAssigned" : {
            "type" : "string",
            "example" : "1"
          },
          "fromSessionStartToOpFirstResponse" : {
            "type" : "string",
            "example" : "1"
          },
          "fromQueueAsignToOpFirstResponse" : {
            "type" : "string",
            "example" : "509"
          },
          "fromOpAssignedToOpFirstResponse" : {
            "type" : "string",
            "example" : "615"
          },
          "fromQueueAsignToSessionClosed" : {
            "type" : "string",
            "example" : "579"
          },
          "fromOpAssignationToSessionClosed" : {
            "type" : "string",
            "example" : "125"
          },
          "sessionTimeout" : {
            "type" : "string",
            "example" : "1"
          },
          "conversationLink" : {
            "type" : "string",
            "example" : "https://go.botmaker.com/#/chats/DN5SFU5TP46YHJXVAX3F"
          }
        }
      },
      "EntityResponse" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "additionalProperties" : {
                "type" : "string"
              }
            }
          }
        }
      },
      "BotResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          }
        },
        "description" : "The bot this intent belongs to."
      },
      "IntentResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The Botmaker id. You can use it to trigger intents at `/chat-actions/trigger-intent`"
          },
          "name" : {
            "type" : "string",
            "description" : "The name of the intent. You can use it to trigger intents at `/chat-actions/trigger-intent`"
          },
          "bot" : {
            "$ref" : "#/components/schemas/BotResponse"
          },
          "topics" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "triggers" : {
            "type" : "array",
            "description" : "The list of intent triggers used in conversations.",
            "items" : {
              "type" : "string",
              "description" : "The list of intent triggers used in conversations."
            }
          },
          "active" : {
            "type" : "boolean"
          }
        }
      },
      "IntentsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/IntentResponse"
            }
          }
        }
      },
      "UploadKnowledgeBaseRequest" : {
        "type" : "object",
        "properties" : {
          "url" : {
            "type" : "string",
            "description" : "Url of either the file, or the web page with which to create a KnowledgeBase"
          },
          "name" : {
            "type" : "string",
            "description" : "Name of the KnowledgeBase. If it doesn't exists, it will create a new one, if it exists it will update it"
          },
          "type" : {
            "type" : "string",
            "description" : "Type of KnowledgeBase. It can be any of the following: \"www\", \"doc\"",
            "enum" : [ "www", "doc", "content", "articles", "other" ]
          },
          "language" : {
            "type" : "string",
            "description" : "Language to use when processing the KnowledgeBase",
            "enum" : [ "PORTUGUES", "ESPANOL", "ENGLISH", "FRENCH", "ITALIAN", "GERMAN", "CHINESE", "JAPANESE", "KOREAN", "TURKISH", "HEBREW", "EMPTY", "HINDI", "PUNJABI", "ARABIC", "PORTUGUES_PORTUGAL", "RUSSIAN" ]
          },
          "limitPages" : {
            "type" : "integer",
            "description" : "Limit of pages to crawl for www type. Cannot exceed 20000",
            "format" : "int32"
          }
        },
        "description" : "KnowledgeBase file or url to upload. The accepted file extensions are: \"pdf\", \"doc\", \"xlsx\", \"txt\""
      },
      "Call" : {
        "type" : "object",
        "properties" : {
          "event" : {
            "type" : "string",
            "enum" : [ "user-joined", "agent-joined", "user-left", "agent-left", "recording", "room-destroyed" ]
          }
        }
      },
      "Content" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : [ "text", "image", "audio", "file", "video", "buttons", "carousel", "button-click", "call" ]
          },
          "text" : {
            "type" : "string"
          },
          "buttons" : {
            "type" : "array",
            "description" : "The option buttons showed to the user.",
            "items" : {
              "type" : "string",
              "description" : "The option buttons showed to the user."
            }
          },
          "selectedButton" : {
            "type" : "string"
          },
          "carouselItems" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "media" : {
            "$ref" : "#/components/schemas/MessageMediaResponse"
          },
          "location" : {
            "$ref" : "#/components/schemas/Location"
          },
          "call" : {
            "$ref" : "#/components/schemas/Call"
          },
          "whatsAppTemplateName" : {
            "type" : "string",
            "description" : "If the message was a whatsapp template, the name of the template."
          },
          "originalText" : {
            "type" : "string",
            "description" : "If the message was translated, the original text"
          },
          "originalAudioUrl" : {
            "type" : "string",
            "description" : "Audio URL, in case it was transcribed"
          }
        }
      },
      "EncryptionParams" : {
        "type" : "object",
        "properties" : {
          "version" : {
            "type" : "string"
          },
          "configId" : {
            "type" : "string"
          },
          "timestamp" : {
            "type" : "string"
          },
          "encryptedKey" : {
            "type" : "string"
          }
        },
        "description" : "Needed for decryption when message was encrypted."
      },
      "MessageMediaResponse" : {
        "type" : "object",
        "properties" : {
          "caption" : {
            "type" : "string"
          },
          "url" : {
            "type" : "string"
          }
        }
      },
      "MessageResponse" : {
        "required" : [ "chat" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id of the message in Botmaker",
            "example" : "ABC123DEF456GHI789JK"
          },
          "creationTime" : {
            "type" : "string",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "from" : {
            "type" : "string",
            "description" : "Who sent the message.",
            "enum" : [ "bot", "user", "agent" ]
          },
          "agentId" : {
            "type" : "string",
            "description" : "The agent that sent the message (when `from` = \"agent\")"
          },
          "queueId" : {
            "type" : "string",
            "description" : "The current queue of the user."
          },
          "content" : {
            "$ref" : "#/components/schemas/Content"
          },
          "encryptionParams" : {
            "$ref" : "#/components/schemas/EncryptionParams"
          },
          "sessionCreationTime" : {
            "type" : "string",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "chat" : {
            "$ref" : "#/components/schemas/ChatReferenceRes"
          },
          "sessionId" : {
            "type" : "string",
            "description" : "The session this message belongs to. The concatenation of `chat.chatId` + `_` + `sessionCreationTime`",
            "example" : "ABC123DEF456GHI789JK_2021-01-01T00:00:00Z"
          }
        }
      },
      "MessagesPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/MessageResponse"
            }
          }
        }
      },
      "BlackListReqRes" : {
        "type" : "object",
        "properties" : {
          "contacts" : {
            "type" : "array",
            "description" : "List of blacklist contacts.",
            "example" : [ "5491199993333", "52912349876" ],
            "items" : {
              "type" : "string",
              "description" : "List of blacklist contacts.",
              "example" : "[\"5491199993333\",\"52912349876\"]"
            }
          }
        }
      },
      "CampaignRequest" : {
        "required" : [ "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "A unique campaign name"
          },
          "goal" : {
            "type" : "string",
            "description" : "A text that defines the goal of your campaign"
          }
        },
        "description" : "A new notification campaign."
      },
      "NotificationContactRequest" : {
        "required" : [ "contactId" ],
        "type" : "object",
        "properties" : {
          "contactId" : {
            "type" : "string",
            "description" : "The id of the chat in the chat platform.",
            "example" : "5491147038***"
          },
          "variables" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string",
              "description" : "Variables to set before the intent execution starts.",
              "example" : "{\"varName\":\"some value\",\"numVar\":\"12345\"}"
            },
            "description" : "Variables to set before the intent execution starts.",
            "example" : {
              "varName" : "some value",
              "numVar" : "12345"
            }
          },
          "tags" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "boolean",
              "description" : "Tags to set before the intent execution starts.",
              "example" : false
            },
            "description" : "Tags to set before the intent execution starts.",
            "example" : {
              "tagName" : true,
              "anotherTag" : false
            }
          },
          "webhookPayload" : {
            "type" : "string",
            "description" : "Custom data you want to receive in a webhook notification. It can be any string you like to track this request by your side."
          }
        },
        "description" : "A contact reference and the intent to trigger."
      },
      "NotificationRequest" : {
        "required" : [ "channelId", "contacts", "name" ],
        "type" : "object",
        "properties" : {
          "campaign" : {
            "type" : "string",
            "description" : "A campaign `name` or `id` or `null` for default campaign."
          },
          "channelId" : {
            "type" : "string",
            "description" : "You can get it at [GET /channels](https://api.botmaker.com/v2.0/#/operations/getChannels) endpoint.<br>_Currently supported platforms: **WhatsApp**, **SMS** and **Email**._"
          },
          "name" : {
            "type" : "string",
            "description" : "Notification name"
          },
          "intentIdOrName" : {
            "type" : "string",
            "description" : "The intent id or name. You can get the id at the `/intents` endpoint; the name is the one found at [Botmaker bots page](https://go.botmaker.com/#/bots).",
            "example" : "Intent Display Name | some_whatsapp_template_name"
          },
          "contacts" : {
            "type" : "array",
            "description" : "List of contact",
            "items" : {
              "$ref" : "#/components/schemas/NotificationContactRequest"
            }
          }
        },
        "description" : "The notification to be send"
      },
      "CampaignPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/CampaignResponse"
            }
          }
        }
      },
      "CampaignResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "goal" : {
            "type" : "string"
          },
          "active" : {
            "type" : "boolean"
          }
        },
        "description" : "A notification campaign."
      },
      "BlackListPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "contacts" : {
            "type" : "array",
            "description" : "List of blacklist contacts.",
            "example" : [ "5491199993333", "52912349876" ],
            "items" : {
              "type" : "string",
              "description" : "List of blacklist contacts.",
              "example" : "[\"5491199993333\",\"52912349876\"]"
            }
          }
        }
      },
      "CustomerDetail" : {
        "type" : "object",
        "properties" : {
          "customerId" : {
            "type" : "string",
            "description" : "Customer ID",
            "example" : "002HITVZHY47SGW8FHCX"
          },
          "sessionId" : {
            "type" : "string",
            "description" : "Session ID",
            "example" : "session_789012"
          },
          "contactId" : {
            "type" : "string",
            "description" : "Contact ID",
            "example" : "5491199995555"
          },
          "phone" : {
            "type" : "string",
            "description" : "Phone number",
            "example" : "5491199995555"
          },
          "firstName" : {
            "type" : "string",
            "description" : "First name",
            "example" : "John"
          },
          "lastName" : {
            "type" : "string",
            "description" : "Last name",
            "example" : "Doe"
          },
          "email" : {
            "type" : "string",
            "description" : "Email",
            "example" : "john.doe@example.com"
          },
          "lastStatus" : {
            "$ref" : "#/components/schemas/NotificationStatus"
          },
          "answeredMessage" : {
            "type" : "string",
            "description" : "Text value sent by the customer as answer",
            "example" : "Yes, I'm interested"
          },
          "answeredMessageId" : {
            "type" : "string",
            "description" : "Message ID of the customer's answer",
            "example" : "msg_123456"
          },
          "status" : {
            "$ref" : "#/components/schemas/CustomerStatus"
          }
        },
        "description" : "Customer detail for notification instance"
      },
      "CustomerStatus" : {
        "type" : "object",
        "properties" : {
          "sent" : {
            "type" : "string",
            "description" : "Timestamp when the notification was sent",
            "example" : "2024-01-15T10:30:00Z"
          },
          "delivered" : {
            "type" : "string",
            "description" : "Timestamp when the notification was delivered",
            "example" : "2024-01-15T10:30:05Z"
          },
          "read" : {
            "type" : "string",
            "description" : "Timestamp when the notification was read",
            "example" : "2024-01-15T10:35:00Z"
          },
          "answered" : {
            "type" : "string",
            "description" : "Timestamp when the notification was answered",
            "example" : "2024-01-15T10:40:00Z"
          },
          "error" : {
            "type" : "string",
            "description" : "Timestamp when an error occurred",
            "example" : "2024-01-15T10:30:00Z"
          }
        },
        "description" : "Customer notification status with timestamps for each event"
      },
      "NotificationInfo" : {
        "type" : "object",
        "properties" : {
          "campaignName" : {
            "type" : "string",
            "description" : "Campaign name",
            "example" : "Marketing Campaign 2024"
          },
          "contactGroup" : {
            "type" : "string",
            "description" : "Contact group",
            "example" : "Premium Users"
          },
          "notificationName" : {
            "type" : "string",
            "description" : "Notification name",
            "example" : "Welcome Message"
          },
          "notificationId" : {
            "type" : "string",
            "description" : "Notification ID",
            "example" : "notif_123456"
          },
          "notificationInstanceId" : {
            "type" : "string",
            "description" : "Notification Instance ID",
            "example" : "inst_123456"
          },
          "start" : {
            "type" : "string",
            "description" : "Start timestamp",
            "example" : "2024-01-15T10:30:00Z"
          },
          "end" : {
            "type" : "string",
            "description" : "End timestamp",
            "example" : "2024-01-15T11:00:00Z"
          },
          "status" : {
            "type" : "string",
            "description" : "Notification status",
            "example" : "COMPLETED"
          },
          "details" : {
            "$ref" : "#/components/schemas/NotificationInstanceDetails"
          }
        },
        "description" : "Notification instance information"
      },
      "NotificationInstanceDetailResponse" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data. Null if no more pages.",
            "example" : "https://api.botmaker.com/v2/notifications/instance-detail/123?from=2024-01-15T00:00:00Z&to=2024-01-16T00:00:00Z&offset=customer_id_123"
          },
          "notification" : {
            "$ref" : "#/components/schemas/NotificationInfo"
          },
          "customers" : {
            "type" : "array",
            "description" : "List of customers (maximum 500 per page)",
            "items" : {
              "$ref" : "#/components/schemas/CustomerDetail"
            }
          }
        },
        "description" : "Notification instance detail with customers"
      },
      "NotificationInstanceDetails" : {
        "type" : "object",
        "properties" : {
          "sent" : {
            "type" : "integer",
            "description" : "Number of messages sent",
            "format" : "int64",
            "example" : 100
          },
          "delivered" : {
            "type" : "integer",
            "description" : "Number of messages delivered",
            "format" : "int64",
            "example" : 95
          },
          "read" : {
            "type" : "integer",
            "description" : "Number of messages read",
            "format" : "int64",
            "example" : 80
          },
          "answered" : {
            "type" : "integer",
            "description" : "Number of messages answered",
            "format" : "int64",
            "example" : 25
          },
          "error" : {
            "type" : "integer",
            "description" : "Number of messages with errors",
            "format" : "int64",
            "example" : 5
          }
        },
        "description" : "Notification instance details with counters"
      },
      "NotificationStatus" : {
        "type" : "string",
        "description" : "Status of a notification",
        "example" : "delivered",
        "enum" : [ "sent", "delivered", "read", "answered", "error" ]
      },
      "NotificationInstanceResponse" : {
        "type" : "object",
        "properties" : {
          "campaignName" : {
            "type" : "string",
            "description" : "Campaign name",
            "example" : "Marketing Campaign 2024"
          },
          "contactGroup" : {
            "type" : "string",
            "description" : "Contact group",
            "example" : "Premium Users"
          },
          "notificationName" : {
            "type" : "string",
            "description" : "Notification name",
            "example" : "Welcome Message"
          },
          "start" : {
            "type" : "string",
            "description" : "Start timestamp",
            "example" : "2024-01-15T10:30:00Z"
          },
          "end" : {
            "type" : "string",
            "description" : "End timestamp",
            "example" : "2024-01-15T11:00:00Z"
          },
          "status" : {
            "type" : "string",
            "description" : "Notification status",
            "example" : "COMPLETED"
          },
          "details" : {
            "$ref" : "#/components/schemas/NotificationInstanceDetails"
          },
          "notificationInstanceId" : {
            "type" : "string"
          }
        },
        "description" : "A notification instance with its details and counters"
      },
      "NotificationInstancesPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/NotificationInstanceResponse"
            }
          }
        }
      },
      "AttentionQueuesResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The Botmaker id of the queue."
          },
          "name" : {
            "type" : "string",
            "description" : "The Botmaker name of the queue."
          },
          "slots" : {
            "minimum" : 0,
            "type" : "integer",
            "description" : "The number of slots (concurrent attentions) of the queue.",
            "format" : "int32"
          },
          "allowedTransferQueues" : {
            "type" : "array",
            "description" : "The ids of the queues this queue is allowed to transfer to.",
            "items" : {
              "type" : "string",
              "description" : "The ids of the queues this queue is allowed to transfer to."
            }
          }
        }
      },
      "AttentionQueuesPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/AttentionQueuesResponse"
            }
          }
        }
      },
      "AttentionQueueUpdateRequest" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The new name of the queue."
          },
          "slots" : {
            "minimum" : 0,
            "type" : "integer",
            "description" : "The new number of slots (concurrent attentions) of the queue.",
            "format" : "int32"
          },
          "allowedTransferQueues" : {
            "type" : "array",
            "description" : "The new ids (or names) of the queues this queue is allowed to transfer to.",
            "items" : {
              "type" : "string",
              "description" : "The new ids (or names) of the queues this queue is allowed to transfer to."
            }
          }
        }
      },
      "RoleRequestResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The role id. (This field is not needed when creating a role.)"
          },
          "name" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "queues" : {
            "type" : "array",
            "description" : "The default queues for agents with this role.",
            "items" : {
              "type" : "string",
              "description" : "The default queues for agents with this role."
            }
          },
          "priority" : {
            "type" : "string",
            "description" : "The default priority for agents with this role.",
            "enum" : [ "never", "low", "normal", "high" ]
          },
          "slots" : {
            "maximum" : 30,
            "minimum" : 0,
            "type" : "integer",
            "description" : "The default slots for agents with this role.",
            "format" : "int32"
          },
          "permissions" : {
            "$ref" : "#/components/schemas/RolePermissions"
          }
        }
      },
      "RolesPageResponse" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/RoleRequestResponse"
            }
          }
        }
      },
      "ChatResponse" : {
        "type" : "object",
        "properties" : {
          "chat" : {
            "$ref" : "#/components/schemas/ChatReferenceRes"
          },
          "creationTime" : {
            "type" : "string",
            "description" : "When did the chat conversation begun.",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "lastSessionCreationTime" : {
            "type" : "string"
          },
          "externalId" : {
            "type" : "string"
          },
          "firstName" : {
            "type" : "string"
          },
          "lastName" : {
            "type" : "string"
          },
          "country" : {
            "type" : "string"
          },
          "email" : {
            "type" : "string"
          },
          "whatsAppWindowCloseDatetime" : {
            "type" : "string",
            "description" : "In WhatsApp, until when you can keep sending messages without charge. After that datetime, you have to use a template.",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "variables" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string",
              "example" : "{\"varName\":\"some value\",\"numVar\":\"12345\"}"
            },
            "example" : {
              "varName" : "some value",
              "numVar" : "12345"
            }
          },
          "tags" : {
            "type" : "array",
            "description" : "The tags this chat is tagged with.",
            "example" : [ "returningCustomer", "buyer" ],
            "items" : {
              "type" : "string",
              "description" : "The tags this chat is tagged with.",
              "example" : "[\"returningCustomer\",\"buyer\"]"
            }
          },
          "queueId" : {
            "type" : "string",
            "description" : "The queue the chat was derived."
          },
          "agentId" : {
            "type" : "string",
            "description" : "The chat's assigned agent."
          },
          "onHoldAgentId" : {
            "type" : "string"
          },
          "lastUserMessageDatetime" : {
            "type" : "string",
            "description" : "Datetime of the last message sent by the user.",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "isBanned" : {
            "type" : "boolean"
          },
          "isTester" : {
            "type" : "boolean"
          },
          "isBotMuted" : {
            "type" : "boolean"
          }
        }
      },
      "SessionAiAnalysisResponse" : {
        "type" : "object",
        "properties" : {
          "summary" : {
            "type" : "string"
          },
          "doesNotMeetCriteria" : {
            "type" : "boolean",
            "description" : "Returns false when the minimum criteria required for evaluation are not met."
          },
          "name" : {
            "type" : "string"
          },
          "justification" : {
            "type" : "string"
          },
          "aspectScores" : {
            "type" : "object",
            "additionalProperties" : {
              "$ref" : "#/components/schemas/SessionAspectScoreResponse"
            },
            "description" : "Score per evaluation aspect. Keys are business-configurable (e.g. clarity, resolution, userUnderstanding)."
          },
          "qualityScore" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "SessionAspectScoreResponse" : {
        "type" : "object",
        "properties" : {
          "result" : {
            "type" : "integer",
            "description" : "Score for this aspect, between 0 and 100.",
            "format" : "int32"
          },
          "weight" : {
            "type" : "integer",
            "description" : "Weight of this aspect in the overall quality_score, between 0 and 100.",
            "format" : "int32"
          }
        },
        "description" : "Score per evaluation aspect. Keys are business-configurable (e.g. clarity, resolution, userUnderstanding)."
      },
      "SessionEventResponse" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "$ref" : "#/components/schemas/EventName"
          },
          "creationTime" : {
            "type" : "string"
          },
          "info" : {
            "$ref" : "#/components/schemas/EventInfo"
          },
          "sessionId" : {
            "type" : "string"
          }
        }
      },
      "SessionMessageResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id of the message in Botmaker",
            "example" : "ABC123DEF456GHI789JK"
          },
          "creationTime" : {
            "type" : "string",
            "format" : "date-time",
            "example" : "2021-01-01T00:00:00Z"
          },
          "from" : {
            "type" : "string",
            "description" : "Who sent the message.",
            "enum" : [ "bot", "user", "agent" ]
          },
          "agentId" : {
            "type" : "string",
            "description" : "The agent that sent the message (when `from` = \"agent\")"
          },
          "queueId" : {
            "type" : "string",
            "description" : "The current queue of the user."
          },
          "content" : {
            "$ref" : "#/components/schemas/Content"
          },
          "encryptionParams" : {
            "$ref" : "#/components/schemas/EncryptionParams"
          },
          "sessionId" : {
            "type" : "string"
          }
        }
      },
      "SessionResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "creationTime" : {
            "type" : "string"
          },
          "startingCause" : {
            "type" : "string"
          },
          "chat" : {
            "$ref" : "#/components/schemas/ChatResponse"
          },
          "messages" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/SessionMessageResponse"
            }
          },
          "events" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/SessionEventResponse"
            }
          },
          "aiAnalysis" : {
            "$ref" : "#/components/schemas/SessionAiAnalysisResponse"
          }
        }
      },
      "SessionsPage" : {
        "type" : "object",
        "properties" : {
          "nextPage" : {
            "type" : "string",
            "description" : "URL for next page to continue downloading data.You must use the URL as it comes in the response, together with the `access-token` header."
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/SessionResponse"
            }
          }
        }
      },
      "TicketCustomField" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string"
          },
          "value" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/TicketCustomFieldValue"
            }
          }
        }
      },
      "TicketCustomFieldValue" : {
        "type" : "object",
        "properties" : {
          "valueId" : {
            "type" : "string"
          },
          "label" : {
            "type" : "string"
          }
        }
      },
      "TicketResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "businessId" : {
            "type" : "string"
          },
          "ticketCode" : {
            "type" : "string"
          },
          "state" : {
            "type" : "string"
          },
          "lastStateModification" : {
            "type" : "string"
          },
          "creationTime" : {
            "type" : "string"
          },
          "lastModificationBy" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            }
          },
          "subject" : {
            "type" : "string"
          },
          "content" : {
            "type" : "string"
          },
          "contentFormat" : {
            "type" : "string"
          },
          "companyId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "authorId" : {
            "type" : "integer",
            "format" : "int64"
          },
          "assignedTo" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "object"
            }
          },
          "followBy" : {
            "type" : "array",
            "items" : {
              "type" : "integer",
              "format" : "int64"
            }
          },
          "waitingQueueIds" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "waitingAssignationSince" : {
            "type" : "string"
          },
          "assignedQueueId" : {
            "type" : "string"
          },
          "firstAnswer" : {
            "type" : "string"
          },
          "resolveDate" : {
            "type" : "string"
          },
          "finishedSlasMetrics" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "attachments" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/JSONObject"
            }
          },
          "chatIds" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "fieldValues" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/TicketCustomField"
            }
          }
        }
      },
      "CreateTicketRequest" : {
        "required" : [ "contentMarkDown", "customFields", "subject" ],
        "type" : "object",
        "properties" : {
          "subject" : {
            "maxLength" : 999,
            "minLength" : 2,
            "type" : "string",
            "description" : "The subject of the new created ticket.",
            "example" : "A title subject"
          },
          "contentMarkDown" : {
            "maxLength" : 1000000,
            "minLength" : 2,
            "type" : "string",
            "description" : "A markdown version of the content for the ticket."
          },
          "customFields" : {
            "$ref" : "#/components/schemas/CustomFields"
          },
          "attachments" : {
            "$ref" : "#/components/schemas/Attachment"
          },
          "aiAgentId" : {
            "type" : "string",
            "description" : "Optional id of the published AI agent that will own this ticket. When provided, the ticket is created as a task associated to that AI agent. The agent must exist and be productive within the same business."
          }
        }
      },
      "FieldDefinitionResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "active" : {
            "type" : "boolean"
          },
          "name" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string"
          },
          "validOptions" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "additionalProperties" : {
                "type" : "string"
              }
            }
          }
        }
      },
      "TicketsResponse" : {
        "type" : "object",
        "properties" : {
          "total" : {
            "minimum" : 0,
            "type" : "integer",
            "description" : "The total of tickets found.",
            "format" : "int64"
          },
          "tickets" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/TicketResponse"
            }
          }
        }
      },
      "CustomField" : {
        "type" : "object",
        "properties" : {
          "fieldId" : {
            "type" : "string"
          },
          "fieldValues" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        },
        "description" : "Custom fields that can be added to any ticket. Each customField is a map with the keys `fieldId` and `fieldValues`. Use the [GET /v2.0/tickets/field-definitions] endpoint to find them. The fieldId is the id of the field definition and the fieldValues are the selected values in the valid options array in the field definition resource."
      },
      "UpdateTicketRequest" : {
        "required" : [ "contentMarkDown", "customFields", "state", "subject", "ticketCode" ],
        "type" : "object",
        "properties" : {
          "ticketCode" : {
            "maxLength" : 20,
            "minLength" : 1,
            "type" : "string",
            "description" : "The code of the ticket.",
            "example" : "123"
          },
          "subject" : {
            "maxLength" : 999,
            "minLength" : 2,
            "type" : "string",
            "description" : "The subject of the new created ticket.",
            "example" : "A title subject"
          },
          "contentMarkDown" : {
            "maxLength" : 1000000,
            "minLength" : 2,
            "type" : "string",
            "description" : "A markdown version of the content for the ticket."
          },
          "customFields" : {
            "type" : "array",
            "description" : "Custom fields that can be added to any ticket. Each customField is a map with the keys `fieldId` and `fieldValues`. Use the [GET /v2.0/tickets/field-definitions] endpoint to find them. The fieldId is the id of the field definition and the fieldValues are the selected values in the valid options array in the field definition resource.",
            "items" : {
              "$ref" : "#/components/schemas/CustomField"
            }
          },
          "state" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string",
              "description" : "The state code of the ticket.",
              "example" : "NEW | OPEN | CLOSED | CANCELLED"
            },
            "description" : "The state code of the ticket.",
            "example" : "NEW | OPEN | CLOSED | CANCELLED"
          },
          "assignedConsoleUserEmail" : {
            "type" : "string",
            "description" : "The email of the user to be assigned to the ticket",
            "example" : "joe@example.com"
          }
        }
      },
      "TypificationResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The Botmaker id of the typification."
          },
          "displayName" : {
            "type" : "string",
            "description" : "The Botmaker name of the typification."
          },
          "groups" : {
            "type" : "array",
            "description" : "The Botmaker groups list of the typification.",
            "items" : {
              "type" : "string",
              "description" : "The Botmaker groups list of the typification."
            }
          },
          "queues" : {
            "type" : "array",
            "description" : "The Botmaker queues list the typification.",
            "items" : {
              "type" : "string",
              "description" : "The Botmaker queues list the typification."
            }
          }
        }
      },
      "TypificationResponseList" : {
        "type" : "object",
        "properties" : {
          "typifications" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/TypificationResponse"
            }
          }
        }
      },
      "VariableResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The Botmaker id of the variable."
          },
          "name" : {
            "type" : "string",
            "description" : "The name of the variable."
          },
          "type" : {
            "type" : "string",
            "description" : "The type of the variable."
          },
          "scope" : {
            "type" : "string",
            "description" : "The scope of the variable: [ 'user' | 'session' ]"
          },
          "visibleInUserInfo" : {
            "type" : "boolean",
            "description" : "If the variable is visible to agents in the chats section."
          },
          "category" : {
            "type" : "string",
            "description" : "Category in which agents will be able to view the variable in the chats section."
          },
          "icon" : {
            "type" : "string",
            "description" : "Icon with which agents can see the variable in the chats section."
          },
          "tagColor" : {
            "type" : "string",
            "description" : "Color that the label will display in the chats section."
          },
          "orderInUserInfo" : {
            "type" : "string",
            "description" : "Place it will occupy in the variable list in the chats section."
          }
        }
      },
      "VariablesListResponse" : {
        "type" : "object",
        "properties" : {
          "variables" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/VariableResponse"
            }
          }
        }
      },
      "RedirectionRule" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The id needed to interact with this API.",
            "example" : "ABC123DEF456GHI789JK"
          },
          "URL" : {
            "type" : "string"
          },
          "chatsMatchProps" : {
            "type" : "array",
            "description" : "A list of chats properties to match against every chat.\nEach element is a map to match with the properties of a chat; if a chat matches these properties, the messages from this chat will be sent to this redirection rule `URL` (instead of using the webhook's default URL).",
            "example" : [ {
              "webhookEnv" : "test"
            }, {
              "botmakerEnvironment" : "DEVELOPMENT"
            } ],
            "items" : {
              "type" : "object",
              "additionalProperties" : {
                "type" : "string",
                "description" : "A list of chats properties to match against every chat.\nEach element is a map to match with the properties of a chat; if a chat matches these properties, the messages from this chat will be sent to this redirection rule `URL` (instead of using the webhook's default URL).",
                "example" : "[{\"webhookEnv\":\"test\"},{\"botmakerEnvironment\":\"DEVELOPMENT\"}]"
              },
              "description" : "A list of chats properties to match against every chat.\nEach element is a map to match with the properties of a chat; if a chat matches these properties, the messages from this chat will be sent to this redirection rule `URL` (instead of using the webhook's default URL).",
              "example" : [ {
                "webhookEnv" : "test"
              }, {
                "botmakerEnvironment" : "DEVELOPMENT"
              } ]
            }
          },
          "name" : {
            "type" : "string",
            "description" : "A name to help you identifying this object.",
            "example" : "Tester chats redirection"
          }
        }
      },
      "MessagesNotifications" : {
        "type" : "object",
        "properties" : {
          "channelsIds" : {
            "type" : "array",
            "description" : "Which channels this webhook will notify messages from.",
            "example" : [ "botproject-whatsapp-5491147038***", "botproject-messenger-123456789***" ],
            "items" : {
              "type" : "string",
              "description" : "Which channels this webhook will notify messages from.",
              "example" : "[\"botproject-whatsapp-5491147038***\",\"botproject-messenger-123456789***\"]"
            }
          },
          "notifyBotMessages" : {
            "type" : "boolean"
          },
          "notifyUserMessages" : {
            "type" : "boolean"
          },
          "notifyOperatorMessages" : {
            "type" : "boolean"
          },
          "notifyStatusChanges" : {
            "type" : "boolean"
          },
          "includeVariableChanges" : {
            "type" : "boolean"
          }
        },
        "description" : "Configuration about messages from whom are notified and whether to include variable changes."
      },
      "WebhookFullResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The webhook id in Botmaker. To change a webhook via API, you need this id.",
            "example" : "ABC123DEF456GHI789JK"
          },
          "active" : {
            "type" : "boolean",
            "description" : "Only active webhooks will be notified."
          },
          "messagesNotifications" : {
            "$ref" : "#/components/schemas/MessagesNotifications"
          },
          "token" : {
            "type" : "string",
            "description" : "Token sent in each notification in the `auth-bm-token` header."
          },
          "version" : {
            "type" : "string"
          },
          "redirectionRules" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/RedirectionRule"
            }
          },
          "url" : {
            "type" : "string"
          }
        }
      },
      "ListedWebhookResponse" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The webhook id in Botmaker. To change a webhook via API, you need this id.",
            "example" : "ABC123DEF456GHI789JK"
          },
          "active" : {
            "type" : "boolean",
            "description" : "Only active webhooks will be notified."
          },
          "messagesNotifications" : {
            "$ref" : "#/components/schemas/MessagesNotifications"
          },
          "token" : {
            "type" : "string",
            "description" : "Token sent in each notification in the `auth-bm-token` header."
          },
          "version" : {
            "type" : "string"
          },
          "redirectionRules" : {
            "type" : "array",
            "description" : "Alternate URLs to use for dev.",
            "items" : {
              "type" : "string",
              "description" : "Alternate URLs to use for dev."
            }
          },
          "url" : {
            "type" : "string"
          }
        }
      },
      "WebhookListResponse" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ListedWebhookResponse"
            }
          }
        }
      },
      "WhatsAppCreateAccountLinkResponse" : {
        "type" : "object",
        "properties" : {
          "createAccountLink" : {
            "type" : "string"
          }
        }
      },
      "WhatsAppAccountRequest" : {
        "type" : "object",
        "properties" : {
          "number" : {
            "type" : "string"
          }
        }
      },
      "WhatsAppAccountResponse" : {
        "type" : "object",
        "properties" : {
          "number" : {
            "type" : "string",
            "description" : "The phone line number."
          },
          "alias" : {
            "type" : "string"
          },
          "templateNamespace" : {
            "type" : "string",
            "description" : "This namespace is needed to send template messages.",
            "example" : "abcdefghijk_12lmnop"
          },
          "wabaId" : {
            "type" : "string",
            "description" : "The WhatsApp business account ID.",
            "example" : "1906385232743451"
          }
        }
      },
      "WhatsAppAccountStatusResponse" : {
        "type" : "object",
        "properties" : {
          "number" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "connectionStatus" : {
            "type" : "string"
          },
          "nameStatus" : {
            "type" : "string"
          },
          "otpVerificationStatus" : {
            "type" : "string"
          },
          "qualityRating" : {
            "type" : "string"
          },
          "isCertificateAvailable" : {
            "type" : "boolean"
          }
        }
      },
      "WhatsAppAccountListResponse" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/WhatsAppAccountResponse"
            }
          }
        }
      },
      "Body" : {
        "required" : [ "text" ],
        "type" : "object",
        "properties" : {
          "text" : {
            "maxLength" : 1024,
            "type" : "string"
          }
        },
        "description" : "The main body content."
      },
      "Footer" : {
        "required" : [ "text" ],
        "type" : "object",
        "properties" : {
          "text" : {
            "type" : "string"
          }
        }
      },
      "Header" : {
        "type" : "object",
        "properties" : {
          "format" : {
            "type" : "string",
            "enum" : [ "TEXT", "IMAGE", "DOCUMENT", "VIDEO" ]
          },
          "text" : {
            "type" : "string",
            "description" : "The header text. (Only required when `format` is `TEXT`.)"
          },
          "exampleURL" : {
            "type" : "string",
            "description" : "An example file used by WhatsApp to decide whether or not to approve the template. (Only required when `format` is other than `TEXT`; needed to create template in `POST whatsapp/templates`.)"
          }
        }
      },
      "WhatsAppTemplateButton" : {
        "required" : [ "text", "type" ],
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "description" : "The button type.<br>_`OTP` is only for `AUTHENTICATION` templates, and is always created as a copy-code button._",
            "enum" : [ "QUICK_REPLY", "URL", "PHONE_NUMBER", "MPM", "OTP" ]
          },
          "text" : {
            "maxLength" : 20,
            "type" : "string",
            "description" : "The button label."
          },
          "intentIdOrName" : {
            "type" : "string",
            "description" : "The intent to execute when the button is pressed.<br>_Only for `QUICK_REPLY` and `PASSKEY`. On a `PASSKEY` button it is the intent triggered once the customer completes the verification._"
          },
          "webhookPayload" : {
            "type" : "string",
            "description" : "Anything you want to receive via webhook when the button is pressed.<br>_Only for `QUICK_REPLY`; use only one of `webhookPayload` or `intentIdOrName`._"
          },
          "url" : {
            "type" : "string",
            "description" : "The url to navigate when the button is pressed. It can have a variable postfix, e. g. `https://www.example.com/{botVarName}` (this postfix can be an user id).<br>_Only for `URL` type._"
          },
          "phoneNumber" : {
            "type" : "string",
            "description" : "The phone number to call when the button is pressed.<br>_Only for `PHONE_NUMBER` type_."
          }
        },
        "description" : "The template buttons. WhatsApp buttons rules are:\n- `QUICK_REPLY` cannot be combined with `URL` and `PHONE_NUMBER` buttons\n- You can use 3 `QUICK_REPLY` buttons max\n- Only one `URL` button and one `PHONE_NUMBER` are allowed; you can combine both of these types"
      },
      "WhatsAppTemplateResponse" : {
        "required" : [ "body" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "maxLength" : 512,
            "type" : "string",
            "format" : "snake_case",
            "example" : "the_template_name"
          },
          "state" : {
            "type" : "string",
            "enum" : [ "APPROVED", "REJECTED", "ACCOUNT_PENDING", "BOTMAKER_PENDING" ]
          },
          "notes" : {
            "type" : "array",
            "description" : "Problems that were found in WhatsApp template approval process.",
            "items" : {
              "type" : "object",
              "additionalProperties" : {
                "type" : "object",
                "description" : "Problems that were found in WhatsApp template approval process."
              },
              "description" : "Problems that were found in WhatsApp template approval process."
            }
          },
          "phoneLinesNumbers" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "botName" : {
            "type" : "string",
            "description" : "The bot this template will set when triggered.\nRequired for creation when your project has multiple bots."
          },
          "category" : {
            "type" : "string",
            "enum" : [ "ACCOUNT_UPDATE", "PAYMENT_UPDATE", "PERSONAL_FINANCE_UPDATE", "SHIPPING_UPDATE", "RESERVATION_UPDATE", "ISSUE_RESOLUTION", "APPOINTMENT_UPDATE", "TRANSPORTATION_UPDATE", "TICKET_UPDATE", "ALERT_UPDATE", "AUTO_REPLY", "TRANSACTIONAL", "MARKETING", "OTP", "UTILITY", "AUTHENTICATION" ]
          },
          "locale" : {
            "type" : "string"
          },
          "optInImage" : {
            "type" : "string",
            "description" : "An example image showing that you ask the user for permission to send him/she whatsapp messages."
          },
          "header" : {
            "$ref" : "#/components/schemas/Header"
          },
          "body" : {
            "$ref" : "#/components/schemas/Body"
          },
          "footer" : {
            "$ref" : "#/components/schemas/Footer"
          },
          "buttons" : {
            "type" : "array",
            "description" : "The template buttons. WhatsApp buttons rules are:\n- `QUICK_REPLY` cannot be combined with `URL` and `PHONE_NUMBER` buttons\n- You can use 3 `QUICK_REPLY` buttons max\n- Only one `URL` button and one `PHONE_NUMBER` are allowed; you can combine both of these types",
            "items" : {
              "$ref" : "#/components/schemas/WhatsAppTemplateButton"
            }
          },
          "requesterEmail" : {
            "type" : "string",
            "description" : "Who created the template."
          },
          "allowedQueues" : {
            "type" : "array",
            "description" : "Queues that allow this template",
            "items" : {
              "type" : "string",
              "description" : "Queues that allow this template"
            }
          }
        }
      },
      "WhatsAppTemplateRequest" : {
        "required" : [ "body" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "maxLength" : 512,
            "type" : "string",
            "format" : "snake_case",
            "example" : "the_template_name"
          },
          "phoneLineNumber" : {
            "type" : "string",
            "description" : "One of your WhatsApp phone numbers. *Only required if you have more than one business account in WhatsApp*.\nYou can list them at [/channels?platform=whatsapp](list-channels)."
          },
          "botName" : {
            "type" : "string",
            "description" : "The bot this template will set when triggered.\nRequired for creation when your project has multiple bots."
          },
          "category" : {
            "type" : "string",
            "enum" : [ "ACCOUNT_UPDATE", "PAYMENT_UPDATE", "PERSONAL_FINANCE_UPDATE", "SHIPPING_UPDATE", "RESERVATION_UPDATE", "ISSUE_RESOLUTION", "APPOINTMENT_UPDATE", "TRANSPORTATION_UPDATE", "TICKET_UPDATE", "ALERT_UPDATE", "AUTO_REPLY", "TRANSACTIONAL", "MARKETING", "OTP", "UTILITY", "AUTHENTICATION" ]
          },
          "locale" : {
            "type" : "string"
          },
          "optInImage" : {
            "type" : "string",
            "description" : "An example image showing that you ask the user for permission to send him/she whatsapp messages."
          },
          "header" : {
            "$ref" : "#/components/schemas/Header"
          },
          "body" : {
            "$ref" : "#/components/schemas/Body"
          },
          "footer" : {
            "$ref" : "#/components/schemas/Footer"
          },
          "buttons" : {
            "type" : "array",
            "description" : "The template buttons. WhatsApp buttons rules are:\n- `QUICK_REPLY` cannot be combined with `URL` and `PHONE_NUMBER` buttons\n- You can use 3 `QUICK_REPLY` buttons max\n- Only one `URL` button and one `PHONE_NUMBER` are allowed; you can combine both of these types",
            "items" : {
              "$ref" : "#/components/schemas/WhatsAppTemplateButton"
            }
          }
        }
      },
      "WhatsAppTemplatesListResponse" : {
        "type" : "object",
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/WhatsAppTemplateResponse"
            }
          }
        }
      }
    },
    "securitySchemes" : {
      "access-token" : {
        "type" : "apiKey",
        "description" : "You can generate the `access-token` token at [Botmaker](https://go.botmaker.com/#/integrations/api \"Botmaker API page\").",
        "name" : "access-token",
        "in" : "header"
      },
      "bearer-token" : {
        "type" : "apiKey",
        "description" : "Authentication used by agents connected to Botmaker (not usable by programs).",
        "name" : "bearer-token",
        "in" : "header"
      }
    }
  }
}