Public API
Programmatically manage your accounts, proxies, scripts, and triggers with the Pitchfork API
Public API
The Pitchfork Public API lets you programmatically manage your bot resources. Build custom integrations, automate account management, or create your own tools on top of Pitchfork.
The Public API is available to all Pitchfork users. Generate your API key from Account Settings in the dashboard.
Interactive API Documentation
Explore the full API with our interactive Swagger UI:
The Swagger UI lets you:
- Browse all available endpoints
- See request/response schemas
- Try out API calls directly in your browser
Quick Start
curl -X GET 'https://api.beta.getpitchfork.com/api/public/v1/accounts' \
-H 'X-API-Key: pfk_live_your_api_key_here'Getting Your API Key
- Log in to your Pitchfork dashboard
- Navigate to Account Settings
- Scroll to the API Keys section
- Click Create API Key
- Choose a name and permission level:
- Read-only: Can only view data (GET requests)
- Read-Write: Full access (create, update, delete)
- Copy your key immediately — it won't be shown again!
Keep your API key secret. Never share it or commit it to version control.
Authentication
Include your API key in every request using one of these methods:
# Option 1: X-API-Key header (recommended)
curl -H 'X-API-Key: pfk_live_abc123...'
# Option 2: Bearer token
curl -H 'Authorization: Bearer pfk_live_abc123...'Rate Limits
| Limit | Value |
|---|---|
| Requests per hour | 1,000 per API key |
| Rate limit window | 1 hour |
When you hit the limit, you'll receive a 429 Too Many Requests response with a Retry-After header.
Response Format
All responses follow this structure:
{
"success": true,
"data": { ... },
"message": "Optional message"
}For errors:
{
"success": false,
"error": "error_message"
}Accounts
Manage your OSRS accounts programmatically.
List Accounts
GET /api/public/v1/accountsQuery Parameters:
| Parameter | Description |
|---|---|
page | Page number (default: 1) |
pageSize | Items per page, max 100 (default: 20) |
search | Search query |
field | Search in: display_name, login, nickname, id, or all |
status | Filter by status: active, inactive, etc. |
groupIds | Comma-separated group IDs |
Get Single Account
GET /api/public/v1/accounts/{id}Create Account
POST /api/public/v1/accounts{
"login": "user@email.com",
"password": "secure_password",
"otp": "TOTP_SECRET",
"pin": "1234",
"display_name": "MyAccount",
"group_id": 5
}| Field | Required | Description |
|---|---|---|
login | Yes | Account login/email |
password | Yes | Account password |
otp | No | TOTP secret for 2FA |
pin | No | Bank PIN |
display_name | No | Display name |
group_id | No | Group to assign |
custom_metadata | No | Custom key-value data |
Update Account
PUT /api/public/v1/accounts/{id}All fields are optional — only include what you want to update.
Delete Account
DELETE /api/public/v1/accounts/{id}Proxies
Manage your proxy pool.
List Proxies
GET /api/public/v1/proxiesQuery Parameters:
| Parameter | Description |
|---|---|
page | Page number (default: 1) |
pageSize | Items per page, max 100 (default: 20) |
proxyGroupId | Filter by proxy group |
Create Proxy
POST /api/public/v1/proxies{
"ip": "192.168.1.100",
"port": 1080,
"username": "proxyuser",
"password": "proxypass",
"proxy_type": "socks5",
"proxy_group_id": 1
}Update Proxy
PUT /api/public/v1/proxies/{id}Delete Proxy
DELETE /api/public/v1/proxies/{id}Proxy Groups
Organize proxies into groups.
List Proxy Groups
GET /api/public/v1/proxy-groupsCreate Proxy Group
POST /api/public/v1/proxy-groups{
"name": "US Proxies",
"description": "United States proxy pool"
}Update Proxy Group
PUT /api/public/v1/proxy-groups/{id}Delete Proxy Group
DELETE /api/public/v1/proxy-groups/{id}Scripts
Manage your script activities.
List Scripts
GET /api/public/v1/scriptsQuery Parameters:
| Parameter | Description |
|---|---|
page | Page number (default: 1) |
pageSize | Items per page, max 100 (default: 20) |
is_active | Filter by active status (true/false) |
client_instance_id | Filter by client instance |
Create Script Activity
POST /api/public/v1/scripts{
"name": "Woodcutting Script",
"script_name": "PerfectWoodcutter",
"client_instance_id": 5,
"script_args": "--trees oak",
"discord_webhook_url": "https://discord.com/api/webhooks/...",
"screenshot_frequency_seconds": 300,
"exit_on_finish": true,
"is_active": true
}Update Script
PUT /api/public/v1/scripts/{id}Delete Script
DELETE /api/public/v1/scripts/{id}Triggers
Automate actions based on account events.
List Triggers
GET /api/public/v1/triggersQuery Parameters:
| Parameter | Description |
|---|---|
enabled | Filter by enabled status (true/false) |
Trigger Types
| Type | Description |
|---|---|
skill_level_reached | Specific skill level threshold |
total_level_reached | Total skill level threshold |
quest_points_reached | Quest points threshold |
wealth_reached | Wealth threshold |
runtime_reached | Bot runtime threshold |
script_completed | Script finished execution |
account_banned | Account was banned |
connection_failed | Connection failure |
membership_expired | Membership has expired |
membership_expiring | Membership expiring soon |
Create Trigger
POST /api/public/v1/triggers{
"name": "99 Woodcutting Alert",
"description": "Alert when any account reaches 99 woodcutting",
"trigger_type": "skill_level_reached",
"target_group_id": 5,
"conditions": {
"skill": "woodcutting",
"level": 99
},
"actions": {
"notify": true,
"discord_webhook": "https://discord.com/api/webhooks/..."
}
}Toggle Trigger
POST /api/public/v1/triggers/{id}/toggleQuickly enable or disable a trigger.
Code Examples
Error Codes
| Status | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request — check your input |
401 | Unauthorized — invalid API key |
403 | Forbidden — insufficient permissions |
404 | Not Found — resource doesn't exist |
429 | Rate Limited — slow down |
500 | Server Error — try again later |
Need Help?
Was this page helpful?