Skip to main content
This guide gets you from zero to a successful API call against the WiseYield versioned API (/api/v1/*). Allow ~5 minutes.
51 endpoints across 7 scope families are live: Farms, Crops, Fields/Blocks/Plants, Tasks/Recurring/Templates, Crop Library, Analytics, Market Intelligence. Browse the full surface in the API Reference.

1. Create an API key

Summit-tier required. API key creation is gated to the Summit subscription. Lower tiers (Seed / Sprout / Harvest / Grove / Trial) get 403 TIER_INSUFFICIENT on POST /api/api-keys. See Subscription tiers for what’s included at each tier and Authentication for the full key contract.
  1. Sign in to your WiseYield dashboard as a Summit-tier user.
  2. Open Settings → API Keys.
  3. Click Create API Key, give it a name and pick scopes (for this guide: farms:read and farms:write).
  4. Copy the key shown on screen — it’s only displayed once.
Store the key in an environment variable or secret manager. Never commit it to a repo or paste it into client-side code.

2. List your farms

The GET /api/v1/farms endpoint returns the farms owned by the user behind the API key, paginated.
Successful response shape:
Supported query parameters:
ParameterTypeDefaultNotes
pageinteger ≥ 11Pagination cursor
limitinteger 1–10020Page size
statusactive | inactive | archived | draftOptional filter
sortcreatedAt | name | totalAreacreatedAtSort field
orderasc | descdescSort direction

3. Create a farm

POST /api/v1/farms creates a farm under the authenticated user’s account.
A 201 Created response wraps the new farm under data:

Validation rules

FieldRequiredRules
nameyes1–200 characters
cityyes1–200 characters
countryyes1–200 characters
totalAreayesPositive number
areaUnitno (default hectare)One of hectare, acre, feddan
farmTypenoOne of commercial, organic, mixed, specialty
primaryUsenoOne of crops, livestock, mixed, research
irrigationSystemnoOne of drip, sprinkler, flood, pivot, manual, none
latitudeno−90 to 90
longitudeno−180 to 180
boundariesnoGeoJSON Polygon
statusno (default active)One of active, inactive, archived, draft
A duplicate farm name for the same user returns 409 Conflict.

4. Handle errors gracefully

Errors share a stable shape:
StatusWhen
400Validation failed — inspect details for per-field messages
401Missing, malformed, expired, or revoked API key
403Key lacks the required scope (e.g. farms:write for POST)
409Conflict (e.g. duplicate farm name)
429Rate-limited — back off until X-RateLimit-Reset
5xxServer error — safe to retry with backoff
See the Authentication page for the full list of error codes and a retry-with-backoff implementation.

Next steps

Authentication

Scopes, rate limits, and security best practices

API Reference

Every endpoint and its parameters

Integration guides

Crop recommendations, yield predictions, weather, webhooks

Webhooks

Real-time event notifications

Need help?