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

# Rotacionar o push_token de uma registration existente



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi patch /v1/voip/push-registrations/{id}
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/voip/push-registrations/{id}:
    patch:
      tags:
        - VoIP
      summary: Rotacionar o push_token de uma registration existente
      operationId: patchV1VoipPush-registrationsById
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
          description: ID da push registration
        - in: header
          name: X-Organization-Id
          required: false
          schema:
            type: string
          description: >-
            ID da organização para contexto (opcional). Quando presente, filtra
            recursos da org.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - push_token
              properties:
                push_token:
                  type: string
                  description: Novo token (didUpdatePushCredentials)
            example:
              push_token: novoTokenHex...
      responses:
        '200':
          description: Token atualizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  voip_account_id:
                    type: integer
                  config_entry_id:
                    type: integer
                  org_id:
                    type: string
                    nullable: true
                  platform:
                    type: string
                    enum:
                      - ios
                      - android
                  push_token:
                    type: string
                  bundle_id:
                    type: string
                  environment:
                    type: string
                    enum:
                      - sandbox
                      - production
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
              example:
                id: 1
                voip_account_id: 42
                config_entry_id: 128
                org_id: org_xyz
                platform: ios
                push_token: a3f9c2...
                bundle_id: com.unicontrol.portal
                environment: production
                created_at: '2026-09-25T10:00:00Z'
                updated_at: '2026-09-25T10: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
        '403':
          description: Acesso negado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: forbidden
        '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

````

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