*.get) are public: they send no API key and work for any Ecologi username. An unknown username returns HTTP 404. The username is the row id and is not written to the event.
The purchase operations (*.purchase, trees.purchaseLocal) spend money. They need the API key from Ecologi’s Impact API page, sent as a Bearer token, and are billed to the account on the 1st of each month (minimum invoice GBP 3). Pass test: true to get the expected response without being charged. Send an idempotencyKey so a retried request is not bought twice. The name is shown publicly on a public profile, so don’t send a customer’s name without permission. A recipientEmail sends that person an email about the purchase.
What you get:
- 10 typed API operations
- 5 synced entities (
carbonOffsets,carbonRemovals,habitats,impacts,trees) for fast.search()/.list()
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Ecologi API key before the first call: More: API Key
pnpm corsair setup --plugin=ecologi --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Read treescarbonOffsets.purchase
Query synced data
Synced entities supporttenant.ecologi.db.<entity>.search() and .list(): carbonOffsets, carbonRemovals, habitats, impacts, trees.
See Database for filters and operators.
What’s next
API reference
Every
ecologi.api.* operation with input and output types.Database
Synced entities, search filters, and operators.
Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.