---
updatedAt: 2026-09-04T07:06:15.000Z
agentTools:
  projectIndex: https://documentation.indigitall.com/llms.txt
---

# Edit a canned message associated to an instance

Edit a canned message associated to an instance

# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "INDIGITALL API v1",
    "x-gateway-endpoint": "accountService",
    "description": "### Introduction\nThis documentation describes the interface of Indigitall's API version 1.\n<ins>API BASE URL:</ins> https://api.indigitall.com/v1\n### Authentication\nEvery request to this API needs an Authorization header.\nThere are two Authorization ways:\n- If your intention is to manage API calls with a server-side script you have to create a Server key through Indigitall's console.\n\n  You can set the following Authorization Header :\n  ```\n  Authorization: ServerKey {ServerKey}\n  ```\n- If your intention is to integrate this API for front-end users POST /auth endpoint authorizes a user and returns an access token.\n\n  You can set the following Authorization Header :\n  ```\n  Authorization: Bearer {Token}\n  ```\n\n### Support\nFor further information or if you need support you can contact with support@indigitall.com\n"
  },
  "tags": [
    {
      "name": "chat",
      "x-displayName": "Chat Service",
      "description": "Endpoint for Chat integration functions"
    }
  ],
  "security": [
    {
      "Authorization": []
    }
  ],
  "paths": {
    "/chat/cannedmessage/{id}": {
      "put": {
        "tags": [
          "chat"
        ],
        "summary": "Edit a canned message associated to an instance",
        "description": "Edit a canned message associated to an instance",
        "operationId": "updateCannedMessage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCannedMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CannedMessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Parameters missing or not in right format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Default auditor canned message already exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "in": "query",
          "name": "applicationId",
          "required": true,
          "description": "The action will be only performed to this application.\n",
          "schema": {
            "type": "integer"
          }
        },
        {
          "in": "path",
          "name": "id",
          "required": true,
          "schema": {
            "type": "integer"
          }
        }
      ]
    }
  },
  "servers": [
    {
      "url": "https://api.indigitall.com/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "Authorization": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Authorization for accesing endpoints , must be in one of the following format:\n- **Bearer {token}**\n- **ServerKey {key}**\n"
      }
    },
    "schemas": {
      "ErrorResponse": {
        "required": [
          "statusCode",
          "message"
        ],
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "Response code"
          },
          "errorCode": {
            "type": "string",
            "enum": [
              "AUTH_ERROR",
              "TOO_MANY_REQUESTS",
              "IP_WHITELIST",
              "PS_INTERNAL_ERROR",
              "PS_FORBIDDEN",
              "PS_BAD_REQUEST",
              "PS_ARGUMENTS",
              "PS_DATE_FORMAT",
              "PS_DATE_RANGE",
              "PS_DATE_RANGE_MAX",
              "PS_INVALID_TOPIC_CODE",
              "PS_TOPIC_NOT_FOUND",
              "PS_APPLICATION_NOT_FOUND",
              "PS_CAMPAIGN_NOT_FOUND",
              "PS_TEST_NOT_FOUND",
              "PS_MULTITEST_NOT_FOUND",
              "PS_SENDING_NOT_FOUND",
              "PS_SENDING_ALREADY_CANCELLED",
              "PS_CSV_EMPTY",
              "PS_CSV_FIELD_NOT_FOUND",
              "PS_CSV_SIZE",
              "PS_BAD_CSV_FORMAT",
              "PS_CAMPAIGN_TIMEZONE",
              "PS_CAMPAIGN_ACTION",
              "PS_CAMPAIGN_BUTTON",
              "PS_CAMPAIGN_TRIGGER",
              "PS_CAMPAIGN_OVERWRITE_PROPERTIES",
              "PS_CAMPAIGN_BAD_VIDEO",
              "PS_CAMPAIGN_BAD_VIDEO_TYPE",
              "PS_CAMPAIGN_BAD_VIDEO_SIZE",
              "PS_CAMPAIGN_BAD_VIDEO_SIZE_AFTER_CONVERSION",
              "PS_CAMPAIGN_BAD_ICON_TYPE",
              "PS_CAMPAIGN_BAD_ICON_SIZE",
              "PS_CAMPAIGN_TARGETS",
              "PS_FEATURE_GEOFENCING_DISABLED",
              "PS_FEATURE_NETWORK_DISABLED",
              "PS_MULTITEST_INVALID",
              "PS_MULTITEST_ALREADY_SENT",
              "PS_BAD_IMAGE_TYPE",
              "PS_BAD_IMAGE_SIZE",
              "PS_CAMPAIGN_CUSTOMER_SERVICE",
              "PS_CAMPAIGN_CUSTOMER_SERVICE_SENDING",
              "PS_CAMPAIGN_INVALID_CATEGORY_ID",
              "PS_EXTRACT_META_PARSE_HTML_ERROR",
              "PS_AUDIENCE_CJ_NOT_FOUND",
              "AS_INTERNAL_ERROR",
              "AS_FORBIDDEN",
              "AS_BAD_REQUEST",
              "AS_LIMIT_EXCEEDED",
              "AS_INVALID_CREDENTIALS",
              "AS_ELEMENT_NOT_FOUND",
              "AS_LOCKED_INACTIVITY",
              "AS_LOCKED_EXPIRED_PASSWORD",
              "AS_LOCKED_TOO_MANY_LOGIN_ATTEMPTS",
              "AS_APPLICATION_NOT_FOUND",
              "AS_ACCOUNT_NOT_FOUND",
              "AS_EXTERNAL_APP_NOT_FOUND",
              "AS_AREA_NOT_FOUND",
              "AS_WEB_ANALYTIC_NOT_FOUND",
              "AS_CATEGORY_NOT_FOUND",
              "AS_EXTERNAL_AUTH_NOT_FOUND",
              "AS_USER_NOT_FOUND",
              "AS_INTEGRATION_NOT_FOUND",
              "AS_PERMISSION_NOT_FOUND",
              "AS_ROLE_NOT_FOUND",
              "AS_IP_WHITELIST",
              "AS_CHAT_FEATURE_DISABLED",
              "AS_CONTACT_CENTER_FEATURE_DISABLED",
              "AS_RESOURCE_ALREADY_EXISTS",
              "AS_EMAIL_ALREADY_EXISTS",
              "AS_TOPIC_ALREADY_EXISTS",
              "AS_CATEGORY_ALREADY_EXISTS",
              "AS_USER_ALREADY_EXISTS",
              "AS_SAFARI_ID_ALREADY_EXISTS",
              "AS_EXTERNAL_AUTH_DATA_ALREADY_EXISTS",
              "AS_TOPIC_PARENT_NOT_FOUND",
              "AS_INVALID_CERTIFICATE",
              "AS_BAD_SAFARI_CONFIGURATION",
              "AS_BAD_HARMONY_CONFIGURATION",
              "AS_BAD_ANDROID_CONFIGURATION",
              "AS_BAD_REPORTING_CONFIGURATION",
              "AS_BAD_SLICING_CONFIGURATION",
              "AS_BAD_APP_CODE",
              "AS_BAD_TOPIC_CODE",
              "AS_BAD_IMAGE_TYPE",
              "AS_BAD_IMAGE_SIZE",
              "AS_BAD_CSV_FORMAT",
              "AS_BAD_EMAIL",
              "AS_PASSWORD_MANDATORY",
              "AS_PASSWORD_TOO_SHORT",
              "AS_PASSWORD_COMPLEXITY_NOT_MET",
              "AS_PASSWORD_PERSONAL_INFO",
              "AS_PASSWORD_REUSED",
              "AS_PASSWORD_MISMATCH",
              "AS_PASSWORD_SAME_OLD",
              "AS_PASSWORD_TOO_MANY_CHANGES",
              "PS_TEST_INVALID",
              "PS_TEST_ALREADY_SENT",
              "AS_ONLY_SUPER_ADMIN_PERMISSION",
              "AS_INVALID_METHOD",
              "AS_INVALID_TOTP",
              "AS_INVALID_TOKEN",
              "AS_CHAT_DOWNLOAD_ACCOUNTS_FEATURE_DISABLED",
              "AS_CHAT_V2_FEATURE_DISABLED",
              "AS_CHAT_V2_PERMISSION_PROFILE_NOT_FOUND",
              "AS_CHAT_V2_UPSTREAM_ERROR",
              "CS_CSV_NUMBER_OF_PARAMS",
              "CS_CSV_EMPTY_FILE",
              "CS_CSV_INVALID_CHANNEL",
              "CS_CSV_INVALID_CONTENT_TYPE",
              "CS_CSV_INVALID_PARAMETER",
              "CS_CSV_INVALID_TYPE",
              "CS_CSV_MISSING_FIELDS",
              "CS_CSV_EMPTY_FIELDS",
              "CS_DOWNLOAD_MULTIMEDIA_ERROR"
            ],
            "description": "Sort order:\n  * `AUTH_ERROR` - Authorization error\n  * `TOO_MANY_REQUESTS` - TOO_MANY_REQUESTS\n  * `IP_WHITELIST` - The ip with which you are trying to access the resource is not allowed\n  * `PS_INTERNAL_ERROR` - Internal Server Error\n  * `PS_FORBIDDEN` - Forbidden action\n  * `PS_BAD_REQUEST` - Generic bad request\n  * `PS_ARGUMENTS` - Error in any of the arguments\n  * `PS_DATE_FORMAT` - The specified date format is not correct\n  * `PS_DATE_RANGE` - It indicated a range of dates not allowed\n  * `PS_DATE_RANGE_MAX` - Indicates that the range between two dates exceeds the maximum limit\n  * `PS_INVALID_TOPIC_CODE` - The topic code has a wrong format\n  * `PS_TOPIC_NOT_FOUND` - The topic code has a wrong format\n  * `PS_APPLICATION_NOT_FOUND` - Application / project not found\n  * `PS_CAMPAIGN_NOT_FOUND` - Campaign not found\n  * `PS_CAMPAIGN_NOT_MODIFIABLE` - Campaign cannot be updated as it belongs to an initialized journey\n  * `PS_TEST_NOT_FOUND` - Test not found\n  * `PS_MULTITEST_NOT_FOUND` - Multitest not found\n  * `PS_SENDING_NOT_FOUND` - Sending not found\n  * `PS_SENDING_ALREADY_CANCELLED` - Sending already cancelled or has a past date scheduled\n  * `PS_CSV_EMPTY` - The CSV has a wrong format: it is empty\n  * `PS_CSV_FIELD_NOT_FOUND` - The CSV has a wrong format: a required field is missing\n  * `PS_CSV_SIZE` - The CSV has an impermissible size\n  * `PS_BAD_CSV_FORMAT` - Generic CSV format error\n  * `PS_CAMPAIGN_TIMEZONE` - The property Timezone camapaña has an incorrect value\n  * `PS_CAMPAIGN_ACTION` - There was an error trying to process the actions of the campaign\n  * `PS_CAMPAIGN_BUTTON` - There was an error trying to process the campaign buttons\n  * `PS_CAMPAIGN_TRIGGER` - There was an error trying to process the triggers of the campaign\n  * `PS_CAMPAIGN_OVERWRITE_PROPERTIES` - There was an error trying to process the properties overwrite campaign\n  * `PS_CAMPAIGN_BAD_VIDEO` - There was an error trying to process the video of the campaign\n  * `PS_CAMPAIGN_BAD_VIDEO_TYPE` - There was an error trying to process the video of the campaign. Video type is not allowed.\n  * `PS_CAMPAIGN_BAD_VIDEO_SIZE` - There was an error trying to process the video of the campaign. The size of the video exceeds the maximum allowable size.\n  * `PS_CAMPAIGN_BAD_VIDEO_SIZE_AFTER_CONVERSION` - There was an error trying to process the video of the campaign. The size of the video then convert it exceeds the maximum allowable size.\n  * `PS_CAMPAIGN_BAD_ICON_TYPE` - There was an error trying to process the icon of the campaign. The type of icon is invalid.\n  * `PS_CAMPAIGN_BAD_ICON_SIZE` - There was an error trying to process the icon of the campaign. The size of the icon is invalid.\n  * `PS_CAMPAIGN_TARGETS` - There was an error trying to process the targets of the campaign\n  * `PS_FEATURE_GEOFENCING_DISABLED` - The feature 'gefencing' is disabled for this account\n  * `PS_FEATURE_NETWORK_DISABLED` - The feature 'network' is disabled for this account\n  * `PS_MULTITEST_INVALID` - The test contains invalid data\n  * `PS_MULTITEST_ALREADY_SENT` - The multitest has already been sent\n  * `PS_BAD_IMAGE_TYPE` - Image has invalid format\n  * `PS_BAD_IMAGE_SIZE` - Image has invalid size\n  * `PS_TEST_INVALID` - This test is not valid on this endpoint or has invalid configuration\n  * `PS_TEST_ALREADY_SENT` - The test has already been sent\n  * `PS_CAMPAIGN_CUSTOMER_SERVICE` - Campaigns with the onlyCustomerService field set to true cannot use triggers or filtering other than platform\n  * `PS_CAMPAIGN_CUSTOMER_SERVICE_SENDING` - Campaigns with the onlyCustomerService field set to true can only be sent from a journey.\n                                            Customer service can only send campaigns with this field set to true.\n  * `PS_CAMPAIGN_INVALID_CATEGORY_ID` - The category id indicated in a campaign is invalid, does not exist or belongs to another application\n  * `PS_EXTRACT_META_PARSE_HTML_ERROR` - Error during meta tag extraction due to HTML parsing failure\n  * `PS_AUDIENCE_CJ_NOT_FOUND` - The CJ audience or segment indicated in the audienceCJ filter was not found in customer-service\n  * `AS_INTERNAL_ERROR` - Generic internal error\n  * `AS_FORBIDDEN` - Generic forbidden error\n  * `AS_BAD_REQUEST` - Generic bad request\n  * `AS_LIMIT_EXCEEDED` - Some of the configured limits have been exceeded\n  * `AS_INVALID_CREDENTIALS` - Invalid credentials\n  * `AS_ELEMENT_NOT_FOUND` - Element not found\n  * `AS_LOCKED_INACTIVITY` - User is locked for inactivity. Please, contact an administrator\n  * `AS_LOCKED_EXPIRED_PASSWORD` - The password is way old. Please, change it for a new one\n  * `AS_LOCKED_TOO_MANY_LOGIN_ATTEMPTS` - Too many login attempts\n  * `AS_APPLICATION_NOT_FOUND` - Application (project) not found\n  * `AS_ACCOUNT_NOT_FOUND` - Account not found\n  * `AS_EXTERNAL_APP_NOT_FOUND` -\n  * `AS_AREA_NOT_FOUND` -\n  * `AS_WEB_ANALYTIC_NOT_FOUND` -\n  * `AS_CATEGORY_NOT_FOUND` -\n  * `AS_EXTERNAL_AUTH_NOT_FOUND` -\n  * `AS_USER_NOT_FOUND` -\n  * `AS_INTEGRATION_NOT_FOUND` -\n  * `AS_PERMISSION_NOT_FOUND` -\n  * `AS_ROLE_NOT_FOUND` -\n  * `AS_IP_WHITELIST`- The ip with which you are trying to access the resource is not allowed\n  * `AS_CHAT_FEATURE_DISABLED` - Chat Service is not activated for this account\n  * `AS_CONTACT_CENTER_FEATURE_DISABLED` - Contact Center is not activated for this account\n  * `AS_RESOURCE_ALREADY_EXISTS` - Generic error when trying to duplicate a resource\n  * `AS_EMAIL_ALREADY_EXISTS` - User with same email already exists\n  * `AS_TOPIC_ALREADY_EXISTS` - Topic code already exists in this application\n  * `AS_CATEGORY_ALREADY_EXISTS` - Category code already exists in this application\n  * `AS_USER_ALREADY_EXISTS` - User already exists\n  * `AS_SAFARI_ID_ALREADY_EXISTS` - Safari push ID already exists\n  * `AS_EXTERNAL_AUTH_DATA_ALREADY_EXISTS` - External auth already exists\n  * `AS_TOPIC_PARENT_NOT_FOUND` - Topic parent not found\n  * `AS_INVALID_CERTIFICATE` - Invalid certificate credentials or invalid certificate\n  * `AS_BAD_SAFARI_CONFIGURATION` - It has been requested to activate Safari push, however, the necessary parameters for this service has not been provided.\n  * `AS_BAD_HARMONY_CONFIGURATION` - It has been requested to activate Harmony push, however, the necessary parameters for this service has not been provided.\n  * `AS_BAD_ANDROID_CONFIGURATION` - It has been requested to activate Android push, however, the necessary parameters for this service has not been provided.\n  * `AS_BAD_REPORTING_CONFIGURATION` - Reporting configuration object does not have the expected format\n  * `AS_BAD_SLICING_CONFIGURATION` - Slicing configuration object does not have the expected format\n  * `AS_BAD_APP_CODE` - App code does not have the expected format\n  * `AS_BAD_TOPIC_CODE` - Topic code does not have the expected format\n  * `AS_BAD_IMAGE_TYPE` - Image format is different than expected\n  * `AS_BAD_IMAGE_SIZE` - Image file size exceeds maximum size\n  * `AS_BAD_CSV_FORMAT` - The format of the CSV file is not as expected. It may be empty or may not contain the expected columns or headers.\n  * `AS_BAD_EMAIL` - Email was not found or is in the wrong format\n  * `AS_PASSWORD_MANDATORY` - Password field is mandatory and cannot be empty\n  * `AS_PASSWORD_TOO_SHORT` - Password is too short\n  * `AS_PASSWORD_COMPLEXITY_NOT_MET` - Password must include at least three of the following categories: numbers, lowercase letters, uppercase letters, or special characters\n  * `AS_PASSWORD_PERSONAL_INFO` - Password must not contain personal information (name, email, etc.)\n  * `AS_PASSWORD_REUSED` - Password has been used before\n  * `AS_PASSWORD_MISMATCH` - currentPassword does not match with user current password\n  * `AS_PASSWORD_SAME_OLD` - Old and new password shoud be different\n  * `AS_PASSWORD_TOO_MANY_CHANGES` - Password has been changed too many times in a short period of time\n  * `AS_ONLY_SUPER_ADMIN_PERMISSION` - Only super administrator has permission to perform this action\n  * `AS_INVALID_METHOD` - The totp method is not valid\n  * `AS_INVALID_TOTP` - The totp code is not valid\n  * `AS_INVALID_TOKEN` - The JWT user is not the same that body user.\n  * `AS_CHAT_DOWNLOAD_ACCOUNTS_FEATURE_DISABLED` - download contacts is not active in this account.\n  * `CS_CSV_NUMBER_OF_PARAMS` - Number of incorrect parameters\n  * `CS_CSV_EMPTY_FILE` - Empty file or no data\n  * `CS_CSV_INVALID_CHANNEL` - Only Whatsapp channel is allowed\n  * `CS_CSV_INVALID_CONTENT_TYPE` - Invalid contentType. Only `template` contentType is available\n  * `CS_CSV_INVALID_PARAMETER` - Invalid parameter\n  * `CS_CSV_INVALID_TYPE` - Invalid file type\n  * `CS_CSV_MISSING_FIELDS` - Missings fields\n  * `CS_CSV_EMPTY_FIELDS` - Empty fields\n  * `CS_DOWNLOAD_MULTIMEDIA_ERROR` - Error in download file by URL\n  * `AS_CHAT_V2_FEATURE_DISABLED` - Chat V2 is not active in this account.\n  * `AS_CHAT_V2_PERMISSION_PROFILE_NOT_FOUND` - The permission profile specified in the request was not found.\n  * `AS_CHAT_V2_UPSTREAM_ERROR` - An error occurred while processing the request in the upstream service.\n"
          },
          "message": {
            "type": "string",
            "description": "Error message"
          }
        }
      },
      "ChatMessageTemplate": {
        "description": "The containing element for the message content — Indicates that the message is highly structured. Parameters contained within provide the structure.",
        "required": [
          "components"
        ],
        "properties": {
          "namespace": {
            "type": "string",
            "description": "Only in WhatsApp On-Premise. The namespace that will be used\n\nNot required in Cloud API\n"
          },
          "name": {
            "type": "string",
            "description": "Only in WhatsApp. The name that indicates which template to use within the namespace"
          },
          "language": {
            "description": "Allows deterministic specification.\n",
            "required": [
              "code"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The code of the language or locale to use — Accepts both language and language_locale formats (e.g., en and en_US)."
              }
            }
          },
          "components": {
            "type": "array",
            "description": "Sets the content of each of the components that a template defines. Depending on the type of destination channel of the message, the components can be totally set or only the content of some variables.\nThe whatsapp channel works with previously defined templates, where a series of variable fields have been defined that are replaced in this endpoint when the message is sent with the value that we define in the 'parameters' field. In this case, it is not allowed to create more than one component of the same type.\nIn webchat or messenger type channels there is no previously defined template, so we will have to indicate the complete content for each of the components. In this case, it is allowed to create more than one component of the button type to send a message with many buttons.\n",
            "items": {
              "required": [
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "body",
                    "header",
                    "footer",
                    "button",
                    "carousel"
                  ]
                },
                "subType": {
                  "type": "string",
                  "enum": [
                    "url",
                    "quickReply",
                    "phoneCall",
                    "flow"
                  ],
                  "description": "Only allowed in `button` type, describes button type. `phoneCall` is not valid in `whatsapp` channel"
                },
                "index": {
                  "type": "string",
                  "description": "Describes button position. Type must be button"
                },
                "label": {
                  "type": "string",
                  "description": "Button label. Not allowed in `whatsapp` channel. Type must be `button`"
                },
                "url": {
                  "type": "string",
                  "description": "Button URL. Not allowed in `whatsapp` channel. Type must be `button` with subType `url`"
                },
                "payload": {
                  "type": "string",
                  "description": "Button payload. It allows defining an event in Dialogflow that will be triggered when the button is pressed.\nThis allows to reply with a message to the user when pressing a button.\nNot allowed in `whatsapp` channel. Type must be `button` with subType `quickReply`\n"
                },
                "buttonContext": {
                  "type": "object",
                  "description": "Sets values in the context of the conversation when the button is pressed. If any of the values already exist in the context they will be overwritten.\nIt must be a flat object (key value) without nested objects.\nNot allowed in `whatsapp` channel. Type must be `button` with subType `quickReply`\n"
                },
                "phone": {
                  "type": "string",
                  "description": "Phone number for button subtype `phoneCall`.\nNot allowed in `whatsapp` channel. Type must be button with subType `phoneCall`\n"
                },
                "text": {
                  "type": "string",
                  "description": "Text content for component\nNot allowed in `whatsapp` channel. Type can't be `button`\n"
                },
                "multimediaId": {
                  "type": "integer",
                  "description": "Allows to send a multimedia element that has previously been uploaded using its ID.\nNot allowed in `whatsapp` channel. Type must be `header`\n"
                },
                "multimediaCode": {
                  "type": "string",
                  "description": "Allows to send a multimedia element that has previously been uploaded using its multimedia code.\nNot allowed in `whatsapp` channel. Type must be `header`\n"
                },
                "multimediaFilename": {
                  "type": "string",
                  "description": "Allows to set the name of the file to be shown to the user\nNot allowed in `whatsapp` channel. Type must be `header`. Multimedia type must be a `document` type\n"
                },
                "parameters": {
                  "type": "array",
                  "description": "Only allowed in `whatsapp` channel\nThe order and number of parameters must be the same as defined in the template. Otherwise the message will not be sent.\n",
                  "items": {
                    "$ref": "#/components/schemas/ChatMessageTemplateParameters"
                  }
                },
                "cards": {
                  "type": "array",
                  "description": "Only allowed in `carousel` type",
                  "items": {
                    "properties": {
                      "card_index": {
                        "type": "string",
                        "description": "Describes button position. Type must be button"
                      },
                      "components": {
                        "type": "array",
                        "description": "All cards must have same components. Must include a card for every card defined on the template.\n",
                        "items": {
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "body",
                                "header",
                                "button"
                              ]
                            },
                            "subType": {
                              "type": "string",
                              "description": "Only allowed in `button` type, describes button type. `phoneCall` is not valid in `whatsapp` channel",
                              "enum": [
                                "url",
                                "quickReply",
                                "phoneCall"
                              ]
                            },
                            "index": {
                              "type": "string",
                              "description": "Describes button position. Type must be button"
                            },
                            "parameters": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/ChatMessageTemplateParameters"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ChatMessageTemplateParameters": {
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text",
              "currency",
              "date_time",
              "multimedia",
              "payload",
              "action"
            ],
            "description": "Parameter type.\nWhen using a component of type `button`, parameter type can be:\n\n  - `text`: Developer provided suffix that will be appended to a previously created dynamic URL button. `text` field must be set\n  - `payload`: Event in Dialogflow. `payload` field must be set\n  - `action`: Params to send a flow message template. `action` field must be set\n\nWhen using a component of type `header` or `body`, parameter type can be\n\n  - `text`\n  - `currency`\n  - `date_time`\n  - `multimedia`\n"
          },
          "text": {
            "type": "string",
            "description": "Text to use to replace the content of the variable\nWhen using with buttons component: Developer provided suffix that will be appended to a previously created dynamic URL button.\nParameter type must be `text`\n"
          },
          "payload": {
            "type": "string",
            "description": "Button payload. It allows defining an event in Dialogflow that will be triggered when the button is pressed.\nThis allows to reply with a message to a user in response to pressing a button.\nThe button must be defined in the template as quickReply. Component subType must be `quickReply`. Parameter type must be `payload`\n"
          },
          "action": {
            "type": "object",
            "description": "Set params to flow message template.\n",
            "properties": {
              "flowToken": {
                "type": "string",
                "description": "Optional for template message of subtype `flow`.\nA token generated by the company to serve as an identifier. If you do not provide it, we will generate a random token\n"
              },
              "flowActionData": {
                "type": "object",
                "description": "The input data key/value for the first screen of the Flow. Must be a non-empty object."
              }
            }
          },
          "buttonContext": {
            "type": "object",
            "description": "Sets values in the context of the conversation when the button is pressed. If any of the values already exist in the context they will be overwritten.\nIt must be a flat object (key value) without nested objects.\nComponent type must be `button` with subType `quickReply` and parameter type `payload`.\n"
          },
          "currency": {
            "description": "If the currency object is used, it contains required parameters fallbackValue, code and amount_1000.\nParameter type must be `currency`\n",
            "properties": {
              "fallbackValue": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "amount_1000": {
                "type": "integer"
              }
            }
          },
          "dateTime": {
            "description": "If the date_time object is used, further definition of the date and time is required.\nParameter type must be `date_time`\n",
            "properties": {
              "fallbackValue": {
                "type": "string"
              },
              "dayOfWeek": {
                "type": "integer"
              },
              "dayOfMonth": {
                "type": "integer"
              },
              "year": {
                "type": "integer"
              },
              "month": {
                "type": "integer"
              },
              "hour": {
                "type": "integer"
              },
              "minute": {
                "type": "integer"
              }
            }
          },
          "multimediaId": {
            "type": "integer",
            "description": "Set a media element previously uploaded to the platform to replace a variable using its id.\nComponent must be of type `header` with parameters of type `multimedia`\n"
          },
          "multimediaCode": {
            "type": "string",
            "description": "Set a media element previously uploaded to the platform to replace a variable using its code.\nComponent must be of type `header` with parameters of type `multimedia`\n"
          },
          "multimediaFilename": {
            "type": "string",
            "description": "Set a media element previously uploaded to the platform to replace a variable using its code.\nComponent must be of type `header` with parameters of type `multimedia`. Multimedia item must be a \"document\"\n"
          },
          "multimediaType": {
            "type": "string",
            "enum": [
              "document",
              "video",
              "image"
            ],
            "description": "The type of multimedia.\nThis field is required to be specified if you want to reference the multimedia by its URL.\n"
          },
          "multimediaUrl": {
            "type": "string",
            "description": "Set a media element (document, video or image) using its URL.\nComponent must be of type `header` with parameters of type `multimedia`. This field is required to be specified if you want to reference the multimedia by its URL.\n"
          }
        }
      },
      "OneTimeNotification": {
        "description": "One time notification request message",
        "properties": {
          "title": {
            "type": "string",
            "description": "The title field is limited to 65 characters."
          },
          "payload": {
            "type": "string",
            "description": "Notification's description"
          }
        }
      },
      "OneTimeNotifFollowUp": {
        "description": "One time notification follow up message",
        "properties": {
          "text": {
            "type": "string"
          }
        }
      },
      "InteractiveMessage": {
        "description": "Interactive message with buttons or list options",
        "properties": {
          "header": {
            "description": "Mandatory for `product_list` type. Optional for other types.",
            "$ref": "#/components/schemas/ChatInteractiveMessageHeader"
          },
          "body": {
            "description": "Optional for type product. Required for other message types.",
            "$ref": "#/components/schemas/ChatInteractiveMessageBody"
          },
          "footer": {
            "$ref": "#/components/schemas/ChatInteractiveMessageFooter"
          },
          "action": {
            "$ref": "#/components/schemas/ChatInteractiveMessageAction"
          },
          "type": {
            "type": "string",
            "description": "Type of interactive message",
            "enum": [
              "list",
              "button",
              "ctaUrl",
              "singleProduct",
              "multiProduct",
              "flow",
              "locationRequest"
            ]
          }
        }
      },
      "ChatInteractiveMessageHeader": {
        "description": "Mandatory for `multiProduct` type. Optional for other types.\nInteractive `list`:\n  These fields are required:\n    - type: Must be text.\n    - text: Header text (maximum length 60).\nInteractive `button`:\n  With multimedia content:\n    - Required. Only one of the following multimedia fields is allowed (multimediaID, multimediaCode, multimediaUrl or text).\n  Without multimedia content. These fields are required:\n    - type: Must be text.\n    - text: Header text (maximum length 60).\nInteractive `multiProduct`.\n    Only `text` type can be used.\nInteractive `singleProduct`:\n  You cannot set a header if your interactive object is of product type.\n",
        "properties": {
          "multimediaId": {
            "type": "integer",
            "description": "Allows to send a multimedia element that has previously been uploaded using its ID.\n"
          },
          "multimediaCode": {
            "type": "string",
            "description": "Allows to send a multimedia element that has previously been uploaded using its multimedia code.\n"
          },
          "multimediaUrl": {
            "type": "string",
            "description": "For sending multimedia messages whose content is hosted on external servers, url public accessible with the content.\n  description: Address of the location. Only displayed if name is present.\n"
          },
          "contentType": {
            "type": "string",
            "description": "Type of content to be sent. It can be image, audio, document, video. Required if multimedia Url"
          },
          "type": {
            "type": "string",
            "description": "only supports text, required if text"
          },
          "text": {
            "type": "string",
            "maxLength": 60,
            "description": "text for header (max. length 60), required if type is text"
          }
        }
      },
      "ChatInteractiveMessageBody": {
        "description": "Optional for type `singleProduct`. Required for other message types.\nAn object with the body of the message.\n",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 1024,
            "description": "Your message's body."
          }
        }
      },
      "ChatInteractiveMessageFooter": {
        "description": "Optional\nAn object with the footer of the message.\n",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 60,
            "description": "footer text."
          }
        }
      },
      "ChatInteractiveMessageAction": {
        "description": "- No required for interactive type locationRequest.\n\n- `list`: Only fields `button`, `sections`\n\n- `button`: Only field `buttons`\n\n- `ctaUrl`: Only fields `displayText`, `url`\n\n- `singleProduct`: Only fields `catalog_id`, `product_retailer_id`\n\n- `multiProduct`: Only fields `catalog_id` and `sections`\n\n- `flow`: Only fields starts with `flow` name and mode field (this is optional)\n",
        "properties": {
          "button": {
            "type": "string",
            "description": "Button text"
          },
          "sections": {
            "type": "array",
            "items": {
              "properties": {
                "rows": {
                  "$ref": "#/components/schemas/ChatInteractiveMessageRows"
                },
                "title": {
                  "type": "string",
                  "description": "Section title",
                  "maxLength": 24
                },
                "productItems": {
                  "$ref": "#/components/schemas/ChatInteractiveMultiProductItems"
                }
              }
            }
          },
          "buttons": {
            "type": "array",
            "items": {
              "properties": {
                "reply": {
                  "$ref": "#/components/schemas/ChatInteractiveMessageReply"
                },
                "type": {
                  "type": "string",
                  "description": "Should be reply"
                }
              }
            }
          },
          "catalogId": {
            "type": "string",
            "description": "For messages of type `singleProduct` or `multiProduct`.\nUnique catalog identifier. In the case of WhatsApp this ID can be retrieved via Commerce Manager\n"
          },
          "productId": {
            "type": "string",
            "description": "For messages of type `singleProduct`.\n"
          },
          "mode": {
            "type": "string",
            "description": "Optional for messages of type `flow`.\nThe current mode of the Flow, either `draft` or `published`.\n",
            "enum": [
              "published",
              "draft"
            ]
          },
          "flowMessageVersion": {
            "type": "string",
            "description": "Required for messages of type `flow`. Should be `\"3\"`.\n"
          },
          "flowToken": {
            "type": "string",
            "description": "Optional for messages of type `flow`.\nA token generated by the company to serve as an identifier. If you do not provide it, we will generate a random token\n"
          },
          "flowId": {
            "type": "string",
            "description": "Required for messages of type `flow`.\nUnique identifier of the Flow provided by WhatsApp manager.\n"
          },
          "flowCTA": {
            "type": "string",
            "description": "Required for messages of type `flow`.\nText on the CTA button, eg. \"Signup\".\nMaximum length: 20 characters (no emoji).\n",
            "maxLength": 20
          },
          "flowAction": {
            "type": "string",
            "description": "Optional for messages of type `flow`.\nAt the moment only accepts `navigate`. Use navigate to predefine the first screen as part of the message.\n",
            "enum": [
              "navigate"
            ]
          },
          "flowActionPayload": {
            "type": "object",
            "required": [
              "screen"
            ],
            "description": "Optional for messages of type `flow`. Required if flowAction is `navigate`\n",
            "properties": {
              "screen": {
                "type": "string",
                "description": "The id of the first screen of the Flow."
              },
              "data": {
                "type": "object",
                "description": "The input data key/value for the first screen of the Flow. Must be a non-empty object."
              }
            }
          },
          "displayText": {
            "type": "string",
            "description": "Required for messages of type `ctaUrl`.\nButton text.\n"
          },
          "url": {
            "type": "string",
            "description": "Required for messages of type `ctaUrl`.\nURL to load in the device's default web browser when tapped by the user.\n"
          }
        }
      },
      "ChatInteractiveMessageRows": {
        "type": "array",
        "items": {
          "required": [
            "payload"
          ],
          "type": "object",
          "properties": {
            "title": {
              "maxLength": 24,
              "type": "string",
              "description": "Row name\nRequired if the message has more than one section.\n"
            },
            "description": {
              "maxLength": 72,
              "type": "string",
              "description": "Row description"
            },
            "payload": {
              "maxLength": 200,
              "type": "string",
              "description": "Event name"
            }
          },
          "description": "Rows of interactive list"
        }
      },
      "ChatInteractiveMultiProductItems": {
        "type": "array",
        "description": "Required for `multiProduct` interactive messages.\nList of products.\nThere is a minimum of 1 product per section and a maximum of 30 products across all sections.\n",
        "items": {
          "properties": {
            "productId": {
              "type": "string"
            }
          }
        }
      },
      "ChatInteractiveMessageReply": {
        "description": "Reply object",
        "required": [
          "title",
          "payload"
        ],
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 24,
            "description": "Reply name"
          },
          "payload": {
            "type": "string",
            "maxLength": 200,
            "description": "Event name"
          }
        }
      },
      "ChatMessageRedirectIntegration": {
        "description": "Integration redirect message.\nAllows moving a conversationSession to another instance with this messages.\n`contentType` must be 'redirectToIntegration'\n",
        "properties": {
          "integrationType": {
            "description": "Integration to redirect the conversation",
            "type": "string",
            "enum": [
              "iagen",
              "df"
            ]
          },
          "parameters": {
            "type": "object",
            "description": "Parameters for integration. See the integration documentation for more information."
          }
        }
      },
      "ChatMessageLocation": {
        "description": "Location message",
        "required": [
          "longitude",
          "latitude"
        ],
        "properties": {
          "longitude": {
            "type": "number",
            "description": "Longitude of the location"
          },
          "latitude": {
            "type": "number",
            "description": "Latitude of the location"
          },
          "name": {
            "type": "string",
            "description": "Name of the location"
          },
          "address": {
            "type": "string",
            "description": "Address of the location. Only displayed if name is present."
          }
        }
      },
      "ChatMessageContact": {
        "description": "Contact message",
        "properties": {
          "addresses": {
            "description": "Full contact address(es)",
            "type": "array",
            "items": {
              "properties": {
                "street": {
                  "type": "string",
                  "description": "Street number and name"
                },
                "city": {
                  "type": "string",
                  "description": "City name"
                },
                "state": {
                  "type": "string",
                  "description": "State abbreviation"
                },
                "zip": {
                  "type": "string",
                  "description": "ZIP code"
                },
                "country": {
                  "type": "string",
                  "description": "Full country name"
                },
                "country_code": {
                  "type": "string",
                  "description": "Two-letter country abbreviation"
                },
                "type": {
                  "type": "string",
                  "description": "Must be HOME or WORK"
                }
              }
            }
          },
          "birthday": {
            "type": "string",
            "description": "YYYY-MM-DD formatted string"
          },
          "emails": {
            "description": "Contact email address(es)",
            "type": "array",
            "items": {
              "properties": {
                "email": {
                  "type": "string",
                  "description": "Email address"
                },
                "type": {
                  "type": "string",
                  "description": "Must be HOME or WORK"
                }
              }
            }
          },
          "name": {
            "description": "Full contact name.\nAt least one of the optional parameters (first_name, last_name, middle_name, suffix, prefix) needs to be included along with the formatted_name parameter\n",
            "properties": {
              "formatted_name": {
                "type": "string",
                "description": "Full name as it normally appears"
              },
              "first_name": {
                "type": "string",
                "description": "First name"
              },
              "last_name": {
                "type": "string",
                "description": "Last name"
              },
              "middle_name": {
                "type": "string",
                "description": "Middle name"
              },
              "suffix": {
                "type": "string",
                "description": "Name suffix"
              },
              "prefix": {
                "type": "string",
                "description": "Name prefix"
              }
            }
          },
          "org": {
            "description": "Contact organization information",
            "properties": {
              "company": {
                "type": "string",
                "description": "Name of the contact's company"
              },
              "department": {
                "type": "string",
                "description": "Name of the contact's department"
              },
              "title": {
                "type": "string",
                "description": "Contact's business title"
              }
            }
          },
          "phone": {
            "description": "Contact phone number(s)",
            "type": "array",
            "items": {
              "properties": {
                "phone": {
                  "type": "string",
                  "description": "Automatically populated with the wa_id value as a formatted phone number."
                },
                "type": {
                  "type": "string",
                  "description": "Must be CELL,MAIN,IPHONE,HOME,WORK"
                },
                "wa_id": {
                  "type": "string",
                  "description": "WhatsApp ID"
                }
              }
            }
          },
          "urls": {
            "description": "Contact URL(s)",
            "type": "array",
            "items": {
              "properties": {
                "url": {
                  "type": "string",
                  "description": "URL"
                },
                "type": {
                  "type": "string",
                  "description": "Must be HOME or WORK"
                }
              }
            }
          }
        }
      },
      "ChatMessageContentPost": {
        "description": "Message content.",
        "properties": {
          "body": {
            "type": "string",
            "description": "For messages of type 'text', the text we want to send to the user. It can contain emoticons and formatting labels (**, etc.)."
          },
          "multimediaId": {
            "type": "integer",
            "description": "For sending multimedia messages, the internal identifier of the previously loaded multimedia element."
          },
          "multimediaUrl": {
            "type": "string",
            "description": "For sending multimedia messages whose content is hosted on external servers, url public accessible with the content."
          },
          "multimediaCode": {
            "type": "string",
            "description": "For sending multimedia messages, the multimedia code of the previously loaded multimedia element."
          },
          "eventName": {
            "type": "string",
            "description": "Send a message from the result of executing an intent in Dialogflow with an event name."
          },
          "eventData": {
            "type": "object",
            "description": "Only for Azure Bot Builder. The event data that is sent to the bot."
          },
          "caption": {
            "type": "string",
            "description": "Describes the specified image, video, or document media. Do not use with audio media or text."
          },
          "filename": {
            "type": "string",
            "description": "Describes the filename for the specific document. Use only with document media."
          },
          "location": {
            "$ref": "#/components/schemas/ChatMessageLocation"
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessageContact"
            }
          },
          "template": {
            "$ref": "#/components/schemas/ChatMessageTemplate"
          },
          "oneTimeNotification": {
            "$ref": "#/components/schemas/OneTimeNotification"
          },
          "oneTimeNotifFollowUp": {
            "$ref": "#/components/schemas/OneTimeNotifFollowUp"
          },
          "interactive": {
            "$ref": "#/components/schemas/InteractiveMessage"
          },
          "webhookId": {
            "type": "string",
            "description": "For webhook type messages. External identifier of the webhook that must be executed to obtain the message to be sent to the user."
          },
          "integration": {
            "$ref": "#/components/schemas/ChatMessageRedirectIntegration"
          }
        }
      },
      "CannedMessage": {
        "properties": {
          "id": {
            "type": "integer",
            "description": "Canned message id"
          },
          "onlyAuditor": {
            "type": "boolean",
            "description": "This canned message will only be available to audit agents"
          },
          "title": {
            "type": "string"
          },
          "contentType": {
            "$ref": "#/components/schemas/CannedMessageContentType"
          },
          "content": {
            "$ref": "#/components/schemas/ChatMessageContentPost"
          },
          "auditorDefaultMessage": {
            "type": "boolean",
            "description": "Indicates if it will be the default message displayed in the contact center"
          }
        }
      },
      "CannedMessageContentType": {
        "type": "string",
        "enum": [
          "text",
          "audio",
          "document",
          "image",
          "location",
          "video",
          "contacts",
          "dfEvent",
          "event",
          "template",
          "webhook",
          "oneTimeNotification",
          "oneTimeNotifFollowUp",
          "interactive"
        ],
        "default": "text",
        "description": "Content type. It is not necessary when a multimediaId has been specified (it will be replaced)."
      },
      "UpdateCannedMessage": {
        "properties": {
          "title": {
            "type": "string"
          },
          "onlyAuditor": {
            "type": "boolean",
            "description": "This canned message will only be available to audit agents"
          },
          "contentType": {
            "$ref": "#/components/schemas/CannedMessageContentType"
          },
          "content": {
            "$ref": "#/components/schemas/ChatMessageContentPost"
          },
          "auditorDefaultMessage": {
            "type": "boolean",
            "description": "Indicates if it will be the default message displayed in the contact center"
          }
        }
      },
      "CannedMessageResponse": {
        "required": [
          "statusCode",
          "message",
          "data"
        ],
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "Response code"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/CannedMessage"
          }
        }
      }
    }
  }
}
````