Create API Key
curl --request POST \
--url https://api.vertracloud.app/v1/users/me/api-keys \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": [
"<string>"
],
"allowed_ips": [
"<string>"
]
}
'import requests
url = "https://api.vertracloud.app/v1/users/me/api-keys"
payload = {
"name": "<string>",
"scopes": ["<string>"],
"allowed_ips": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: ['<string>'], allowed_ips: ['<string>']})
};
fetch('https://api.vertracloud.app/v1/users/me/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.vertracloud.app/v1/users/me/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' => '<string>',
'scopes' => [
'<string>'
],
'allowed_ips' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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.vertracloud.app/v1/users/me/api-keys"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.vertracloud.app/v1/users/me/api-keys")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/users/me/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"response": {
"id": "b7e2d1a4-...",
"name": "CI deploy",
"prefix": "vc_live_a1b2c3d4",
"last4": "9f0e",
"scopes": ["apps:read", "apps:write"],
"allowed_ips": [],
"created_at": "2026-09-11T12:00:00Z",
"last_used_at": null,
"api_key": "vc_live_a1b2c3d4...9f0e"
}
}
API Keys
Create API Key
Creates a new API key. Dashboard session only — an API key gets 403 API_KEY_SCOPE_DENIED.
POST
/
v1
/
users
/
me
/
api-keys
Create API Key
curl --request POST \
--url https://api.vertracloud.app/v1/users/me/api-keys \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": [
"<string>"
],
"allowed_ips": [
"<string>"
]
}
'import requests
url = "https://api.vertracloud.app/v1/users/me/api-keys"
payload = {
"name": "<string>",
"scopes": ["<string>"],
"allowed_ips": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: ['<string>'], allowed_ips: ['<string>']})
};
fetch('https://api.vertracloud.app/v1/users/me/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.vertracloud.app/v1/users/me/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' => '<string>',
'scopes' => [
'<string>'
],
'allowed_ips' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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.vertracloud.app/v1/users/me/api-keys"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.vertracloud.app/v1/users/me/api-keys")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/users/me/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"response": {
"id": "b7e2d1a4-...",
"name": "CI deploy",
"prefix": "vc_live_a1b2c3d4",
"last4": "9f0e",
"scopes": ["apps:read", "apps:write"],
"allowed_ips": [],
"created_at": "2026-09-11T12:00:00Z",
"last_used_at": null,
"api_key": "vc_live_a1b2c3d4...9f0e"
}
}
The full secret is returned only in this response — copy it now. From then on the key is stored as a hash and every other endpoint returns just
prefix/last4.409 API_KEY_LIMIT_REACHED — delete an unused key first.
Body
string
required
1–40 characters.
string[]
required
At least one scope from the catalog. Presets
read/write/full on the dashboard expand to these before the request is sent.string[]
IPs or CIDRs allowed to use the key, up to 20 entries. Omitted or empty means any IP.
Response
APIApiKeyCreated
{
"response": {
"id": "b7e2d1a4-...",
"name": "CI deploy",
"prefix": "vc_live_a1b2c3d4",
"last4": "9f0e",
"scopes": ["apps:read", "apps:write"],
"allowed_ips": [],
"created_at": "2026-09-11T12:00:00Z",
"last_used_at": null,
"api_key": "vc_live_a1b2c3d4...9f0e"
}
}
Errors
| Status | Code | When |
|---|---|---|
| 400 | API_KEY_INVALID_NAME | Name is empty or longer than 40 characters. |
| 400 | API_KEY_INVALID_SCOPES | scopes is empty or has an entry outside the catalog. |
| 400 | API_KEY_INVALID_IPS | An entry in allowed_ips isn’t a valid IP/CIDR, or there are more than 20. |
| 403 | API_KEY_SCOPE_DENIED | The session is an API key. |
| 409 | API_KEY_LIMIT_REACHED | The account already has 10 keys. |