Code Examples
Open-source scripts, apps, and tools that show how to build on the ProWorkflow API v4.
Source code for all examples is available on GitHub at github.com/Proactive-Software/proworkflow-api-examples.
Authentication
Every example supports both API authentication methods:
- API Key — find yours in ProWorkflow under Settings → Integrations → API Keys
- Bearer Token (JWT) — obtain via
POST /auth, then pass asAuthorization: Bearer <token>
See the Authentication guide for full details.
Project Dashboard
A single-file browser dashboard showing active projects and upcoming tasks — no build step, no server, no dependencies.
Language: JavaScript (browser)
Source: js/dashboard
What it shows
- Count of active projects in your account
- Tasks due this week
- Overdue tasks
- Table of all active tasks due in the next 14 days, sorted by due date, with overdue rows highlighted
How to use it
- Open
index.htmlin a text editor and set your API key at the top of the<script>block - Open
index.htmlin a browser — that's it
API calls made
GET /projects?status=active&fields=id,name&pagesize=500
GET /projects/items?status=active&duedateto=<+14 days>&sortby=duedate&sortorder=asc&fields=id,name,duedate,priorityid,projectid,projecttitle&pagesize=100
Both calls run in parallel. This example demonstrates field selection, date filtering, meta.total for accurate counts, and joining two resources client-side.
Webhook → Slack
A Node.js server that receives ProWorkflow webhook events and posts notifications to a Slack channel.
Language: JavaScript (Node.js)
Source: js/webhook-to-slack
How it works
- ProWorkflow fires a
POSTto your server when a project or task is created, updated, or completed - The server fetches the full resource from the v4 API (
GET /projects/{id}orGET /projects/items/{id}) - The server posts a formatted message to your Slack incoming webhook URL
Each event type has its own URL path — you register a separate webhook subscription in ProWorkflow for each event you want to receive.
Supported events
Projects: newproject, editproject, completeproject, deleteproject
Tasks: newtask, edittask, completetask, deletetask
Setup
npm install
# edit CONFIG block in server.js with your PWF API key and Slack webhook URL
npm start
For local testing, expose your server with ngrok and register the public URL as a webhook subscription via POST /settings/webhooks.
This example demonstrates
Event-driven integrations, webhook payload handling, fetching full resource details from a webhook trigger ID, and posting to third-party services.
Data Export
Downloads all account data from the ProWorkflow API v4 to local JSON files. Useful for backups, migrations, or offline analysis.
Language: Python 3.10+
Source: python/data-export
What it exports
- Core resources: companies, contacts, projects, invoices, quotes, messages, time, files
- Sub-resources: project items and phases, invoice items and phases, quote items and phases, template items and phases
- Settings: account, contacts, projects, invoices, quotes, webhooks, work stages, and more
All data is saved to an output/ directory as individual JSON files, plus a _manifest.json with export metadata (timestamp, request count, errors).
Usage
pip install requests
# With API key
python export.py --base-url https://api.proworkflow.com/api/v4 --api-key YOUR-API-KEY
# With config file
cp config.example.json config.json
python export.py --config config.json
This example demonstrates
Paginated list traversal across every major resource type, handling nested sub-resources, and writing a resilient export script that logs errors without stopping the full run.
CSV Contact Importer
Import contacts into ProWorkflow from a CSV file, with a dry-run mode to preview rows before creating anything.
Language: Python 3.10+
Source: python/csv-import
CSV format
A template CSV (contacts_template.csv) is included. Supported columns include firstname, lastname, type (client, contractor, staff, other, supplier), email, workphone, mobilephone, title, companyid, address1–address2, city, state, zipcode, country, and allowlogin. Blank columns are ignored.
Usage
pip install requests
# Preview without creating (dry run)
python import_contacts.py \
--base-url https://api.proworkflow.com/api/v4 \
--api-key YOUR-API-KEY \
--file contacts.csv \
--dry-run
# Import for real
python import_contacts.py \
--base-url https://api.proworkflow.com/api/v4 \
--api-key YOUR-API-KEY \
--file contacts.csv
This example demonstrates
Batch POST operations, reading and validating CSV input, dry-run patterns, and linking contacts to existing companies via companyid.
PWF CLI
A full command-line application built on the ProWorkflow API — a real-world example of what you can build with v4.
Language: Go
Source: github.com/Proactive-Software/pwf-cli
What it does
pwf-cli lets you interact with ProWorkflow from the terminal: list and manage projects, tasks, contacts, time entries, and more — without opening a browser.
It demonstrates how to build a complete application on top of the API: authentication flows, persistent config, multiple resource types, and a clean command structure.
This example demonstrates
API key and JWT authentication, building a multi-command CLI, managing local configuration, and covering a broad surface area of the v4 API in a single application.