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
Allowed values:
numberfalse
debateReaction
enum<string>
optional
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
}
}
}