Make an API key
curl --request POST \
--url https://dojo.frogbot.ai/api/api-keys/mint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "GitHub Actions deploy",
"expiresAt": "2027-02-07",
"data": {
"workspace": "6650f1c2a4b5c6d7e8f90123"
}
}
'import requests
url = "https://dojo.frogbot.ai/api/api-keys/mint"
payload = {
"name": "GitHub Actions deploy",
"expiresAt": "2027-02-07",
"data": { "workspace": "6650f1c2a4b5c6d7e8f90123" }
}
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({
name: 'GitHub Actions deploy',
expiresAt: '2027-02-07',
data: {workspace: '6650f1c2a4b5c6d7e8f90123'}
})
};
fetch('https://dojo.frogbot.ai/api/api-keys/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://dojo.frogbot.ai/api/api-keys/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([
'name' => 'GitHub Actions deploy',
'expiresAt' => '2027-02-07',
'data' => [
'workspace' => '6650f1c2a4b5c6d7e8f90123'
]
]),
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://dojo.frogbot.ai/api/api-keys/mint"
payload := strings.NewReader("{\n \"name\": \"GitHub Actions deploy\",\n \"expiresAt\": \"2027-02-07\",\n \"data\": {\n \"workspace\": \"6650f1c2a4b5c6d7e8f90123\"\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://dojo.frogbot.ai/api/api-keys/mint")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"GitHub Actions deploy\",\n \"expiresAt\": \"2027-02-07\",\n \"data\": {\n \"workspace\": \"6650f1c2a4b5c6d7e8f90123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dojo.frogbot.ai/api/api-keys/mint")
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 \"name\": \"GitHub Actions deploy\",\n \"expiresAt\": \"2027-02-07\",\n \"data\": {\n \"workspace\": \"6650f1c2a4b5c6d7e8f90123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"prefix": "<string>",
"token": "<string>",
"name": "<string>"
}API keys
Make an API key
Answers the key’s token once; store it. Needs a browser sign-in or a key with canMint; a key made by a key records it as mintedBy, expires no later than it, and stays in its workspace. expiresAt is a future day such as 2027-02-07 or a date and time with a zone; leave it out and the key works until it’s revoked. data.canMint lets the new key make keys too, and only a sign-in that may make keys can give it. data.workspace keeps the new key to one workspace you’re in; a workspace key or an agent can only name its own. Errors use the plugin’s own { error } shape: 401, 403 (“session required”) and 404.
POST
/
api
/
api-keys
/
mint
Make an API key
curl --request POST \
--url https://dojo.frogbot.ai/api/api-keys/mint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "GitHub Actions deploy",
"expiresAt": "2027-02-07",
"data": {
"workspace": "6650f1c2a4b5c6d7e8f90123"
}
}
'import requests
url = "https://dojo.frogbot.ai/api/api-keys/mint"
payload = {
"name": "GitHub Actions deploy",
"expiresAt": "2027-02-07",
"data": { "workspace": "6650f1c2a4b5c6d7e8f90123" }
}
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({
name: 'GitHub Actions deploy',
expiresAt: '2027-02-07',
data: {workspace: '6650f1c2a4b5c6d7e8f90123'}
})
};
fetch('https://dojo.frogbot.ai/api/api-keys/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://dojo.frogbot.ai/api/api-keys/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([
'name' => 'GitHub Actions deploy',
'expiresAt' => '2027-02-07',
'data' => [
'workspace' => '6650f1c2a4b5c6d7e8f90123'
]
]),
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://dojo.frogbot.ai/api/api-keys/mint"
payload := strings.NewReader("{\n \"name\": \"GitHub Actions deploy\",\n \"expiresAt\": \"2027-02-07\",\n \"data\": {\n \"workspace\": \"6650f1c2a4b5c6d7e8f90123\"\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://dojo.frogbot.ai/api/api-keys/mint")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"GitHub Actions deploy\",\n \"expiresAt\": \"2027-02-07\",\n \"data\": {\n \"workspace\": \"6650f1c2a4b5c6d7e8f90123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dojo.frogbot.ai/api/api-keys/mint")
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 \"name\": \"GitHub Actions deploy\",\n \"expiresAt\": \"2027-02-07\",\n \"data\": {\n \"workspace\": \"6650f1c2a4b5c6d7e8f90123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"prefix": "<string>",
"token": "<string>",
"name": "<string>"
}