Pitchfork
Pitchfork
Into to PitchforkQuick Start Guide
Account ToolsAgent TUIAccounts Formatting ReferencePublic APITriggers Overview
GlossaryFrequently Asked Questions
Advanced Resources

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:

Open 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

  1. Log in to your Pitchfork dashboard
  2. Navigate to Account Settings
  3. Scroll to the API Keys section
  4. Click Create API Key
  5. Choose a name and permission level:
    • Read-only: Can only view data (GET requests)
    • Read-Write: Full access (create, update, delete)
  6. 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

LimitValue
Requests per hour1,000 per API key
Rate limit window1 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/accounts

Query Parameters:

ParameterDescription
pagePage number (default: 1)
pageSizeItems per page, max 100 (default: 20)
searchSearch query
fieldSearch in: display_name, login, nickname, id, or all
statusFilter by status: active, inactive, etc.
groupIdsComma-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
}
FieldRequiredDescription
loginYesAccount login/email
passwordYesAccount password
otpNoTOTP secret for 2FA
pinNoBank PIN
display_nameNoDisplay name
group_idNoGroup to assign
custom_metadataNoCustom 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/proxies

Query Parameters:

ParameterDescription
pagePage number (default: 1)
pageSizeItems per page, max 100 (default: 20)
proxyGroupIdFilter 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-groups

Create 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/scripts

Query Parameters:

ParameterDescription
pagePage number (default: 1)
pageSizeItems per page, max 100 (default: 20)
is_activeFilter by active status (true/false)
client_instance_idFilter 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/triggers

Query Parameters:

ParameterDescription
enabledFilter by enabled status (true/false)

Trigger Types

TypeDescription
skill_level_reachedSpecific skill level threshold
total_level_reachedTotal skill level threshold
quest_points_reachedQuest points threshold
wealth_reachedWealth threshold
runtime_reachedBot runtime threshold
script_completedScript finished execution
account_bannedAccount was banned
connection_failedConnection failure
membership_expiredMembership has expired
membership_expiringMembership 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}/toggle

Quickly enable or disable a trigger.


Code Examples


Error Codes

StatusMeaning
200Success
201Created
400Bad Request — check your input
401Unauthorized — invalid API key
403Forbidden — insufficient permissions
404Not Found — resource doesn't exist
429Rate Limited — slow down
500Server Error — try again later

Need Help?

  • Join our Discord for community support
  • Check the FAQ for common questions

Was this page helpful?

Accounts Formatting Reference

Complete guide to formatting accounts for import into Pitchfork

Triggers Overview

(In Development) Automate complex workflows with Pitchfork's trigger system

On this page

Public APIInteractive API DocumentationQuick StartGetting Your API KeyAuthenticationRate LimitsResponse FormatAccountsList AccountsGet Single AccountCreate AccountUpdate AccountDelete AccountProxiesList ProxiesCreate ProxyUpdate ProxyDelete ProxyProxy GroupsList Proxy GroupsCreate Proxy GroupUpdate Proxy GroupDelete Proxy GroupScriptsList ScriptsCreate Script ActivityUpdate ScriptDelete ScriptTriggersList TriggersTrigger TypesCreate TriggerToggle TriggerCode ExamplesError CodesNeed Help?