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

> ## Agent Instructions
> Base URL: https://api.social-api.ai/v1. Send your API key in the Authorization header: Authorization: Bearer <your API key>.
> Every error response from /v1 is JSON: { "error": { "code", "message", "meta" (optional) }, "request_id" }. Branch on error.code; use error.message only for logs.
> A 429 response carries a Retry-After header, in seconds, when the limit has a known wait. Authenticated responses can carry X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset for the per-minute request budget your SocialAPI account shares across every API key (see /guides/rate-limits).
> Paginated list endpoints return next_cursor, at the top level or inside pagination (see /guides/pagination). Pass it as the cursor query parameter to get the next page. An absent or empty next_cursor means you have the last page.
> Treat every ID as an opaque string: do not parse it or assume a format.
> Support differs by platform and by operation. Check /platforms/overview before assuming an operation works on a platform. An unsupported operation returns 501 with error.code resource.not_supported.

# Send a private reply to a commenter

> Sends a direct message to the author of a comment. Only supported on Instagram and Facebook. Meta allows one private reply per comment, within 7 days of the comment; a second attempt or an expired window returns HTTP 400 with error code platform.instagram.private_reply_ineligible or platform.facebook.private_reply_ineligible. Once a comment has spent its one reply, or the comment is older than 7 days, further attempts are refused and do not count against your outbound message rate; the error carries a reason of already_replied, platform_refused or window_expired. The 400 is terminal: retrying it will never succeed. Set buttons (1 to 3) to send the reply as a button template with text as its body; a tap on a postback button arrives as a dm.postback event. Set attachment instead of text to send one image, video, audio or file: a private reply is a single message, so it carries either text (with optional buttons) or one attachment, never both. You cannot message the commenter again until they respond; once they do, the conversation continues within the standard 24-hour messaging window. Check the can_private_reply capability flag.



## OpenAPI

````yaml /api-reference/openapi.json post /inbox/comments/{postId}/{commentId}/private-reply
openapi: 3.0.0
info:
  description: >-
    Unified social media inbox API. Read and respond to comments, DMs, reviews,
    and mentions across Instagram, Facebook, Threads, Google Business Profile,
    TikTok, LinkedIn, and YouTube through a single REST API. X/Twitter and
    Trustpilot coming soon.
  title: SocialAPI.AI
  contact:
    name: SocialAPI.AI Support
    email: support@social-api.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.social-api.ai/v1
security: []
paths:
  /inbox/comments/{postId}/{commentId}/private-reply:
    post:
      tags:
        - Inbox Comments
      summary: Send a private reply to a commenter
      description: >-
        Sends a direct message to the author of a comment. Only supported on
        Instagram and Facebook. Meta allows one private reply per comment,
        within 7 days of the comment; a second attempt or an expired window
        returns HTTP 400 with error code
        platform.instagram.private_reply_ineligible or
        platform.facebook.private_reply_ineligible. Once a comment has spent its
        one reply, or the comment is older than 7 days, further attempts are
        refused and do not count against your outbound message rate; the error
        carries a reason of already_replied, platform_refused or window_expired.
        The 400 is terminal: retrying it will never succeed. Set buttons (1 to
        3) to send the reply as a button template with text as its body; a tap
        on a postback button arrives as a dm.postback event. Set attachment
        instead of text to send one image, video, audio or file: a private reply
        is a single message, so it carries either text (with optional buttons)
        or one attachment, never both. You cannot message the commenter again
        until they respond; once they do, the conversation continues within the
        standard 24-hour messaging window. Check the can_private_reply
        capability flag.
      parameters:
        - example: '17895695668004550'
          description: Platform post ID
          name: postId
          in: path
          required: true
          schema:
            type: string
        - example: '17858893269577012'
          description: Platform comment ID
          name: commentId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api_endpoints.PrivateReplyRequest'
        description: Private reply content
        required: true
      responses:
        '200':
          description: Private reply sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.SuccessResponse'
        '400':
          description: >-
            Missing required fields, attachment combined with text or buttons
            (validation.attachment_conflict), or comment not eligible for a
            private reply (platform.instagram.private_reply_ineligible,
            platform.facebook.private_reply_ineligible)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '403':
          description: The key's scopes do not include inbox:write
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '422':
          description: >-
            The platform could not fetch or accept the attachment
            (platform.instagram.attachment_failed,
            platform.facebook.attachment_failed). The comment can still receive
            a private reply: fix the URL or file and send again
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '501':
          description: Platform does not support private replies
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api_endpoints.PrivateReplyRequest:
      type: object
      properties:
        account_id:
          type: string
        attachment:
          description: >-
            Attachment sends one image, video, audio or file as the private
            reply,

            instead of text. Leave text and buttons empty when you set it.
          allOf:
            - $ref: '#/components/schemas/api_endpoints.PrivateReplyAttachmentInput'
        buttons:
          description: >-
            Buttons renders a button template (1-3 buttons); uses text as the
            bubble body.
          type: array
          items:
            $ref: '#/components/schemas/api_endpoints.MessageButton'
        text:
          type: string
    api_endpoints.SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
    api_endpoints.ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/api_endpoints.ErrorBody'
        request_id:
          description: >-
            RequestID matches the X-Request-ID response header. Include it when
            contacting support.
          type: string
          example: 01HZ9X3Q4R5M6N7P8V2K0W1J
    api_endpoints.PrivateReplyAttachmentInput:
      type: object
      properties:
        source:
          description: >-
            Source is the attachment reference; its meaning is given by
            source_type.
          type: string
          example: https://cdn.example.com/guide.pdf
        source_type:
          description: |-
            SourceType selects how Source is interpreted:
              - "url": Source is a publicly reachable media URL the platform fetches directly.
              - "media_id": Source is a file id in your SocialAPI media library
                (GET /v1/media).
              - "platform_attachment_id": Source is an id of media already uploaded to the
                target platform (for example a Meta attachment_id).
          type: string
          enum:
            - url
            - media_id
            - platform_attachment_id
          example: url
        type:
          description: >-
            Type is the media kind. Optional for url and media_id sources
            (inferred from

            the file), required for platform_attachment_id.
          type: string
          enum:
            - image
            - video
            - audio
            - file
          example: file
    api_endpoints.MessageButton:
      type: object
      properties:
        payload:
          type: string
          example: VIEW_ORDER
        title:
          type: string
          example: View order
        type:
          type: string
          enum:
            - url
            - postback
          example: url
        url:
          type: string
          example: https://shop.example.com/orders/1
    api_endpoints.ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: resource.not_found
        message:
          type: string
          example: Account not found
        meta:
          type: object
          additionalProperties: {}
  securitySchemes:
    BearerAuth:
      description: >-
        Prefix your API key with "Bearer ". Example: `Authorization: Bearer
        sapi_key_...`
      type: apiKey
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.