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

# Get Post Children

> Get children posts by type

<Warning>If no `postType` is passed, all posts that has the same `parentId` will be fetched.</Warning>
<Tip>This API is useful if you are fetching post type of `repost` or `quote`</Tip>


## OpenAPI

````yaml GET /post/children
openapi: 3.0.1
info:
  title: Post API
  description: API for managing posts with media file uploads
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://our-secret-api-url.com
security: []
paths:
  /post/children:
    get:
      description: Get children posts by type
      parameters:
        - name: parentId
          in: query
          required: true
          schema:
            type: integer
          description: The ID of the parent post.
        - name: postType
          in: query
          required: false
          schema:
            type: string
            enum:
              - post
              - quote
              - reply
              - repost
          description: The type of the post.
      responses:
        '200':
          description: A list of posts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostByType'
        '500':
          description: Failed to retrieve posts by type.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
components:
  schemas:
    PostByType:
      type: object
      properties:
        id:
          type: integer
          description: ID of the post.
        snowflakeId:
          type: string
          description: Snowflake ID of the post.
        user:
          $ref: '#/components/schemas/FeedUser'
        parent:
          $ref: '#/components/schemas/PostByType'
        parentId:
          type: integer
          nullable: true
          description: ID of the parent post.
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp of the post.
        userId:
          type: integer
          description: ID of the user who created the post.
        content:
          type: string
          nullable: true
          description: Content of the post.
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp of the post.
        type:
          type: string
          enum:
            - post
            - quote
            - reply
            - repost
          description: Type of the post.
        originalId:
          type: integer
          nullable: true
          description: ID of the original post if this is a repost or quote.
        hashtags:
          type: array
          items:
            type: string
        media:
          type: array
          items:
            $ref: '#/components/schemas/Media'
        repostsCount:
          type: integer
          description: Number of reposts.
        reposts:
          type: array
          items:
            type: integer
        repliesCount:
          type: integer
          description: Number of replies.
    FeedUser:
      type: object
      properties:
        id:
          type: integer
          description: ID of the user.
        username:
          type: string
          description: Username of the user.
        avatarUrl:
          type: string
          description: Avatar URL of the user.
    Media:
      type: object
      properties:
        id:
          type: integer
          description: ID of the media.
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp of the media.
        postId:
          type: integer
          description: ID of the post this media belongs to.
        mediaUrl:
          type: string
          description: URL of the media.
        mimeType:
          type: string
          description: MIME type of the media.

````