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): 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

The complete error-code reference lives in Errors & status codes.

Error response shape

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: 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:
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

Support