Sites
Create a new site
Creates a new site with location, panel configuration, and horizon profile. Requires an API key.
Creates a new site with location, panel configuration, and horizon profile. Requires an API key.
Authorization
api-key x-api-key<token>
API key for write access. Request one from the API administrator.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/sites" \ -H "Content-Type: application/json" \ -d '{ "name": "Makati Roof", "latitude": 14.59, "longitude": 121.03, "panelTilt": 30, "panelAzimuth": 180, "systemSize": 5, "horizonProfile": [ { "direction": "N", "heightAngle": 15 }, { "direction": "E", "heightAngle": 10 }, { "direction": "S", "heightAngle": 5 }, { "direction": "W", "heightAngle": 10 } ] }'{ "statusCode": 200, "message": "Sites retrieved successfully", "data": { "id": "clx...", "name": "Makati Roof", "latitude": 14.59, "longitude": 121.03, "panelTilt": 30, "panelAzimuth": 180, "systemSize": 5, "horizonProfile": [ { "direction": "S", "heightAngle": 30 } ], "createdAt": "2026-07-04T00:00:00.000Z", "updatedAt": "2026-07-04T00:00:00.000Z" }}{ "statusCode": 400, "message": "Validation failed", "errors": [ { "field": "latitude", "message": "latitude must be between -90 and 90" } ]}{ "statusCode": 404, "message": "Resource not found", "data": null}{ "statusCode": 404, "message": "Resource not found", "data": null}