> ## Documentation Index
> Fetch the complete documentation index at: https://developers.portao3.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the current API client

> Returns the API client the access token belongs to, with the organizations it can act on.

Use it to check which credentials a token carries, and to find the IDs of your realm and organizations for the other endpoints. Any problem with the token answers `401 Unauthorized`.


## OpenAPI

````yaml /api-reference/identity.openapi.json get /me
openapi: 3.0.3
info:
  title: Identity
  version: 1.0.0
  description: >-
    Portão 3 identity API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). 4 app groups run without
    the identity authorizer; publicPatterns enumerates every route they expose,
    except POST /auth/sign-in, documented with HTTP Basic for the API-client
    credentials flow. Confidence tiers: generated:typed=45 copied:manual=0
    unknown=0.
servers:
  - url: https://api.identity.v2.portao3.com.br/
    description: production
  - url: https://api.identity.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Authentication
  - name: Current User
  - name: Custom Fields
  - name: API Clients
  - name: Users
  - name: Organizations
  - name: Groups
  - name: Realms
paths:
  /me:
    get:
      tags:
        - Current User
      summary: Get the current API client
      description: >-
        Returns the API client the access token belongs to, with the
        organizations it can act on.
      operationId: getMe
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the API client.
                    example: 43230779-2cfb-4525-a40c-77fbf15e68f0
                    format: uuid
                  email:
                    type: string
                    description: The API client's `clientId` followed by `@portao3.com.br`.
                    example: prod-client-v2@portao3.com.br
                  name:
                    type: string
                    description: The API client's `clientId`.
                    example: prod-client-v2
                  realm:
                    type: object
                    properties:
                      id:
                        type: string
                        description: ID of the realm.
                        example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
                        format: uuid
                      level:
                        type: string
                        enum:
                          - ADMIN
                          - USER
                          - APP_CLIENT
                        description: >-
                          Access level in the realm. Always `USER` for an API
                          client: it is an admin of its organizations
                          (`organizations[].level`), never of the realm.
                        example: USER
                    required:
                      - id
                      - level
                    description: The realm the API client belongs to.
                  status:
                    type: string
                    enum:
                      - IN_ONBOARDING
                      - CREATING
                      - ACTIVE
                      - DEACTIVATED
                      - BLOCKED
                    description: >-
                      Status of the API client. Tokens are only issued to
                      `ACTIVE` API clients, so it is always `ACTIVE` here.
                    example: ACTIVE
                  organizations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: ID of the organization.
                          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
                          format: uuid
                        level:
                          type: string
                          enum:
                            - ADMIN
                            - USER
                            - APP_CLIENT
                          description: >-
                            Access level in the organization. API clients are
                            organization admins; older API clients can still
                            carry `APP_CLIENT`.
                          example: ADMIN
                        status:
                          type: string
                          enum:
                            - CREATING
                            - AWAITING_BIOMETRIC_VALIDATION
                            - KYC_PENDING
                            - ACTIVE
                            - INACTIVE
                            - BLOCKED
                            - ERROR
                          description: >-
                            Status of the organization. Only `ACTIVE`
                            organizations can operate; `INACTIVE` and `BLOCKED`
                            ones deny every request.
                          example: ACTIVE
                        legalName:
                          type: string
                          description: Legal name.
                          example: Acme Comércio de Alimentos Ltda
                        tradingName:
                          type: string
                          description: Trade name. Empty when there is none.
                          example: Acme Alimentos
                        document:
                          type: string
                          description: CNPJ, digits only.
                          example: '12345678000195'
                        email:
                          type: string
                          description: Contact e-mail address.
                          example: financeiro@acme.com.br
                        phone:
                          type: string
                          description: Contact phone number in E.164 format.
                          example: '+551132654321'
                        address:
                          type: object
                          properties:
                            street:
                              type: string
                              description: Street name.
                              example: Avenida Paulista
                            number:
                              type: string
                              description: Street number.
                              example: '1578'
                            complement:
                              type: string
                              description: Address complement, when there is one.
                              example: Conjunto 42
                            neighborhood:
                              type: string
                              description: Neighborhood.
                              example: Bela Vista
                            city:
                              type: string
                              description: City.
                              example: São Paulo
                            state:
                              type: string
                              description: State.
                              example: SP
                            postalCode:
                              type: string
                              description: Postal code (CEP), formatted `00000-000`.
                              example: 01310-200
                            stateCode:
                              type: string
                              nullable: true
                              description: IBGE code of the state. `null` when unknown.
                              example: '35'
                            cityCode:
                              type: string
                              nullable: true
                              description: IBGE code of the city. `null` when unknown.
                              example: '3550308'
                          required:
                            - stateCode
                            - cityCode
                          description: Registered address.
                        walletProduct:
                          type: string
                          description: >-
                            Product the organization's wallets and cards run on:
                            `NORMAL`, `SUPER`, `BLACK`, `RETRANSFER`,
                            `PRODUCT_08` or `PRODUCT_09`.
                          example: NORMAL
                        isSuper:
                          type: boolean
                          description: Whether the organization is on the `SUPER` product.
                          example: false
                        external:
                          type: object
                          properties:
                            account:
                              type: string
                              description: >-
                                ID of the organization's account in the Banking
                                service — the `accountId` of the Banking
                                endpoints.
                              example: 1ffc63ec8f30faa86d28d79c
                          description: Related Portão 3 resources.
                      required:
                        - id
                        - status
                        - legalName
                        - email
                        - phone
                        - address
                        - external
                      description: An organization the API client can act on.
                    description: Organizations the API client can act on.
                required:
                  - id
                  - email
                  - name
                  - realm
                  - status
                  - organizations
                description: The authenticated API client.

````

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