> 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.

# Tab counts for the loads list

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

Returns per-tab badge counts for the loads list view. Honors the same filter set as ``GET /loads`` so the badges reflect what each tab would show under the user's current filters.

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

Reference: https://docs.tryenvoy.ai/api-reference/endpoints/api/get-loads-counts-api-v-1-loads-counts-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) — Case-insensitive exact filter by raw status received from the source TMS
- `is_posted` (boolean, optional, nullable) — Filter by Envoy's internal posted state
- `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) — Case-insensitive filter by assigned Envoy rep or source-TMS sales rep name. Repeat the parameter to match any selected rep.
- `origin_city` (string, optional, nullable) — Substring match on origin stop city (ILIKE)
- `destination_city` (string, optional, nullable) — Substring match on destination stop city (ILIKE)
- `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) — Inclusive load ingestion date
- `created_at_to` (date, optional, nullable) — Inclusive load ingestion date
- `updated_at_from` (date, optional, nullable) — Inclusive load last-updated date
- `updated_at_to` (date, optional, nullable) — Inclusive load last-updated date
- `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)
- `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.

### Headers

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

## Response

### 200

Successful Response

- `all` (integer, required) — All loads matching the current filters
- `active_notifications` (integer, required) — Loads with at least one unread notification for the current user
- `active_outreaches` (integer, required) — Loads with outreach activity and no accepted offer yet
- `all_calls` (integer, required) — Loads with at least one phone call, regardless of status
- `failed_verifications` (integer, required) — Loads with at least one failed carrier_verifications row recorded against them
- `active_escalations` (integer, required) — Loads with at least one ACTIVE escalation awaiting a human response. Scheduling escalations (appointment management) are not counted.
- `active_offers` (integer, required) — Loads with at least one pending offer

## 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

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "all": 1,
  "active_notifications": 1,
  "active_outreaches": 1,
  "all_calls": 1,
  "failed_verifications": 1,
  "active_escalations": 1,
  "active_offers": 1
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://tryenvoy.ai/api/v1/loads/counts';
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/counts"

	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/counts")

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/counts")
  .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/counts', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://tryenvoy.ai/api/v1/loads/counts");
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/counts")! 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()
```