Documentation Index
Fetch the complete documentation index at: https://docs.wiseyield.co/llms.txt
Use this file to discover all available pages before exploring further.
API-key surface (2026-05-18) — API keys authenticate the versioned
/api/v1/* surface. 51 endpoints across 7 scope families are live today (Farms, Crops, Fields/Blocks/Plants, Tasks/Recurring/Templates, Crop Library, Analytics, Market Intelligence). Key minting is Summit-tier only. Remaining batches (AI, Billing, Team, User Profile) are queued — pages for those endpoints are noindexed until the routes ship. Track the API Reference for the current list.API keys
WiseYield API keys are bearer tokens scoped to a single user and a set of capabilities. They are issued from the WiseYield dashboard and never round-trip through any other system.Creating a key
- Sign in to your WiseYield dashboard.
- Open Settings → API Keys.
- Click Create API Key.
- Give it a descriptive name (e.g. “Production server”, “Mobile app”).
- Choose Environment:
liveortest. - Pick the scopes the key needs (least-privilege).
- Copy the key immediately — the full secret is shown once and never again.
Key format
- Prefix:
wy_(identifies WiseYield). - Environment:
live_(production data) ortest_(test data). - Random: 48 hexadecimal characters (24 bytes from a cryptographic RNG).
Making authenticated requests
Send the API key in theAuthorization header using the Bearer scheme:
Scopes
API keys carry a list of scopes. Requests are rejected with403 Forbidden (INSUFFICIENT_SCOPE) when a key is missing the scope required by an endpoint.
| Scope | Grants |
|---|---|
farms:read | List and read farms |
farms:write | Create, update, and delete farms |
crops:read | List and read crops |
crops:write | Create, update, and delete crops |
fields:read | List and read fields, blocks, and per-plant records |
fields:write | Create, update, and delete fields, blocks, and plants |
library:read | Browse the crop library (admin catalog + own shortlist) |
library:write | Add and remove crops from your shortlist |
market:read | Read anonymized regional crop prices |
analytics:read | Read analytics, predictions, and reports |
tasks:read | List and read tasks |
tasks:write | Create, update, and complete tasks |
team:read | List farm members and invitations |
team:write | Invite, update, and remove farm members |
webhooks:read | List configured webhooks |
webhooks:write | Create and update webhooks |
all | Full access to every resource the user owns |
Example: read-only integration
Rate limits
Rate limits are applied per user, sliding-window, by subscription tier. The system fails closed: if the rate-limit backend is unreachable in production, requests are denied.| Tier | Limit |
|---|---|
| Expired trial | 3 requests/hour |
| Seed | 25 requests/hour |
| Sprout | 50 requests/hour |
| Trial / Harvest | 100 requests/hour |
| Grove | 200 requests/hour |
| Summit | 1,000 requests/hour |
Rate-limit headers
Every response (success or rate-limited) carries the current window state:X-RateLimit-Limit— total requests allowed in the current window.X-RateLimit-Remaining— requests remaining before the limit kicks in.X-RateLimit-Reset— ISO 8601 timestamp when the sliding window opens again.
When you hit the limit
X-RateLimit-Reset:
Error responses
Authentication and authorization errors share a common shape:| Status | code | Meaning |
|---|---|---|
| 401 | MISSING_API_KEY | No Authorization header sent |
| 401 | INVALID_AUTH_FORMAT | Header is not Bearer <key> |
| 401 | INVALID_API_KEY_FORMAT | Key doesn’t match wy_(live|test)_[a-f0-9]{48} |
| 401 | INVALID_API_KEY | Key not found or has been revoked |
| 401 | INACTIVE_API_KEY | Key exists but is currently disabled |
| 401 | EXPIRED_API_KEY | Key passed its expiresAt timestamp |
| 403 | IP_NOT_WHITELISTED | Request came from an IP not in the key’s allowlist |
| 403 | INSUFFICIENT_SCOPE | Key is valid but missing the scope this route requires |
| 429 | RATE_LIMIT_EXCEEDED | Per-user rate limit reached |
Security best practices
Store keys securely
Store keys securely
Never hard-code keys. Use environment variables or a secrets manager.
Separate keys per environment
Separate keys per environment
Use distinct keys for development, staging, and production. Scope them tightly and rotate them independently.
Restrict by IP when possible
Restrict by IP when possible
When creating a key you can set an IP allowlist in
metadata.ipWhitelist. Requests from any other origin return 403 IP_NOT_WHITELISTED.Rotate on a schedule
Rotate on a schedule
Rotate keys at least every 90 days, and immediately when:
- Someone with access leaves the team
- A key may have been exposed (logs, repos, screenshots)
- Compliance requires it
Monitor usage
Monitor usage
The dashboard shows last-used timestamp, request volume, and error rate per key. Investigate unfamiliar patterns or sudden spikes.
Revoking a key
If a key is compromised or no longer needed:- Go to Settings → API Keys.
- Find the key by name or prefix.
- Click Revoke.
401 INVALID_API_KEY.
Next steps
Quickstart
Make your first authenticated request
API Reference
Browse every endpoint