Back to Help Center

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?

SurfaceWhoAuthUse it for
/api/public/v1 (also https://api.flpl.ai/v1)External serversX-Flightplan-Key: fpk_live_…Create a job, read staffing, monthly capacity, receive webhooks
/fp-mcpClaude, Grok, other assistantsAuthorization: Bearer flightplan_…MCP tools (list, plan, allocate)
In-app /api/v1/apps/flightplan/…The Flightplan UISigned-in sessionEverything 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.

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

  1. Sign in as an organization admin.
  2. Open Settings → Developer API Keys (separate from MCP API Keys).
  3. Create a key. The secret is shown once.
  4. 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

ScopeWhat it unlocks
projects:readGET project, staffing, monthly capacity, templates, archive catalog
projects:writePOST project (the created snapshot is returned)
webhooks:manageRegister 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_id is required and must be namespaced (for example ext:SO-10491) so it never collides with leftover imported list ids.
  • The same external_id twice 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 — needs template_id from GET /templates. Builds phases/tasks. Teamed leaves from your org’s template become team demand.
  • archive — Archive import, if enabled. Needs archive_project_id from GET /archive/projects and archive_mode of blank or structure. Structure copies the task tree without hours or team stamps. See Import from an archive organization.

Read it back

MethodPathNotes
GET/{org}/projects/{id}Public snapshot: name, client, contract, dates, address, hours
GET/{org}/projects/by-external/ext:SO-10491Day-2 lookup by external order id
GET/{org}/projects/{id}/staffingStaffed vs unfilled hours by team name only
GET/{org}/capacity/monthlyMonthly demand vs capacity (+Unscheduled). Not staffing.
GET/{org}/capacity/monthly/exclude-restSame stack, with Trip Rest / Truck Pack cutoff. See below.
GET/{org}/templatesCatalog only (no WBS dump)
GET/{org}/archive/projectsArchive 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_days is an integer from 0 to 730. Default is 60.
  • The response also returns rest_exclude_after_days and rest_exclude_after_date (ISO date).
  • The live /capacity/monthly feed 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.created
  • project.updated
  • project.status_changed
  • project.deleted
  • project.staffing_changed (listed; callers can also poll GET …/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

Was this article helpful?

Be the first to rate this article
Powered by TDY.ai