> ## 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.

# Pair a home edge (idempotent): provisions MQTT creds, marks paired



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi post /v1/edge/pair
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/edge/pair:
    post:
      tags:
        - Edge Runtime
      summary: 'Pair a home edge (idempotent): provisions MQTT creds, marks paired'
      operationId: postV1EdgePair
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                capabilities:
                  type: object
                  description: >-
                    Optional capabilities to merge (lan_subnets, usb_devices,
                    ...).
      responses:
        '200':
          description: Paired
          content:
            application/json:
              schema:
                type: object
                properties:
                  edge:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      org_id:
                        type: string
                        nullable: true
                      location:
                        type: string
                        enum:
                          - cloud
                          - home
                      status:
                        type: string
                      capabilities:
                        type: object
                  mqtt:
                    type: object
                    properties:
                      username:
                        type: string
                      password:
                        type: string
        '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
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````