Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.bunny.net/llms.txt

Use this file to discover all available pages before exploring further.

bunny api sends a raw HTTP request to any bunny.net API endpoint with authentication handled automatically via your configured API key. It’s useful for calling endpoints the CLI doesn’t expose directly, scripting, and exploring the API.
# List pull zones
bunny api GET /pullzone

# Get a specific pull zone
bunny api GET /pullzone/12345

# List storage zones
bunny api GET /storagezone

# Create a pull zone with a JSON body
bunny api POST /pullzone --body '{"Name":"my-zone","OriginUrl":"https://example.com"}'

# Delete a DNS zone
bunny api DELETE /dnszone/12345

# Pipe body from stdin
echo '{"Name":"my-zone","OriginUrl":"https://example.com"}' | bunny api POST /pullzone

# Show request/response details
bunny api GET /pullzone --verbose
FlagAliasDescription
--body-bJSON request body

Paths and methods

  • The method is case-insensitive (get and GET both work).
  • Paths are relative to https://api.bunny.net.
  • See the API Reference for a complete list of endpoints.

Request body

You can pass a JSON body three ways:
  1. Inline with --body:
    bunny api POST /pullzone --body '{"Name":"my-zone","OriginUrl":"https://example.com"}'
    
  2. From stdin:
    echo '{"Name":"my-zone","OriginUrl":"https://example.com"}' | bunny api POST /pullzone
    
  3. From a file via shell redirection:
    bunny api POST /pullzone < body.json
    

Tip: inspect requests

Use --verbose to print the full request URL, headers, and raw response. Handy when exploring an endpoint or debugging auth.
bunny api GET /pullzone --verbose