Gateway endpoint (JWT-authenticated). Marks an existing session as completed and releases associated resources.
POST
/
sessions
/
close
Close a session
curl --request POST \
--url https://api.svantic.com/sessions/close \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "string"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({session_id: 'string'})
};
fetch('https://api.svantic.com/sessions/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.svantic.com/sessions/close"
payload = { "session_id": "string" }
headers = {"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.svantic.com/sessions/close"
payload := strings.NewReader("{\n \"session_id\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"ok": true,
"session_id": "string",
"status": "completed"
}{
"error": "Invalid request body",
"code": "BAD_REQUEST"
}{
"error": "Invalid or expired token",
"code": "unauthorized"
}{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}{
"error": "Request timeout",
"code": "REQUEST_TIMEOUT"
}{
"error": "string",
"code": "string"
}{
"error": "Internal server error",
"code": "INTERNAL_ERROR",
"request_id": "req_01EXAMPLE",
"timestamp": "2026-03-31T12:00:00.000Z"
}{
"error": "Bad gateway",
"code": "BAD_GATEWAY"
}{
"error": "Service temporarily unavailable",
"code": "SERVICE_UNAVAILABLE"
}⌘I
Close a session
curl --request POST \
--url https://api.svantic.com/sessions/close \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "string"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({session_id: 'string'})
};
fetch('https://api.svantic.com/sessions/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.svantic.com/sessions/close"
payload = { "session_id": "string" }
headers = {"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.svantic.com/sessions/close"
payload := strings.NewReader("{\n \"session_id\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"ok": true,
"session_id": "string",
"status": "completed"
}{
"error": "Invalid request body",
"code": "BAD_REQUEST"
}{
"error": "Invalid or expired token",
"code": "unauthorized"
}{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}{
"error": "Request timeout",
"code": "REQUEST_TIMEOUT"
}{
"error": "string",
"code": "string"
}{
"error": "Internal server error",
"code": "INTERNAL_ERROR",
"request_id": "req_01EXAMPLE",
"timestamp": "2026-03-31T12:00:00.000Z"
}{
"error": "Bad gateway",
"code": "BAD_GATEWAY"
}{
"error": "Service temporarily unavailable",
"code": "SERVICE_UNAVAILABLE"
}