> ## Documentation Index
> Fetch the complete documentation index at: https://rasa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Run an action in a conversation

> DEPRECATED. Runs the action, calling the action server if necessary. Any responses sent by the executed action will be forwarded to the channel specified in the output_channel parameter. If no output channel is specified, any messages that should be sent to the user will be included in the response of this endpoint.



## OpenAPI

````yaml /openapi/pro.yaml post /conversations/{conversation_id}/execute
openapi: 3.0.1
info:
  title: Rasa - Server Endpoints
  version: 1.0.0
  description: >-
    The Rasa server provides endpoints to retrieve trackers of conversations as
    well as endpoints to modify them. Additionally, endpoints for training and
    testing models are provided.
servers:
  - url: http://localhost:5005
    description: Local development server
security: []
paths:
  /conversations/{conversation_id}/execute:
    post:
      tags:
        - Tracker
      summary: Run an action in a conversation
      description: >-
        DEPRECATED. Runs the action, calling the action server if necessary. Any
        responses sent by the executed action will be forwarded to the channel
        specified in the output_channel parameter. If no output channel is
        specified, any messages that should be sent to the user will be included
        in the response of this endpoint.
      operationId: executeConversationAction
      parameters:
        - $ref: '#/components/parameters/conversation_id'
        - $ref: '#/components/parameters/include_events'
        - $ref: '#/components/parameters/output_channel'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tracker:
                    $ref: '#/components/schemas/Tracker'
                  messages:
                    type: array
                    items:
                      $ref: '#/components/schemas/BotMessage'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401NotAuthenticated'
        '403':
          $ref: '#/components/responses/403NotAuthorized'
        '409':
          $ref: '#/components/responses/409Conflict'
        '500':
          $ref: '#/components/responses/500ServerError'
      deprecated: true
      security:
        - TokenAuth: []
        - JWT: []
