Skip to main content
Every API that has a published version can be exported three ways, and each export describes the same version that REST and MCP calls run. All three need the X-API-Key header, and none includes credentials or session state. An export reads the current published version, so re-export after a revise or rebuild.

Export OpenAPI

Expected response: 200 with an OpenAPI 3.1.0 document. Operations are POST even when the program reads with GET; x-target-method records the program’s method. Feed the file to any OpenAPI tool, for example bunx openapi-typescript peel-api.openapi.json -o peel-api.ts.

Export the MCP manifest

Expected response shape (values are illustrative):
Tool names are a sanitized API name, __ and the endpoint name. Each tool carries annotations such as readOnlyHint and openWorldHint and the identifiers api_id, version_id and endpoint_name. Use it for offline or self-hosted agent runtimes. For everything else, connect to the hosted MCP server, which serves the same endpoints live.

Export the source

The source export returns the integration source and the runtime that executes it, so saved calls run on your machine without a Peel account and without a model.
The response is { "format": "peel.source.v1", "files": { "<path>": "<file contents>" }, "sha256": { "<path>": "<hex digest>" } }. Write the files to a new folder:
Then run it with Bun 1.4.4. The bundle’s README.md is authoritative.
A source export fails with 409 and API_NOT_EXPORTABLE when the version uses a retired format. Rebuild the API first.

Errors and what to do