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

# Reorder message variants

> Changes the sequence of a message's variants without touching their text. The request must name every variant ID of the message exactly once.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json patch /v1/stable/message/{messageID}
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/message/{messageID}:
    patch:
      tags:
        - Message
      summary: Reorder message variants
      description: Changes the sequence of a message's variants without touching their
        text. The request must name every variant ID of the message exactly
        once.
      operationId: StableMessageController_update
      parameters:
        - name: messageID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the message to operate on.
          description: The ID of the message to operate on.
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StableMessageUpdateRequest"
      responses:
        "200":
          description: Confirms the variants were reordered. The body is a message only,
            so refetch the message to see the new sequence.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableUpdateResponse"
          x-vf-doc:
            description: Confirms the variants were reordered. The body is a message only,
              so refetch the message to see the new sequence.
      security:
        - token: []
components:
  schemas:
    StableMessageUpdateRequest:
      type: object
      properties:
        variantOrder:
          minItems: 1
          type: array
          items:
            type: string
          description: Every variant ID of the message, each exactly once, in the new order.
      required:
        - variantOrder
      additionalProperties: false
    StableUpdateResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable message confirming the update.
      required:
        - message
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
