Sites API
With the Sites API you manage sites entirely via the API — without the pvnode web app. This is the programmatic variant of the concepts described under Sites & Strings.
Requires a plan with Sites API access. Without it the write endpoints respond with
403; the two GET endpoints below stay open on every plan. Hobby users manage sites through the
pvnode web app. You can see your entitlements on the Usage & Limits page.
Endpoints at a glance
| Action | Endpoint |
|---|---|
| Create a site | POST /v2/sites |
| List all sites | GET /v2/sites |
| Retrieve a site | GET /v2/sites/{site_id} |
| Update a site | PATCH /v2/sites/{site_id} |
| Delete a site | DELETE /v2/sites/{site_id} |
| Restore a deleted site | POST /v2/sites/{site_id}/restore |
The exact request/response schemas are in the API Reference.
Create
latitude and longitude are required. elevation, timezone and the terrain horizon are
determined automatically. Without strings, a single default string is created.
Code
Update (PATCH)
Partial update — only the sent fields change. Note:
stringsreplaces the entire array. Each string has a stable, server-assignedid— echo it to keep a string (and its data, e.g. measurements); omit it and the string is dropped; send a string with noidto add a new one. The forecaststringsblock carries thisidasstring_id(plus a positionalstring_index), so read the site and forecast from the same point in time.- A location change (coordinates) triggers a re-determination of elevation, timezone and horizon and invalidates the forecast cache.
- Location changes are limited to 1 per 30 days per site (plan-independent) → otherwise 429.
Code
Deletion & restore
DELETE marks the site as "pending deletion" (deleted_at set); permanent
removal happens 30 days later. Within this window, POST .../restore restores the
site.
Limits & errors
| Limit / error | Behavior |
|---|---|
| Sites API access | Without access → 403. |
| Site limit | Maximum number of sites (can be unmetered) → 403 when exceeded. |
| Strings per site | Maximum strings per site → 422 when exceeded. |
| Ephemeral sites | Without this entitlement → 403. |
| Location change quota | 1 per 30 days per site → 429. |
| Invalid timezone | 422. |
| Site not found | 404. |
The complete reference of all fields and error codes is in the API Reference.