Before you begin
You need:- A Leaf account. Contact Sales or your Customer Success representative to register an account.
- Provider API credentials (if connecting to a provider). Complete the provider’s developer/partner agreement and obtain your client ID and secret. Leaf can help with introductions if needed.
- An HTTP client. cURL works, or use the Leaf Postman Collection.
Step 1: Get your token
After registering, authenticate to get a JWT token. This token goes in theAuthorization: Bearer <token> header of every API request.
rememberMe set to "true", the token lasts 30 days. Set it to "false" for a 24-hour token. See Authentication for full details.
Step 2: Create a Leaf user
A Leaf user typically represents a grower. Each Leaf user holds provider credentials, fields, and field operations. Create one with aPOST request:
id. You’ll use it in every subsequent call for this grower.
Step 3: Connect data
You have two options for getting data into Leaf: Option A: Connect a provider. Attach provider credentials to the Leaf user so Leaf automatically syncs their data. Each provider has a specific credentials schema. See the provider authentication docs for details. Option B: Upload files directly. If the grower has machine files on a USB drive or local storage, you can upload them through the API or use Leaf’s Magic Link file upload widget.Step 4: Retrieve your data
Once Leaf processes the connected or uploaded data, you can retrieve machine files and field operations. List machine files for the Leaf user:Field operations require field boundaries. Without boundaries, Leaf converts machine files and produces file summaries, but cannot create operations. You can sync boundaries from a provider or create them manually via the API.
operations array contains the discovered machine files for the Leaf user. Once Leaf has both files and field boundaries, the operations request returns standardized operations for that grower.
Step 5: Set up alerts
Instead of polling the API, set up webhooks to get notified when new data is ready. At a minimum, subscribe to field events, field boundary events, machine file events, and field operation events. See the Alerts documentation for the full list of available events and setup instructions.What you built
You now have a working Leaf integration: an authenticated API owner, a Leaf user representing a grower, a connected data source, and the ability to retrieve processed field operations. From here:- Core Concepts: Understand how the data pipeline works.
- Provider Authentication: Connect to John Deere, Climate FieldView, CNHi, and other providers.
- Machine Data: Understand how Leaf processes machine files into field operations.
- Fields: Manage field boundaries from providers or create your own.
- Configurations: Control how Leaf processes and syncs data.

