NLI API Documentation

Programmatic access to your irrigation controllers, zones, and schedules.

Quick Start

Authentication

Create an API key in Settings → API Keys. Use it as a Bearer token or X-API-Key header:

curl -H "Authorization: Bearer nli_your_key_here" \
  https://your-domain.com/api/v1/controllers

Rate Limiting

Default: 60 requests per minute. Returns 429 when exceeded.

Webhook Signatures

Verify webhook payloads using HMAC-SHA256:

// Node.js verification
const crypto = require('crypto');
const signature = req.headers['x-nli-signature'];
const expected = crypto.createHmac('sha256', webhookSecret)
  .update(JSON.stringify(req.body))
  .digest('hex');
if (signature !== expected) throw new Error('Invalid signature');
# Python verification
import hmac, hashlib
signature = request.headers['X-NLI-Signature']
expected = hmac.new(webhook_secret.encode(), request.data, hashlib.sha256).hexdigest()
assert hmac.compare_digest(signature, expected)