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

# Renomear operação de negócio

> Exige operations. Não altera saldo nem histórico.



## OpenAPI

````yaml /openapi.yaml patch /operations/{id}
openapi: 3.1.0
info:
  title: Master API
  version: 1.1.0
  description: >-
    API pública da Master para cobranças Pix, cartão e transferências Pix
    automáticas. Valores em centavos inteiros.
servers:
  - url: https://api.pagmaster.site/api/v1/public
    description: Produção, após configurar DNS e HTTPS
  - url: http://127.0.0.1:4000/api/v1/public
    description: Desenvolvimento local
security:
  - bearerAuth: []
tags:
  - name: Conta
    description: Saldo e limites da conta
  - name: Pagamentos
    description: Consulta de operações
  - name: Cobranças Pix
    description: Criação de cobranças
  - name: Transferências Pix
    description: Envios automáticos autorizados por API key
  - name: Operações de negócio
    description: Até 10 negócios com saldos e históricos independentes
  - name: Cartão de crédito
    description: Checkout hospedado e consulta de aprovação e liquidação
paths:
  /operations/{id}:
    parameters:
      - $ref: '#/components/parameters/BusinessOperationId'
    patch:
      tags:
        - Operações de negócio
      summary: Renomear operação de negócio
      description: Exige operations. Não altera saldo nem histórico.
      operationId: renameBusinessOperation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - name
              properties:
                name:
                  type: string
                  minLength: 2
                  maxLength: 64
      responses:
        '200':
          description: Operação renomeada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessOperation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimit'
components:
  parameters:
    BusinessOperationId:
      name: id
      in: path
      required: true
      description: UUID do negócio Master
      schema:
        type: string
        format: uuid
  schemas:
    BusinessOperation:
      type: object
      required:
        - id
        - name
        - isDefault
        - balanceCents
        - createdAt
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 2
          maxLength: 64
        isDefault:
          type: boolean
        balanceCents:
          type: integer
          minimum: 0
        balanceUpdatedAt:
          type:
            - integer
            - 'null'
        createdAt:
          type: integer
    Error:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
  responses:
    BadRequest:
      description: Dados inválidos ou conflito de idempotência
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: API key ausente, inválida ou revogada
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Permissão insuficiente
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Operação não encontrada nesta conta
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimit:
      description: Limite temporário de requisições
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key criada em Integrações → Keys. Exemplo `mk_live_...`.

````

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