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

# List custom fields

> Lists the organization's custom-field definitions, newest first.

Filter by `status`, `type`, `location`, `slugs`, `ids`, `required` or a case-insensitive `label` match. Deactivated definitions are included unless you filter on `status`. A list filter takes its values comma-separated (`?type=SELECT,TEXT`); repeating the parameter (`?type=SELECT&type=TEXT`) works too.


## OpenAPI

````yaml /api-reference/identity.openapi.json get /realms/{realmId}/organizations/{organizationId}/custom-fields
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:
  /realms/{realmId}/organizations/{organizationId}/custom-fields:
    get:
      tags:
        - Custom Fields
      summary: List custom fields
      description: Lists the organization's custom-field definitions, newest first.
      operationId: getRealmsByRealmIdOrganizationsByOrganizationIdCustomFields
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: |-
            ID of your organization.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: ids
          in: query
          required: false
          description: >-
            Only the fields with these IDs.


            ---


            Example (comma-separated list):
            `?ids=9c4f0a2e-7b3d-4e8a-a1f5-2d6c8b0e4a71,29bfc458-6d62-4e37-9a89-dc620926bae5`
          schema:
            maxItems: 500
            type: array
            items:
              type: string
          style: form
          explode: false
        - name: slugs
          in: query
          required: false
          description: |-
            Only the fields with these slugs (exact match).

            ---

            Example (comma-separated list): `?slugs=centro-de-custo,projeto`
          schema:
            maxItems: 500
            type: array
            items:
              type: string
          style: form
          explode: false
        - name: status
          in: query
          required: false
          description: >-
            Only fields in this status. Omit to list active and deactivated
            fields alike.
          schema:
            type: string
            enum:
              - ACTIVE
              - DEACTIVATED
          example: ACTIVE
        - name: type
          in: query
          required: false
          description: |-
            Only fields of these value types.

            ---

            Example (comma-separated list): `?type=SELECT,TEXT`
          schema:
            type: array
            items:
              type: string
              enum:
                - TEXT
                - NUMBER
                - DATE
                - BOOLEAN
                - SELECT
                - MULTI_SELECT
                - CUSTOMER
                - FILE
                - MULTI_FILE
          style: form
          explode: false
        - name: location
          in: query
          required: false
          description: |-
            Only fields attached to at least one of these entities.

            ---

            Example (comma-separated list): `?location=TRANSACTION,CARD`
          schema:
            type: array
            items:
              type: string
              enum:
                - TRANSACTION
                - CARD
                - WALLET
                - CUSTOMER
                - TRIP
                - TRAVEL_PASSENGER
                - USER
                - VEHICLE
          style: form
          explode: false
        - name: label
          in: query
          required: false
          description: Only fields whose label contains this text (case-insensitive).
          schema:
            type: string
            maxLength: 200
          example: centro
        - name: required
          in: query
          required: false
          description: Only required (`true`) or optional (`false`) fields.
          schema:
            type: boolean
          example: true
        - name: limit
          in: query
          required: false
          description: Page size, 1–100. Defaults to 15.
          schema:
            type: integer
            minimum: 1
            maximum: 100
          example: 15
        - name: next
          in: query
          required: false
          description: >-
            Cursor returned as `next` by the previous page. Omit for the first
            page.
          schema:
            type: string
          example: NjhkM2YxYTJjNGI1ZTZmN2E4YjljMGQx
        - name: order
          in: query
          required: false
          description: >-
            Sort direction (case-insensitive). Applied only together with
            `orderBy`.
          schema:
            type: string
            enum:
              - ASC
              - DESC
          example: DESC
        - name: orderBy
          in: query
          required: false
          description: >-
            Field to sort by, applied only together with `order`. Omitted:
            newest first. Prefer `slug` (unique) over `label` for an
            alphabetical order: pages may repeat rows when several fields share
            the same label.
          schema:
            type: string
            enum:
              - createdAt
              - updatedAt
              - label
              - slug
          example: createdAt
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier of the custom field.
                          example: 9c4f0a2e-7b3d-4e8a-a1f5-2d6c8b0e4a71
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - DEACTIVATED
                          description: >-
                            `ACTIVE` fields are rendered and validated on the
                            entities listed in `location`. `DEACTIVATED` fields
                            are hidden from new entries while their stored
                            values stay readable. Changed only through the
                            activate and deactivate endpoints.
                          example: ACTIVE
                        realm:
                          type: string
                          description: Realm the field belongs to.
                          example: 6f1d2c3b-4a5e-4f60-9b7c-8d9e0f1a2b3c
                        organization:
                          type: string
                          description: Organization the field belongs to.
                          example: 0b8e7d6c-5a4f-4e3d-9c2b-1a0f9e8d7c6b
                        label:
                          type: string
                          description: >-
                            Human-readable name shown wherever the field is
                            rendered.
                          example: Centro de custo
                        slug:
                          type: string
                          description: >-
                            Stable key of the field: the property name under
                            which its value is stored in the `customFields` map
                            of transactions, cards, wallets, users and the other
                            entities in `location`. Unique per organization and
                            immutable after creation.
                          example: centro-de-custo
                        type:
                          type: string
                          enum:
                            - TEXT
                            - NUMBER
                            - DATE
                            - BOOLEAN
                            - SELECT
                            - MULTI_SELECT
                            - CUSTOMER
                            - FILE
                            - MULTI_FILE
                          description: >-
                            Value type the field accepts. Immutable after
                            creation.
                          example: SELECT
                        values:
                          type: array
                          items:
                            type: object
                            properties:
                              value:
                                type: string
                                description: >-
                                  Stored identifier of the option — the value
                                  written to the entity's `customFields` map
                                  when this option is chosen. Immutable, and
                                  unique within the field on creation. A few
                                  definitions created before that rule still
                                  carry a repeated `value` (each occurrence with
                                  its own label and `_id`), and updates preserve
                                  them — treat `values` as an ordered list, not
                                  as a map keyed by `value`.
                                example: marketing
                              label:
                                type: string
                                description: Display text of the option.
                                example: Marketing
                              description:
                                type: string
                                description: >-
                                  Optional help text for the option. Empty when
                                  none was given.
                                example: Campanhas e eventos
                              status:
                                type: string
                                enum:
                                  - ACTIVE
                                  - DEACTIVATED
                                description: >-
                                  `ACTIVE` options can be selected.
                                  `DEACTIVATED` options are kept so historical
                                  values still render, but can no longer be
                                  chosen.
                                example: ACTIVE
                              _id:
                                type: string
                                description: >-
                                  Internal identifier assigned when the option
                                  is stored. Present on reads (get, list,
                                  activate, deactivate); absent on the create
                                  response and, on an update response, for an
                                  option that request has just appended — the
                                  update returns what it wrote, so fetch the
                                  field again if you need the new option's
                                  `_id`. Ignored on writes: match options by
                                  `value`.
                                example: 68d3f1a2c4b5e6f7a8b9c0d1
                            required:
                              - value
                              - label
                            description: >-
                              One selectable option of a `SELECT` /
                              `MULTI_SELECT` custom field.
                          description: >-
                            Selectable options of a `SELECT` / `MULTI_SELECT`
                            field. Normally empty for the other types.
                        location:
                          type: array
                          items:
                            type: string
                            enum:
                              - TRANSACTION
                              - CARD
                              - WALLET
                              - CUSTOMER
                              - TRIP
                              - TRAVEL_PASSENGER
                              - USER
                              - VEHICLE
                            example: TRANSACTION
                          description: >-
                            Entities the field is attached to. A value is
                            accepted — and, when `required` is true, demanded —
                            on each listed entity.


                            ---


                            Example: `["TRANSACTION","CARD"]`
                        mask:
                          type: string
                          description: >-
                            Display format of a `NUMBER` field: `NONE` (plain
                            number), `BRL` (Brazilian reais), `USD` (US dollars)
                            or `PERCENT`. Empty for the other types.
                          example: BRL
                        required:
                          type: boolean
                          description: >-
                            Whether a value must be provided on every entity
                            listed in `location`.
                          example: true
                        description:
                          type: string
                          description: >-
                            Optional help text shown alongside the field. Empty
                            when none was given.
                          example: Centro de custo responsável pela despesa
                        createdBy:
                          type: string
                          description: ID of the user who created the field.
                          example: 3e2d1c0b-9a8f-4e7d-8c6b-5a4f3e2d1c0b
                        updatedBy:
                          type: string
                          description: ID of the user who last changed the field.
                          example: 3e2d1c0b-9a8f-4e7d-8c6b-5a4f3e2d1c0b
                        createdAt:
                          type: string
                          description: When the field was created (ISO 8601, UTC).
                          example: '2026-09-02T14:21:05.318Z'
                        updatedAt:
                          type: string
                          description: When the field was last changed (ISO 8601, UTC).
                          example: '2026-09-18T09:07:44.902Z'
                      required:
                        - id
                        - status
                        - realm
                        - organization
                        - label
                        - slug
                        - type
                        - values
                        - location
                        - mask
                        - required
                        - description
                        - createdBy
                        - updatedBy
                      description: A custom-field definition.
                    description: >-
                      The definitions on this page, newest first unless
                      `orderBy` was given.
                  next:
                    type: string
                    nullable: true
                    description: >-
                      Opaque cursor of the next page — pass it as the `next`
                      query parameter. `null` on the last page.
                    example: NjhkM2YxYTJjNGI1ZTZmN2E4YjljMGQx
                required:
                  - items
                  - next
                description: One page of custom-field definitions.
        '422':
          description: >-
            `BAD_REQUEST` — A path or query parameter is invalid; `fields` lists
            each offending parameter.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - IDENTITY
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: IDENTITY
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: ids
                    message: 'Too big: expected array to have <=500 items'
                    code: IDS_MAX

````

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