REST API v1.0

API Documentation

Stable JSON-over-HTTPS endpoints for the EnviroTech Group portal. All requests require a bearer token; rate limited to 600 req/min per token.

Base URL: api.envirotechny.comAuth: Bearer tokenFormat: JSONStatus: Production-ready

Quickstart

Request
curl -X POST https://api.envirotechny.com/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"morgan@havenpm.com","password":"••••••••"}'
Response
{
  "token": "etg_live_xx_••••••••••••",
  "user": {
    "id": "u_a1b2c3",
    "role": "client",
    "name": "Morgan Reyes",
    "company": "Haven Property Management"
  },
  "expires_at": "2026-05-26T12:00:00Z"
}

Authentication

POST
/v1/auth/login
Authenticate a user and issue a session token.
POST
/v1/auth/invite
Send an invite link to a new client email.
POST
/v1/auth/logout
Invalidate the current session token.

Clients

GET
/v1/clients
List clients (admin scope only).
POST
/v1/clients
Create a new client record.
PATCH
/v1/clients/{id}
Update a client's profile, status, or company.

Properties

GET
/v1/properties
List properties scoped to caller's role.
POST
/v1/properties
Create a property under a given client.

Units

GET
/v1/properties/{id}/units
List all units for a property.
PATCH
/v1/units/{id}
Update unit status, occupant, or notes.

Reports

GET
/v1/reports
List uploaded compliance reports.
POST
/v1/reports
Upload a PDF report and bind to a unit.
GET
/v1/reports/{id}/download
Stream the signed PDF binary.

Error codes

CodeMeaning
400Invalid request payload
401Missing or invalid bearer token
403Caller's role lacks scope for this resource
404Resource not found or filtered by tenancy
409Conflict — duplicate email or address
429Rate limit exceeded
500Internal service error