πŸ“Create New Site on Project Start

Create new site in illu when a project is greenlit

Create Site

Creates a site. Reactivates a site if previously deleted

POST/orgs/{org_id}/sites
Path parameters
org_id*Org Id
Body
name*Name
latitudeLatitude
longitudeLongitude
addressAddress
Response

Successful Response

Body
site_id*Site Id
name*Name
is_active*Is Active
org_idOrg Id
latitudeLatitude
longitudeLongitude
addressAddress
Request
const response = await fetch('/orgs/{org_id}/sites', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text"
    }),
});
const data = await response.json();
Response
{
  "name": "text",
  "is_active": false,
  "latitude": 0,
  "longitude": 0,
  "address": "text"
}

Example code:

curl -X 'POST' https://api.illu.works/orgs/{org_id}/sites \
  -H 'Authorization: Bearer API_KEY' \
  --json '{"name": "New project", "address"="100 John Smith Way"}'

Last updated