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

# Get groups

> Get all groups for a topic



## OpenAPI

````yaml /api-reference/openapi.json get /topics/{topicId}/groups
openapi: 3.1.1
info:
  description: >-
    The public Modem API. Authenticate with an organization API key:
    `Authorization: Bearer modem_…`.
  title: Modem API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.modem.dev/v1
security:
  - bearerAuth: []
paths:
  /topics/{topicId}/groups:
    get:
      tags:
        - Topics
      summary: Get groups
      description: Get all groups for a topic
      operationId: topics.getGroups
      parameters:
        - in: path
          name: topicId
          required: true
          schema:
            anyOf:
              - format: uuid
                type: string
              - format: uuid
                type: string
        - allowEmptyValue: true
          allowReserved: true
          in: query
          name: order
          required: false
          schema:
            default: desc
            enum:
              - asc
              - desc
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      properties:
                        group:
                          properties:
                            archivedAt:
                              anyOf:
                                - format: date-time
                                  type: string
                                - type: 'null'
                              description: Timestamp when the group was archived.
                              title: Archived At
                            endTimestamp:
                              description: Timestamp for the end of the group time range.
                              title: End Timestamp
                            id:
                              anyOf:
                                - format: uuid
                                  type: string
                                - format: uuid
                                  type: string
                            similarityAtAssignment:
                              type: number
                            startTimestamp:
                              description: Timestamp for the start of the group time range.
                              title: Start Timestamp
                            title:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Human-readable title from the group AI metadata,
                                when available.
                              title: Group Title
                          required:
                            - id
                            - title
                          type: object
                        messages:
                          items:
                            allOf:
                              - properties:
                                  content:
                                    description: Full text content of the message.
                                    title: Content
                                    type: string
                                  createdAt:
                                    description: Timestamp when the message was created.
                                    format: date-time
                                    title: Created At
                                    type: string
                                  deletedAt:
                                    anyOf:
                                      - format: date-time
                                        type: string
                                      - type: 'null'
                                    description: >-
                                      Timestamp when the message was deleted, if
                                      applicable.
                                    title: Deleted At
                                  editedAt:
                                    anyOf:
                                      - format: date-time
                                        type: string
                                      - type: 'null'
                                    description: >-
                                      Timestamp when the message was last
                                      edited.
                                    title: Edited At
                                  id:
                                    anyOf:
                                      - format: uuid
                                        type: string
                                      - format: uuid
                                        type: string
                                  isInternal:
                                    description: >-
                                      Whether the message is an internal,
                                      team-only note withheld from the
                                      external/customer party (e.g. an internal
                                      agent note).
                                    title: Is Internal
                                    type: boolean
                                  metadata:
                                    anyOf:
                                      - additionalProperties: {}
                                        propertyNames:
                                          type: string
                                        type: object
                                      - type: 'null'
                                    description: >-
                                      Additional metadata captured for the
                                      message.
                                    title: Metadata
                                  replyToId:
                                    anyOf:
                                      - format: uuid
                                        type: string
                                      - type: 'null'
                                    description: >-
                                      Internal message ID that this message
                                      replies to.
                                    title: Reply To ID
                                  sourceMessageId:
                                    description: >-
                                      Identifier of the message in the source
                                      system.
                                    title: Source Message ID
                                    type: string
                                  sourceMessageType:
                                    description: Type/classification of the source message.
                                    title: Source Message Type
                                    type: string
                                  sourceName:
                                    description: >-
                                      Source system the message was ingested
                                      from.
                                    pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                                    title: Source Name
                                    type: string
                                  sourceReplyToId:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                    description: >-
                                      Source system ID of the message being
                                      replied to.
                                    title: Source Reply To ID
                                  sourceThreadId:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                    description: Thread identifier in the source system.
                                    title: Source Thread ID
                                  sourceUrl:
                                    anyOf:
                                      - format: uri
                                        type: string
                                      - type: 'null'
                                    description: >-
                                      URL linking to the original message when
                                      available.
                                    title: Source URL
                                  threadId:
                                    anyOf:
                                      - format: uuid
                                        type: string
                                      - type: 'null'
                                    description: >-
                                      Internal thread identifier when
                                      applicable.
                                    title: Thread ID
                                  title:
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                    description: Optional title of the message.
                                    title: Title
                                required:
                                  - content
                                  - id
                                  - isInternal
                                  - metadata
                                  - replyToId
                                  - sourceMessageId
                                  - sourceMessageType
                                  - sourceName
                                  - sourceReplyToId
                                  - sourceThreadId
                                  - sourceUrl
                                  - threadId
                                  - title
                                type: object
                              - properties:
                                  author:
                                    anyOf:
                                      - properties:
                                          displayName:
                                            anyOf:
                                              - type: string
                                              - type: 'null'
                                            description: Optional display name for the author.
                                            title: Display Name
                                          id:
                                            anyOf:
                                              - format: uuid
                                                type: string
                                              - format: uuid
                                                type: string
                                          isBot:
                                            description: Whether the author is a bot account.
                                            title: Is Bot
                                            type: boolean
                                          sourceAuthorId:
                                            description: Author identifier in the source system.
                                            title: Source Author ID
                                            type: string
                                          sourceAvatarUrl:
                                            anyOf:
                                              - format: uri
                                                type: string
                                              - type: 'null'
                                            description: Avatar image URL from the source system.
                                            title: Source Avatar URL
                                          sourceName:
                                            description: >-
                                              Source system where the author
                                              originates.
                                            pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                                            title: Source Name
                                            type: string
                                        required:
                                          - displayName
                                          - id
                                          - isBot
                                          - sourceAuthorId
                                          - sourceAvatarUrl
                                          - sourceName
                                        type: object
                                      - type: 'null'
                                  channel:
                                    anyOf:
                                      - properties:
                                          channelName:
                                            type: string
                                          id:
                                            type: string
                                          serverName:
                                            type: string
                                        required:
                                          - channelName
                                          - id
                                          - serverName
                                        type: object
                                      - type: 'null'
                                  quoteHighlights:
                                    items:
                                      properties:
                                        confidence:
                                          maximum: 1
                                          minimum: 0
                                          type: number
                                        content:
                                          type: string
                                      required:
                                        - confidence
                                        - content
                                      type: object
                                    type: array
                                  reactions:
                                    items:
                                      properties:
                                        count:
                                          description: Number of times this reaction was used.
                                          exclusiveMinimum: 0
                                          title: Count
                                          type: integer
                                        identifier:
                                          description: >-
                                            Normalized reaction identifier (e.g.,
                                            "thumbsup", "heart").
                                          title: Identifier
                                          type: string
                                        messageId:
                                          anyOf:
                                            - format: uuid
                                              type: string
                                            - format: uuid
                                              type: string
                                          description: >-
                                            ID of the message this reaction belongs
                                            to.
                                          title: Message ID
                                        unicode:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                          description: >-
                                            Unicode representation of the emoji if
                                            applicable.
                                          title: Unicode
                                      required:
                                        - count
                                        - identifier
                                        - messageId
                                        - unicode
                                      type: object
                                    type: array
                                  replyTo:
                                    anyOf:
                                      - allOf:
                                          - properties:
                                              content:
                                                description: Full text content of the message.
                                                title: Content
                                                type: string
                                              createdAt:
                                                description: Timestamp when the message was created.
                                                format: date-time
                                                title: Created At
                                                type: string
                                              deletedAt:
                                                anyOf:
                                                  - format: date-time
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  Timestamp when the message was deleted,
                                                  if applicable.
                                                title: Deleted At
                                              editedAt:
                                                anyOf:
                                                  - format: date-time
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  Timestamp when the message was last
                                                  edited.
                                                title: Edited At
                                              id:
                                                anyOf:
                                                  - format: uuid
                                                    type: string
                                                  - format: uuid
                                                    type: string
                                              isInternal:
                                                description: >-
                                                  Whether the message is an internal,
                                                  team-only note withheld from the
                                                  external/customer party (e.g. an
                                                  internal agent note).
                                                title: Is Internal
                                                type: boolean
                                              metadata:
                                                anyOf:
                                                  - additionalProperties: {}
                                                    propertyNames:
                                                      type: string
                                                    type: object
                                                  - type: 'null'
                                                description: >-
                                                  Additional metadata captured for the
                                                  message.
                                                title: Metadata
                                              replyToId:
                                                anyOf:
                                                  - format: uuid
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  Internal message ID that this message
                                                  replies to.
                                                title: Reply To ID
                                              sourceMessageId:
                                                description: >-
                                                  Identifier of the message in the source
                                                  system.
                                                title: Source Message ID
                                                type: string
                                              sourceMessageType:
                                                description: >-
                                                  Type/classification of the source
                                                  message.
                                                title: Source Message Type
                                                type: string
                                              sourceName:
                                                description: >-
                                                  Source system the message was ingested
                                                  from.
                                                pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                                                title: Source Name
                                                type: string
                                              sourceReplyToId:
                                                anyOf:
                                                  - type: string
                                                  - type: 'null'
                                                description: >-
                                                  Source system ID of the message being
                                                  replied to.
                                                title: Source Reply To ID
                                              sourceThreadId:
                                                anyOf:
                                                  - type: string
                                                  - type: 'null'
                                                description: Thread identifier in the source system.
                                                title: Source Thread ID
                                              sourceUrl:
                                                anyOf:
                                                  - format: uri
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  URL linking to the original message when
                                                  available.
                                                title: Source URL
                                              threadId:
                                                anyOf:
                                                  - format: uuid
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  Internal thread identifier when
                                                  applicable.
                                                title: Thread ID
                                              title:
                                                anyOf:
                                                  - type: string
                                                  - type: 'null'
                                                description: Optional title of the message.
                                                title: Title
                                            required:
                                              - content
                                              - id
                                              - isInternal
                                              - metadata
                                              - replyToId
                                              - sourceMessageId
                                              - sourceMessageType
                                              - sourceName
                                              - sourceReplyToId
                                              - sourceThreadId
                                              - sourceUrl
                                              - threadId
                                              - title
                                            type: object
                                          - properties:
                                              author:
                                                anyOf:
                                                  - properties:
                                                      displayName:
                                                        anyOf:
                                                          - type: string
                                                          - type: 'null'
                                                        description: Optional display name for the author.
                                                        title: Display Name
                                                      id:
                                                        anyOf:
                                                          - format: uuid
                                                            type: string
                                                          - format: uuid
                                                            type: string
                                                      isBot:
                                                        description: Whether the author is a bot account.
                                                        title: Is Bot
                                                        type: boolean
                                                      sourceAuthorId:
                                                        description: Author identifier in the source system.
                                                        title: Source Author ID
                                                        type: string
                                                      sourceAvatarUrl:
                                                        anyOf:
                                                          - format: uri
                                                            type: string
                                                          - type: 'null'
                                                        description: Avatar image URL from the source system.
                                                        title: Source Avatar URL
                                                      sourceName:
                                                        description: >-
                                                          Source system where the author
                                                          originates.
                                                        pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                                                        title: Source Name
                                                        type: string
                                                    required:
                                                      - displayName
                                                      - id
                                                      - isBot
                                                      - sourceAuthorId
                                                      - sourceAvatarUrl
                                                      - sourceName
                                                    type: object
                                                  - type: 'null'
                                            required:
                                              - author
                                            type: object
                                      - type: 'null'
                                  thread:
                                    anyOf:
                                      - allOf:
                                          - properties:
                                              content:
                                                description: Full text content of the message.
                                                title: Content
                                                type: string
                                              createdAt:
                                                description: Timestamp when the message was created.
                                                format: date-time
                                                title: Created At
                                                type: string
                                              deletedAt:
                                                anyOf:
                                                  - format: date-time
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  Timestamp when the message was deleted,
                                                  if applicable.
                                                title: Deleted At
                                              editedAt:
                                                anyOf:
                                                  - format: date-time
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  Timestamp when the message was last
                                                  edited.
                                                title: Edited At
                                              id:
                                                anyOf:
                                                  - format: uuid
                                                    type: string
                                                  - format: uuid
                                                    type: string
                                              isInternal:
                                                description: >-
                                                  Whether the message is an internal,
                                                  team-only note withheld from the
                                                  external/customer party (e.g. an
                                                  internal agent note).
                                                title: Is Internal
                                                type: boolean
                                              metadata:
                                                anyOf:
                                                  - additionalProperties: {}
                                                    propertyNames:
                                                      type: string
                                                    type: object
                                                  - type: 'null'
                                                description: >-
                                                  Additional metadata captured for the
                                                  message.
                                                title: Metadata
                                              replyToId:
                                                anyOf:
                                                  - format: uuid
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  Internal message ID that this message
                                                  replies to.
                                                title: Reply To ID
                                              sourceMessageId:
                                                description: >-
                                                  Identifier of the message in the source
                                                  system.
                                                title: Source Message ID
                                                type: string
                                              sourceMessageType:
                                                description: >-
                                                  Type/classification of the source
                                                  message.
                                                title: Source Message Type
                                                type: string
                                              sourceName:
                                                description: >-
                                                  Source system the message was ingested
                                                  from.
                                                pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                                                title: Source Name
                                                type: string
                                              sourceReplyToId:
                                                anyOf:
                                                  - type: string
                                                  - type: 'null'
                                                description: >-
                                                  Source system ID of the message being
                                                  replied to.
                                                title: Source Reply To ID
                                              sourceThreadId:
                                                anyOf:
                                                  - type: string
                                                  - type: 'null'
                                                description: Thread identifier in the source system.
                                                title: Source Thread ID
                                              sourceUrl:
                                                anyOf:
                                                  - format: uri
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  URL linking to the original message when
                                                  available.
                                                title: Source URL
                                              threadId:
                                                anyOf:
                                                  - format: uuid
                                                    type: string
                                                  - type: 'null'
                                                description: >-
                                                  Internal thread identifier when
                                                  applicable.
                                                title: Thread ID
                                              title:
                                                anyOf:
                                                  - type: string
                                                  - type: 'null'
                                                description: Optional title of the message.
                                                title: Title
                                            required:
                                              - content
                                              - id
                                              - isInternal
                                              - metadata
                                              - replyToId
                                              - sourceMessageId
                                              - sourceMessageType
                                              - sourceName
                                              - sourceReplyToId
                                              - sourceThreadId
                                              - sourceUrl
                                              - threadId
                                              - title
                                            type: object
                                          - properties:
                                              author:
                                                anyOf:
                                                  - properties:
                                                      displayName:
                                                        anyOf:
                                                          - type: string
                                                          - type: 'null'
                                                        description: Optional display name for the author.
                                                        title: Display Name
                                                      id:
                                                        anyOf:
                                                          - format: uuid
                                                            type: string
                                                          - format: uuid
                                                            type: string
                                                      isBot:
                                                        description: Whether the author is a bot account.
                                                        title: Is Bot
                                                        type: boolean
                                                      sourceAuthorId:
                                                        description: Author identifier in the source system.
                                                        title: Source Author ID
                                                        type: string
                                                      sourceAvatarUrl:
                                                        anyOf:
                                                          - format: uri
                                                            type: string
                                                          - type: 'null'
                                                        description: Avatar image URL from the source system.
                                                        title: Source Avatar URL
                                                      sourceName:
                                                        description: >-
                                                          Source system where the author
                                                          originates.
                                                        pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                                                        title: Source Name
                                                        type: string
                                                    required:
                                                      - displayName
                                                      - id
                                                      - isBot
                                                      - sourceAuthorId
                                                      - sourceAvatarUrl
                                                      - sourceName
                                                    type: object
                                                  - type: 'null'
                                            required:
                                              - author
                                            type: object
                                      - type: 'null'
                                required:
                                  - author
                                  - channel
                                  - reactions
                                  - replyTo
                                  - thread
                                type: object
                          type: array
                      required:
                        - group
                        - messages
                      type: object
                    type: array
                required:
                  - data
                type: object
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid request (validation failed).
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid API key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The API key does not have access to this resource.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The requested resource was not found.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate limit exceeded.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error.
components:
  schemas:
    Error:
      properties:
        code:
          description: Machine-readable error code, e.g. `NOT_FOUND`.
          examples:
            - NOT_FOUND
          type: string
        data:
          description: Optional structured error details.
        defined:
          description: True if the error was declared in the procedure contract.
          type: boolean
        message:
          description: Human-readable error message.
          type: string
        status:
          description: HTTP status code.
          examples:
            - 404
          type: integer
      required:
        - code
        - defined
        - message
        - status
      type: object
  securitySchemes:
    bearerAuth:
      description: Organization API key (`modem_…`).
      scheme: bearer
      type: http

````