- The key is you. The key acts as its full user account, with that account’s permissions and visibility. Loomio recommends a dedicated bot account for integrations. The key rotates when the account’s password changes.
- Self-hosted installs. Loomio is open source. Set the account’s
base_url(or thebaseUrloption) to your install’s https origin, e.g.https://loomio.example.org; leave it empty for loomio.com. Requests go to<origin>/api/user0(never the legacy/api/b2prefix, which renames poll fields). - Server API (self-hosted only). The
server.*operations call/api/server0and authenticate with the install’sSERVER_API_KEYinstead of a user key: list every group, sync memberships and roles, and create, update, deactivate, redact or delete user accounts. They are not available on loomio.com. Use a separate Corsair account for the server key. - Header auth only. Requests authenticate with
Authorization: Bearer <key>. Query-string keys are rejected. - Bad keys answer 403. A missing or invalid key gets 403
{"error":"You are not authorized to access this page."}, and so does a permission denial, even on calls that name a record. Errors are coreApiErrors with the status and Loomio’s message; the sent body (content, email addresses) is stripped. - Compound envelopes. User API responses carry the primary records in an array named after the resource (
groups,discussions,threads,items,polls,comments,memberships,chatbots), related records in sibling arrays (users, topics, groups, poll_options, outcomes), andmeta: {root, total}. Single-record calls also return the record under a singular key (group,discussion,thread,comment,poll,chatbot). Passcompact: trueorexclude_typeson reads to drop bulky related records. Thread titles are not on the thread record: join the relateddiscussions(orpolls) array ontopicable_id. - Paging. List calls take
limit(default 50; capped at 500 for groups, thread items and webhooks; 50 on the Server API) andoffset, and returnmeta.totalplus a derivednext_offsetthat disappears on the last page. Search returns up to 20 results and reports return the whole section, without paging. - Polls. A poll without
closing_atstays a draft with voting disabled. Proposal polls default to the agree, disagree, abstain, and block options whenoptionsis omitted. Options ride in the relatedpoll_optionsarray and the current outcome inoutcomes, matched bycurrent_outcome_id. - Who gets emailed.
recipient_emails,recipient_user_idsandrecipient_audience: 'group'on discussions and polls notify or invite people, andmemberships.manageemails every new address; these operations aredestructive. Deletes of discussions, comments and polls are soft deletes the API cannot undo. - Webhooks. Group admins manage outgoing webhooks (Loomio’s
/chatbotsroute) withwebhooks.*. Deliveries are chat-style messages with no signature, so this plugin does not receive them; treat the destination URL as a secret and use the API for current state. - Writes are not idempotent. A retry of a failed create can post twice, so the plugin replays only reads on server errors. Core retries 429s; Loomio sends no rate-limit headers (the hosted service allows about 900 requests per 5 minutes per IP).
- 47 typed API operations
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 Loomio API key before the first call: More: API Key
pnpm corsair setup --plugin=loomio --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
List the latest discussions in a groupWhat’s next
API reference
Every
loomio.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.