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

# Get segment contacts

> Get contacts in a segment. For manual segments, returns contacts from the contact_segments join table. For data-driven segments, evaluates filter conditions at query time.



## OpenAPI

````yaml /openapi.json get /v1/segments/{id}/contacts
openapi: 3.0.3
info:
  title: Emailr API
  version: 1.0.0
servers:
  - url: https://api.emailr.dev
    description: Production
security: []
tags:
  - name: emails
    description: Email sending and management
  - name: contacts
    description: Contact management
  - name: templates
    description: Email template management
  - name: domains
    description: Domain verification and management
  - name: webhooks
    description: Webhook configuration
  - name: broadcasts
    description: Broadcast campaign management
  - name: segments
    description: Contact segmentation
paths:
  /v1/segments/{id}/contacts:
    get:
      tags:
        - segments
      summary: Get segment contacts
      description: >-
        Get contacts in a segment. For manual segments, returns contacts from
        the contact_segments join table. For data-driven segments, evaluates
        filter conditions at query time.
      operationId: getSegmentContacts
      parameters:
        - schema:
            type: string
            format: uuid
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          name: id
          in: path
        - schema:
            type: string
            description: 'Maximum number of contacts to return (default: 100, max: 1000)'
            example: '100'
          required: false
          name: limit
          in: query
        - schema:
            type: string
            description: Number of contacts to skip for pagination
            example: '0'
          required: false
          name: offset
          in: query
      responses:
        '200':
          description: Paginated list of contacts in the segment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentContactsResponse'
        '404':
          description: Segment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    SegmentContactsResponse:
      type: object
      properties:
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
        total:
          type: integer
          description: Total number of contacts in the segment
          example: 150
        limit:
          type: integer
          example: 100
        offset:
          type: integer
          example: 0
      required:
        - contacts
        - total
        - limit
        - offset
    Error:
      type: object
      properties:
        error:
          type: string
          example: An error occurred
        code:
          type: string
          example: VALIDATION_ERROR
        details: {}
      required:
        - error
    Contact:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        organization_id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        metadata:
          type: object
          nullable: true
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
            description: >-
              Property value supporting string, number, boolean, or date (as ISO
              string) types
            nullable: true
          description: >-
            Custom properties for the contact. Supports string, number, boolean,
            and date (as ISO string) values.
        subscribed:
          type: boolean
        unsubscribed_at:
          type: string
          nullable: true
          format: date-time
        tags:
          type: array
          items:
            type: string
          description: Tags for categorization.
          example:
            - newsletter
            - vip
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - organization_id
        - email
        - first_name
        - last_name
        - metadata
        - subscribed
        - unsubscribed_at
        - tags
        - created_at
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API key authentication. Use your API key as the bearer token.

````