curl --request POST \
--url https://api.mudraid.ai/api/v1/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"api_key_id": "muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4",
"secret": "muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG",
"platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": [],
"profile": "mudraid-native-jwt"
}
'import requests
url = "https://api.mudraid.ai/api/v1/auth/token"
payload = {
"api_key_id": "muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4",
"secret": "muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG",
"platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": [],
"profile": "mudraid-native-jwt"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_key_id: 'muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4',
secret: 'muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG',
platform_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
scopes: [],
profile: 'mudraid-native-jwt'
})
};
fetch('https://api.mudraid.ai/api/v1/auth/token', 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.mudraid.ai/api/v1/auth/token",
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([
'api_key_id' => 'muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4',
'secret' => 'muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG',
'platform_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'scopes' => [
],
'profile' => 'mudraid-native-jwt'
]),
CURLOPT_HTTPHEADER => [
"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.mudraid.ai/api/v1/auth/token"
payload := strings.NewReader("{\n \"api_key_id\": \"muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4\",\n \"secret\": \"muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG\",\n \"platform_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": [],\n \"profile\": \"mudraid-native-jwt\"\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))
}HttpResponse<String> response = Unirest.post("https://api.mudraid.ai/api/v1/auth/token")
.header("Content-Type", "application/json")
.body("{\n \"api_key_id\": \"muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4\",\n \"secret\": \"muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG\",\n \"platform_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": [],\n \"profile\": \"mudraid-native-jwt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mudraid.ai/api/v1/auth/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key_id\": \"muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4\",\n \"secret\": \"muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG\",\n \"platform_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": [],\n \"profile\": \"mudraid-native-jwt\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"token_type": "Bearer",
"expires_in": 900
}{
"detail": "<string>",
"error_code": "<string>"
}{
"detail": "<string>",
"error_code": "<string>"
}Exchange agent credentials + platform_id for a short-lived JWT
The Agent SDK calls this on first request to a platform and again on
401 from that platform (token expiry / revocation). Returns a 15-minute
RS256 JWT whose aud claim binds it to platform_id so the platform
middleware can reject mis-aimed tokens locally.
Empty scopes defaults to the agent’s full permitted scope set for the
platform.
curl --request POST \
--url https://api.mudraid.ai/api/v1/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"api_key_id": "muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4",
"secret": "muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG",
"platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": [],
"profile": "mudraid-native-jwt"
}
'import requests
url = "https://api.mudraid.ai/api/v1/auth/token"
payload = {
"api_key_id": "muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4",
"secret": "muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG",
"platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": [],
"profile": "mudraid-native-jwt"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
api_key_id: 'muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4',
secret: 'muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG',
platform_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
scopes: [],
profile: 'mudraid-native-jwt'
})
};
fetch('https://api.mudraid.ai/api/v1/auth/token', 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.mudraid.ai/api/v1/auth/token",
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([
'api_key_id' => 'muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4',
'secret' => 'muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG',
'platform_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'scopes' => [
],
'profile' => 'mudraid-native-jwt'
]),
CURLOPT_HTTPHEADER => [
"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.mudraid.ai/api/v1/auth/token"
payload := strings.NewReader("{\n \"api_key_id\": \"muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4\",\n \"secret\": \"muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG\",\n \"platform_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": [],\n \"profile\": \"mudraid-native-jwt\"\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))
}HttpResponse<String> response = Unirest.post("https://api.mudraid.ai/api/v1/auth/token")
.header("Content-Type", "application/json")
.body("{\n \"api_key_id\": \"muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4\",\n \"secret\": \"muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG\",\n \"platform_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": [],\n \"profile\": \"mudraid-native-jwt\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mudraid.ai/api/v1/auth/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key_id\": \"muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4\",\n \"secret\": \"muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG\",\n \"platform_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": [],\n \"profile\": \"mudraid-native-jwt\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"token_type": "Bearer",
"expires_in": 900
}{
"detail": "<string>",
"error_code": "<string>"
}{
"detail": "<string>",
"error_code": "<string>"
}Body
Public agent identifier (41 chars, muid_kid_ + 32 hex).
"muid_kid_a3f8e9c1d2b4f5e6a7b8c9d0e1f2a3b4"
Agent secret, set at registration / rotation. Never logged.
"muid_sk_xY9kL2pQ4rT6vN8mZ1cX3bV5nL7kJ9hG"
Target platform's UUID.
Requested scope subset. Empty array expands to the agent's full permitted set for this platform. All requested scopes must be a subset of what the agent is permitted on this platform.
Token profile to mint (Phase 1a). Only mudraid-native-jwt exists
today; unknown values are rejected with 422. The issued JWT carries
the chosen profile as the private claim mudraid_token_profile. The
oauth-at-jwt profile is added in Phase 1b.
mudraid-native-jwt 
