Base URL
/api/v1/* namespace. 51 endpoints across 7 scope families are live today (2026-05-18):
| Scope family | Routes |
|---|---|
| Farms | /v1/farms, /v1/farms/{id} |
| Crops | /v1/crops, /v1/crops/{id} (+ status) |
| Fields / Blocks / Plants | /v1/farms/{id}/fields/*, /v1/farms/{id}/fields/{id}/blocks/*, /v1/farms/{id}/fields/{id}/blocks/{id}/plants/* |
| Tasks / Recurring / Templates | /v1/tasks/*, /v1/recurring-tasks/*, /v1/task-templates/* |
| Crop Library | /v1/crop-library/*, /v1/user-crops/* |
| Analytics | /v1/farms/{id}/health-score, /v1/farms/{id}/yield-prediction |
| Market Intelligence | /v1/market/regional-prices |
V1_API_EXPANSION_PLAN.md). The unversioned /api/* surface powers the WiseYield dashboard and uses session authentication (Clerk cookies); it is not addressable from server-to-server integrations and is intentionally not part of this reference.
Request format
Every API request sends:camelCase. Numeric values may be sent as numbers or numeric strings — the API coerces sensibly.
Response format
Successful responses wrap payloads under adata key:
pagination envelope:
2026-05-17T14:23:01.000Z).
HTTP status codes
| Status | Meaning |
|---|---|
200 OK | Read or update succeeded |
201 Created | Resource was created |
204 No Content | Delete succeeded |
400 Bad Request | Validation failed — see details |
401 Unauthorized | Missing, malformed, expired, or revoked API key |
403 Forbidden | Authenticated but lacking required scope or IP |
404 Not Found | Resource doesn’t exist or is soft-deleted |
409 Conflict | Uniqueness or state-machine violation |
429 Too Many Requests | Rate limit exceeded |
5xx | Server error — safe to retry with backoff |
Error response shape
| Field | Always present? | Notes |
|---|---|---|
error | Yes | Short category |
code | When the error has a stable kind | Machine-readable identifier |
message | Frequently | Human-readable description |
details | When structured context exists | Per-field validation errors, available scopes, etc. |
Authentication
Pass a key from your dashboard:wy_(live|test)_[a-f0-9]{48}. See Authentication for scopes, rotation, and security guidance.
Rate limits
Per-user, sliding-window, by subscription tier:| Tier | Requests / hour |
|---|---|
| Expired trial | 3 |
| Seed | 25 |
| Sprout | 50 |
| Trial / Harvest | 100 |
| Grove | 200 |
| Summit | 1,000 |
X-RateLimit-Reset is an ISO 8601 string, not a Unix timestamp. The complete rate-limit contract — backoff implementations, what to do on 429, what the limits are NOT — is on the Rate-limit handling guide.
Pagination
Offset pagination with two parameters:| Parameter | Default | Constraints |
|---|---|---|
page | 1 | ≥ 1 |
limit | 20 | 1–100 |
Sorting
List endpoints acceptsort and order parameters:
Soft deletes
Domain records are soft-deletable.DELETE calls set a deletedAt timestamp; subsequent reads exclude soft-deleted rows. There is no includeDeleted flag — deleted records are not retrievable via the public API. See Soft deletes for the full semantics.
Currency in financial endpoints
Financial rows carry an ISO 4217currency code. Aggregations convert per row using daily spot rates and return a byCurrency breakdown alongside the base-currency total. See Currency model for the precedence chain and Currency in financial endpoints for usage patterns.
Land hierarchy
Operations attach to the level they belong to: irrigation to a field, fertigation to a block, soil samples to a field, leaf samples to a block, expenses to a crop or field, overhead to a farm. See Land hierarchy for the model.Conventions
| Casing | camelCase for JSON fields, kebab-case in URLs |
| IDs | UUIDs in path parameters, prefixed strings (key_…, wl_…) elsewhere |
| Timestamps | ISO 8601 UTC strings |
| Booleans | Native JSON true / false |
| Nullable fields | Explicit null rather than omission |
Support
- Email — support@wiseyield.co
- Help Center — wiseyield.featurebase.app