Skip to main content
Use ToneDen through Corsair: one client, typed API calls. ToneDen issues a user access token through an OAuth 2.0 authorization-code flow only, so this plugin uses oauth_2 as its auth type. Register an app in Developer Settings at https://www.toneden.io/settings/developer to get a client ID and secret; ToneDen reviews the app before the API works. The token is a user token, so every call acts as that user. Things to know:
  • Every route is scoped to a user. Campaigns and user lists take user_id in the path, and links and attachments are listed per user (links.listForUser, attachments.listForUser with a type of unlock or contest). Call users.get with user_id: 'me' to read the connected user and its ID.
  • A taken path is a successful call. links.validPath answers 200 with valid: false and a reason, so check the flag rather than catching an error.
  • Writes send only what you pass. ToneDen documents no required body field, so an update with no field is rejected here rather than sending an empty body that changes nothing.
  • Campaign writes can spend money. campaigns.create creates a real campaign on Facebook or Google, and a campaign or playbook update can change its budget or status, so campaigns.create, campaigns.update, playbooks.create and playbooks.update are destructive. Review the body before calling them.
  • Link insights need a metric. links.insights takes metric (clicks, clickthroughs or rsvps) and the window as start_date and end_date.
  • Errors. HTTP failures are core’s ApiError; describeToneDenError reads the message out of its body.
  • Ad campaigns need a linked ad account. A campaign write also needs the ad account, creative and targeting fields ToneDen documents; the plugin forwards whatever you send without inventing defaults.
  • User lists need ToneDen approval. The custom-audience endpoints say to contact support for access.
  • No webhooks. ToneDen posts no events, so performance is read through the insights routes.
What you get:
  • 36 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

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 your links
Create a link
See the full list on the API page.

What’s next

API reference

Every toneden.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.