Skip to main content
This section documents the wire contract for the WiseYield API: base URL, auth, request and response format, pagination, and rate limits. Endpoint pages live under the groups in the left nav.

Base URL

API key–authenticated routes live under the versioned /api/v1/* namespace. 51 endpoints across 7 scope families are live today (2026-05-18):
Scope familyRoutes
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
API key minting is Summit-tier only. The full per-endpoint breakdown is in the API Reference left nav. Additional surface ships over time (AI, Billing, Team, User Profile — see 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:
Request bodies are JSON. Field names use camelCase. Numeric values may be sent as numbers or numeric strings — the API coerces sensibly.

Response format

Successful responses wrap payloads under a data key:
List endpoints add a pagination envelope:
Timestamps are ISO 8601 in UTC (2026-05-17T14:23:01.000Z).

HTTP status codes

StatusMeaning
200 OKRead or update succeeded
201 CreatedResource was created
204 No ContentDelete succeeded
400 Bad RequestValidation failed — see details
401 UnauthorizedMissing, malformed, expired, or revoked API key
403 ForbiddenAuthenticated but lacking required scope or IP
404 Not FoundResource doesn’t exist or is soft-deleted
409 ConflictUniqueness or state-machine violation
429 Too Many RequestsRate limit exceeded
5xxServer error — safe to retry with backoff
The complete error-code reference lives in Errors & status codes.

Error response shape

FieldAlways present?Notes
errorYesShort category
codeWhen the error has a stable kindMachine-readable identifier
messageFrequentlyHuman-readable description
detailsWhen structured context existsPer-field validation errors, available scopes, etc.

Authentication

Pass a key from your dashboard:
Keys are wy_(live|test)_[a-f0-9]{48}. See Authentication for scopes, rotation, and security guidance.

Rate limits

Per-user, sliding-window, by subscription tier:
TierRequests / hour
Expired trial3
Seed25
Sprout50
Trial / Harvest100
Grove200
Summit1,000
Every response carries:
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:
ParameterDefaultConstraints
page1≥ 1
limit201–100
See Pagination for iteration patterns and edge cases.

Sorting

List endpoints accept sort and order parameters:
The supported fields per endpoint are listed on each endpoint page.

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 4217 currency 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

CasingcamelCase for JSON fields, kebab-case in URLs
IDsUUIDs in path parameters, prefixed strings (key_…, wl_…) elsewhere
TimestampsISO 8601 UTC strings
BooleansNative JSON true / false
Nullable fieldsExplicit null rather than omission

Support