Skip to main content
Use Retently through Corsair: one client, typed API calls. Create a key in Retently under Settings, API. The key decides what the plugin can do:
  • Read permission allows GET only. Write permission adds POST and DELETE. A read-only key on a write route returns a 403 that the plugin reports as isPermissionError, which is a different problem from a 401 (a wrong or deleted key) and needs a new key rather than a retry.
Things to know before you send:
  • survey.send sends real email. It queues a survey through a transactional campaign and returns only status: 'queued'; there is no survey ID to cancel. A non-transactional campaign is a 400, an inactive one a 403, and an unknown one a 404. delay overrides the campaign’s own scheduling, so omit it to respect the campaign’s sending time frame.
  • feedback.import changes your scores. Imported responses count toward NPS and trends, bucketed by response_date, so set it on a historical import or every response lands on the import day. They do not consume send quota and never fire webhooks. Only 200 responses go in one call, and a bad item fails alone: read details.failed for the reason instead of treating a 200 as all-or-nothing.
  • The main comment and additional questions collide. A top-level comment fills the template’s isMain question, so also answering that question in additional_questions fails the item as ambiguous. Get question UUIDs from templates.get.
  • RATING answers need their metric. An additional_questions entry of type RATING is scored on a metric (nps, csat, ces, star, thumbs, xsat or pmf); the plugin rejects one that omits it before the request is sent.
  • Dates are not uniform. customers.list, feedback.list and outbox.list accept YYYY-MM-DD, an ISO 8601 date-time, or UNIX seconds - milliseconds silently resolve to a far-future date. reports.get is the exception: it takes YYYY-MM-DD only and rejects a full timestamp. feedback.import dates are ISO 8601 only.
  • Paging stops at 1,000. limit is capped there, and data.pages tells you how many pages exist, so walk them rather than asking for everything at once.
  • Unsubscribing and resubscribing are not symmetric. customers.resubscribe is idempotent and reports a status per contact: only resubscribed means a change, skipped means Retently refused for compliance (self-unsubscribed or hard-bounced), and suppressed: true warns that an account-level suppression still blocks delivery.
  • Rate limit. 150 requests a minute. No Retry-After is documented, so the plugin backs off exponentially on a 429.
What you get:
  • 18 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

Read the latest NPS responses
Send a transactional survey
See the full list on the API page.

What’s next

API reference

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