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.createtakes a digest of the files (files: path -> SHA1) and answers with the SHA1s it still needs inrequired; send each withdeploys.uploadFile(the file’s path and its bytes asfile: a URL,{ base64 }or a Blob), and upload the functions it lists inrequired_functionsthe same way withdeploys.uploadFunction(a zip per function). After the last upload Netlify processes the deploy: polldeploys.getuntilstateisready. Adraftdeploy is never published, and a locked site keeps its current deploy. A whole site can also go up as one zip (ziponsites.deploys.create).sites.builds.createstarts a build from the linked repository instead. - Lists page with
page(1-based) andper_page; the plugin sends 100 whenper_pageis left out. Paged lists return{ items, next_page }, withnext_pageset while a page comes back full: steppageuntil it is null. - Risk. Every delete is
destructiveexcept the three that only stop work (agentRunners.delete,agentRunners.sessions.delete,sites.devServers.deleteAll, which arewrite), 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(typeurl,data.urlyour Corsair webhook URL,data.signature_secreta long random secret) for each event you want, and give the plugin the same secret aswebhookSecret(or store it as the account’s webhook signature). Deliveries are checked againstX-Webhook-Signature(a JWS, HS256, whosesha256claim must match the body) and routed byX-Netlify-Event: deploy events todeploy,submission_createdtosubmission. - Rate limits: 500 requests a minute, 3 deploys a minute and 100 a day;
core waits for
X-RateLimit-Resetand retries a 429 three times. - Not wrapped: three routes the swagger tags
x-internal(the build plugins runtime’s own calls).
- 185 typed API operations
- 4 incoming webhook event types
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 Netlify API key before the first call: More: API Key
pnpm corsair setup --plugin=netlify --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 sitesWebhooks
This plugin registers 4 webhook event types. Configure the provider to POST to your Corsair HTTP handler, then usewebhookHooks 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.