1. Post
Networked API Documentation
  • Getting Started
  • User Authentication
    • Add New Users to Community
      POST
    • Send email invites
      POST
  • User Profile
    • User Profile
      GET
    • Profile Visits
      GET
  • Community
    • Features
      • Feature List
    • Directory
      • Users List
      • Roles List
    • Monetization
      • Plans
        • Plans List
    • Feed
      • Polls
        • Create Polls
      • Surveys
        • Create Surveys
      • Post
        • Ask and offer help
          • Post Intro
          • Post Advice
          • Post Recommendation
          • Post Kudos
          • Post Help
        • Feed Post List
          GET
        • Post to Feed
          POST
        • Get Post Comments
          GET
        • Add Comments to Post
          POST
      • upload Media
        POST
    • Opportunities
      • Company and Services
        • Company and Services List
      • Fundaising Initiatives
        • Fundraising Initiatives List
      • Career Opportunities
        • Career Opportunities
    • Events
      • Event Post
      • Edit Events
      • Delete Event
      • Event List
    • Media Center
      • Get Resources
    • Analytics
      • Community Analytics
    • Newsletter
      • Lists
        • Get newsletter subscriber lists
      • Add newsletter subscribers
      • Get newsletter subscribers
    • Community Details
      GET
    • Spaces List
      GET
  • Webhooks
    • User Webhooks
      • user.joined
      • user.profile.updated
      • user.joined.space
    • Feed Webhooks
      • post.created
      • post.liked
      • post.unliked
      • comment.added
      • post.reported
  • References
    • Response Codes
    • Model Status
    • Post Types
  1. Post

Add Comments to Post

POST
https://backend.networked.co/api/v1/posts/comment

💬 Post a Comment on a Post#

Allows authenticated users to add a comment to a specific post within the community.

HTTP Method#

POST

Endpoint#

/api/v1/posts/comment

Headers#

NameTypeRequiredDescription
x-api-keyString✅ YesSecret API key provided by Networked. Required for all API calls.

Body Parameters#

NameTypeRequiredDescription
commentString✅ YesThe actual comment in text.
postIdString✅ YesThe ID of the post being commented on.

Sample Request#

{
  "comment": "test comment 2",
  "postId": "6855529c78bddf001282dd01"
}

Sample Response#

{
  "data": {
    "commentId": "6858c0a078bddf001282e06d",
    "childCommentscount": 0,
    "comment": "<p class=&#x27;preserveHtml&#x27; class=&#x27;preserveHtml&#x27;>test comment 2</p>",
    "parentCommentId": null,
    "likesCount": 0,
    "selfLike": false,
    "shareCount": 0,
    "user": {
      "id": "6787893423126f0012a92ed6",
      "name": "Spencer Johnson Spencer",
      "image": "https://ntwc-us-east-2-qa-eks-s3-files-storage.s3.us-east-2.amazonaws.com/user-6787893423126f0012a92ed6/file_1741258763688_image (25).png",
      "title": " Software Development Test Engineer WBC Community Test Engineer"
    }
  },
  "error": false,
  "message": "Post comment created"
}

Response Interface#


Response Field Descriptions#

FieldTypeDescription
commentIdStringUnique identifier for the newly created comment.
childCommentscountNumberNumber of replies (child comments) to this comment.
commentStringHTML-formatted content of the comment.
parentCommentIdStringParent comment id
likesCountNumberTotal number of likes received on the comment.
selfLikeBooleanIndicates whether the comment is liked by the current user.
shareCountNumberNumber of times the comment has been shared.
userObjectMetadata about the commenter.
user Object#
FieldTypeDescription
idStringUser ID of the commenter.
nameStringName of the commenter.
imageStringURL to profile image.
titleStringProfessional title or designation.

Reference#

🔗 Status Codes

Notes#

Make sure to sanitize HTML in comment if rendering in frontend.
The comment will be publicly visible to anyone with access to the post.
Use selfLike to determine if the current user has liked the comment.
Use this API in conjunction with the GET comments endpoint to build threaded comment UIs.

Request

Header Params

Body Params application/json

Examples

Responses

🟢200
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://backend.networked.co/api/v1/posts/comment' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{"comment":"test comment 3","postId":"6855529c78bddf001282dd01"}'
Response Response Example
{
    "data": {
        "commentId": "6858c0a078bddf001282e06d",
        "childCommentscount": 0,
        "comment": "<p>test comment 2</p>",
        "parentCommentId": null,
        "likesCount": 0,
        "selfLike": false,
        "shareCount": 0,
        "user": {
            "id": "6787893423126f0012a92ed6",
            "name": "Spencer Johnson Spencer",
            "image": "https://ntwc-us-east-2-qa-eks-s3-files-storage.s3.us-east-2.amazonaws.com/user-6787893423126f0012a92ed6/file_1741258763688_image%20%2825%29.png",
            "title": " Software Development Test Engineer WBC Community Test Engineer"
        }
    },
    "error": false,
    "message": "Comment added successfully"
}
Modified at 2026-05-15 11:47:17
Previous
Get Post Comments
Next
upload Media
Built with