curl --request POST \
--url https://api.mountthor.com/v1/admin/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_ttl_seconds": 900,
"source_ip": "<string>",
"user_agent": "<string>"
}
'import requests
url = "https://api.mountthor.com/v1/admin/sessions"
payload = {
"session_ttl_seconds": 900,
"source_ip": "<string>",
"user_agent": "<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({session_ttl_seconds: 900, source_ip: '<string>', user_agent: '<string>'})
};
fetch('https://api.mountthor.com/v1/admin/sessions', 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.mountthor.com/v1/admin/sessions",
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([
'session_ttl_seconds' => 900,
'source_ip' => '<string>',
'user_agent' => '<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.mountthor.com/v1/admin/sessions"
payload := strings.NewReader("{\n \"session_ttl_seconds\": 900,\n \"source_ip\": \"<string>\",\n \"user_agent\": \"<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.mountthor.com/v1/admin/sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_ttl_seconds\": 900,\n \"source_ip\": \"<string>\",\n \"user_agent\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountthor.com/v1/admin/sessions")
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 \"session_ttl_seconds\": 900,\n \"source_ip\": \"<string>\",\n \"user_agent\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"audience": "api.mountthor.com",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2026-05-06T18:30:00Z",
"issued_at": "2026-05-06T18:15:00Z",
"namespace_name": "<string>",
"scopes": [
"compute:read",
"compute:write"
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_token": "mt_session_01JZ8M7EXAMPLE",
"session_ttl_seconds": 123,
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_type": "Bearer",
"refresh_token": "<string>",
"refresh_token_expires_at": "<string>",
"refresh_token_ttl_seconds": 123
}{
"audience": "api.mountthor.com",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2026-05-06T18:30:00Z",
"issued_at": "2026-05-06T18:15:00Z",
"portal_access_state": "<string>",
"scopes": [
"access:read",
"sessions:write"
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_token": "mt_session_01JZ8M7EXAMPLE",
"session_ttl_seconds": 123,
"token_type": "Bearer",
"refresh_token": "<string>",
"refresh_token_expires_at": "<string>",
"refresh_token_ttl_seconds": 123
}"<string>"Create Session
Creates a short-lived compute session from an API key or a trusted workload identity token.
curl --request POST \
--url https://api.mountthor.com/v1/admin/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_ttl_seconds": 900,
"source_ip": "<string>",
"user_agent": "<string>"
}
'import requests
url = "https://api.mountthor.com/v1/admin/sessions"
payload = {
"session_ttl_seconds": 900,
"source_ip": "<string>",
"user_agent": "<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({session_ttl_seconds: 900, source_ip: '<string>', user_agent: '<string>'})
};
fetch('https://api.mountthor.com/v1/admin/sessions', 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.mountthor.com/v1/admin/sessions",
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([
'session_ttl_seconds' => 900,
'source_ip' => '<string>',
'user_agent' => '<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.mountthor.com/v1/admin/sessions"
payload := strings.NewReader("{\n \"session_ttl_seconds\": 900,\n \"source_ip\": \"<string>\",\n \"user_agent\": \"<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.mountthor.com/v1/admin/sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_ttl_seconds\": 900,\n \"source_ip\": \"<string>\",\n \"user_agent\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountthor.com/v1/admin/sessions")
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 \"session_ttl_seconds\": 900,\n \"source_ip\": \"<string>\",\n \"user_agent\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"audience": "api.mountthor.com",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2026-05-06T18:30:00Z",
"issued_at": "2026-05-06T18:15:00Z",
"namespace_name": "<string>",
"scopes": [
"compute:read",
"compute:write"
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_token": "mt_session_01JZ8M7EXAMPLE",
"session_ttl_seconds": 123,
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token_type": "Bearer",
"refresh_token": "<string>",
"refresh_token_expires_at": "<string>",
"refresh_token_ttl_seconds": 123
}{
"audience": "api.mountthor.com",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2026-05-06T18:30:00Z",
"issued_at": "2026-05-06T18:15:00Z",
"portal_access_state": "<string>",
"scopes": [
"access:read",
"sessions:write"
],
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_token": "mt_session_01JZ8M7EXAMPLE",
"session_ttl_seconds": 123,
"token_type": "Bearer",
"refresh_token": "<string>",
"refresh_token_expires_at": "<string>",
"refresh_token_ttl_seconds": 123
}"<string>"Authorizations
Bearer scheme name used by typed customer admin operations.
Body
- Option 1
- Option 2
API-key or workload-identity session request.
Requested session TTL in seconds. Must be between 300 and 3600. Defaults to 900 (15 minutes) when omitted.
300 <= x <= 3600900
Optional client-reported source IP, recorded for audit.
128Optional client-reported user agent, recorded for audit.
512Response
Session minted
Response body for POST /v1/admin/sessions.
session_token is shown once; Mount Thor stores only its SHA-256 digest.
API audience the session token is valid for.
"api.mountthor.com"
Customer account id the session is bound to.
Customer principal id the session is bound to.
RFC 3339 timestamp at which the session token expires.
"2026-05-06T18:30:00Z"
RFC 3339 timestamp at which the session token was issued.
"2026-05-06T18:15:00Z"
Tenant namespace inside the customer's dedicated control plane.
Scopes granted to the session.
["compute:read", "compute:write"]
Stable Mount Thor identifier for the minted session.
Short-lived bearer token. Format: mt_session_*. Returned exactly once.
"mt_session_01JZ8M7EXAMPLE"
Granted session TTL in seconds.
Tenant id the session is bound to.
Always "Bearer".
"Bearer"
RFC 3339 timestamp at which the refresh token expires (when set).
Refresh token TTL in seconds (when refresh_token is set).