Usage

The NexPanel API lets you manage your panel programmatically. Anything you can do from the panel interface that relates to your own resources can be done from scripts, CI pipelines, mobile apps, or any tool that can make HTTP requests.

Common uses:

  • Automate website deployment from CI
  • Trigger backups from a monitoring system
  • Pull server status into a dashboard
  • Rotate credentials on a schedule

Base URL

All API endpoints are versioned under /api/v1 on your panel domain:

https://panel.example.com/api/v1/

For example:

https://panel.example.com/api/v1/version

Quickstart

A minimal request to check the panel version:

curl -H "Authorization: Bearer $TOKEN" \
  https://panel.example.com/api/v1/version

List websites:

curl -H "Authorization: Bearer $TOKEN" \
  "https://panel.example.com/api/v1/websites?page=1&limit=10"

Restart a service:

curl -X PATCH \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"nginx": "restart"}' \
  https://panel.example.com/api/v1/services/actions

Before running any of these, you need a token. See Authentication for how the header works, and API Tokens for how to create one.

Reference

  • Authentication - token format, header, scopes, failure cases
  • Endpoints - every endpoint with parameters and examples
  • Errors - response format, error codes, rate limiting, pagination

Admin Controls

Admins can enable or disable the API, set the rate limit, adjust page size defaults, and control what gets logged. All of that lives in Panel → Settings → API.

See API Settings for the full configuration reference.

Last updated: October 18, 2026