This documentation covers the AgFlow REST API, organized by business domain (Flow, Phase, Cards, Clients, Engines, among others). Before using any endpoint, this page explains how to get access, which base URL to use, and how to locate the identifiers required by the route paths.Base URL#
Every call described in this documentation uses the base URL:https://api.agflow.agrisk.app
Each documented endpoint's path (e.g. /v1/clients) must be combined with this base URL — for example, GET /v1/clients corresponds to the full call GET https://api.agflow.agrisk.app/v1/clients.Authentication#
Login uses a different URL from the API's base URL, dedicated exclusively to authentication:POST https://agflow.agrisk.app/api/login
{
"credential": "<your-access-email>",
"password": "<your-password>"
}
The response carries an access token in the accessToken field. This token must be sent on every subsequent API call, in the Authorization header:Authorization: Bearer <accessToken>
The token has a limited lifetime; once it expires, repeat the login to obtain a new one.How to locate the identifiers used in endpoints#
Most endpoint paths contain identifiers in curly braces (e.g. {clientId}, {cardId}, {flowId}). These values are never invented or freely chosen — they always come from the response of a prior listing or lookup endpoint:| Identifier | Where to obtain it |
|---|
flowId | GET /v1/flows, or the flow's URL inside the AgFlow application |
cardId | A flow's or phase's card listing (Cards domain) |
clientId | GET /v1/clients (Clients domain), or a specific card's client listing |
phaseId, templateId, and others | Always from a read call in the corresponding domain — never freely defined by the API consumer |
Headers and general conventions#
Every authenticated request requires the Authorization: Bearer <accessToken> header.
Some endpoints also accept an ag-flow-id header, identifying a reference flow. When a specific endpoint documents this header, it is optional unless that endpoint explicitly states otherwise.
Every request and response uses JSON (Content-Type: application/json).
How this documentation is organized#
Endpoints are grouped by business domain, replicated across two parallel trees — 🇧🇷 Português and 🇺🇸 English — with the same technical content, only the description language changes. Each domain has an "Overview" document at the top, followed by that domain's individual endpoints. Modificado em 2026-07-29 13:10:10