curl --request POST \
--url https://api.mountthor.com/v1/admin/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"api_key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2027-01-01T00:00:00Z",
"scopes": [
"compute:read",
"compute:write"
]
}
'import requests
url = "https://api.mountthor.com/v1/admin/keys"
payload = {
"display_name": "<string>",
"api_key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2027-01-01T00:00:00Z",
"scopes": ["compute:read", "compute:write"]
}
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({
display_name: '<string>',
api_key_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expires_at: '2027-01-01T00:00:00Z',
scopes: ['compute:read', 'compute:write']
})
};
fetch('https://api.mountthor.com/v1/admin/keys', 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/keys",
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([
'display_name' => '<string>',
'api_key_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expires_at' => '2027-01-01T00:00:00Z',
'scopes' => [
'compute:read',
'compute:write'
]
]),
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/keys"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"api_key_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2027-01-01T00:00:00Z\",\n \"scopes\": [\n \"compute:read\",\n \"compute:write\"\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))
}HttpResponse<String> response = Unirest.post("https://api.mountthor.com/v1/admin/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"api_key_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2027-01-01T00:00:00Z\",\n \"scopes\": [\n \"compute:read\",\n \"compute:write\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountthor.com/v1/admin/keys")
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 \"display_name\": \"<string>\",\n \"api_key_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2027-01-01T00:00:00Z\",\n \"scopes\": [\n \"compute:read\",\n \"compute:write\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"api_key": "mthr_live_01JZ8M7EXAMPLE",
"api_key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2026-05-25T17:30:00Z",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_name": "ci-prod",
"key_last4": "MPLE",
"key_prefix": "<string>",
"plaintext_display": "one-time",
"scopes": [
"compute:read",
"compute:write"
],
"status": "active",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2027-01-01T00:00:00Z"
}"<string>"Create Key
The plaintext api_key is returned exactly once. The requested scopes must
be covered by the caller’s own API-key scopes.
Store the returned value in a secret manager before discarding the response.
curl --request POST \
--url https://api.mountthor.com/v1/admin/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"api_key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2027-01-01T00:00:00Z",
"scopes": [
"compute:read",
"compute:write"
]
}
'import requests
url = "https://api.mountthor.com/v1/admin/keys"
payload = {
"display_name": "<string>",
"api_key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2027-01-01T00:00:00Z",
"scopes": ["compute:read", "compute:write"]
}
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({
display_name: '<string>',
api_key_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expires_at: '2027-01-01T00:00:00Z',
scopes: ['compute:read', 'compute:write']
})
};
fetch('https://api.mountthor.com/v1/admin/keys', 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/keys",
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([
'display_name' => '<string>',
'api_key_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expires_at' => '2027-01-01T00:00:00Z',
'scopes' => [
'compute:read',
'compute:write'
]
]),
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/keys"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"api_key_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2027-01-01T00:00:00Z\",\n \"scopes\": [\n \"compute:read\",\n \"compute:write\"\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))
}HttpResponse<String> response = Unirest.post("https://api.mountthor.com/v1/admin/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"api_key_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2027-01-01T00:00:00Z\",\n \"scopes\": [\n \"compute:read\",\n \"compute:write\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountthor.com/v1/admin/keys")
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 \"display_name\": \"<string>\",\n \"api_key_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expires_at\": \"2027-01-01T00:00:00Z\",\n \"scopes\": [\n \"compute:read\",\n \"compute:write\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"api_key": "mthr_live_01JZ8M7EXAMPLE",
"api_key_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2026-05-25T17:30:00Z",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_name": "ci-prod",
"key_last4": "MPLE",
"key_prefix": "<string>",
"plaintext_display": "one-time",
"scopes": [
"compute:read",
"compute:write"
],
"status": "active",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2027-01-01T00:00:00Z"
}"<string>"Authorizations
Bearer scheme name used by typed customer admin operations.
Body
Request body for customer self-service POST /v1/admin/keys.
Human-readable label shown in customer tooling.
160Optional client-supplied UUID for the new API key.
Optional expiry timestamp in RFC 3339 form.
80"2027-01-01T00:00:00Z"
Allowed scopes for the new key. Defaults to ["compute"].
["compute:read", "compute:write"]
Response
API key minted
Response body for creating a customer API key.
The plaintext api_key is returned only once; the customer portal
surfaces it with a "show once" affordance and never re-fetches it.
Plaintext API key. Format: mthr_live_*. Returned exactly once.
"mthr_live_01JZ8M7EXAMPLE"
Stable UUID for the API key.
RFC 3339 creation timestamp.
"2026-05-25T17:30:00Z"
Stable UUID for the customer account.
Customer user UUID the key is bound to.
Human-readable label for the key.
"ci-prod"
Last 4 characters, used as a display affordance.
"MPLE"
First 18 characters of the API key, stored server-side for fast prefix lookups. Prefix stored for display and lookup. Not sufficient to authenticate.
Always "one-time" — reminder that the plaintext is not
retrievable.
"one-time"
Scopes granted to the key.
["compute:read", "compute:write"]
Key lifecycle state.
"active"
Stable UUID for the tenant this key can access.
Optional RFC 3339 expiry timestamp.
"2027-01-01T00:00:00Z"