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

# Create a new transfer request



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi post /v1/transfers
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/transfers:
    post:
      tags:
        - Transfers
      summary: Create a new transfer request
      operationId: postV1Transfers
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - to_email
                - resource_type
                - resource_id
              properties:
                to_email:
                  type: string
                  format: email
                  description: Email do destinatário
                resource_type:
                  type: string
                  enum:
                    - physical_device
                    - user_product
                    - config_entry
                    - automation
                    - lovelace_dashboard
                    - script
                    - tag
                    - zone
                    - organization
                  description: Tipo do recurso
                resource_id:
                  type: string
                  description: ID do recurso
                metadata:
                  type: object
                  nullable: true
                  description: Metadados opcionais
            example:
              to_email: amigo@email.com
              resource_type: config_entry
              resource_id: '42'
      responses:
        '201':
          description: Transfer created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  from_user_id:
                    type: string
                  to_email:
                    type: string
                  resource_type:
                    type: string
                  resource_id:
                    type: string
                  status:
                    type: string
                    enum:
                      - pending
                      - accepted
                      - rejected
                      - cancelled
                  metadata:
                    type: object
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
              example:
                id: 1
                from_user_id: user_abc123
                to_email: amigo@email.com
                resource_type: config_entry
                resource_id: '42'
                status: pending
                metadata: null
                created_at: '2026-03-17T10:00:00Z'
        '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

````