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

# Update conversation state

> Replace the current state of the user's conversation.



## OpenAPI

````yaml /specs/general-runtime/openapi.public.json put /state/user/{userID}
openapi: 3.0.0
info:
  title: General-runtime
  description: Voiceflow runtime service
  version: 1.0.0
  contact: {}
servers:
  - url: https://general-runtime.voiceflow.com
security: []
paths:
  /state/user/{userID}:
    put:
      tags:
        - State
        - Public-Docs
      summary: Update conversation state
      description: Replace the current state of the user's conversation.
      operationId: StateController_updateStateForId
      parameters:
        - name: userID
          required: true
          in: path
          schema:
            description: An ID which uniquely identifies the user having the conversation.
            type: string
            maxLength: 128
        - name: projectID
          required: true
          in: header
          schema:
            type: string
            description: ID of the target Voiceflow project.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                turn:
                  type: object
                  additionalProperties: {}
                stack:
                  type: array
                  items:
                    type: object
                    properties:
                      nodeID:
                        oneOf:
                          - type: string
                          - {}
                      diagramID:
                        type: string
                      name:
                        type: string
                        nullable: true
                        default: null
                      storage:
                        type: object
                        additionalProperties: {}
                      variables:
                        type: object
                        additionalProperties: {}
                      commands:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                          required:
                            - type
                      dynamicCommands:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            type:
                              type: string
                          required:
                            - type
                    required:
                      - diagramID
                      - storage
                      - variables
                variables:
                  type: object
                  additionalProperties: {}
                storage:
                  type: object
                  additionalProperties: {}
              required:
                - stack
                - variables
                - storage
      responses:
        '200':
          description: ''
      security:
        - auth: []
components:
  securitySchemes:
    auth:
      type: apiKey
      in: header
      name: authorization
      description: Voiceflow API key

````