Skip to main content
Use Netlify through Corsair: one client, typed API calls, and incoming webhooks. Connect with a Netlify personal access token (User settings > Applications > Personal access tokens) or an OAuth access token; it is sent as Authorization: Bearer <token> and acts as that user across every team they belong to. Netlify calls a team an account: account_id and account_slug come from accounts.list, site ids from sites.list.
  • Deploys. sites.deploys.create takes a digest of the files (files: path -> SHA1) and answers with the SHA1s it still needs in required; send each with deploys.uploadFile (the file’s path and its bytes as file: a URL, { base64 } or a Blob), and upload the functions it lists in required_functions the same way with deploys.uploadFunction (a zip per function). After the last upload Netlify processes the deploy: poll deploys.get until state is ready. A draft deploy is never published, and a locked site keeps its current deploy. A whole site can also go up as one zip (zip on sites.deploys.create). sites.builds.create starts a build from the linked repository instead.
  • Lists page with page (1-based) and per_page; the plugin sends 100 when per_page is left out. Paged lists return { items, next_page }, with next_page set while a page comes back full: step page until it is null.
  • Risk. Every delete is destructive except the three that only stop work (agentRunners.delete, agentRunners.sessions.delete, sites.devServers.deleteAll, which are write), as are team plan changes (accounts.create, accounts.update), add-ons, database compute settings, data resets and restores, migrations, member invitations (they send email), agent runs (they spend AI credits), commits and pull requests from agent runs, DNS zone transfers, unlinking a repository and disabling a site.
  • Webhooks. Create an outgoing hook with hooks.create (type url, data.url your Corsair webhook URL, data.signature_secret a long random secret) for each event you want, and give the plugin the same secret as webhookSecret (or store it as the account’s webhook signature). Deliveries are checked against X-Webhook-Signature (a JWS, HS256, whose sha256 claim must match the body) and routed by X-Netlify-Event: deploy events to deploy, submission_created to submission.
  • Rate limits: 500 requests a minute, 3 deploys a minute and 100 a day; core waits for X-RateLimit-Reset and retries a 429 three times.
  • Not wrapped: three routes the swagger tags x-internal (the build plugins runtime’s own calls).
What you get:
  • 185 typed API operations
  • 4 incoming webhook event types

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 sites
Start a build
See the full list on the API page.

Webhooks

This plugin registers 4 webhook event types. Configure the provider to POST to your Corsair HTTP handler, then use webhookHooks on the plugin factory. See Webhooks for every event path and payload shape, and Webhooks concept for routing.

What’s next

API reference

Every netlify.api.* operation with input and output types.

Webhooks

Event paths, payloads, and webhookHooks examples.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.