> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.tryenvoy.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.tryenvoy.ai/_mcp/server.

# Export loads to CSV

GET https://tryenvoy.ai/api/v1/loads/export

Export every load matching the load board's search, filters, selected tab, and sort order. The CSV contains one row per load and is not limited by the board's current page.

**Authentication:** Supports API key and bearer token authentication.

Reference: https://docs.tryenvoy.ai/api-reference/endpoints/api/export-loads-csv-api-v-1-loads-export-get

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://tryenvoy.ai/api/v1` (Production, default)
- `https://staging.tryenvoy.ai/api/v1` (Staging)

## Request

### Query parameters

- `search` (string, optional, nullable)
- `status` (list of enum, optional, nullable)
  - Allowed values: `Created`, `Unassigned`, `Quotes Received`, `Dispatched`, `En Route`, `Delivered`, `Cancelled`, `Exception`
- `tms_status` (list of string, optional, nullable)
- `is_posted` (boolean, optional, nullable)
- `mode` (list of enum, optional, nullable)
  - Allowed values: `FTL`, `PTL`, `LTL`, `DED`, `RAIL`, `PASS`
- `equipment_type` (list of enum, optional, nullable)
  - Allowed values: `VAN`, `REEFER`, `FLATBED`, `STEPDECK`, `RGN`, `CONESTOGA`, `BOX_TRUCK`, `CONTAINER`, `INTERMODAL`, `POWER_ONLY`, `TANKER`, `LOWBOY`, `HOTSHOT`, `AUTO_CARRIER`, `DRY_BULK`, `DRY_TEAM`, `REEFER_TEAM`, `LTL`, `OTHER`, `VAN/REEFER`
- `customer_name` (list of string, optional, nullable)
- `carrier_rep_name` (list of string, optional, nullable)
- `origin_city` (string, optional, nullable)
- `destination_city` (string, optional, nullable)
- `pickup_date_from` (date, optional, nullable)
- `pickup_date_to` (date, optional, nullable)
- `delivery_date_from` (date, optional, nullable)
- `delivery_date_to` (date, optional, nullable)
- `created_at_from` (date, optional, nullable)
- `created_at_to` (date, optional, nullable)
- `updated_at_from` (date, optional, nullable)
- `updated_at_to` (date, optional, nullable)
- `last_posted_at_from` (date, optional, nullable) — Earliest UTC calendar day (inclusive) on which Envoy's posted flag last turned on
- `last_posted_at_to` (date, optional, nullable) — Latest UTC calendar day (inclusive) on which Envoy's posted flag last turned on
- `distance_min` (double, optional, nullable)
- `distance_max` (double, optional, nullable)
- `posted_rate_min` (integer, optional, nullable)
- `posted_rate_max` (integer, optional, nullable)
- `tab` (enum, optional, nullable) — Tab filter used by the loads list view. Each value maps to an existence-subquery condition applied on top of the standard load filters. ``ALL`` is the no-op default. ``ACTIVE_ESCALATIONS`` is reserved for an upcoming product workflow; the API surfaces it so the front-end can render the full tab strip from day one, but the backend returns 0 / no rows until the feature lands.
  - Allowed values: `all`, `active_notifications`, `active_outreaches`, `all_calls`, `failed_verifications`, `active_escalations`, `active_offers`
- `view_id` (string, optional, nullable) — A saved load view to apply (ENG-2112). Its filters stack under the inline ones: both narrow, neither widens. 404 when the view is not visible to the caller.
- `order_by` (string, optional, default: created_at)
- `order_desc` (boolean, optional, default: true)

### Headers

- `X-Organization-ID` (string, optional, nullable)

## Response

### 200

CSV download

## Errors

### 401 Unauthorized Error

Not authenticated - missing or invalid token/API key

- `any`

### 403 Forbidden Error

Insufficient permissions for this operation

- `any`

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 429 Too Many Requests Error

Rate limit exceeded - see Retry-After header

- `any`

## Types

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Response**

```json
"string"
```

**SDK Code**

```python
import requests

url = "https://tryenvoy.ai/api/v1/loads/export"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://tryenvoy.ai/api/v1/loads/export';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://tryenvoy.ai/api/v1/loads/export"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://tryenvoy.ai/api/v1/loads/export")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://tryenvoy.ai/api/v1/loads/export")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://tryenvoy.ai/api/v1/loads/export', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://tryenvoy.ai/api/v1/loads/export");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://tryenvoy.ai/api/v1/loads/export")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```