Cast a vote as user
curl --request POST \
--url https://app.orgo.space/api/v1/vote_users \
--header 'Api-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"vote": "/api/v1/votes/1",
"user": "/api/v1/users/1",
"voteCollection": "/api/v1/vote_collections/1"
}
'import requests
url = "https://app.orgo.space/api/v1/vote_users"
payload = {
"vote": "/api/v1/votes/1",
"user": "/api/v1/users/1",
"voteCollection": "/api/v1/vote_collections/1"
}
headers = {
"Api-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Api-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vote: '/api/v1/votes/1',
user: '/api/v1/users/1',
voteCollection: '/api/v1/vote_collections/1'
})
};
fetch('https://app.orgo.space/api/v1/vote_users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.orgo.space/api/v1/vote_users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vote' => '/api/v1/votes/1',
'user' => '/api/v1/users/1',
'voteCollection' => '/api/v1/vote_collections/1'
]),
CURLOPT_HTTPHEADER => [
"Api-Token: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.orgo.space/api/v1/vote_users"
payload := strings.NewReader("{\n \"vote\": \"/api/v1/votes/1\",\n \"user\": \"/api/v1/users/1\",\n \"voteCollection\": \"/api/v1/vote_collections/1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.orgo.space/api/v1/vote_users")
.header("Api-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vote\": \"/api/v1/votes/1\",\n \"user\": \"/api/v1/users/1\",\n \"voteCollection\": \"/api/v1/vote_collections/1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.orgo.space/api/v1/vote_users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vote\": \"/api/v1/votes/1\",\n \"user\": \"/api/v1/users/1\",\n \"voteCollection\": \"/api/v1/vote_collections/1\"\n}"
response = http.request(request)
puts response.read_body{
"id": 42,
"user": {
"id": 42,
"fullName": "James Patterson",
"cardId": "string"
},
"external": {
"name": "Boston Chapter",
"fullName": "James Patterson"
},
"hasVoted": true,
"alias": "string"
}VoteUser
Cast a vote as user
Adds a user as an eligible voter in a private vote collection. Prevents duplicate entries. The vote collection must be in editable state. Only the vote collection owner can add voters.
POST
/
api
/
v1
/
vote_users
Cast a vote as user
curl --request POST \
--url https://app.orgo.space/api/v1/vote_users \
--header 'Api-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"vote": "/api/v1/votes/1",
"user": "/api/v1/users/1",
"voteCollection": "/api/v1/vote_collections/1"
}
'import requests
url = "https://app.orgo.space/api/v1/vote_users"
payload = {
"vote": "/api/v1/votes/1",
"user": "/api/v1/users/1",
"voteCollection": "/api/v1/vote_collections/1"
}
headers = {
"Api-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Api-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vote: '/api/v1/votes/1',
user: '/api/v1/users/1',
voteCollection: '/api/v1/vote_collections/1'
})
};
fetch('https://app.orgo.space/api/v1/vote_users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.orgo.space/api/v1/vote_users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vote' => '/api/v1/votes/1',
'user' => '/api/v1/users/1',
'voteCollection' => '/api/v1/vote_collections/1'
]),
CURLOPT_HTTPHEADER => [
"Api-Token: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.orgo.space/api/v1/vote_users"
payload := strings.NewReader("{\n \"vote\": \"/api/v1/votes/1\",\n \"user\": \"/api/v1/users/1\",\n \"voteCollection\": \"/api/v1/vote_collections/1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.orgo.space/api/v1/vote_users")
.header("Api-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vote\": \"/api/v1/votes/1\",\n \"user\": \"/api/v1/users/1\",\n \"voteCollection\": \"/api/v1/vote_collections/1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.orgo.space/api/v1/vote_users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vote\": \"/api/v1/votes/1\",\n \"user\": \"/api/v1/users/1\",\n \"voteCollection\": \"/api/v1/vote_collections/1\"\n}"
response = http.request(request)
puts response.read_body{
"id": 42,
"user": {
"id": 42,
"fullName": "James Patterson",
"cardId": "string"
},
"external": {
"name": "Boston Chapter",
"fullName": "James Patterson"
},
"hasVoted": true,
"alias": "string"
}Authorizations
ApiTokenJWT
Server-to-server authentication. Generate a token in the admin UI at
Settings → Developers → API Access. Send the raw token in the
Api-Token header — there is no Bearer prefix.
Tokens can be marked read-only at creation time, in which case the API
rejects any non-GET request with 403 Forbidden.
Body
application/json
The new VoteUser resource
⌘I

