Skip to main content
The plugin registers two HTTP endpoints on your Payload app, under the /api/storage-bunny prefix. Client uploads use Payload’s own POST /api/upload-instructions endpoint. The admin UI calls them for you. You only need this reference if you build a custom upload flow, for example a headless front end that uploads directly to Bunny, or if you set up the Stream webhook.

Endpoints

upload-instructions returns Bunny upload URLs only when storage.clientUploads is on. stream/tus-auth needs stream.tus, and stream/webhook needs stream.webhook. See Custom upload clients for a full example. Errors use Payload’s standard format, { "errors": [{ "message": "..." }] }.

Authentication

  • upload-instructions and stream/tus-auth run through Payload’s access control. Send them with an authenticated session, for example the payload-token cookie. clientUploads.access can only narrow Payload’s check. stream.tus.access replaces the default check.
  • stream/webhook is not a Payload-authenticated route. Bunny signs each call, and the plugin verifies an HMAC-SHA256 X-BunnyStream-Signature header against the library’s Read-Only API key (stream.webhook.secret).
Base your requests on your own app’s origin. The https://your-site.com server shown on each endpoint is a placeholder — replace it with where your Payload app runs.

Plugin options accessors

Looking for the plugin’s server-side helper functions (getBunnyStreamForCollection, getBunnyStorageForCollection, and friends) rather than HTTP endpoints? Those are documented under Accessing the resolved options.