# Create a comment or reply

POST https://services.leadconnectorhq.com/social-media-posting/comments/{platform}

Create a top-level comment on a post (`isParentThread: true`, `parentId` = postId) or a reply to an existing comment (`isParentThread: false`, `parentId` = commentId). Per-platform content max length: Facebook 8000, Instagram 2200, Linkedin 3000, Community 8000, Tiktok 150, Bluesky 300, Youtube 10000, Threads 500.

**Optional-field platform support:**
- `attachments` — supported on **Facebook only**. Ignored on Instagram, LinkedIn, TikTok, Bluesky, Community (Community processes the field but external URLs are not rendered due to its bucket restriction).
- `mentions` — supported on **Facebook**, **LinkedIn**, and **Community** only. Ignored on Instagram, TikTok, Bluesky.
- `notifyAllGroupMembers` — supported on **Community** only. When `true`, all group members get a push/in-app notification (equivalent to an `@everyone` broadcast). Independent of the `mentions` array and of `@everyone` text in `content`. Default `false`.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `socialplanner/comments.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `platform` | string | Yes | Supported Comments Platforms |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `locationId` | string | Yes | Location ID |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/social-media-posting/comments/{platform}": {
      "post": {
        "summary": "Create a comment or reply",
        "operationId": "createACommentOrReply",
        "description": "Create a top-level comment on a post (`isParentThread: true`, `parentId` = postId) or a reply to an existing comment (`isParentThread: false`, `parentId` = commentId). Per-platform content max length: Facebook 8000, Instagram 2200, Linkedin 3000, Community 8000, Tiktok 150, Bluesky 300, Youtube 10000, Threads 500.\n\n**Optional-field platform support:**\n- `attachments` — supported on **Facebook only**. Ignored on Instagram, LinkedIn, TikTok, Bluesky, Community (Community processes the field but external URLs are not rendered due to its bucket restriction).\n- `mentions` — supported on **Facebook**, **LinkedIn**, and **Community** only. Ignored on Instagram, TikTok, Bluesky.\n- `notifyAllGroupMembers` — supported on **Community** only. When `true`, all group members get a push/in-app notification (equivalent to an `@everyone` broadcast). Independent of the `mentions` array and of `@everyone` text in `content`. Default `false`.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "platform",
            "required": true,
            "in": "path",
            "description": "Supported Comments Platforms",
            "schema": {
              "example": "facebook",
              "enum": [
                "facebook",
                "instagram",
                "linkedin",
                "community",
                "tiktok",
                "bluesky",
                "youtube",
                "threads"
              ],
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "query",
            "description": "Location ID",
            "schema": {
              "example": "1234",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentsCreateBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentsCreateResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Location-Access": [
              "socialplanner/comments.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "CommentsCreateBodyDTO": {
        "type": "object",
        "properties": {
          "parentId": {
            "type": "string",
            "description": "For top-level comments (`isParentThread: true`): pass the post ID returned by the posts API. For replies (`isParentThread: false`): pass the parent comment ID returned by the list-comments API. In both cases this must be a valid 24-character internal ID — not the native platform ID.",
            "example": "6975b186f3442844ec07665b"
          },
          "isParentThread": {
            "type": "boolean",
            "description": "Set `true` to create a top-level comment on a post (parentId = post ID). Set `false` to create a reply to an existing comment (parentId = comment ID).",
            "example": true
          },
          "content": {
            "type": "string",
            "description": "Content of the comment. Per-platform max length: Facebook 8000, Instagram 2200, Linkedin 3000, Community 8000, Tiktok 150, Bluesky 300, Youtube 10000, Threads 500.",
            "example": "Great post, Alex Morgan!"
          },
          "attachments": {
            "description": "Attachments for the comment (max 1 image). **Supported on:** Facebook only. **Not supported on:** Instagram, LinkedIn, TikTok, Bluesky, Community — the field is accepted by the API but the attachment will not appear on the comment. (Community processes the field server-side, but external URLs are not rendered due to its bucket restriction.)",
            "example": [
              {
                "url": "https://example.com/image.jpg",
                "type": "image"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "description": "URL of the attachment",
                  "example": "https://example.com/image.jpg"
                },
                "type": {
                  "type": "string",
                  "description": "Type of the attachment",
                  "example": "image",
                  "enum": [
                    "image"
                  ]
                }
              },
              "required": [
                "url",
                "type"
              ],
              "title": "AttachmentDTO"
            }
          },
          "mentions": {
            "description": "Mentions for the comment. **Supported on:** Facebook, LinkedIn, Community. **Ignored on:** Instagram, TikTok, Bluesky — the field is accepted but mentions are not rendered on these platforms.\n\n`offset`/`length` must locate `name` inside `content` exactly — `content.substring(offset, offset + length) === name` — otherwise the request is rejected with 400. The example below aligns with the `content` example above.",
            "example": [
              {
                "name": "Alex Morgan",
                "id": "102694781978972",
                "offset": 12,
                "length": 11
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Mention name. Must appear verbatim in `content` at `offset`.",
                  "example": "Alex Morgan"
                },
                "id": {
                  "type": "string",
                  "description": "Mention ID",
                  "example": "102694781978972"
                },
                "offset": {
                  "type": "number",
                  "description": "Zero-based character index in `content` where `name` starts. For content `\"Great post, Alex Morgan!\"` the mention `\"Alex Morgan\"` starts at 12.",
                  "example": 12
                },
                "length": {
                  "type": "number",
                  "description": "Character length of `name` — `content.substring(offset, offset + length)` must equal `name`.",
                  "example": 11
                },
                "slug": {
                  "type": "string",
                  "description": "Mention slug for community profile link",
                  "example": "mohammed-marvan-8bRf3H"
                }
              },
              "required": [
                "name",
                "id",
                "offset",
                "length"
              ],
              "title": "MentionsDTO"
            }
          },
          "notifyAllGroupMembers": {
            "type": "boolean",
            "description": "When `true`, all members of the Community group receive a push/in-app notification about this comment — equivalent to an `@everyone` broadcast.\n\n**Supported on:** Community only. Ignored on all other platforms (the field is accepted but no notification is sent).\n\n**Independent of the `mentions` array** — you do not need to add an `@everyone` entry to `mentions` for this to take effect. Conversely, putting the literal text `@everyone` in `content` does **not** by itself trigger notifications; only this flag does.\n\nDefaults to `false` (no broadcast notification). Use `true` only when the comment is genuinely intended for every member of the group — overuse may cause members to mute the group.",
            "example": false
          },
          "pollOptions": {
            "type": "object",
            "description": "Poll options for Threads reply (2-4 options)",
            "example": {
              "option_a": "Yes",
              "option_b": "No",
              "option_c": "Maybe"
            }
          },
          "textAttachment": {
            "type": "object",
            "description": "Text attachment for Threads reply with optional styling info",
            "example": {
              "plaintext": "Styled text content",
              "textWithStylingInfo": [
                {
                  "offset": 0,
                  "length": 5,
                  "styling_info": [
                    "bold"
                  ]
                }
              ]
            }
          },
          "threadLocationId": {
            "type": "string",
            "description": "Location ID for Threads reply location tagging",
            "example": "123456"
          }
        },
        "required": [
          "parentId",
          "isParentThread",
          "content"
        ],
        "title": "CommentsCreateBodyDTO"
      },
      "CommentsCreateResponseDTO": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success or Failure",
            "example": true
          },
          "statusCode": {
            "type": "number",
            "description": "Status Code",
            "example": 201
          },
          "message": {
            "type": "string",
            "description": "Message",
            "example": "Created Comment"
          },
          "results": {
            "description": "The created comment",
            "example": {
              "_id": "507f1f77bcf86cd799439011",
              "platform": "facebook",
              "platformCommentId": "122129390871181019_974705035458625",
              "postId": "6a169db95c78177a5c24ef7c",
              "originId": "956033194258752",
              "isParentThread": true,
              "isPost": false,
              "message": "Nice post!",
              "attachments": [
                {
                  "type": "image/jpeg",
                  "url": "https://example.com/image.jpg"
                }
              ],
              "author": {
                "id": "123456789",
                "name": "John Doe",
                "profilePic": "https://example.com/avatar.jpg"
              }
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "_id": {
                    "type": "string",
                    "description": "Internal comment ID",
                    "example": "507f1f77bcf86cd799439011"
                  },
                  "platform": {
                    "type": "string",
                    "description": "Platform the comment was posted on",
                    "example": "facebook"
                  },
                  "platformCommentId": {
                    "type": "string",
                    "description": "Native platform comment ID",
                    "example": "122129390871181019_974705035458625"
                  },
                  "platformParentId": {
                    "type": "string",
                    "description": "Native platform parent ID (the post or comment this is a reply to)",
                    "example": "956033194258752_122129390871181019"
                  },
                  "platformPostId": {
                    "type": "string",
                    "description": "Native platform post ID",
                    "example": "122129390871181019"
                  },
                  "postId": {
                    "type": "string",
                    "description": "Internal post ID",
                    "example": "6a169db95c78177a5c24ef7c"
                  },
                  "originId": {
                    "type": "string",
                    "description": "Connected account / page ID on the native platform",
                    "example": "956033194258752"
                  },
                  "isParentThread": {
                    "type": "boolean",
                    "description": "True if this comment is a top-level comment on the post; false if it is a reply to another comment",
                    "example": true
                  },
                  "isPost": {
                    "type": "boolean",
                    "description": "True if this record represents the root post (not a comment)",
                    "example": false
                  },
                  "content": {
                    "type": "string",
                    "description": "Comment content. May be empty or missing for attachment-only comments.",
                    "example": "Nice post!"
                  },
                  "attachments": {
                    "description": "Attachments on the comment",
                    "example": [
                      {
                        "type": "image/jpeg",
                        "url": "https://example.com/image.jpg"
                      }
                    ],
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Attachment MIME type or platform-specific type",
                          "example": "image/jpeg"
                        },
                        "url": {
                          "type": "string",
                          "description": "Attachment URL",
                          "example": "https://example.com/image.jpg"
                        },
                        "thumbnail": {
                          "type": "string",
                          "description": "Thumbnail URL",
                          "example": "https://example.com/thumb.jpg"
                        },
                        "videoUrl": {
                          "type": "string",
                          "description": "Video URL (when attachment is a video)",
                          "example": "https://example.com/video.mp4"
                        }
                      },
                      "title": "CommentAttachmentDTO"
                    }
                  },
                  "author": {
                    "description": "Author of the comment. May be partial or missing for some sync paths.",
                    "example": {
                      "id": "123456789",
                      "name": "John Doe",
                      "profilePic": "https://example.com/avatar.jpg"
                    },
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Platform author ID",
                            "example": "123456789"
                          },
                          "name": {
                            "type": "string",
                            "description": "Author display name",
                            "example": "John Doe"
                          },
                          "profilePic": {
                            "type": "string",
                            "description": "Author profile picture URL",
                            "example": "https://example.com/avatar.jpg"
                          }
                        },
                        "title": "CommentAuthorDTO"
                      }
                    ]
                  },
                  "level": {
                    "type": "number",
                    "description": "Comment depth (0 = post, 1 = comment, 2 = reply)",
                    "example": 1
                  },
                  "likeCount": {
                    "type": "number",
                    "description": "Number of likes on the comment",
                    "example": 0
                  },
                  "reactionCount": {
                    "type": "number",
                    "description": "Number of reactions on the comment",
                    "example": 0
                  },
                  "replyCount": {
                    "type": "number",
                    "description": "Number of replies to the comment",
                    "example": 0
                  },
                  "shareCount": {
                    "type": "number",
                    "description": "Number of shares of the comment",
                    "example": 0
                  },
                  "repostCount": {
                    "type": "number",
                    "description": "Number of reposts of the comment (platform-specific)",
                    "example": 0
                  },
                  "quoteCount": {
                    "type": "number",
                    "description": "Number of quote posts (platform-specific)",
                    "example": 0
                  },
                  "previewLink": {
                    "type": "string",
                    "description": "Direct link to view the comment on the native platform",
                    "example": "https://www.facebook.com/.../posts/..."
                  },
                  "isRead": {
                    "type": "boolean",
                    "description": "Whether the comment has been read",
                    "example": false
                  },
                  "isDeleted": {
                    "type": "boolean",
                    "description": "Whether the comment was deleted",
                    "example": false
                  },
                  "isEdited": {
                    "type": "boolean",
                    "description": "Whether the comment was edited",
                    "example": false
                  },
                  "publishedAt": {
                    "format": "date-time",
                    "type": "string",
                    "description": "Time the comment was published on the native platform. May be missing for legacy or webhook-synced records.",
                    "example": "2026-04-01T10:00:00.000Z"
                  },
                  "createdAt": {
                    "format": "date-time",
                    "type": "string",
                    "description": "Time the comment record was created in the system",
                    "example": "2026-04-01T10:00:00.000Z"
                  },
                  "updatedAt": {
                    "format": "date-time",
                    "type": "string",
                    "description": "Time the comment record was last updated in the system",
                    "example": "2026-04-01T10:00:00.000Z"
                  }
                },
                "required": [
                  "_id",
                  "platform",
                  "postId",
                  "originId",
                  "isPost",
                  "likeCount",
                  "reactionCount",
                  "replyCount",
                  "shareCount",
                  "repostCount",
                  "quoteCount",
                  "isRead",
                  "isDeleted",
                  "isEdited"
                ],
                "title": "CommentItemDTO"
              }
            ]
          }
        },
        "required": [
          "success",
          "statusCode",
          "message",
          "results"
        ],
        "title": "CommentsCreateResponseDTO"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X POST 'https://services.leadconnectorhq.com/social-media-posting/comments/<platform>?locationId=<LOCATIONID>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "parentId": "6975b186f3442844ec07665b",
  "isParentThread": true,
  "content": "Great post, Alex Morgan!",
  "attachments": [
    {
      "url": "https://example.com/image.jpg",
      "type": "image"
    }
  ],
  "mentions": [
    {
      "name": "Alex Morgan",
      "id": "102694781978972",
      "offset": 12,
      "length": 11
    }
  ],
  "notifyAllGroupMembers": false,
  "pollOptions": {
    "option_a": "Yes",
    "option_b": "No",
    "option_c": "Maybe"
  },
  "textAttachment": {
    "plaintext": "Styled text content",
    "textWithStylingInfo": [
      {
        "offset": 0,
        "length": 5,
        "styling_info": [
          "bold"
        ]
      }
    ]
  },
  "threadLocationId": "123456"
}'
```

**Node.js**

```javascript
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "parentId": "6975b186f3442844ec07665b",
      "isParentThread": true,
      "content": "Great post, Alex Morgan!",
      "attachments": [
        {
          "url": "https://example.com/image.jpg",
          "type": "image"
        }
      ],
      "mentions": [
        {
          "name": "Alex Morgan",
          "id": "102694781978972",
          "offset": 12,
          "length": 11
        }
      ],
      "notifyAllGroupMembers": false,
      "pollOptions": {
        "option_a": "Yes",
        "option_b": "No",
        "option_c": "Maybe"
      },
      "textAttachment": {
        "plaintext": "Styled text content",
        "textWithStylingInfo": [
          {
            "offset": 0,
            "length": 5,
            "styling_info": [
              "bold"
            ]
          }
        ]
      },
      "threadLocationId": "123456"
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/comments/<platform>?locationId=<LOCATIONID>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/social-media-posting/comments/{platform}"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

