Mint a delegated token for an app or an agent run (AS2)
curl --request POST \
--url https://api.eddy.engineer/v1/tokens.mint \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"scopes": [
"<string>"
],
"rev": "<string>",
"ttl_s": 43230
}
'import requests
url = "https://api.eddy.engineer/v1/tokens.mint"
payload = {
"id": "<string>",
"scopes": ["<string>"],
"rev": "<string>",
"ttl_s": 43230
}
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({id: '<string>', scopes: ['<string>'], rev: '<string>', ttl_s: 43230})
};
fetch('https://api.eddy.engineer/v1/tokens.mint', 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.eddy.engineer/v1/tokens.mint",
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([
'id' => '<string>',
'scopes' => [
'<string>'
],
'rev' => '<string>',
'ttl_s' => 43230
]),
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.eddy.engineer/v1/tokens.mint"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"rev\": \"<string>\",\n \"ttl_s\": 43230\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.eddy.engineer/v1/tokens.mint")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"rev\": \"<string>\",\n \"ttl_s\": 43230\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/tokens.mint")
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 \"id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"rev\": \"<string>\",\n \"ttl_s\": 43230\n}"
response = http.request(request)
puts response.read_body{
"record": {
"created_at_unix_ms": 123,
"expires_at_unix_ms": 123,
"id": "<string>",
"kind": "<string>",
"minted_by": "<string>",
"on_behalf_of": "<string>",
"org": "<string>",
"principal": "<string>",
"rev": "<string>",
"revoked": true,
"scopes": [
"<string>"
],
"token_hash": "<string>"
},
"token": "<string>"
}Meta
Mint a delegated token for an app or an agent run (AS2)
A signed-in person mints a short-lived token for one of their apps (kind: app, rev = the app revision) or agent runs (kind: agent, rev = the run). The token acts FOR that person — it sees what they see — inside its scopes (<family>:<effect>, never admin), until ttl_s (60..=86400, default 3600) runs out or it is revoked. Present it as Authorization: Bearer ssd_.... It is never a user: it cannot mint keys or tokens, cannot pass a human gate (403 HUMAN_GATE_NEEDS_HUMAN) and every call it makes is on the audit trail (GET /v1/audit). Keys, anonymous callers and delegates may not mint (403). The token is answered exactly once; only its BLAKE3 hash is stored.
POST
/
v1
/
tokens.mint
Mint a delegated token for an app or an agent run (AS2)
curl --request POST \
--url https://api.eddy.engineer/v1/tokens.mint \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"scopes": [
"<string>"
],
"rev": "<string>",
"ttl_s": 43230
}
'import requests
url = "https://api.eddy.engineer/v1/tokens.mint"
payload = {
"id": "<string>",
"scopes": ["<string>"],
"rev": "<string>",
"ttl_s": 43230
}
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({id: '<string>', scopes: ['<string>'], rev: '<string>', ttl_s: 43230})
};
fetch('https://api.eddy.engineer/v1/tokens.mint', 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.eddy.engineer/v1/tokens.mint",
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([
'id' => '<string>',
'scopes' => [
'<string>'
],
'rev' => '<string>',
'ttl_s' => 43230
]),
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.eddy.engineer/v1/tokens.mint"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"rev\": \"<string>\",\n \"ttl_s\": 43230\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.eddy.engineer/v1/tokens.mint")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"rev\": \"<string>\",\n \"ttl_s\": 43230\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/tokens.mint")
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 \"id\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"rev\": \"<string>\",\n \"ttl_s\": 43230\n}"
response = http.request(request)
puts response.read_body{
"record": {
"created_at_unix_ms": 123,
"expires_at_unix_ms": 123,
"id": "<string>",
"kind": "<string>",
"minted_by": "<string>",
"on_behalf_of": "<string>",
"org": "<string>",
"principal": "<string>",
"rev": "<string>",
"revoked": true,
"scopes": [
"<string>"
],
"token_hash": "<string>"
},
"token": "<string>"
}Body
application/json