API keys, areas and webhooks
What it is for
The API lets your own programs read what Tooli holds for your organisation (tracked emails, links, documents, websites, visitors, mailboxes, members, the Event log and the Dashboard's figures) and, where you allow it, change some of it: make and change links, upload documents, tag and file emails, add websites, keep the never-track list and the webhooks. Every route, filter and field is in the API reference, which is checked against the running API whenever Tooli is tested; the same is an OpenAPI file.
Tooli runs no AI model. The API is a way in for your own programs, with your organisation's own key.
Make a key
Owners and admins make keys, in Organisation → API and MCP: a name, what it may do area by area, and when it ends. The key is shown once; only its last four characters are kept where they can be read again. Send it with every request, in the Authorization header:
curl -H "Authorization: Bearer $TOOLI_API_KEY" https://app.tooli.dev/api/v1/organization
A key works only on /api/v1/ (and on the MCP server), and a sign-in to the app never works there.
Areas
A key is given areas, each to read, or to read and change:
- Tracked emails and views: emails, their recipients and views, tags, folders, archive, and the never-track list.
- Links and clicks: short links and their clicks; make, re-point and archive links.
- Documents: documents and their views; upload a PDF.
- Websites and visitors: websites, visits and visitors; add a website.
- Mailboxes: the shared mailboxes and their figures.
- Members and teams: members, teams and Activity.
- The Event log: the Event log, the Dashboard's figures and what is known of an IP address.
- Webhooks: the webhooks; add, change and remove them.
A key reads as an admin of your organisation does, so if admins don't see every member's records (Organisation settings), neither does a key. The reference lists which routes each area opens (Areas); a key is refused anything else with 403 not_permitted, naming the area.
Roll or revoke
- Roll makes a new key with the same name, areas and end. The old one works for 24 more hours, then stops, so you have a day to change what uses it.
- Revoke stops a key at once.
Webhooks
In Organisation → API and MCP, choose Add webhook, give the https address to send to and choose the events: an email viewed, a link clicked, a document viewed, a visit to a website beginning, a reply noticed. An organisation may have 10 webhooks. A key with the Webhooks area can add, change and remove them too; the signing secret is shown once, in the answer that made it.
Each delivery is signed the way the Standard Webhooks convention signs them, so a library you already have can check it: three headers, webhook-id, webhook-timestamp and webhook-signature, the signature an HMAC-SHA-256 of the id, the time and the body with your webhook's secret. Refuse a delivery whose time is far from your own clock, and drop one whose id you have already handled. Rolling the secret signs with both the old and the new for 24 hours.
A delivery that fails is tried again, waiting longer each time; the reference lists the waits. A webhook that has had nothing through for three days is switched off, and its page says so.
Exports
Tracked emails, Links, Documents, Websites, Visitors and the Event log each export to a CSV file, with the list's own filters and only what you may see. A link's page exports its clicks, a document's its views and a website's its page views.