curl --request POST \
--url https://api.rallly.co/v1/polls/{pollId}/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "alex@example.com",
"name": "Alex Kim"
}
'import requests
url = "https://api.rallly.co/v1/polls/{pollId}/invites"
payload = {
"email": "alex@example.com",
"name": "Alex Kim"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'alex@example.com', name: 'Alex Kim'})
};
fetch('https://api.rallly.co/v1/polls/{pollId}/invites', 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://api.rallly.co/v1/polls/{pollId}/invites",
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([
'email' => 'alex@example.com',
'name' => 'Alex Kim'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.rallly.co/v1/polls/{pollId}/invites"
payload := strings.NewReader("{\n \"email\": \"alex@example.com\",\n \"name\": \"Alex Kim\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.rallly.co/v1/polls/{pollId}/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"alex@example.com\",\n \"name\": \"Alex Kim\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rallly.co/v1/polls/{pollId}/invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"alex@example.com\",\n \"name\": \"Alex Kim\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "cm5h8x2k40002q9l4e5f6a7b8",
"pollId": "Xk3pQ9vLm2Ab",
"email": "alex@example.com",
"name": "Alex Kim",
"inviteUrl": "https://rallly.co/invite/Xk3pQ9vLm2Ab?token=abc123",
"createdAt": "2025-01-10T12:00:00.000Z"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}Invite someone to a poll
Invites one person to an open poll by email and responds with 201 Created and the invite. The poll must belong to the space associated with the API key.
Each invitee gets a personal inviteUrl. A response made through it is tied to the invite, and the form starts with the invitee’s email and, when you pass one, their name filled in. They can still change both.
Rallly emails the link on the space owner’s behalf and counts it against the space owner’s daily invite limit and the space’s monthly invites, as invites sent from the app are. When the space sends participant emails itself, nothing is emailed, neither limit applies, and you deliver inviteUrl yourself.
An address gets one pending invite per poll: inviting it again fails with ALREADY_INVITED. An invite removed in the app can be sent again; it gets a new link and the old one stops working.
curl --request POST \
--url https://api.rallly.co/v1/polls/{pollId}/invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "alex@example.com",
"name": "Alex Kim"
}
'import requests
url = "https://api.rallly.co/v1/polls/{pollId}/invites"
payload = {
"email": "alex@example.com",
"name": "Alex Kim"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'alex@example.com', name: 'Alex Kim'})
};
fetch('https://api.rallly.co/v1/polls/{pollId}/invites', 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://api.rallly.co/v1/polls/{pollId}/invites",
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([
'email' => 'alex@example.com',
'name' => 'Alex Kim'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.rallly.co/v1/polls/{pollId}/invites"
payload := strings.NewReader("{\n \"email\": \"alex@example.com\",\n \"name\": \"Alex Kim\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.rallly.co/v1/polls/{pollId}/invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"alex@example.com\",\n \"name\": \"Alex Kim\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rallly.co/v1/polls/{pollId}/invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"alex@example.com\",\n \"name\": \"Alex Kim\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "cm5h8x2k40002q9l4e5f6a7b8",
"pollId": "Xk3pQ9vLm2Ab",
"email": "alex@example.com",
"name": "Alex Kim",
"inviteUrl": "https://rallly.co/invite/Xk3pQ9vLm2Ab?token=abc123",
"createdAt": "2025-01-10T12:00:00.000Z"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "title: Invalid input: expected string, received undefined"
}
}Authorizations
Body
Was this page helpful?