Set RSVP
curl --request POST \
--url https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "<string>",
"userId": "<string>"
}
'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp"
payload = {
"status": "<string>",
"userId": "<string>"
}
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({status: '<string>', userId: '<string>'})
};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp', 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.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp",
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([
'status' => '<string>',
'userId' => '<string>'
]),
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.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp"
payload := strings.NewReader("{\n \"status\": \"<string>\",\n \"userId\": \"<string>\"\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.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\",\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp")
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 \"status\": \"<string>\",\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyEvent Endpoints
Set RSVP
Set or change the caller’s RSVP to an event
Set RSVP
curl --request POST \
--url https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "<string>",
"userId": "<string>"
}
'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp"
payload = {
"status": "<string>",
"userId": "<string>"
}
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({status: '<string>', userId: '<string>'})
};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp', 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.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp",
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([
'status' => '<string>',
'userId' => '<string>'
]),
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.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp"
payload := strings.NewReader("{\n \"status\": \"<string>\",\n \"userId\": \"<string>\"\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.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\",\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp")
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 \"status\": \"<string>\",\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodySets or changes the caller’s RSVP. A new RSVP is created, or an existing one is switched, and the event’s
See also: useSetRsvp
rsvpCounts are updated atomically. Requires authentication, and the caller must be able to see the event (otherwise 404).
Transitions into going are capacity-checked under a row-level lock, so an event can never be oversold.
Rules:
- RSVPs close at
startTime. - A
cancelledevent rejects RSVPs. "maybe"is rejected when the event’sallowMaybeisfalse."going"(new or switched into) is rejected whenrsvpCounts.goinghas reachedcapacity.
Path Parameters
string
required
UUID of the event.
Body Parameters
string
required
"going", "maybe", or "not_going".string
Service/master key only. RSVP on behalf of this user.
Response
Returns the Event with refreshedrsvpCounts and the caller’s userRsvp.
Error Responses
Not Found / No Access — 404
Not Found / No Access — 404
{ "error": "Event not found", "code": "event/not-found" }
Event Cancelled — 409
Event Cancelled — 409
{ "error": "This event has been cancelled.", "code": "event/cancelled" }
RSVPs Closed — 409
RSVPs Closed — 409
{ "error": "RSVPs are closed for this event.", "code": "event/rsvp-closed" }
Maybe Disabled — 409
Maybe Disabled — 409
{ "error": "This event does not allow a 'maybe' RSVP.", "code": "event/maybe-disabled" }
At Capacity — 409
At Capacity — 409
{ "error": "This event is at capacity.", "code": "event/full" }
⌘I

