> ## Documentation Index
> Fetch the complete documentation index at: https://botpress-ak-docs-20-document-updating-variables-from-outsid.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# updateMessage

> Updates a message tags and payload. The message type cannot be changed. Calling this operation from an integration, to update an incoming message, will not invoke the bot. The other way around it also true; Calling this operation from the bot, to update an outgoing message, will not invoke the integration.



## OpenAPI

````yaml runtime-openapi.json put /v1/chat/messages/{id}
openapi: 3.0.0
info:
  title: Botpress Runtime API
  description: API for Botpress Runtime
  version: 1.52.1
servers:
  - url: https://api.botpress.cloud
security:
  - BearerAuth: []
tags:
  - name: documented
paths:
  /v1/chat/messages/{id}:
    put:
      tags:
        - Endpoints
      description: >-
        Updates a message tags and payload. The message type cannot be changed.
        Calling this operation from an integration, to update an incoming
        message, will not invoke the bot. The other way around it also true;
        Calling this operation from the bot, to update an outgoing message, will
        not invoke the integration.
      operationId: updateMessage
      parameters:
        - name: id
          in: path
          description: Message id
          required: true
          schema:
            type: string
        - name: x-bot-id
          in: header
          description: Bot id
          required: true
          schema:
            type: string
        - name: x-integration-id
          in: header
          description: Integration id
          required: false
          schema:
            type: string
        - name: x-integration-alias
          in: header
          description: Integration alias
          required: false
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/updateMessageBody'
      responses:
        '200':
          $ref: '#/components/responses/updateMessageResponse'
        default:
          $ref: '#/components/responses/updateMessageResponse'
components:
  requestBodies:
    updateMessageBody:
      description: Message data
      content:
        application/json:
          schema:
            type: object
            properties:
              tags:
                type: object
                additionalProperties:
                  type: string
                description: >-
                  Set of [Tags](/docs/developers/concepts/tags) that you can
                  attach to a [Conversation](#schema_conversation). The set of
                  [Tags](/docs/developers/concepts/tags) available on a
                  [Conversation](#schema_conversation) is restricted by the list
                  of [Tags](/docs/developers/concepts/tags) defined previously
                  by the [Bot](#schema_bot). Individual keys can be unset by
                  posting an empty value to them.
              payload:
                type: object
                additionalProperties: true
                description: >-
                  Payload is the content type of the message. Accepted payload
                  options: Text, Image, Choice, Dropdown, Card, Carousel, File,
                  Audio, Video, Location
            required:
              - tags
            title: updateMessageBody
            additionalProperties: false
  responses:
    updateMessageResponse:
      description: Message information
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                $ref: '#/components/schemas/Message'
            required:
              - message
            title: updateMessageResponse
            additionalProperties: false
  schemas:
    Message:
      type: object
      properties:
        id:
          type: string
          minLength: 28
          maxLength: 36
          description: Id of the [Message](#schema_message)
        createdAt:
          type: string
          format: date-time
          description: Creation date of the [Message](#schema_message) in ISO 8601 format
        updatedAt:
          type: string
          format: date-time
          description: Update date of the [Message](#schema_message) in ISO 8601 format
        type:
          type: string
          maxLength: 200
          description: >-
            Type of the [Message](#schema_message) represents the resource type
            that the message is related to
        payload:
          type: object
          additionalProperties: true
          description: >-
            Payload is the content type of the message. Accepted payload
            options: Text, Image, Choice, Dropdown, Card, Carousel, File, Audio,
            Video, Location
        direction:
          type: string
          enum:
            - incoming
            - outgoing
          description: Direction of the message (`incoming` or `outgoing`).
        userId:
          type: string
          minLength: 28
          maxLength: 36
          description: ID of the [User](#schema_user)
        conversationId:
          type: string
          minLength: 28
          maxLength: 36
          description: ID of the [Conversation](#schema_conversation)
        tags:
          type: object
          additionalProperties:
            type: string
          description: >-
            Set of [Tags](/docs/developers/concepts/tags) that you can attach to
            a [Conversation](#schema_conversation). The set of
            [Tags](/docs/developers/concepts/tags) available on a
            [Conversation](#schema_conversation) is restricted by the list of
            [Tags](/docs/developers/concepts/tags) defined previously by the
            [Bot](#schema_bot). Individual keys can be unset by posting an empty
            value to them.
        origin:
          type: string
          enum:
            - synthetic
          description: Origin of the message (`synthetic`).
      required:
        - id
        - createdAt
        - updatedAt
        - type
        - payload
        - direction
        - userId
        - conversationId
        - tags
      description: >-
        The Message object represents a message in a
        [Conversation](#schema_conversation) for a specific
        [User](#schema_user).
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````