DEVELOPERS

Build on Fretie.

A REST API for quotes, rates, inbox, and customers; an email ingestion webhook; and a remote MCP server so AI agents can use Fretie natively. Everything below is machine-readable first.

Quickstart

01

Get a token

Machine clients use the OAuth 2.0 client-credentials grant. Credentials are issued per organization in the workspace settings (or by the org you're integrating with). Request only the scopes you need — they're listed in the OpenAPI security scheme.

curl -X POST https://api.fretie.com/auth/token \
  -H "Content-Type: application/json" \
  -d '{"client_id":"<your id>","client_secret":"<your secret>"}'
02

Call the API

Send the token as a bearer header. All endpoints, parameters, and response schemas are described in /openapi.json, with a unique operationId on every operation for function-calling agents.

curl https://api.fretie.com/quotes \
  -H "Authorization: Bearer <access_token>"
03

Push emails in

The ingestion webhook accepts raw emails from any system that can speak HTTP. Recognized quote requests run through the autopilot pipeline automatically and come back as priced draft quotes.

curl -X POST https://api.fretie.com/ingest/email \
  -H "Authorization: Bearer <connector key>" \
  -H "Content-Type: application/json" \
  -d '{"from_email":"ops@customer.com","subject":"Rate needed — 2x40HC Shanghai→Rotterdam","body":"..."}'

For AI agents: MCP first

Claude, ChatGPT, and other MCP clients should connect to the remote MCP server at https://mcp.fretie.com/mcp (Streamable HTTP). The server requires OAuth 2.1 and advertises its authorization server via RFC 9728 protected-resource metadata, so a compliant client can complete the whole flow from the 401 challenge alone. Tools cover quotes, rate search, inbox, and reconciliation, scoped to the authorized organization.

Every page on this site is also available as clean markdown — send Accept: text/markdown to any URL, or start from /llms.txt.

Let the agent draft the next quote.