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

# Get Segment Schema Catalog

> Get the fields and schema relationships available when building a tenant segment, including every schema reachable through a relationship hop.



## OpenAPI

````yaml GET /api/segments/schema-catalog
openapi: 3.0.0
info:
  title: Reach API
  version: 1.0.0
  description: API documentation for Reach platform
servers:
  - url: https://api.embedreach.com
    description: Production server
security: []
paths:
  /api/segments/schema-catalog:
    get:
      tags:
        - Segments
      summary: Get Segment Schema Catalog
      description: >-
        Get the fields and schema relationships available when building a tenant
        segment, including every schema reachable through a relationship hop.
      parameters:
        - name: reach-tenant-id
          in: header
          required: false
          schema:
            type: string
            description: >-
              If using a platform scoped JWT, you can pass in a header to
              impersonate a specific tenant to impersonate the request as.
      responses:
        '200':
          description: Status 200 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      contactSchemaId:
                        type: string
                        nullable: true
                        description: The schema mapped as the primary contact source
                      schemas:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: The schema id
                            name:
                              type: string
                              description: The schema name
                            description:
                              type: string
                              nullable: true
                              description: What this schema represents
                            fields:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    description: >-
                                      The field name, as referenced by segment
                                      conditions
                                  type:
                                    type: string
                                    enum:
                                      - string
                                      - number
                                      - boolean
                                      - date
                                      - array
                                      - reference
                                      - unknown
                                    description: >-
                                      The field type, which determines the
                                      operators offered for it
                                  label:
                                    type: string
                                    description: Human-readable field name
                                  description:
                                    type: string
                                    description: What the field represents
                                  enum:
                                    type: array
                                    items:
                                      type: string
                                    description: >-
                                      The allowed values, when the field is an
                                      enum
                                required:
                                  - name
                                  - type
                              description: The fields exposed for segmentation
                            externalIdField:
                              type: string
                              description: The field carrying the external identifier
                            displayMetadata:
                              type: object
                              nullable: true
                              properties:
                                icon:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - lucide
                                    value:
                                      type: string
                                      enum:
                                        - User
                                        - Users
                                        - Contact
                                        - Briefcase
                                        - Building2
                                        - Home
                                        - Store
                                        - MapPin
                                        - ShoppingCart
                                        - Receipt
                                        - CreditCard
                                        - DollarSign
                                        - Package
                                        - Box
                                        - Truck
                                        - Car
                                        - Calendar
                                        - Clock
                                        - Ticket
                                        - Wrench
                                        - ClipboardList
                                        - FileText
                                        - Mail
                                        - MessageSquare
                                        - Phone
                                        - Bell
                                        - Tag
                                        - Tags
                                        - Hash
                                        - Flag
                                        - Star
                                        - Heart
                                        - Award
                                        - Gift
                                        - CircleCheck
                                        - Zap
                                        - Sparkles
                                        - Layers
                                        - Database
                                        - Dog
                                  required:
                                    - type
                                    - value
                                color:
                                  type: string
                                  pattern: ^#[0-9a-fA-F]{6}$
                                reporting:
                                  type: object
                                  properties:
                                    status:
                                      type: object
                                      properties:
                                        path:
                                          type: string
                                          minLength: 1
                                          maxLength: 200
                                      required:
                                        - path
                                      additionalProperties: false
                                    effectiveDate:
                                      type: object
                                      properties:
                                        path:
                                          type: string
                                          minLength: 1
                                          maxLength: 200
                                      required:
                                        - path
                                      additionalProperties: false
                                    resourceLink:
                                      oneOf:
                                        - type: object
                                          properties:
                                            source:
                                              type: string
                                              enum:
                                                - field
                                            path:
                                              type: string
                                              minLength: 1
                                              maxLength: 200
                                          required:
                                            - source
                                            - path
                                          additionalProperties: false
                                        - type: object
                                          properties:
                                            source:
                                              type: string
                                              enum:
                                                - pattern
                                            pattern:
                                              type: string
                                              minLength: 1
                                              maxLength: 2048
                                          required:
                                            - source
                                            - pattern
                                          additionalProperties: false
                                  additionalProperties: false
                              additionalProperties: false
                              description: >-
                                Icon and color the partner set in Data
                                Integration
                          required:
                            - id
                            - name
                            - fields
                            - externalIdField
                        description: Every schema reachable for segmentation
                      relationships:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Stable identifier for this relationship
                            sourceSchemaId:
                              type: string
                              description: The schema holding the foreign key
                            targetSchemaId:
                              type: string
                              description: The schema the foreign key points at
                            foreignKeyPath:
                              type: string
                              description: JSON path of the referencing property
                            cardinality:
                              type: string
                              enum:
                                - one
                                - many
                              description: >-
                                Whether the source references one or many
                                targets
                            label:
                              type: string
                              description: Human-readable description of the hop
                          required:
                            - id
                            - sourceSchemaId
                            - targetSchemaId
                            - foreignKeyPath
                            - cardinality
                            - label
                        description: The hops between those schemas
                      contactFields:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: >-
                                The field name, as referenced by segment
                                conditions
                            type:
                              type: string
                              enum:
                                - string
                                - number
                                - boolean
                                - date
                                - array
                                - reference
                                - unknown
                              description: >-
                                The field type, which determines the operators
                                offered for it
                            label:
                              type: string
                              description: Human-readable field name
                            description:
                              type: string
                              description: What the field represents
                            enum:
                              type: array
                              items:
                                type: string
                              description: The allowed values, when the field is an enum
                          required:
                            - name
                            - type
                        description: Fields conditions may target on the contact itself
                    required:
                      - contactSchemaId
                      - schemas
                      - relationships
                      - contactFields
                required:
                  - success
        '400':
          description: Bad Request - Validation or request error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
                  message:
                    type: string
                    description: Error message describing what went wrong
                  errors:
                    type: array
                    items:
                      type: string
                    description: Optional array of specific validation errors
                required:
                  - message

````