params = {
    "locationId": "<LOCATIONID>"
}

payload = {
    "parentId": "6975b186f3442844ec07665b",
    "isParentThread": true,
    "content": "Great post, Alex Morgan!",
    "attachments": [
        {
            "url": "https://example.com/image.jpg",
            "type": "image"
        }
    ],
    "mentions": [
        {
            "name": "Alex Morgan",
            "id": "102694781978972",
            "offset": 12,
            "length": 11
        }
    ],
    "notifyAllGroupMembers": false,
    "pollOptions": {
        "option_a": "Yes",
        "option_b": "No",
        "option_c": "Maybe"
    },
    "textAttachment": {
        "plaintext": "Styled text content",
        "textWithStylingInfo": [
            {
                "offset": 0,
                "length": 5,
                "styling_info": [
                    "bold"
                ]
            }
        ]
    },
    "threadLocationId": "123456"
}

response = requests.post(url, params=params, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/social-media-posting/comments/<platform>?locationId=<LOCATIONID>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "parentId": "6975b186f3442844ec07665b",
  "isParentThread": true,
  "content": "Great post, Alex Morgan!",
  "attachments": [
    {
      "url": "https://example.com/image.jpg",
      "type": "image"
    }
  ],
  "mentions": [
    {
      "name": "Alex Morgan",
      "id": "102694781978972",
      "offset": 12,
      "length": 11
    }
  ],
  "notifyAllGroupMembers": false,
  "pollOptions": {
    "option_a": "Yes",
    "option_b": "No",
    "option_c": "Maybe"
  },
  "textAttachment": {
    "plaintext": "Styled text content",
    "textWithStylingInfo": [
      {
        "offset": 0,
        "length": 5,
        "styling_info": [
          "bold"
        ]
      }
    ]
  },
  "threadLocationId": "123456"
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .post("https://services.leadconnectorhq.com/social-media-posting/comments/<platform>?locationId=<LOCATIONID>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"parentId\":\"6975b186f3442844ec07665b\",\"isParentThread\":true,\"content\":\"Great post, Alex Morgan!\",\"attachments\":[{\"url\":\"https://example.com/image.jpg\",\"type\":\"image\"}],\"mentions\":[{\"name\":\"Alex Morgan\",\"id\":\"102694781978972\",\"offset\":12,\"length\":11}],\"notifyAllGroupMembers\":false,\"pollOptions\":{\"option_a\":\"Yes\",\"option_b\":\"No\",\"option_c\":\"Maybe\"},\"textAttachment\":{\"plaintext\":\"Styled text content\",\"textWithStylingInfo\":[{\"offset\":0,\"length\":5,\"styling_info\":[\"bold\"]}]},\"threadLocationId\":\"123456\"}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/social-media-posting/comments/<platform>?locationId=<LOCATIONID>"
  payload := strings.NewReader(`{
  "parentId": "6975b186f3442844ec07665b",
  "isParentThread": true,
  "content": "Great post, Alex Morgan!",
  "attachments": [
    {
      "url": "https://example.com/image.jpg",
      "type": "image"
    }
  ],
  "mentions": [
    {
      "name": "Alex Morgan",
      "id": "102694781978972",
      "offset": 12,
      "length": 11
    }
  ],
  "notifyAllGroupMembers": false,
  "pollOptions": {
    "option_a": "Yes",
    "option_b": "No",
    "option_c": "Maybe"
  },
  "textAttachment": {
    "plaintext": "Styled text content",
    "textWithStylingInfo": [
      {
        "offset": 0,
        "length": 5,
        "styling_info": [
          "bold"
        ]
      }
    ]
  },
  "threadLocationId": "123456"
}`)
  req, _ := http.NewRequest("POST", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/social-media-posting/comments/<platform>?locationId=<LOCATIONID>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "parentId": "6975b186f3442844ec07665b",
  "isParentThread": true,
  "content": "Great post, Alex Morgan!",
  "attachments": [
    {
      "url": "https://example.com/image.jpg",
      "type": "image"
    }
  ],
  "mentions": [
    {
      "name": "Alex Morgan",
      "id": "102694781978972",
      "offset": 12,
      "length": 11
    }
  ],
  "notifyAllGroupMembers": false,
  "pollOptions": {
    "option_a": "Yes",
    "option_b": "No",
    "option_c": "Maybe"
  },
  "textAttachment": {
    "plaintext": "Styled text content",
    "textWithStylingInfo": [
      {
        "offset": 0,
        "length": 5,
        "styling_info": [
          "bold"
        ]
      }
    ]
  },
  "threadLocationId": "123456"
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "parentId": "6975b186f3442844ec07665b",
  "isParentThread": true,
  "content": "Great post, Alex Morgan!",
  "attachments": [
    {
      "url": "https://example.com/image.jpg",
      "type": "image"
    }
  ],
  "mentions": [
    {
      "name": "Alex Morgan",
      "id": "102694781978972",
      "offset": 12,
      "length": 11
    }
  ],
  "notifyAllGroupMembers": false,
  "pollOptions": {
    "option_a": "Yes",
    "option_b": "No",
    "option_c": "Maybe"
  },
  "textAttachment": {
    "plaintext": "Styled text content",
    "textWithStylingInfo": [
      {
        "offset": 0,
        "length": 5,
        "styling_info": [
          "bold"
        ]
      }
    ]
  },
  "threadLocationId": "123456"
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/social-media-posting/comments/<platform>?locationId=<LOCATIONID>' -Method 'POST' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
