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/loginAuthenticate a user and issue a session token.
POST
/v1/auth/inviteSend an invite link to a new client email.
POST
/v1/auth/logoutInvalidate the current session token.
Clients
GET
/v1/clientsList clients (admin scope only).
POST
/v1/clientsCreate a new client record.
PATCH
/v1/clients/{id}Update a client's profile, status, or company.
Properties
GET
/v1/propertiesList properties scoped to caller's role.
POST
/v1/propertiesCreate a property under a given client.
Units
GET
/v1/properties/{id}/unitsList all units for a property.
PATCH
/v1/units/{id}Update unit status, occupant, or notes.
Reports
GET
/v1/reportsList uploaded compliance reports.
POST
/v1/reportsUpload a PDF report and bind to a unit.
GET
/v1/reports/{id}/downloadStream the signed PDF binary.
Error codes
| Code | Meaning |
|---|---|
| 400 | Invalid request payload |
| 401 | Missing or invalid bearer token |
| 403 | Caller's role lacks scope for this resource |
| 404 | Resource not found or filtered by tenancy |
| 409 | Conflict — duplicate email or address |
| 429 | Rate limit exceeded |
| 500 | Internal service error |