Make an API key
curl --request POST \
--url https://api.numi.sh/v1/account/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "laptop"
}
'import requests
url = "https://api.numi.sh/v1/account/keys"
payload = { "name": "laptop" }
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: 'laptop'})
};
fetch('https://api.numi.sh/v1/account/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.numi.sh/v1/account/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([
'name' => 'laptop'
]),
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.numi.sh/v1/account/keys"
payload := strings.NewReader("{\n \"name\": \"laptop\"\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.numi.sh/v1/account/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"laptop\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numi.sh/v1/account/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 \"name\": \"laptop\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"key": {
"id": 123,
"prefix": "numi_live_Ab3x",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"full_key": "<string>"
}
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA",
"as_of": "2026-10-19T12:34:56.789Z"
}
}{
"error": {
"code": "bad_request",
"message": "limit: must be from 1 to 50"
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}{
"error": {
"code": "unauthorized",
"message": "Sign in to numi to manage your account."
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}{
"error": {
"code": "key_limit",
"message": "This account has 3 active keys, which is the limit. Revoke a key before you make a new one."
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The sandbox plan has a limit of 20 requests a minute. Retry in 12 seconds.",
"retry_after": 12,
"scope": "minute"
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}{
"error": {
"code": "service_unavailable",
"message": "Accounts are not configured on this server, so you cannot sign in here."
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}Account (web app)
Make an API key
Makes a key for the account and returns it whole. This is the only time the key is shown, so store it at once. An account can have as many active keys as its plan allows.
POST
/
account
/
keys
Make an API key
curl --request POST \
--url https://api.numi.sh/v1/account/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "laptop"
}
'import requests
url = "https://api.numi.sh/v1/account/keys"
payload = { "name": "laptop" }
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: 'laptop'})
};
fetch('https://api.numi.sh/v1/account/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.numi.sh/v1/account/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([
'name' => 'laptop'
]),
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.numi.sh/v1/account/keys"
payload := strings.NewReader("{\n \"name\": \"laptop\"\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.numi.sh/v1/account/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"laptop\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numi.sh/v1/account/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 \"name\": \"laptop\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"key": {
"id": 123,
"prefix": "numi_live_Ab3x",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"full_key": "<string>"
}
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA",
"as_of": "2026-10-19T12:34:56.789Z"
}
}{
"error": {
"code": "bad_request",
"message": "limit: must be from 1 to 50"
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}{
"error": {
"code": "unauthorized",
"message": "Sign in to numi to manage your account."
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}{
"error": {
"code": "key_limit",
"message": "This account has 3 active keys, which is the limit. Revoke a key before you make a new one."
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The sandbox plan has a limit of 20 requests a minute. Retry in 12 seconds.",
"retry_after": 12,
"scope": "minute"
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}{
"error": {
"code": "service_unavailable",
"message": "Accounts are not configured on this server, so you cannot sign in here."
},
"meta": {
"request_id": "req_Qm3xYb9Kd2LpR7wA"
}
}Authorizations
A session of the numi web app, sent as Authorization: Bearer <token>. Only the account routes take it.
Body
application/json
A name for the key, so that you can tell it apart from your other keys, such as the name of the machine where you use it.
Maximum string length:
100Example:
"laptop"