curl --request POST \
--url https://api.peachdeskai.com/api/v1/admin/service-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tier_name": "<string>",
"name": "<string>",
"is_test": false,
"expires_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.peachdeskai.com/api/v1/admin/service-keys"
payload = {
"tier_name": "<string>",
"name": "<string>",
"is_test": False,
"expires_at": "2023-11-07T05:31:56Z"
}
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({
tier_name: '<string>',
name: '<string>',
is_test: false,
expires_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.peachdeskai.com/api/v1/admin/service-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.peachdeskai.com/api/v1/admin/service-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([
'tier_name' => '<string>',
'name' => '<string>',
'is_test' => false,
'expires_at' => '2023-11-07T05:31:56Z'
]),
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.peachdeskai.com/api/v1/admin/service-keys"
payload := strings.NewReader("{\n \"tier_name\": \"<string>\",\n \"name\": \"<string>\",\n \"is_test\": false,\n \"expires_at\": \"2023-11-07T05:31:56Z\"\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.peachdeskai.com/api/v1/admin/service-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tier_name\": \"<string>\",\n \"name\": \"<string>\",\n \"is_test\": false,\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/admin/service-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 \"tier_name\": \"<string>\",\n \"name\": \"<string>\",\n \"is_test\": false,\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"key": {
"id": 123,
"organization_id": 123,
"key_prefix": "<string>",
"tier_name": "<string>",
"reserved_concurrent_slots": 123,
"commitment_months": 123,
"used_minutes_this_month": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"overage_rate_usd_per_min_override": "<string>",
"included_minutes_per_month_override": 123,
"addons": {},
"floor_override_reason": "<string>",
"floor_override_approved_by": 123,
"month_anchor": "2023-12-25",
"last_used_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"created_by": 123
},
"api_key": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Issue Service Key
Issue a new service key for an organization.
The cleartext key is returned ONCE in the response and never persisted — only the bcrypt hash is stored.
curl --request POST \
--url https://api.peachdeskai.com/api/v1/admin/service-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tier_name": "<string>",
"name": "<string>",
"is_test": false,
"expires_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.peachdeskai.com/api/v1/admin/service-keys"
payload = {
"tier_name": "<string>",
"name": "<string>",
"is_test": False,
"expires_at": "2023-11-07T05:31:56Z"
}
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({
tier_name: '<string>',
name: '<string>',
is_test: false,
expires_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.peachdeskai.com/api/v1/admin/service-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.peachdeskai.com/api/v1/admin/service-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([
'tier_name' => '<string>',
'name' => '<string>',
'is_test' => false,
'expires_at' => '2023-11-07T05:31:56Z'
]),
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.peachdeskai.com/api/v1/admin/service-keys"
payload := strings.NewReader("{\n \"tier_name\": \"<string>\",\n \"name\": \"<string>\",\n \"is_test\": false,\n \"expires_at\": \"2023-11-07T05:31:56Z\"\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.peachdeskai.com/api/v1/admin/service-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tier_name\": \"<string>\",\n \"name\": \"<string>\",\n \"is_test\": false,\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/admin/service-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 \"tier_name\": \"<string>\",\n \"name\": \"<string>\",\n \"is_test\": false,\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"key": {
"id": 123,
"organization_id": 123,
"key_prefix": "<string>",
"tier_name": "<string>",
"reserved_concurrent_slots": 123,
"commitment_months": 123,
"used_minutes_this_month": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"overage_rate_usd_per_min_override": "<string>",
"included_minutes_per_month_override": 123,
"addons": {},
"floor_override_reason": "<string>",
"floor_override_approved_by": 123,
"month_anchor": "2023-12-25",
"last_used_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"created_by": 123
},
"api_key": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Interactive user session: the login JWT, sent as Authorization: Bearer <token>.
Query Parameters
Org to issue the key to
Body
Response
Successful Response
One-time response when a new service key is issued. The api_key
field is the cleartext key — the only time it is ever sent over the
wire. The customer must store it; the operator cannot recover it later
(only the bcrypt hash is persisted).
Service key metadata — does NOT include the actual key value. The cleartext key is shown to the customer exactly once via ServiceKeyIssuedResponse at creation time.
Show child attributes
Show child attributes
Cleartext key. SHOWN ONCE. Cannot be retrieved later — the operator only stores the bcrypt hash. The customer must copy this immediately.