components:
  parameters:
    conversation_id:
      in: path
      name: conversation_id
      description: Id of the conversation
      example: default
      schema:
        type: string
      required: true
    include_events:
      in: query
      name: include_events
      description: >-
        Specify which events of the tracker the response should contain.

        * `ALL` - every logged event.

        * `APPLIED` - only events that contribute to the trackers state. This
        excludes reverted utterances and actions that got undone.

        * `AFTER_RESTART` -  all events since the last `restarted` event.
          This includes utterances that got reverted and actions that got undone.

        * `NONE` - no events.
      example: AFTER_RESTART
      schema:
        type: string
        default: AFTER_RESTART
        enum:
          - ALL
          - APPLIED
          - AFTER_RESTART
          - NONE
    output_channel:
      in: query
      name: output_channel
      description: >-
        The bot's utterances will be forwarded to this channel. It uses the
        credentials listed in `credentials.yml` to connect. In case the channel
        does not support this, the utterances will be returned in the response
        body. Use `latest` to try to send the messages to the latest channel the
        user used. Currently supported channels are listed in the permitted
        values for the parameter.
      example: slack
      schema:
        type: string
        enum:
          - latest
          - slack
          - callback
          - facebook
          - rocketchat
          - telegram
          - twilio
          - webexteams
          - socketio
  schemas:
    ActionRequest:
      type: object
      properties:
        name:
          description: Name of the action to be executed.
          type: string
          example: utter_greet
        policy:
          description: Name of the policy that predicted the action.
          type: string
          nullable: true
        confidence:
          description: Confidence of the prediction.
          type: number
          nullable: true
          example: 0.987232
      required:
        - name
    Tracker:
      type: object
      description: Conversation tracker which stores the conversation state.
      properties:
        sender_id:
          type: string
          description: ID of the conversation
          example: default
        user_id:
          type: string
          nullable: true
          description: >-
            Optional identifier of the end user associated with this
            conversation. Omitted from serialized output when `null`.
          example: usr_a1b2c3d4e5f6
        current_session_id:
          type: string
          nullable: true
          description: >-
            Session ID derived from the metadata of the last stored event.
            `null` when the last event is `ConversationInactive`, indicating no
            active session.
          example: 4b3c1e2a-91f0-4d8e-b123-abc123def456
        slots:
          type: array
          description: Slot values
          items:
            $ref: '#/components/schemas/Slot'
        latest_message:
          $ref: '#/components/schemas/ParseResult'
        latest_event_time:
          type: number
          description: Most recent event time
          example: 1537645578.314389
        followup_action:
          type: string
          description: Deterministic scheduled next action
        paused:
          type: boolean
          description: Bot is paused
          example: false
        stack:
          type: array
          nullable: true
          items:
            type: object
            properties: {}
            example:
              frame_id: 8UJPHH5C
              flow_id: transfer_money
              step_id: START
              frame_type: regular
              type: flow
        events:
          $ref: '#/components/schemas/EventList'
          description: Event history
        latest_input_channel:
          type: string
          description: Communication channel
          example: rest
        latest_action_name:
          type: string
          description: Name of last bot action
          example: action_listen
        latest_action:
          $ref: '#/components/schemas/LatestAction'
        active_loop:
          type: object
          description: Name of the active loop
          properties:
            name:
              type: string
              description: Name of the active loop
              example: restaurant_form
    BotMessage:
      type: object
      properties:
        recipient_id:
          type: string
          description: Id of the message receiver
        text:
          type: string
          description: Message
        image:
          type: string
          description: Image URL
        buttons:
          type: array
          description: Quick reply buttons
          items:
            type: object
            properties:
              title:
                type: string
                description: Button caption
              payload:
                type: string
                description: Payload to be sent if button is clicked
        attachement:
          type: array
          description: Additional information
          items:
            type: object
            properties:
              title:
                type: string
                description: Attachement caption
              payload:
                type: string
                description: Attachement payload
    Slot:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/SlotValue'
      example:
        slot_name: slot_value
    ParseResult:
      type: object
      properties:
        entities:
          type: array
          description: Parsed entities
          items:
            $ref: '#/components/schemas/Entity'
        intent:
          $ref: '#/components/schemas/Intent'
        intent_ranking:
          type: array
          description: Scores of all intents
          items:
            $ref: '#/components/schemas/Intent'
        text:
          type: string
          description: Text of the message
          example: Hello!
        message_id:
          type: string
          description: ID of the message
          example: b2831e73-1407-4ba0-a861-0f30a42a2a5a
        metadata:
          type: object
          properties: {}
        commands:
          type: array
          description: Commands to be executed
          items:
            $ref: '#/components/schemas/Command'
        flows_from_semantic_search:
          type: array
          items:
            type: array
            items:
              oneOf:
                - type: string
                  example: transfer_money
                - type: number
                  example: 0.9035494923591614
        flows_in_prompt:
          type: array
          items:
            type: string
            example: transfer_money
      description: >-
        NLU parser information. If set, message will not be passed through NLU,
        but instead this parsing information will be used.
      required:
        - text
    EventList:
      type: array
      items:
        $ref: '#/components/schemas/Event'
    LatestAction:
      type: object
      properties:
        action_name:
          type: string
          description: latest action name
        action_text:
          type: string
          description: text of last bot utterance
      description: Latest bot action.
    Error:
      type: object
      properties:
        version:
          type: string
          description: Rasa version
        status:
          type: string
          enum:
            - failure
          description: Status of the requested action
        message:
          type: string
          description: Error message
        reason:
          type: string
          description: Error category
        details:
          type: object
          description: Additional error information
        help:
          type: string
          description: Optional URL to additonal material
        code:
          type: number
          description: HTTP status code
    SlotValue:
      oneOf:
        - type: string
        - type: array
          items:
            type: string
    Entity:
      type: object
      description: Entities within a message
      properties:
        start:
          type: integer
          description: Char offset of the start
        end:
          type: integer
          description: Char offset of the end
        value:
          type: string
          description: Found value for entity
        entity:
          type: string
          description: Type of the entity
        confidence:
          type: number
      required:
        - start
        - end
        - value
        - entity
    Intent:
      type: object
      description: Intent of the text
      properties:
        confidence:
          type: number
          description: Confidence of the intent
          example: 0.6323
        name:
          type: string
          description: Intent name
          example: greet
      required:
        - confidence
        - name
    Command:
      anyOf:
        - $ref: '#/components/schemas/StartFlowCommand'
        - $ref: '#/components/schemas/CancelFlowCommand'
        - $ref: '#/components/schemas/ClarifyCommand'
        - $ref: '#/components/schemas/SetSlotCommand'
        - $ref: '#/components/schemas/ChitChatAnswerCommand'
        - $ref: '#/components/schemas/KnowledgeAnswerCommand'
        - $ref: '#/components/schemas/HumanHandoffCommand'
        - $ref: '#/components/schemas/SkipQuestionCommand'
    Event:
      anyOf:
        - $ref: '#/components/schemas/UserEvent'
        - $ref: '#/components/schemas/BotEvent'
        - $ref: '#/components/schemas/SessionStartedEvent'
        - $ref: '#/components/schemas/ActionEvent'
        - $ref: '#/components/schemas/SlotEvent'
        - $ref: '#/components/schemas/ResetSlotsEvent'
        - $ref: '#/components/schemas/RestartEvent'
        - $ref: '#/components/schemas/ReminderEvent'
        - $ref: '#/components/schemas/CancelReminderEvent'
        - $ref: '#/components/schemas/PauseEvent'
        - $ref: '#/components/schemas/ResumeEvent'
        - $ref: '#/components/schemas/FollowupEvent'
        - $ref: '#/components/schemas/ExportEvent'
        - $ref: '#/components/schemas/UndoEvent'
        - $ref: '#/components/schemas/RewindEvent'
        - $ref: '#/components/schemas/AgentEvent'
        - $ref: '#/components/schemas/EntitiesAddedEvent'
        - $ref: '#/components/schemas/UserFeaturizationEvent'
        - $ref: '#/components/schemas/ActionExecutionRejectedEvent'
        - $ref: '#/components/schemas/FormValidationEvent'
        - $ref: '#/components/schemas/LoopInterruptedEvent'
        - $ref: '#/components/schemas/FormEvent'
        - $ref: '#/components/schemas/ActiveLoopEvent'
        - $ref: '#/components/schemas/StackEvent'
        - $ref: '#/components/schemas/FlowStartedEvent'
        - $ref: '#/components/schemas/FlowCompletedEvent'
    StartFlowCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - start flow
              example: start flow
            flow:
              type: string
              description: Name of the flow to be started
              example: transfer_money
    CancelFlowCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - cancel flow
              example: cancel flow
    ClarifyCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - clarify
              example: clarify
            options:
              type: array
              items:
                type: string
    SetSlotCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - set slot
              example: set slot
            name:
              type: string
              description: Name of the slot to be set
              example: name
            value:
              description: Value of the slot to be set
              example: John Doe
    ChitChatAnswerCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - chitchat
              example: chitchat
    KnowledgeAnswerCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - knowledge
              example: knowledge
    HumanHandoffCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - human handoff
              example: human handoff
    SkipQuestionCommand:
      allOf:
        - $ref: '#/components/schemas/BasicCommand'
        - type: object
          properties:
            command:
              enum:
                - skip question
              example: skip question
    UserEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          description: Event for incoming user message.
          properties:
            event:
              enum:
                - user
              example: user
            text:
              type: string
              nullable: true
              description: Text of user message.
            input_channel:
              type: string
              nullable: true
            message_id:
              type: string
              nullable: true
            parse_data:
              $ref: '#/components/schemas/ParseResult'
            anonymized_at:
              type: string
              nullable: true
              description: >-
                ISO 8601 timestamp of when PII in this event was anonymized, or
                `null` if the event has not been anonymized.
    BotEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          description: Event for an outgoing bot message.
          properties:
            event:
              enum:
                - bot
              example: bot
            text:
              type: string
              nullable: true
              description: Text of the bot response.
            data:
              type: object
              nullable: true
              description: Rich response payload (buttons, images, attachments, etc.).
              properties:
                image:
                  type: string
                  nullable: true
                buttons:
                  type: array
                  nullable: true
                  items:
                    type: object
                attachment:
                  type: string
                  nullable: true
                elements:
                  type: array
                  nullable: true
                  items:
                    type: object
                quick_replies:
                  type: array
                  nullable: true
                  items:
                    type: object
                custom:
                  nullable: true
            anonymized_at:
              type: string
              nullable: true
              description: >-
                ISO 8601 timestamp of when PII in this event was anonymized, or
                `null` if the event has not been anonymized.
    SessionStartedEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - session_started
              example: session_started
    ActionEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - action
              example: action
            policy:
              type: string
              nullable: true
            confidence:
              type: number
              nullable: true
            name:
              type: string
              nullable: true
            hide_rule_turn:
              type: boolean
            action_text:
              type: string
              nullable: true
    SlotEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - slot
              example: slot
            name:
              type: string
            value: {}
            filled_by:
              type: string
              nullable: true
              description: >-
                Identifier of the extractor that filled the slot (e.g. `LLM`,
                `CommandPayloadReader`), or `null` if not set by an extractor.
              example: LLM
            anonymized_at:
              type: string
              nullable: true
              description: >-
                ISO 8601 timestamp of when PII in this event was anonymized, or
                `null` if the event has not been anonymized.
          required:
            - name
            - value
    ResetSlotsEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - reset_slots
              example: reset_slots
    RestartEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - restart
              example: restart
    ReminderEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - reminder
              example: reminder
    CancelReminderEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - cancel_reminder
              example: cancel_reminder
    PauseEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - pause
              example: pause
    ResumeEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - resume
              example: resume
    FollowupEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - followup
              example: followup
    ExportEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - export
              example: export
    UndoEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - undo
              example: undo
    RewindEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - rewind
              example: rewind
    AgentEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - agent
              example: agent
    EntitiesAddedEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - entities
              example: entities
            entities:
              type: array
              items:
                type: object
                properties:
                  start:
                    type: integer
                  end:
                    type: integer
                  entity:
                    type: string
                  confidence:
                    type: number
                  extractor:
                    type: string
                    nullable: true
                  value: {}
                  role:
                    type: string
                    nullable: true
                  group:
                    type: string
                    nullable: true
                required:
                  - entity
                  - value
          required:
            - entities
    UserFeaturizationEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - user_featurization
              example: user_featurization
            use_text_for_featurization:
              type: boolean
              description: Whether the user message text was used for featurization.
              example: false
    ActionExecutionRejectedEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - action_execution_rejected
              example: action_execution_rejected
    FormValidationEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - form_validation
              example: form_validation
    LoopInterruptedEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - loop_interrupted
              example: loop_interrupted
    FormEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - form
              example: form
    ActiveLoopEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          properties:
            event:
              enum:
                - active_loop
              example: active_loop
    StackEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          description: >-
            CALM dialogue stack update event. Contains a JSON Patch document
            describing the change applied to the conversation stack.
          properties:
            event:
              enum:
                - stack
              example: stack
            update:
              type: string
              description: >-
                JSON Patch (RFC 6902) string describing the stack mutation, e.g.
                add/replace/remove operations on stack frames.
              example: >-
                [{"op": "add", "path": "/0", "value": {"frame_id": "Z9X2EAS9",
                "flow_id": "tax_issue", "step_id": "START", "frame_type":
                "regular", "type": "flow"}}]
          required:
            - update
    FlowStartedEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          description: Emitted when a CALM flow begins execution.
          properties:
            event:
              enum:
                - flow_started
              example: flow_started
            flow_id:
              type: string
              description: ID of the flow that started.
              example: tax_issue
          required:
            - flow_id
    FlowCompletedEvent:
      allOf:
        - $ref: '#/components/schemas/BasicEvent'
        - type: object
          description: Emitted when a CALM flow finishes execution.
          properties:
            event:
              enum:
                - flow_completed
              example: flow_completed
            flow_id:
              type: string
              description: ID of the flow that completed.
              example: tax_issue
            step_id:
              type: string
              description: ID of the last step executed before the flow completed.
              example: tax_issue_4_utter_submit_issue
          required:
            - flow_id
    BasicCommand:
      type: object
      properties:
        command:
          type: string
          description: Command to be executed
          example: very basic
    BasicEvent:
      type: object
      properties:
        event:
          type: string
          description: Event name
          example: slot
        timestamp:
          type: number
          description: Unix timestamp (float) of when the event was applied.
          example: 1774447464.622012
        metadata:
          type: object
          description: >-
            Arbitrary metadata attached to the event by the channel or model,
            e.g. session_id, model_id, assistant_id, model_name.
          additionalProperties: true
          example:
            session_id: eed351b9-a996-4bb8-83ea-1d18e7cd4905
            model_id: 80687713793f4d07957e8e51f73df866
            assistant_id: my-assistant
      required:
        - event
  responses:
    400BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            version: 1.0.0
            status: failure
            reason: BadRequest
            code: 400
    401NotAuthenticated:
      description: User is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            version: 1.0.0
            status: failure
            reason: NotAuthenticated
            message: User is not authenticated to access resource.
            code: 401
    403NotAuthorized:
      description: User has insufficient permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            version: 1.0.0
            status: failure
            reason: NotAuthorized
            message: User has insufficient permission to access resource.
            code: 403
    409Conflict:
      description: The request conflicts with the currently loaded model.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            version: 1.0.0
            status: failure
            reason: Conflict
            message: The request conflicts with the currently loaded model.
            code: 409
    500ServerError:
      description: An unexpected error occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            version: 1.0.0
            status: ServerError
            message: An unexpected error occurred.
            code: 500
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: query
      name: token
      description: >
        A plaintext token to secure your server, specified at startup in the
        argument `--auth-token thisismysecret`
    JWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        A JWT token that is signed using the JWT secret specified at startup in
        the argument `--jwt-secret thisismysecret`,

        using the `HS256` algorithm.


        The token's payload must contain an object under the `user` key,

        which in turn must contain the `username` and `role` attributes.

        The following is an example payload for a JWT token:


        ```json

        {
            "user": {
                "username": "<sender_id>",
                "role": "user"
            }
        }

        ```


        If the `role` is `admin`, all endpoints are accessible.

        If the `role` is `user`, endpoints with a `sender_id` parameter are only
        accessible

        if the `sender_id` matches the payload's `username` property.


        For the user trackers endpoint (`GET /users/{user_id}/trackers`), you
        should use `user_id` instead of `username` in the payload.

        In this case, the path `user_id` parameter is matched against the
        payload's `username` property. For example:


        ```json

        {
            "user": {
                "username": "<user_id>",
                "role": "user"
            }
        }

        ```

````