Versioned API (v1)
Farms (v1)
List and create farms using API key authentication.
GET
The versioned
/api/v1/farms endpoint is the API-key-authenticated path for managing farms. The list operation returns paginated farms owned by the authenticated user; the create operation persists a new farm under that user.
List farms
Authentication
Requires a key with thefarms:read scope. See Authentication.
Query parameters
Page number (≥ 1).
Results per page (1–100; values above 100 are clamped to 100).
Filter by farm status:
active, inactive, archived, draft.Sort field:
createdAt, name, totalArea.Sort direction:
asc, desc.Response
Returns paginated farm records.Array of farm objects.
Create farm
Authentication
Requires a key with thefarms:write scope.
Request body
1–200 characters.
1–200 characters.
1–200 characters.
Positive number.
One of
hectare, acre, feddan.One of
commercial, organic, mixed, specialty.One of
crops, livestock, mixed, research.Up to 200 characters.
One of
drip, sprinkler, flood, pivot, manual, none.Between −90 and 90.
Between −180 and 180.
GeoJSON
Polygon ({ type: "Polygon", coordinates: number[][][] }).One of
active, inactive, archived, draft.Response
Returns the created farm wrapped underdata.
Errors
| Status | When |
|---|---|
400 | Validation failed — details carries per-field messages |
401 | Missing, malformed, expired, or revoked API key |
403 | Key lacks farms:read (GET) or farms:write (POST) |
409 | Farm name already exists for this user (active rows only) |
429 | Rate limit reached — see Rate-limit handling |
5xx | Server error — retry with backoff |
Related
Authentication
Scopes, key format, rate limits
Pagination
Iterator patterns for list endpoints
Errors
Canonical error response shape
API Keys
Manage keys from your dashboard