Quickstart
This walks you through sending your first approval request: your agent proposes an action, a human reviews it in the Pump Up workspace, and your agent acts on their decision.
Prerequisites
- A Pump Up account and an API key from the dashboard
- Python 3.9+ (or Node 18+ for TypeScript)
1. Install the SDK
2. Set your API key
The SDK reads your key from the PUMPUP_API_KEY environment variable.
3. Request an approval and read the decision
Run it, then open the Pump Up workspace — the request is waiting on the task with the summary and context you sent. Approve it, and your script prints the decision.
What just happened
- Tasks and projects. Every request lives on a task (the case) inside a project (which routes it). The
generalproject exists in every account; create dedicated ones in the dashboard for real routing. - The poll model.
approvals.createreturns immediately with an event id.get_resultreturns the decision once a human acts, or nothing (None/undefined) while it’s still pending — so you poll. - Idempotency. Every write takes an idempotency key; a retry with the same key returns the original event instead of recording a duplicate.
- The outcome.
result.outcome.typeis one ofAPPROVE,REJECT,EDIT_AND_APPROVE,ESCALATE, orREQUEST_MORE_INFO. When a reviewer edits before approving, their change is described inoutcome.note.