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

# Advance a step in the Config Flow

> Submit user input for the current step of a config flow.



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi post /v1/config_flow/{flowId}/advance
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/config_flow/{flowId}/advance:
    post:
      tags:
        - Config Flow
      summary: Advance a step in the Config Flow
      description: Submit user input for the current step of a config flow.
      operationId: postV1Config_flowByFlowIdAdvance
      parameters:
        - in: path
          name: flowId
          required: true
          schema:
            type: string
          description: ID do flow retornado pelo /start
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_code:
                  type: string
                  description: Código de autorização OAuth2 (quando aplicável)
            example:
              region: eu
              access_id: xxx
              access_secret: yyy
        required: true
      responses:
        '200':
          description: Step advanced
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    description: >-
                      Tipo do passo atual (ex: form, external, abort,
                      create_entry)
                  flowId:
                    type: string
                  handler:
                    type: string
                  stepId:
                    type: string
                  errors:
                    type: object
                    nullable: true
                  data_schema:
                    type: array
                    items:
                      path: /v1/logto/webhook
                    nullable: true
                  url:
                    type: string
                    nullable: true
                    description: URL OAuth2 para redirecionamento externo
              example:
                type: create_entry
                flowId: flow_abc123
                handler: tuya
                stepId: done
        '400':
          description: Dados inválidos
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: validation error
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: unauthorized
        '404':
          description: Recurso não encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````