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

# Atualizar OAuth app

> Altera nome, redirect URIs ou escopos padrão. Escopo `oauth_apps:manage`.



## OpenAPI

````yaml /es/oauth-api/api-reference/openapi-oauth.json patch /v1/oauth/apps/{id}
openapi: 3.0.3
info:
  title: Notifique API. OAuth 2.1
  description: >-
    Authorization Server OAuth 2.1 con PKCE obligatorio. Registra clientes,
    autoriza usuarios y obtén access tokens para `/v1/*`. Issuer:
    `https://api.notifique.dev`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security: []
tags:
  - name: Metadados
    description: Discovery RFC 8414, chaves públicas JWT e metadados do recurso MCP.
  - name: OAuth
    description: Registro de clientes, autorização, tokens e revogação.
  - name: OAuth Apps
    description: Apps OAuth do workspace (painel Developer → OAuth Apps).
paths:
  /v1/oauth/apps/{id}:
    patch:
      tags:
        - OAuth Apps
      summary: Atualizar OAuth app
      description: >-
        Altera nome, redirect URIs ou escopos padrão. Escopo
        `oauth_apps:manage`.
      operationId: ntfOauth_updateWorkspaceApp
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NtfOauth_WorkspaceAppPatch'
            example:
              name: Meu SaaS v2
              allowedScopes:
                - email:send
                - whatsapp:send
      responses:
        '200':
          description: App atualizado.
          content:
            application/json:
              example:
                success: true
                data:
                  id: cloauthapp_01H...
                  name: Meu SaaS v2
              schema:
                $ref: '#/components/schemas/ntfOauth_UpdateWorkspaceAppResponse'
        '400':
          $ref: '#/components/responses/NtfOauth_BadRequest'
        '401':
          $ref: '#/components/responses/NtfOauth_Unauthorized'
        '403':
          $ref: '#/components/responses/NtfOauth_Forbidden'
        '404':
          $ref: '#/components/responses/NtfOauth_NotFound'
components:
  schemas:
    NtfOauth_WorkspaceAppPatch:
      type: object
      properties:
        name:
          type: string
        redirectUris:
          type: array
          items:
            type: string
            format: uri
        allowedScopes:
          type: array
          items:
            type: string
      example:
        name: Exemplo
        redirectUris:
          - https://example.com/resource
        allowedScopes:
          - string
    ntfOauth_UpdateWorkspaceAppResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
      example:
        success: true
        data:
          id: clxx...
          name: Exemplo
    NtfOauth_Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        message:
          type: string
        code:
          type: string
      example:
        success: false
        error: string
        message: string
        code: string
  responses:
    NtfOauth_BadRequest:
      description: Body inválido ou campo inesperado.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfOauth_Error'
          examples:
            validation:
              value:
                success: false
                error: Bad Request
                message: url must be HTTPS
                code: VALIDATION_ERROR
            unexpected_fields:
              value:
                success: false
                code: UNEXPECTED_FIELDS
    NtfOauth_Unauthorized:
      description: Chave ausente, inválida ou revogada.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfOauth_Error'
          example:
            success: false
            error: Unauthorized
            message: Invalid API key
            code: UNAUTHORIZED
    NtfOauth_Forbidden:
      description: Escopo ausente ou recurso fora da permissão da chave.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfOauth_Error'
          example:
            success: false
            error: Forbidden
            message: Missing scope webhooks:manage
            code: FORBIDDEN
    NtfOauth_NotFound:
      description: Recurso não encontrado no workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfOauth_Error'
          example:
            success: false
            error: Not Found
            message: Webhook not found
            code: NOT_FOUND

````