Public API for external systems
Public API for external systems
Use this when another system needs to create a Flightplan job from a sold order, read staffing, or pull monthly demand vs capacity. This is the org-keyed public API. It is not the in-app session API and it is not MCP.
Which surface should I use?
| Surface | Who | Auth | Use it for |
|---|---|---|---|
/api/public/v1 (also https://api.flpl.ai/v1) | External servers | X-Flightplan-Key: fpk_live_… | Create a job, read staffing, monthly capacity, receive webhooks |
/fp-mcp | Claude, Grok, other assistants | Authorization: Bearer flightplan_… | MCP tools (list, plan, allocate) |
In-app /api/v1/apps/flightplan/… | The Flightplan UI | Signed-in session | Everything you see on screen |
Callers must use fpk_live_ keys. An MCP flightplan_ key is rejected on the public API. A public key cannot call MCP or the in-app routes.
Base URL and live schema
https://api.flpl.ai/v1
https://flpl.ai/api/public/v1
Both reach the same public API. Prefer api.flpl.ai for integrations.
- Human docs (always on): https://api.flpl.ai/v1/docs (same content as
/api/public/v1/docs) - OpenAPI 3.1: https://api.flpl.ai/v1/openapi.json
The {org_slug} in every path must match the key’s organization (the slug in your Flightplan URL). A mismatch returns 404, not 403, so callers cannot probe other orgs.
Mint a developer key
- Sign in as an organization admin.
- Open Settings → Developer API Keys (separate from MCP API Keys).
- Create a key. The secret is shown once.
- Send it on every request:
X-Flightplan-Key: fpk_live_…
Authorization: Bearer fpk_live_… is also accepted. Keys are hashed at rest, can expire, can be IP-allowlisted, and are rate-limited (default 60/minute, 1000/hour). Revoking a key disables its webhooks.
Scopes
| Scope | What it unlocks |
|---|---|
projects:read | GET project, staffing, monthly capacity, templates, archive catalog |
projects:write | POST project (the created snapshot is returned) |
webhooks:manage | Register HTTPS callbacks |
Production keys typically get all three. A reporting key can be projects:read only.
Create a project from an external order
POST /{org}/projects
X-Flightplan-Key: fpk_live_…
{
"external_id": "ext:SO-10491",
"name": "Acme Arena — Bowl LED",
"client_name": "Acme Entertainment",
"contract_number": "SO-10491",
"start_date": "2026-09-01",
"end_date": "2026-12-15",
"source": { "type": "blank" }
}
external_idis required and must be namespaced (for exampleext:SO-10491) so it never collides with leftover imported list ids.- The same
external_idtwice is idempotent: you get the existing job back (200) and Flightplan does not change it. - Status is always Planned. This surface cannot set Planview ids, people, or budget dollars on this surface.
source.type:
blank— metadata only (default). Planners finish the WBS in Flightplan.template— needstemplate_idfromGET /templates. Builds phases/tasks. Teamed leaves from your org’s template become team demand.archive— Archive import, if enabled. Needsarchive_project_idfromGET /archive/projectsandarchive_modeofblankorstructure. Structure copies the task tree without hours or team stamps. See Import from an archive organization.
Read it back
| Method | Path | Notes |
|---|---|---|
| GET | /{org}/projects/{id} | Public snapshot: name, client, contract, dates, address, hours |
| GET | /{org}/projects/by-external/ext:SO-10491 | Day-2 lookup by external order id |
| GET | /{org}/projects/{id}/staffing | Staffed vs unfilled hours by team name only |
| GET | /{org}/capacity/monthly | Monthly demand vs capacity (+Unscheduled). Not staffing. |
| GET | /{org}/capacity/monthly/exclude-rest | Same stack, with Trip Rest / Truck Pack cutoff. See below. |
| GET | /{org}/templates | Catalog only (no WBS dump) |
| GET | /{org}/archive/projects | Archive catalog, if enabled for your organization |
Snapshots never include people, emails, Planview ids, Slack/ClickUp tokens, or portal tokens. That is intentional — this surface is for job create, staffing totals, and capacity hours, not people data.
Monthly demand vs capacity
Leadership tiles and other systems can read org-level monthly hours for four groups only: Assembly, Engineering, Foremen, and Install Techs. Demand matches the Capacity toolbar’s +Unscheduled layer (Allocated + staff + team + unscheduled). This is not sold-order staffing (GET …/projects/{id}/staffing).
Default window: 3 civil months back through 24 months forward. Optional start_month / end_month (YYYY-MM) are clamped to that span. Draft, Hold, and Cancelled jobs contribute 0 demand on this feed.
curl -sS "https://api.flpl.ai/v1/your-org/capacity/monthly" \
-H "X-Flightplan-Key: fpk_live_YOUR_KEY_HERE"
Response shape (abbreviated): { "success": true, "data": { "start_month", "end_month", "months", "demand": "unscheduled", "teams": [ { "team", "months": [ { "month", "capacity_hours", "demand_hours" } ] } ] } }.
Live schema and field notes: Public API docs (section “Monthly demand vs capacity”).
Exclude Trip Rest and Truck Pack beyond a day window
Some plans count Trip Rest and Truck Pack on Install Techs and Foremen for near-term months, but want those hours out of the far horizon. Use the sibling endpoint:
GET /{org}/capacity/monthly/exclude-rest?rest_exclude_after_days=60
- Same +Unscheduled stack and four groups as
/capacity/monthly. - Months that start on or before today + N days keep Trip Rest / Truck Pack.
- Later months subtract those rest/pack hours from
demand_hours(Install Techs and Foremen only). Assembly and Engineering are unchanged. rest_exclude_after_daysis an integer from 0 to 730. Default is 60.- The response also returns
rest_exclude_after_daysandrest_exclude_after_date(ISO date). - The live
/capacity/monthlyfeed is unchanged. Switch only when you are ready.
curl -sS "https://api.flpl.ai/v1/your-org/capacity/monthly/exclude-rest?rest_exclude_after_days=60" \
-H "X-Flightplan-Key: fpk_live_YOUR_KEY_HERE"
Authorization: Bearer fpk_live_YOUR_KEY_HERE works the same way. Scope required: projects:read.
Webhooks back to the caller
POST /{org}/webhooks
{
"url": "https://hooks.example.com/hooks/flightplan",
"events": ["project.created", "project.status_changed", "project.staffing_changed"]
}
HTTPS only. The secret is returned once. Every delivery signs the raw JSON body:
X-Flightplan-Event: project.created
X-Flightplan-Delivery: …
X-Webhook-Signature: sha256=<hex>
HMAC-SHA256 of the raw body with the subscription secret. Verify before trusting the payload.
Events you may subscribe to:
project.createdproject.updatedproject.status_changedproject.deletedproject.staffing_changed(listed; callers can also pollGET …/staffing)
Do not subscribe to resource, allocation, or timesheet events on this key. Those are internal.
What this API will not do
- List every project in the org
- Write allocations or name people
- Delete or cancel a project
- Expose the 300 in-app routes
- Accept an MCP key
Related
- MCP Integration Guide — assistants, not the public API
- Glossary — demand layers, +Unscheduled, statuses
- What’s new in Flightplan
- Live Public API docs