Mint API key
curl --request POST \
--url https://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Production server-to-server key",
"environment": "LIVE",
"scopes": [
"sessions:create",
"sessions:read",
"pricing:read"
]
}
'import requests
url = "https://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-keys"
payload = {
"label": "Production server-to-server key",
"environment": "LIVE",
"scopes": ["sessions:create", "sessions:read", "pricing:read"]
}
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({
label: 'Production server-to-server key',
environment: 'LIVE',
scopes: ['sessions:create', 'sessions:read', 'pricing:read']
})
};
fetch('https://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-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.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-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([
'label' => 'Production server-to-server key',
'environment' => 'LIVE',
'scopes' => [
'sessions:create',
'sessions:read',
'pricing:read'
]
]),
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.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-keys"
payload := strings.NewReader("{\n \"label\": \"Production server-to-server key\",\n \"environment\": \"LIVE\",\n \"scopes\": [\n \"sessions:create\",\n \"sessions:read\",\n \"pricing:read\"\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://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"Production server-to-server key\",\n \"environment\": \"LIVE\",\n \"scopes\": [\n \"sessions:create\",\n \"sessions:read\",\n \"pricing:read\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-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 \"label\": \"Production server-to-server key\",\n \"environment\": \"LIVE\",\n \"scopes\": [\n \"sessions:create\",\n \"sessions:read\",\n \"pricing:read\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Request successful",
"data": {
"id": "3b1a9f0c-2d4e-5f6a-7b8c-9d0e1f2a3b4c",
"workspaceId": "8c3a5b6f-1d2e-4f7a-9b8c-d1e2f3a4b5c6",
"prefix": "lxxn_live_8c3a5b6f_",
"label": "Production server-to-server key",
"environment": "LIVE",
"scopes": [
"sessions:create",
"sessions:read",
"pricing:read"
],
"lastUsedAt": "2026-05-12T08:30:00.000Z",
"revokedAt": null,
"gracePeriodEnd": null,
"createdAt": "2026-05-13T11:30:00.000Z",
"createdByWallet": "0xAbC0000000000000000000000000000000000001",
"plaintext": "lxxn_live_8c3a5b6f_4f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c"
},
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 400,
"code": "INVALID_INPUT",
"message": "Invalid request payload",
"detail": "invalid_input:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 401,
"code": "NOT_AUTHENTICATED",
"message": "Session expired or missing",
"detail": "not_authenticated:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 403,
"code": "NOT_AUTHORIZED",
"message": "Not authorized for this operation",
"detail": "not_authorized:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 503,
"code": "AUTHZ_ERROR",
"message": "Authorization service unavailable",
"detail": "authz_error:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}API keys
Mint API key
Issue a new API key for the workspace. plaintext is returned ONCE — persist client-side immediately; the server only stores sha256. Wallet-session only (API keys can’t mint API keys).
POST
/
api
/
v1
/
workspaces
/
{workspaceId}
/
api-keys
Mint API key
curl --request POST \
--url https://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "Production server-to-server key",
"environment": "LIVE",
"scopes": [
"sessions:create",
"sessions:read",
"pricing:read"
]
}
'import requests
url = "https://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-keys"
payload = {
"label": "Production server-to-server key",
"environment": "LIVE",
"scopes": ["sessions:create", "sessions:read", "pricing:read"]
}
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({
label: 'Production server-to-server key',
environment: 'LIVE',
scopes: ['sessions:create', 'sessions:read', 'pricing:read']
})
};
fetch('https://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-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.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-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([
'label' => 'Production server-to-server key',
'environment' => 'LIVE',
'scopes' => [
'sessions:create',
'sessions:read',
'pricing:read'
]
]),
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.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-keys"
payload := strings.NewReader("{\n \"label\": \"Production server-to-server key\",\n \"environment\": \"LIVE\",\n \"scopes\": [\n \"sessions:create\",\n \"sessions:read\",\n \"pricing:read\"\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://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"Production server-to-server key\",\n \"environment\": \"LIVE\",\n \"scopes\": [\n \"sessions:create\",\n \"sessions:read\",\n \"pricing:read\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-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 \"label\": \"Production server-to-server key\",\n \"environment\": \"LIVE\",\n \"scopes\": [\n \"sessions:create\",\n \"sessions:read\",\n \"pricing:read\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Request successful",
"data": {
"id": "3b1a9f0c-2d4e-5f6a-7b8c-9d0e1f2a3b4c",
"workspaceId": "8c3a5b6f-1d2e-4f7a-9b8c-d1e2f3a4b5c6",
"prefix": "lxxn_live_8c3a5b6f_",
"label": "Production server-to-server key",
"environment": "LIVE",
"scopes": [
"sessions:create",
"sessions:read",
"pricing:read"
],
"lastUsedAt": "2026-05-12T08:30:00.000Z",
"revokedAt": null,
"gracePeriodEnd": null,
"createdAt": "2026-05-13T11:30:00.000Z",
"createdByWallet": "0xAbC0000000000000000000000000000000000001",
"plaintext": "lxxn_live_8c3a5b6f_4f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c"
},
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 400,
"code": "INVALID_INPUT",
"message": "Invalid request payload",
"detail": "invalid_input:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 401,
"code": "NOT_AUTHENTICATED",
"message": "Session expired or missing",
"detail": "not_authenticated:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 403,
"code": "NOT_AUTHORIZED",
"message": "Not authorized for this operation",
"detail": "not_authorized:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 503,
"code": "AUTHZ_ERROR",
"message": "Authorization service unavailable",
"detail": "authz_error:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Example:
"8c3a5b6f-1d2e-4f7a-9b8c-d1e2f3a4b5c6"
Body
application/json
⌘I