Compass API

Stakeholder, funding and messaging data for the PLI platform. JSON over HTTPS. Base URL https://localhost:8400/api.

Authentication

Send Authorization: Bearer <token>. Tokens are created in Settings and carry read or read,write scope. Writes are audited under the token's name.

Entities

EntityMethodsWritable fields
organisationsGET list · GET by id · POST · PATCHname, kind, segment_id, tier, stage, prospect_type, website, charity_number, region, scope, income_gbp, reserves_gbp, fy_end, govt_funded_share, reach, core_offer, key_funders, why_relevant, suggested_ask, capacity_to_fund, summary, next_step, next_step_due, owner, source_id, archived
peopleGET list · GET by id · POST · PATCH · DELETEorg_id, name, role, email, phone, linkedin, notes, stage, is_primary, source_id, archived
asksGET list · GET by id · POST · PATCH · DELETEorg_id, person_id, kind, title, description, value_gbp, stage, priority, probability, next_step, due, owner, source_id
interactionsGET list · GET by id · POST · PATCH · DELETEorg_id, person_id, ask_id, kind, occurred_at, subject, summary, body_ref, source_id
tasksGET list · GET by id · POST · PATCH · DELETEtitle, detail, rationale, org_id, person_id, ask_id, due, status, owner, proposed_by, done_at
messagesGET list · GET by id · POST · PATCHkind, segment_id, title, subject, body, status
draftsGET list · GET by id · POST · PATCH · DELETEorg_id, person_id, ask_id, message_id, to_name, to_email, subject, body, rationale, status
playsGET list · GET by id · POST · PATCH · DELETEcategory, title, action, cost, route, status, owner, org_id, notes, sort
sourcesGET list · GET by id · POST · PATCHkind, title, origin, sender, received_at, status, summary, content_text, content_path, meta, ingested_at
segmentsGET list · GET by id · POST · PATCHname, description, what_they_need, our_offer, tone, sort
briefingsGET list · GET by idread-only

Routes

GET    /api/{entity}?…filters            list (organisations: q, kind, stage, tier, segment; asks: stage, kind, org_id; tasks: status, org_id; people: q, org_id; interactions: org_id, limit)
GET    /api/{entity}/{id}               one record (organisations and people return a bundle with related records)
POST   /api/{entity}                    create (JSON body of writable fields)
PATCH  /api/{entity}/{id}               partial update
DELETE /api/{entity}/{id}               delete where allowed
GET    /api/search?q=                   full-text search across everything
GET    /api/dashboard                   counts, pipeline by stage, latest briefing
GET    /api/agent/run                   run status
POST   /api/agent/run  {focus?}         start an agent run
GET    /api/health                      liveness (no auth)
POST   /mcp                             Model Context Protocol endpoint (Streamable HTTP, same bearer token)

Vocabulary

organisation.kind   charity | funder | government | prison | law_firm | community_group | press | supplier | infrastructure | internal | other
organisation.stage  identified | researched | planned | contacted | in_conversation | active | dormant | declined
organisation.tier   1 (priority) … 4 (low)
ask.kind            funding | partnership | distribution | referral | endorsement | sponsorship | adoption | content | press | policy | supplier
ask.stage           idea | planned | approached | in_discussion | agreed | delivered | declined | parked
interaction.kind    email_in | email_out | draft | call | meeting | note | event | research
task.status         proposed | open | done | dismissed
draft.status        proposed | approved | in_outlook | sent | discarded
source.kind         email | attachment | drop_file | transcript | web | upload | manual

Example

curl -H "Authorization: Bearer cmp_…" "https://localhost:8400/api/organisations?tier=1"
curl -H "Authorization: Bearer cmp_…" -H "content-type: application/json" -X POST https://localhost:8400/api/interactions \
  -d '{"org_id":"org_…","kind":"call","subject":"Intro call","summary":"Agreed to send the one-pager."}'

Timestamps are ISO 8601 UTC. Money is integer pounds. Identifiers are opaque strings with a type prefix (org_, per_, ask_…).