Create a new Signing Key for an Organization
curl --request POST \
--url https://manage.nervescloud.com/api/orgs/{org_name}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "-----BEGIN PUBLIC KEY-----\nMIIBoj...\n-----END PUBLIC KEY-----\n",
"name": "ESP release",
"scheme": "secure_boot_v2_rsa"
}
'import requests
url = "https://manage.nervescloud.com/api/orgs/{org_name}/keys"
payload = {
"key": "-----BEGIN PUBLIC KEY-----
MIIBoj...
-----END PUBLIC KEY-----
",
"name": "ESP release",
"scheme": "secure_boot_v2_rsa"
}
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({
key: '-----BEGIN PUBLIC KEY-----\nMIIBoj...\n-----END PUBLIC KEY-----\n',
name: 'ESP release',
scheme: 'secure_boot_v2_rsa'
})
};
fetch('https://manage.nervescloud.com/api/orgs/{org_name}/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://manage.nervescloud.com/api/orgs/{org_name}/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([
'key' => '-----BEGIN PUBLIC KEY-----
MIIBoj...
-----END PUBLIC KEY-----
',
'name' => 'ESP release',
'scheme' => 'secure_boot_v2_rsa'
]),
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://manage.nervescloud.com/api/orgs/{org_name}/keys"
payload := strings.NewReader("{\n \"key\": \"-----BEGIN PUBLIC KEY-----\\nMIIBoj...\\n-----END PUBLIC KEY-----\\n\",\n \"name\": \"ESP release\",\n \"scheme\": \"secure_boot_v2_rsa\"\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://manage.nervescloud.com/api/orgs/{org_name}/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"-----BEGIN PUBLIC KEY-----\\nMIIBoj...\\n-----END PUBLIC KEY-----\\n\",\n \"name\": \"ESP release\",\n \"scheme\": \"secure_boot_v2_rsa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://manage.nervescloud.com/api/orgs/{org_name}/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 \"key\": \"-----BEGIN PUBLIC KEY-----\\nMIIBoj...\\n-----END PUBLIC KEY-----\\n\",\n \"name\": \"ESP release\",\n \"scheme\": \"secure_boot_v2_rsa\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"key": "abc123=",
"name": "QA",
"scheme": "ed25519"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"identifier": [
"can't be blank"
]
}
}Signing Keys
Create a new Signing Key for an Organization
The scheme decides how key is validated and what it can verify:
ed25519(the default) — an fwup signing key, base64 encoded, as produced byfwup -g. Verifies.fwarchives.secure_boot_v2_rsa— a PEM-encoded RSA-3072 public key, the public half of anespsecure.pySecure Boot v2 signing key. Verifies ESP-IDF.binimages.
A key is only ever a candidate for firmware of its own scheme.
POST
/
api
/
orgs
/
{org_name}
/
keys
Create a new Signing Key for an Organization
curl --request POST \
--url https://manage.nervescloud.com/api/orgs/{org_name}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "-----BEGIN PUBLIC KEY-----\nMIIBoj...\n-----END PUBLIC KEY-----\n",
"name": "ESP release",
"scheme": "secure_boot_v2_rsa"
}
'import requests
url = "https://manage.nervescloud.com/api/orgs/{org_name}/keys"
payload = {
"key": "-----BEGIN PUBLIC KEY-----
MIIBoj...
-----END PUBLIC KEY-----
",
"name": "ESP release",
"scheme": "secure_boot_v2_rsa"
}
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({
key: '-----BEGIN PUBLIC KEY-----\nMIIBoj...\n-----END PUBLIC KEY-----\n',
name: 'ESP release',
scheme: 'secure_boot_v2_rsa'
})
};
fetch('https://manage.nervescloud.com/api/orgs/{org_name}/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://manage.nervescloud.com/api/orgs/{org_name}/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([
'key' => '-----BEGIN PUBLIC KEY-----
MIIBoj...
-----END PUBLIC KEY-----
',
'name' => 'ESP release',
'scheme' => 'secure_boot_v2_rsa'
]),
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://manage.nervescloud.com/api/orgs/{org_name}/keys"
payload := strings.NewReader("{\n \"key\": \"-----BEGIN PUBLIC KEY-----\\nMIIBoj...\\n-----END PUBLIC KEY-----\\n\",\n \"name\": \"ESP release\",\n \"scheme\": \"secure_boot_v2_rsa\"\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://manage.nervescloud.com/api/orgs/{org_name}/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"-----BEGIN PUBLIC KEY-----\\nMIIBoj...\\n-----END PUBLIC KEY-----\\n\",\n \"name\": \"ESP release\",\n \"scheme\": \"secure_boot_v2_rsa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://manage.nervescloud.com/api/orgs/{org_name}/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 \"key\": \"-----BEGIN PUBLIC KEY-----\\nMIIBoj...\\n-----END PUBLIC KEY-----\\n\",\n \"name\": \"ESP release\",\n \"scheme\": \"secure_boot_v2_rsa\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"key": "abc123=",
"name": "QA",
"scheme": "ed25519"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"detail": "Resource Not Found or Authorization Insufficient"
}
}{
"errors": {
"identifier": [
"can't be blank"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization Name
Body
application/json
Signing Key creation request body
POST body for adding a Signing Key to an Organization.
scheme defaults to ed25519 when omitted, which is what every key was
before ESP-IDF support — so existing clients keep working unchanged.
Response
Signing Key
Response schema for a single Signing Key
Show child attributes
Show child attributes
Example:
{
"key": "abc123=",
"name": "CI",
"scheme": "ed25519"
}

