{"openapi":"3.1.0","info":{"title":"Mappedo API","version":"0.1.0","description":"EU company data, ownership graphs, and buying committees from official registers. HTTP Basic auth: empty username, API key as password (lemlist convention)."},"servers":[{"url":"https://api.mappedo.com"}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}},"schemas":{"Company":{"type":"object","properties":{"_id":{"type":"string","example":"CZ-26185610"},"name":{"type":"string"},"country":{"type":"string"},"registry_id":{"type":"string"},"legal_form_canonical":{"type":"string"},"domain":{"type":"string","nullable":true},"linkedin_url":{"type":"string","nullable":true},"people":{"type":"array","items":{"type":"object"}},"owners":{"type":"array","items":{"type":"object"}},"source":{"type":"string","example":"registry"},"as_of":{"type":"string","format":"date-time"}}}}},"security":[{"basicAuth":[]}],"paths":{"/api/database/companies":{"get":{"summary":"Search companies","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":25}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"matching companies","content":{"application/json":{"schema":{"type":"object","properties":{"companies":{"type":"array","items":{"$ref":"#/components/schemas/Company"}},"count":{"type":"integer"}}}}}}}}},"/api/database/companies/{id}":{"get":{"summary":"Company profile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"CZ-26185610 or a bare registry number"}],"responses":{"200":{"description":"full profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"404":{"description":"not found"}}}},"/api/database/companies/{id}/group":{"get":{"summary":"Group structure","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"parent chain and subsidiaries"}}}},"/api/company/{id}/committee/members":{"get":{"summary":"List row-backed committee members","description":"The canonical editable buying committee for the caller's deal on this account. Session cookie OR API key (with sellerProfileId).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"CZ-26185610 or a bare registry number"},{"name":"includeRemoved","in":"query","schema":{"type":"string","enum":["0","1"]}},{"name":"sellerProfileId","in":"query","schema":{"type":"integer"},"description":"required for API-key access"}],"responses":{"200":{"description":"members"},"401":{"description":"unauthorized"},"404":{"description":"company not found"}}},"post":{"summary":"Add a committee member by hand","description":"source=user_added, status=active, full precedence. The agent may enrich but never delete a user-added member.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["full_name"],"properties":{"full_name":{"type":"string"},"role":{"type":"string"},"title":{"type":"string"},"division":{"type":"string"},"linkedin_url":{"type":"string"},"sellerProfileId":{"type":"integer"}}}}}},"responses":{"200":{"description":"member added"},"400":{"description":"bad request"}}}},"/api/company/{id}/committee/members/{memberId}":{"patch":{"summary":"Retag or promote/restore a committee member","description":"{ field, value } retags a field (writes it, locks it against agent overwrites, source=user_edited). { status: 'active' } promotes a suggestion or restores a removed member.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"memberId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string","nullable":true},"status":{"type":"string","enum":["active"]},"sellerProfileId":{"type":"integer"}}}}}},"responses":{"200":{"description":"updated"},"400":{"description":"bad request"},"404":{"description":"not found"}}},"delete":{"summary":"Soft-remove a committee member","description":"status=removed, source=user_edited. Reversible; a re-run never re-adds the person.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"memberId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"removed"},"404":{"description":"not found"}}}},"/api/company/{id}/transcript":{"post":{"summary":"Reconcile a pasted transcript into the committee","description":"The paste path: the transcript agent extracts the committee reality and reconciles it against the living object, returning the review diff (never a silent overwrite). Session cookie OR API key (with sellerProfileId).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"title":{"type":"string"},"occurredAt":{"type":"string"},"sellerProfileId":{"type":"integer"}}}}}},"responses":{"200":{"description":"snapshot + diff"},"400":{"description":"text required"}}}},"/api/dealroom/transcript":{"post":{"summary":"Generic transcript ingestion","description":"Anything not integrated: drop a transcript for an account. accountId accepts CZ-26185610, a bare registry number, or an internal id.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["accountId","text"],"properties":{"accountId":{"type":"string","example":"CZ-26185610"},"text":{"type":"string"},"title":{"type":"string"},"occurredAt":{"type":"string"},"sellerProfileId":{"type":"integer"}}}}}},"responses":{"200":{"description":"snapshot + diff"},"404":{"description":"account not found"}}}},"/api/webhooks/{connector}":{"post":{"summary":"Recorder webhook (transcript in, committee out)","description":"A meeting recorder posts a completed transcript. connector = the connector kind; cid selects the connector row (workspace + shared secret). generic uses an X-Mappedo-Signature HMAC-SHA256 header. Unresolved/ambiguous accounts are parked, not reconciled.","parameters":[{"name":"connector","in":"path","required":true,"schema":{"type":"string","enum":["generic","fireflies","fathom","tldv","otter","claap","granola"]}},{"name":"cid","in":"query","required":true,"schema":{"type":"integer"},"description":"connector id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attendees":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}}}},"text":{"type":"string"},"endedAt":{"type":"string"},"accountHint":{"type":"string"},"title":{"type":"string"}}}}}},"responses":{"200":{"description":"processed or parked"},"401":{"description":"signature verification failed"},"501":{"description":"connector not yet implemented"}}}}}}