Sqabl APIs
  1. Post
Sqabl APIs
  • APIs
    • Auth
      • Sign Up
      • Sign In
      • Sign Out
      • Refresh Access Token
      • Get user by token
      • Change password
    • OTP
      • Verify OTP
      • Generate OTP
      • OTP Status
    • User
      • Get user
      • Get user by token
      • Update user
      • Get user's followers
      • Get user's followees
      • Get user's referred members
      • Get user's interacted items
      • Get user's bookmarks
      • Flag a user
      • Follow user
      • Unfollow user
      • Block a user
      • Unblock a user
      • Delete user's picture
      • Delete user
    • Users
      • Get users
    • Arenas
      • Get arenas
      • Create an arena
      • Invite users to arenas
    • Arena
      • Get arena
      • Update arena
      • Join an arena
      • Leave an arena
      • Get arena members
      • Add users to arena
      • Remove members from an arena
      • Update an arena member
    • Posts
      • Get posts
      • Create a post
    • Post
      • Get a post
        GET
      • Update a post
        PUT
      • Delete a post
        DELETE
      • Flag a post
        POST
      • Flame a post
        POST
      • Unflame a post
        DELETE
      • Save a post
        POST
      • Unsave a post
        DELETE
      • Hide a post
        POST
      • Get post participants
        GET
      • Participate in a post
        POST
      • Get post comments
        GET
      • Comment on a post
        POST
    • Comment
      • Get comment
      • Delete a comment
      • Flag a comment
      • Flame a comment
      • Unflame a comment
      • Save a comment
      • Unsave a comment
    • Alerts
      • Get user's alerts
      • Mark some or all alerts read
    • Flags
      • get flags
    • Faqs
      • get faqs
    • Interests
      • get interests
    • Search
      • get popular search keywords
    • Signed Upload URL
      • get signed url for upload
  1. Post

Comment on a post

Prod Env
https://api.sqabl.com/v1
Prod Env
https://api.sqabl.com/v1
POST
/post/{id}/comment/

Request

Path Params
id
string 
required
Header Params
Authorization
string 
required
Example:
Bearer some-user-token
Body Params application/json
text
string 
required
When mentioning in a comment, the format of the mentioned user is;
@{user-id}
An "at" symbol, then the user id in a pair of curly braces.
argumentType
enum<string> 
optional
This is required for debates, otherwise optional.
Allowed values:
opposesupport
parentCommentId
string 
optional
If provided, this new comment is treated as a reply under the parent-comment thread.
Example
{
    "text": "string",
    "argumentType": "oppose",
    "parentCommentId": "string"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.sqabl.com/v1/post//comment/' \
--header 'Authorization: Bearer some-user-token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "text": "string",
    "argumentType": "oppose",
    "parentCommentId": "string"
}'

Responses

🟢200Success
application/json
Body
object {0}
Examples
{
    "success": true,
    "statusCode": 200,
    "data": {
        "comment": {
            "id": "some-new-comment-id",
            "argumentType": "support",
            "text": "This is my argument.",
            "dateCommented": "2024-09-30 17:4:13"
        },
        "post": {
            "id": "the-post-id",
            "totalComments": 43
        }
    }
}
Previous
Get post comments
Next
Comment
Built with