Create an API key
curl --request POST \
--url https://api.talkpilot.io/v1/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "n8n Production",
"permissions": [
"agents:read",
"agents:write",
"employees:read",
"employees:write",
"tools:read",
"tools:write"
],
"rate_limit_per_minute": 60,
"expires_at": null
}
'import requests
url = "https://api.talkpilot.io/v1/api-keys"
payload = {
"name": "n8n Production",
"permissions": ["agents:read", "agents:write", "employees:read", "employees:write", "tools:read", "tools:write"],
"rate_limit_per_minute": 60,
"expires_at": None
}
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: 'n8n Production',
permissions: [
'agents:read',
'agents:write',
'employees:read',
'employees:write',
'tools:read',
'tools:write'
],
rate_limit_per_minute: 60,
expires_at: null
})
};
fetch('https://api.talkpilot.io/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.talkpilot.io/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' => 'n8n Production',
'permissions' => [
'agents:read',
'agents:write',
'employees:read',
'employees:write',
'tools:read',
'tools:write'
],
'rate_limit_per_minute' => 60,
'expires_at' => null
]),
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.talkpilot.io/v1/api-keys"
payload := strings.NewReader("{\n \"name\": \"n8n Production\",\n \"permissions\": [\n \"agents:read\",\n \"agents:write\",\n \"employees:read\",\n \"employees:write\",\n \"tools:read\",\n \"tools:write\"\n ],\n \"rate_limit_per_minute\": 60,\n \"expires_at\": null\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.talkpilot.io/v1/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"n8n Production\",\n \"permissions\": [\n \"agents:read\",\n \"agents:write\",\n \"employees:read\",\n \"employees:write\",\n \"tools:read\",\n \"tools:write\"\n ],\n \"rate_limit_per_minute\": 60,\n \"expires_at\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talkpilot.io/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\": \"n8n Production\",\n \"permissions\": [\n \"agents:read\",\n \"agents:write\",\n \"employees:read\",\n \"employees:write\",\n \"tools:read\",\n \"tools:write\"\n ],\n \"rate_limit_per_minute\": 60,\n \"expires_at\": null\n}"
response = http.request(request)
puts response.read_body{
"key": "tp_live_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"permissions": [
"<string>"
],
"allowed_agent_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rate_limit_per_minute": 123,
"rate_limit_per_hour": 123,
"created_at": "2023-11-07T05:31:56Z"
}API Keys
Create an API key
Creates a new API key. The raw key is returned only once in the response. Store it securely — it cannot be retrieved again.
organization_id is optional and sets the key’s home organization; it must be
one of the caller’s memberships (otherwise 400). The key’s data scope at
request time is resolved from the creator’s memberships, not from this field.
Requires Supabase JWT authentication (not API key auth); dev_admin only.
POST
/
v1
/
api-keys
Create an API key
curl --request POST \
--url https://api.talkpilot.io/v1/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "n8n Production",
"permissions": [
"agents:read",
"agents:write",
"employees:read",
"employees:write",
"tools:read",
"tools:write"
],
"rate_limit_per_minute": 60,
"expires_at": null
}
'import requests
url = "https://api.talkpilot.io/v1/api-keys"
payload = {
"name": "n8n Production",
"permissions": ["agents:read", "agents:write", "employees:read", "employees:write", "tools:read", "tools:write"],
"rate_limit_per_minute": 60,
"expires_at": None
}
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: 'n8n Production',
permissions: [
'agents:read',
'agents:write',
'employees:read',
'employees:write',
'tools:read',
'tools:write'
],
rate_limit_per_minute: 60,
expires_at: null
})
};
fetch('https://api.talkpilot.io/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.talkpilot.io/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' => 'n8n Production',
'permissions' => [
'agents:read',
'agents:write',
'employees:read',
'employees:write',
'tools:read',
'tools:write'
],
'rate_limit_per_minute' => 60,
'expires_at' => null
]),
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.talkpilot.io/v1/api-keys"
payload := strings.NewReader("{\n \"name\": \"n8n Production\",\n \"permissions\": [\n \"agents:read\",\n \"agents:write\",\n \"employees:read\",\n \"employees:write\",\n \"tools:read\",\n \"tools:write\"\n ],\n \"rate_limit_per_minute\": 60,\n \"expires_at\": null\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.talkpilot.io/v1/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"n8n Production\",\n \"permissions\": [\n \"agents:read\",\n \"agents:write\",\n \"employees:read\",\n \"employees:write\",\n \"tools:read\",\n \"tools:write\"\n ],\n \"rate_limit_per_minute\": 60,\n \"expires_at\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talkpilot.io/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\": \"n8n Production\",\n \"permissions\": [\n \"agents:read\",\n \"agents:write\",\n \"employees:read\",\n \"employees:write\",\n \"tools:read\",\n \"tools:write\"\n ],\n \"rate_limit_per_minute\": 60,\n \"expires_at\": null\n}"
response = http.request(request)
puts response.read_body{
"key": "tp_live_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"permissions": [
"<string>"
],
"allowed_agent_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rate_limit_per_minute": 123,
"rate_limit_per_hour": 123,
"created_at": "2023-11-07T05:31:56Z"
}Authorizations
Supabase JWT token (for Dashboard-only endpoints like API key management)
Body
application/json
Required string length:
1 - 255Minimum array length:
1Available permissions:
agents:read— List and view agent configurationsagents:write— Update agent settingsemployees:read— List and view employeesemployees:write— Create, update, delete employeestools:read— List and view agent toolstools:write— Create, update, delete toolsforwarding:read— List forwarding slotsforwarding:write— Create, update, delete forwarding slotskb:read— List and view knowledge base documentskb:write— Create, update, delete KB documentscalls:read— List and view call recordsorganization:read— View organization settingsorganization:write— Update organization settingscontacts:read— List and view contacts (customer database)contacts:write— Create, update, delete contacts
Available options:
agents:read, agents:write, employees:read, employees:write, tools:read, tools:write, forwarding:read, forwarding:write, kb:read, kb:write, calls:read, organization:read, organization:write, contacts:read, contacts:write Home organization of the key; must be one of the caller's memberships. Defaults to the profile organization
Required range:
1 <= x <= 600Required range:
1 <= x <= 10000Optional expiration date (null = never expires)
Response
API key created (raw key shown only once)