Skip to main content
NervesHub provides a REST API covering devices, firmware, deployment groups, products, organizations, signing keys, support scripts and more. Whether you are automating firmware releases in CI or building a custom dashboard, the API lets you integrate NervesHub into any workflow. The Endpoints section in the sidebar is generated directly from the server’s OpenAPI specification, so it always matches what the API actually accepts. This page covers what the specification does not: base URLs, how responses are shaped, and what each status code means.

Base URL

All API requests are made over HTTPS. The base URL depends on how you host NervesHub: Every endpoint path is appended directly to the base URL:

OpenAPI Specification

The server generates its own OpenAPI document and serves it, so it is never out of step with the running code:
  • Spec document: https://manage.nervescloud.com/api/openapi
  • Interactive docs: https://manage.nervescloud.com/api/docs
Both paths are relative to your base URL, so a self-hosted instance serves its own spec at https://nerveshub.example.com/api/openapi. Import it into Postman, Insomnia, a code generator, or anything else that reads OpenAPI.
The endpoint reference in this section is built from NervesCloud’s specification. A self-hosted deployment exposes the same API, but if you are running an older version, fetch the spec from your own instance to see exactly what it offers.

URL Structure

All resource paths follow a consistent hierarchy anchored to an organization and, for most resources, a product:
For example:
Org-level resources (CA certificates, signing keys, products) omit the product segment:
The deployments path manages what the web console calls deployment groups. The path name is kept for backwards compatibility.

Response Format

All responses are JSON. Successful responses wrap the payload in a data key:
List responses return an array under data:
Error responses return an error or errors key:

HTTP Status Codes

Before making API calls, you need a Bearer token. See Authentication for instructions on generating and using API tokens.