POST. Here’s a quick example of what an API client would look like.
Getting Started
Authenticating API Calls
Authentication and Making API Calls
All our requests use
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Authentication and Making API Calls
POST. Here’s a quick example of what an API client would look like.
const baseUrl = "https://api.wattshift.com/v1";
const options = {
method: "POST",
headers: {
"x-ws-api-key": "<your api key here>",
},
};
const wattshiftApiCall = async (
path: `/${string}`,
body?: Record<string, any>,
) => {
const res = await fetch(`${baseUrl}${path}`, {
...options,
body: JSON.stringify(body ?? {}),
});
return res.json();
};
await wattShiftApiCall(`/homes/${user.wsHomeId}/update`, {
name: "updated home name",
solarSystemSizeKw: 6.4,
isNonNetMetered: true,
});
