Stop multiple sessions
curl --request POST \
--url https://api.polymorfa.com/v1/sessions/stop \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionIds": [
"<string>"
],
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ids": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sessionIds: ['<string>'],
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ids: ['<string>']
})
};
fetch('https://api.polymorfa.com/v1/sessions/stop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/v1/sessions/stop"
payload = {
"sessionIds": ["<string>"],
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/v1/sessions/stop"
payload := strings.NewReader("{\n \"sessionIds\": [\n \"<string>\"\n ],\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ids\": [\n \"<string>\"\n ]\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.polymorfa.com/v1/sessions/stop",
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([
'sessionIds' => [
'<string>'
],
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ids' => [
'<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;
}{
"data": {
"stopping": 50
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}sessions
Stop multiple sessions
Requests asynchronous stops for up to 100 session UUIDs or slugs in the authenticated project scope.
Organization API-key callers require sessions:manage; dashboard callers require current organization membership and authorization.
POST
/
v1
/
sessions
/
stop
Stop multiple sessions
curl --request POST \
--url https://api.polymorfa.com/v1/sessions/stop \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionIds": [
"<string>"
],
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ids": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sessionIds: ['<string>'],
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ids: ['<string>']
})
};
fetch('https://api.polymorfa.com/v1/sessions/stop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/v1/sessions/stop"
payload = {
"sessionIds": ["<string>"],
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/v1/sessions/stop"
payload := strings.NewReader("{\n \"sessionIds\": [\n \"<string>\"\n ],\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ids\": [\n \"<string>\"\n ]\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.polymorfa.com/v1/sessions/stop",
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([
'sessionIds' => [
'<string>'
],
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ids' => [
'<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;
}{
"data": {
"stopping": 50
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
ApiKeyAuthConsoleSession
Polymorfa server credential: a scoped titan_ organization key. Public /v1 operations reject titan_pt_ project tokens.
Body
application/json
- Option 1
- Option 2
Required array length:
1 - 100 elementsDatabase session UUID or stable session slug.
Required string length:
1 - 64Project UUID. Optional where an operation can infer or search organization scope; required where the operation creates a project-owned resource.
Compatibility alias for sessionIds.
Required array length:
1 - 100 elementsDatabase session UUID or stable session slug.
Required string length:
1 - 64Response
Success
Show child attributes
Show child attributes