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

# Registrar cliente (DCR)

> Dynamic Client Registration (RFC 7591). Cria um cliente OAuth — pelo código ou antes do fluxo MCP. O `client_secret` só é retornado uma vez para clientes confidenciais.



## OpenAPI

````yaml /es/oauth-api/api-reference/openapi-oauth.json post /oauth/register
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:
  /oauth/register:
    post:
      tags:
        - OAuth
      summary: Registrar cliente (DCR)
      description: >-
        Dynamic Client Registration (RFC 7591). Cria um cliente OAuth — pelo
        código ou antes do fluxo MCP. O `client_secret` só é retornado uma vez
        para clientes confidenciais.
      operationId: ntfOauth_registerClient
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NtfOauth_ClientRegistration'
            examples:
              web_confidencial:
                summary: App web com backend
                value:
                  client_name: Meu App
                  redirect_uris:
                    - https://meuapp.com/oauth/callback
                  grant_types:
                    - authorization_code
                    - refresh_token
                  response_types:
                    - code
                  token_endpoint_auth_method: client_secret_basic
                  scope: email:send
              cli_publico:
                summary: CLI local (público + PKCE)
                value:
                  client_name: Minha CLI
                  redirect_uris:
                    - http://127.0.0.1:8765/callback
                  grant_types:
                    - authorization_code
                    - refresh_token
                  response_types:
                    - code
                  token_endpoint_auth_method: none
                  scope: email:send
      responses:
        '201':
          description: Cliente registrado.
          content:
            application/json:
              example:
                client_id: ntf_oauth_cl_abc123
                client_secret: ntf_oauth_cs_xyz789
                client_name: Meu App
                redirect_uris:
                  - https://meuapp.com/oauth/callback
                grant_types:
                  - authorization_code
                  - refresh_token
                response_types:
                  - code
                token_endpoint_auth_method: client_secret_basic
                scope: email:send
                client_id_issued_at: 1735689600
              schema:
                $ref: '#/components/schemas/ntfOauth_RegisterClientResponse'
        '400':
          description: Payload inválido (redirect URI, grant type, etc.).
components:
  schemas:
    NtfOauth_ClientRegistration:
      type: object
      required:
        - client_name
        - redirect_uris
      properties:
        client_name:
          type: string
          description: Nome exibido na tela de consentimento.
        redirect_uris:
          type: array
          items:
            type: string
            format: uri
          description: URIs de callback permitidas.
        grant_types:
          type: array
          items:
            type: string
          default:
            - authorization_code
            - refresh_token
        response_types:
          type: array
          items:
            type: string
          default:
            - code
        token_endpoint_auth_method:
          type: string
          enum:
            - client_secret_basic
            - none
          default: client_secret_basic
        scope:
          type: string
          description: Escopos padrão do cliente, separados por espaço.
      example:
        client_name: string
        redirect_uris:
          - https://example.com/resource
        grant_types:
          - authorization_code
          - refresh_token
        response_types:
          - code
        token_endpoint_auth_method: client_secret_basic
        scope: string
    ntfOauth_RegisterClientResponse:
      type: object
      properties:
        client_id:
          type: string
        client_secret:
          type: string
        client_name:
          type: string
        redirect_uris:
          type: array
          items:
            type: string
        grant_types:
          type: array
          items:
            type: string
        response_types:
          type: array
          items:
            type: string
        token_endpoint_auth_method:
          type: string
        scope:
          type: string
        client_id_issued_at:
          type: integer
      example:
        client_id: clxx...
        client_secret: string
        client_name: string
        redirect_uris:
          - string
        grant_types:
          - string
        response_types:
          - string
        token_endpoint_auth_method: string
        scope: string
        client_id_issued_at: 1

````