Skip to main content
New to Corsair? See API access, authentication, and error handling.

Auth

check

auth.check Verify the API key and read its workspace name, rate-limit window and suspension state; the key and JWT in the raw answer are dropped Risk: read
Input: empty object Output

Javascript

run

javascript.run Run JavaScript inline with the given input and return what it produced as text; the code can call any bundled NPM module and reach the network Risk: write
Input The code runs as a function body: use input for the request value and return for the result. Bundled modules include axios, cheerio, pdf-lib, nodemailer, jsonwebtoken and the AWS SDK. Output

runBinary

javascript.runBinary Run JavaScript inline and return its Buffer result as base64, for PDFs and images; the code can call any bundled NPM module and reach the network Risk: write
Input Send returnBinary by using this operation rather than javascript.run; the plugin sets it for you. Output

Pages

create

pages.create Publish an HTML page to a new live URL; CustomJS does not enforce unique names, so a repeated call publishes a second page Risk: write
Input CustomJS does not enforce unique names, and the answer carries shortId rather than the name the docs show. Output

delete

pages.delete Delete a hosted page, which takes its live URL down permanently; an unknown page ID fails with a 404 Risk: destructive · Irreversible
Input An unknown pageId fails with a 404 (CustomjsAPIError with status: 404), so a delete that resolves removed the page. Output

list

pages.list List the hosted HTML pages in the workspace with their live URLs Risk: read
Input: empty object Output

update

pages.update Replace the HTML of a hosted page in place, keeping its live URL, and optionally rename it Risk: write
Input Output

Pdf

fromHtml

pdf.fromHtml Render HTML or a Nunjucks template to PDF in Chromium, returning the bytes as base64 with an optional page size Risk: read
Input
Output

fromMarkdown

pdf.fromMarkdown Render Markdown to PDF, returning the bytes as base64 Risk: read
Input Output

Scrape

agent

scrape.agent Give an AI agent a plain-language goal and let it drive a browser for up to maxSteps actions; it bills model tokens and can submit forms on the site it visits Risk: destructive · Irreversible
Input Output

page

scrape.page Drive a browser through exact steps (navigate, click, type, evaluate and extract) and return the extracted values, with no model tokens spent per step Risk: write
Input A wait step here takes ms; the screenshot route takes value for the same thing.
Output

Screenshot

capture

screenshot.capture Capture a URL as PNG after optional click, type, wait and scroll steps, cropped to a box when one is given Risk: write
Input
Output