> ## Documentation Index
> Fetch the complete documentation index at: https://myco-29fc6df6-sweetmantech-myc-3925-docs-document-the-apiar.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Artist Segments

> Retrieve all segments associated with an artist. This endpoint should be called before using the Segment Fans endpoint to obtain the necessary segment IDs. Supports pagination.



## OpenAPI

````yaml GET /api/artist/segments
openapi: 3.1.0
info:
  title: Recoup API
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://recoup-api.vercel.app
security:
  - apiKeyAuth: []
paths:
  /api/artist/segments:
    get:
      description: >-
        Retrieve all segments associated with an artist. This endpoint should be
        called before using the Segment Fans endpoint to obtain the necessary
        segment IDs. Supports pagination.
      parameters:
        - name: artist_account_id
          in: query
          description: The unique identifier of the artist account to fetch segments for
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          description: 'The page number to retrieve (default: 1)'
          required: false
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          description: 'The number of records per page (default: 20, max: 100)'
          required: false
          schema:
            type: integer
            default: 20
            maximum: 100
      responses:
        '200':
          description: Segments retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSegmentsResponse'
        '400':
          description: Bad request - missing required parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSegmentsErrorResponse'
components:
  schemas:
    ArtistSegmentsResponse:
      type: object
      required:
        - status
        - segments
        - pagination
      properties:
        status:
          type: string
          enum:
            - success
          description: Status of the request
        segments:
          type: array
          items:
            $ref: '#/components/schemas/ArtistSegment'
          description: List of segment objects associated with the artist
        pagination:
          $ref: '#/components/schemas/ArtistSegmentsPagination'
          description: Pagination metadata for the response
    ArtistSegmentsErrorResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
          description: Status of the request
        message:
          type: string
          description: Error message describing what went wrong
    ArtistSegment:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the artist_segments record
        artist_account_id:
          type: string
          format: uuid
          description: UUID of the artist's accounts record
        segment_id:
          type: string
          format: uuid
          description: UUID of the segments record
        updated_at:
          type: string
          format: date-time
          description: ISO timestamp of when the segment data was last updated
        segment_name:
          type: string
          description: Name of the segment (e.g., 'Twitter Followers')
        artist_name:
          type: string
          description: Name of the artist
    ArtistSegmentsPagination:
      type: object
      properties:
        total_count:
          type: integer
          description: Total number of segments available
        page:
          type: integer
          description: Current page number
        limit:
          type: integer
          description: Number of segments per page
        total_pages:
          type: integer
          description: Total number of pages available
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).

````