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

Participate in a post

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

Request

Path Params
id
string 
required
Header Params
Authorization
string 
required
Example:
Bearer some-random-token
Body Params application/json
voteForOptionIndex
enum<string> 
optional
For polls, vote for an option by suppling its index; invoke vote by supplying "false" (boolean), instead of a number.
Allowed values:
numberfalse
debateReaction
enum<string> 
optional
For debates; if "none", it removes participant's reaction from the debate.
Allowed values:
supportopposenone
Example
{
    "voteForOptionIndex": "number",
    "debateReaction": "support"
}

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//participate' \
--header 'Authorization: Bearer some-random-token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "voteForOptionIndex": "number",
    "debateReaction": "support"
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{
    "success": true,
    "statusCode": 200,
    "data": {
        "post": {
            "id": "cm1z66sxy0000u4v311cjcpzo",
            "type": "poll",
            "pollOptions": [
                {
                    "text": "Some option text",
                    "totalVoters": 2
                },
                {
                    "text": "Some option text",
                    "totalVoters": 1,
                    "userVoted": true
                }
            ],
            "totalParticipants": 3,
            "totalOpposers": 0,
            "totalSupporters": 0,
            "userParticipated": true,
            "userOpposed": false,
            "userSupported": false
        }
    }
}
Previous
Get post participants
Next
Get post comments
Built with