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

# Where a chat's workflow stands

> The questions asked and answered so far, the one waiting, and once every question is behind it the task to send. 404 when the chat wasn't started from a workflow.



## OpenAPI

````yaml get /api/chat/threads/{thread_id}/workflow
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/chat/threads/{thread_id}/workflow:
    get:
      tags:
        - Chat
      summary: Where a chat's workflow stands
      description: >-
        The questions asked and answered so far, the one waiting, and once every
        question is behind it the task to send. 404 when the chat wasn't started
        from a workflow.
      operationId: get_workflow_api_chat_threads__thread_id__workflow_get
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Thread Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatWorkflowProgress'
        '403':
          description: You can't post in this chat.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Thread or workflow not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            Not now: the chat has messages, the step was sent, or the workflow
            is no longer available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: An answer the form can't take.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ChatWorkflowProgress:
      properties:
        item_id:
          type: string
          format: uuid
          title: Item Id
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
          description: The version it follows.
        title:
          type: string
          title: Title
        transcript:
          items:
            $ref: '#/components/schemas/WorkflowTranscriptEntry'
          type: array
          title: Transcript
        current:
          anyOf:
            - $ref: '#/components/schemas/ChatWorkflowQuestionOut'
            - type: 'null'
          description: The question waiting for an answer; null once done.
        total:
          type: integer
          title: Total
          description: Questions the workflow can ask.
        done:
          type: boolean
          title: Done
          default: false
        task:
          anyOf:
            - type: string
            - type: 'null'
          title: Task
          description: 'Once done: the message to send to the assistant.'
        available:
          type: boolean
          title: Available
          description: False when the version was withdrawn or is no longer yours to see.
          default: true
        can_continue:
          type: boolean
          title: Can Continue
          description: 'Whether you may answer: who started it, or a manager.'
          default: true
      type: object
      required:
        - item_id
        - title
        - total
      title: ChatWorkflowProgress
      description: Where a workflow conversation stands.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    WorkflowTranscriptEntry:
      properties:
        key:
          type: string
          title: Key
        question:
          type: string
          title: Question
        answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer
          description: Null when skipped.
      type: object
      required:
        - key
        - question
      title: WorkflowTranscriptEntry
      description: A question asked and how it was answered.
    ChatWorkflowQuestionOut:
      properties:
        key:
          type: string
          title: Key
        text:
          type: string
          title: Text
        type:
          type: string
          enum:
            - choice
            - text
            - number
            - date
            - yes_no
          title: Type
        choices:
          items:
            type: string
          type: array
          title: Choices
        allow_other:
          type: boolean
          title: Allow Other
        required:
          type: boolean
          title: Required
        placeholder:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeholder
        number:
          type: integer
          title: Number
          description: 1-based, counting the questions asked so far.
      type: object
      required:
        - key
        - text
        - type
        - allow_other
        - required
        - number
      title: ChatWorkflowQuestionOut
      description: The question being asked.
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.