API Documentation
Complete reference for the MyRobots.app REST API
Sections
POST
/api/v1/auth/api-keysAuth RequiredCreate a new API key
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Name for the API key |
Code Examples
cURL
curl -X POST \
https://api.myrobots.app/api/v1/auth/api-keys \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_value"
}'JavaScript
const response = await fetch('https://api.myrobots.app/api/v1/auth/api-keys', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "example_value"
})
});
const data = await response.json();
console.log(data);Python
import requests
response = requests.post(
'https://api.myrobots.app/api/v1/auth/api-keys',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
"name": "example_value"
}
)
data = response.json()
print(data)Response
200API key created successfully
{
"id": "ak_abc123",
"name": "Production Key",
"key": "sk_live_1234567890abcdef",
"userId": "user123",
"createdAt": "2025-07-24T12:00:00Z"
}