Quit Custom Role
curl --request PATCH \
--url https://api.series.hr/sessions/{sessionId}/custom-roles/quit \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"UserId": "<string>",
"RoleName": "<string>"
}
'import requests
url = "https://api.series.hr/sessions/{sessionId}/custom-roles/quit"
payload = {
"UserId": "<string>",
"RoleName": "<string>"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({UserId: '<string>', RoleName: '<string>'})
};
fetch('https://api.series.hr/sessions/{sessionId}/custom-roles/quit', 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.series.hr/sessions/{sessionId}/custom-roles/quit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'UserId' => '<string>',
'RoleName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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.series.hr/sessions/{sessionId}/custom-roles/quit"
payload := strings.NewReader("{\n \"UserId\": \"<string>\",\n \"RoleName\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("apikey", "<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.patch("https://api.series.hr/sessions/{sessionId}/custom-roles/quit")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"UserId\": \"<string>\",\n \"RoleName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.series.hr/sessions/{sessionId}/custom-roles/quit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"UserId\": \"<string>\",\n \"RoleName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodySessions
Quit Custom Role
Quit a custom role slot in a session
PATCH
/
sessions
/
{sessionId}
/
custom-roles
/
quit
Quit Custom Role
curl --request PATCH \
--url https://api.series.hr/sessions/{sessionId}/custom-roles/quit \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"UserId": "<string>",
"RoleName": "<string>"
}
'import requests
url = "https://api.series.hr/sessions/{sessionId}/custom-roles/quit"
payload = {
"UserId": "<string>",
"RoleName": "<string>"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({UserId: '<string>', RoleName: '<string>'})
};
fetch('https://api.series.hr/sessions/{sessionId}/custom-roles/quit', 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.series.hr/sessions/{sessionId}/custom-roles/quit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'UserId' => '<string>',
'RoleName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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.series.hr/sessions/{sessionId}/custom-roles/quit"
payload := strings.NewReader("{\n \"UserId\": \"<string>\",\n \"RoleName\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("apikey", "<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.patch("https://api.series.hr/sessions/{sessionId}/custom-roles/quit")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"UserId\": \"<string>\",\n \"RoleName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.series.hr/sessions/{sessionId}/custom-roles/quit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"UserId\": \"<string>\",\n \"RoleName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyQuit a custom role that the user currently holds. The slot will be made vacant again for other users to claim. The user must be a workspace member.
Custom roles are a Premium/Enterprise feature. This endpoint will return a 403 error for free-tier workspaces.
Request
curl -X PATCH https://api.series.hr/sessions/session_abc123/custom-roles/quit \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"UserId": "714760171",
"RoleName": "Trainer"
}'
Parameters
string
required
The session ID
string
required
The Roblox user ID of the user quitting the role (must be a workspace member)
string
required
The name of the custom role to quit
Response
{
"success": true,
"data": {
"message": "Successfully quit Trainer position",
"SessionId": "session_abc123",
"RoleName": "Trainer",
"UserId": "714760171"
}
}
Errors
| Status | Description |
|---|---|
| 400 | User is not in this role, user is not a workspace member, or session is completed/cancelled |
| 403 | Premium/Enterprise subscription required |
| 404 | Session or custom role not found |
Authorizations
Pass your API key in the apikey header. Alternatively, the x-api-key header is also accepted.
Path Parameters
The session ID
Body
application/json
Response
Custom role quit successfully
⌘I

