curl -X POST https://api.saturn-pay.com/v1/agents \
-H "Authorization: Bearer sk_agt_..." \
-H "Content-Type: application/json" \
-d '{
"name": "worker-2"
}'
const response = await fetch('https://api.saturn-pay.com/v1/agents', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_agt_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: 'worker-2' })
});
const { id, apiKey } = await response.json();
// Store apiKey securely
import requests
response = requests.post(
'https://api.saturn-pay.com/v1/agents',
headers={'Authorization': 'Bearer sk_agt_...'},
json={'name': 'worker-2'}
)
data = response.json()
api_key = data['apiKey'] # Store securely
{
"id": "agt_ghi789",
"name": "worker-2",
"apiKey": "sk_agt_new_key_here_abc123def456",
"killed": false,
"createdAt": "2024-01-20T15:00:00Z"
}
Agents
Create Agent
Create a new agent
POST
/
v1
/
agents
curl -X POST https://api.saturn-pay.com/v1/agents \
-H "Authorization: Bearer sk_agt_..." \
-H "Content-Type: application/json" \
-d '{
"name": "worker-2"
}'
const response = await fetch('https://api.saturn-pay.com/v1/agents', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_agt_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: 'worker-2' })
});
const { id, apiKey } = await response.json();
// Store apiKey securely
import requests
response = requests.post(
'https://api.saturn-pay.com/v1/agents',
headers={'Authorization': 'Bearer sk_agt_...'},
json={'name': 'worker-2'}
)
data = response.json()
api_key = data['apiKey'] # Store securely
{
"id": "agt_ghi789",
"name": "worker-2",
"apiKey": "sk_agt_new_key_here_abc123def456",
"killed": false,
"createdAt": "2024-01-20T15:00:00Z"
}
Creates a new agent under your account. Returns the agent details including a new API key.
The API key is only returned once. Store it securely.
Request
string
required
Name for the agent. Used for identification in logs and dashboard.
Response
string
Unique agent identifier
string
Agent name
string
API key for this agent. Only returned on creation.
string
ISO 8601 timestamp
curl -X POST https://api.saturn-pay.com/v1/agents \
-H "Authorization: Bearer sk_agt_..." \
-H "Content-Type: application/json" \
-d '{
"name": "worker-2"
}'
const response = await fetch('https://api.saturn-pay.com/v1/agents', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_agt_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: 'worker-2' })
});
const { id, apiKey } = await response.json();
// Store apiKey securely
import requests
response = requests.post(
'https://api.saturn-pay.com/v1/agents',
headers={'Authorization': 'Bearer sk_agt_...'},
json={'name': 'worker-2'}
)
data = response.json()
api_key = data['apiKey'] # Store securely
{
"id": "agt_ghi789",
"name": "worker-2",
"apiKey": "sk_agt_new_key_here_abc123def456",
"killed": false,
"createdAt": "2024-01-20T15:00:00Z"
}
⌘I