Create API key
curl --request POST \
--url https://api.uplint.dev/api/v1/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Backend Service",
"scopes": [
"upload",
"download",
"metadata"
],
"expires_in_days": 90
}
'import requests
url = "https://api.uplint.dev/api/v1/api-keys"
payload = {
"name": "Backend Service",
"scopes": ["upload", "download", "metadata"],
"expires_in_days": 90
}
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: 'Backend Service',
scopes: ['upload', 'download', 'metadata'],
expires_in_days: 90
})
};
fetch('https://api.uplint.dev/api/v1/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.uplint.dev/api/v1/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([
'name' => 'Backend Service',
'scopes' => [
'upload',
'download',
'metadata'
],
'expires_in_days' => 90
]),
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.uplint.dev/api/v1/api-keys"
payload := strings.NewReader("{\n \"name\": \"Backend Service\",\n \"scopes\": [\n \"upload\",\n \"download\",\n \"metadata\"\n ],\n \"expires_in_days\": 90\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.uplint.dev/api/v1/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Backend Service\",\n \"scopes\": [\n \"upload\",\n \"download\",\n \"metadata\"\n ],\n \"expires_in_days\": 90\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uplint.dev/api/v1/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 \"name\": \"Backend Service\",\n \"scopes\": [\n \"upload\",\n \"download\",\n \"metadata\"\n ],\n \"expires_in_days\": 90\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "API key created",
"data": {
"api_key_id": "6612f1a2c3b4d5e6f7890123",
"api_key": "ul_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"name": "Backend Service",
"scopes": [
"upload",
"download",
"metadata"
],
"expires_at": "2026-05-11T00:00:00Z"
},
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "Invalid or missing API key",
"errors": [
"Authentication required"
],
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "Validation error",
"errors": [
"name: field required"
],
"timestamp": "2026-02-10T12:00:00Z"
}API Keys
Create API Key
Create a new API key for the current tenant. The full key value is returned only once in the response — store it securely.
POST
/
api
/
v1
/
api-keys
Create API key
curl --request POST \
--url https://api.uplint.dev/api/v1/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Backend Service",
"scopes": [
"upload",
"download",
"metadata"
],
"expires_in_days": 90
}
'import requests
url = "https://api.uplint.dev/api/v1/api-keys"
payload = {
"name": "Backend Service",
"scopes": ["upload", "download", "metadata"],
"expires_in_days": 90
}
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: 'Backend Service',
scopes: ['upload', 'download', 'metadata'],
expires_in_days: 90
})
};
fetch('https://api.uplint.dev/api/v1/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.uplint.dev/api/v1/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([
'name' => 'Backend Service',
'scopes' => [
'upload',
'download',
'metadata'
],
'expires_in_days' => 90
]),
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.uplint.dev/api/v1/api-keys"
payload := strings.NewReader("{\n \"name\": \"Backend Service\",\n \"scopes\": [\n \"upload\",\n \"download\",\n \"metadata\"\n ],\n \"expires_in_days\": 90\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.uplint.dev/api/v1/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Backend Service\",\n \"scopes\": [\n \"upload\",\n \"download\",\n \"metadata\"\n ],\n \"expires_in_days\": 90\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uplint.dev/api/v1/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 \"name\": \"Backend Service\",\n \"scopes\": [\n \"upload\",\n \"download\",\n \"metadata\"\n ],\n \"expires_in_days\": 90\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "API key created",
"data": {
"api_key_id": "6612f1a2c3b4d5e6f7890123",
"api_key": "ul_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"name": "Backend Service",
"scopes": [
"upload",
"download",
"metadata"
],
"expires_at": "2026-05-11T00:00:00Z"
},
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "Invalid or missing API key",
"errors": [
"Authentication required"
],
"timestamp": "2026-02-10T12:00:00Z"
}{
"status": "ERROR",
"message": "Validation error",
"errors": [
"name: field required"
],
"timestamp": "2026-02-10T12:00:00Z"
}Authorizations
Pass an API key or JWT token. API keys can be sent as Authorization: Bearer <key> or Authorization: <key>.
Body
application/json
A human-readable name for the key.
Required string length:
1 - 255Permissions granted to this key.
Permission scope for an API key. admin grants all permissions.
Available options:
upload, download, metadata, delete, admin Days until the key expires. Omit or pass null for no expiry.
Required range:
1 <= x <= 365Arbitrary key-value metadata.
Was this page helpful?
⌘I

