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

# List scans

GET https://api.usglobalmail.com/v1/scans

List your scan and open-and-scan requests, with filtering, search and pagination

Reference: https://docs.usglobalmail.com/api/api-reference/scans/list

## Authentication

- `Authorization` header (bearer token, required) — Your API key, sent as `Authorization: Bearer usgmk_live_…` in production or `usgmk_test_…` in the sandbox.

## Servers

- `https://api.usglobalmail.com` (Production, default)
- `https://api-sandbox.usglobalmail.com` (Sandbox)

## Request

### Query parameters

- `limit` (integer, optional, default: 25) — Page size, capped at 100.
- `cursor` (string, optional) — Opaque page cursor — the `next_cursor` of the previous response. Omit for the first page.
- `status` (list of enum, optional)
  - Allowed values: `in_process`, `cancelled`, `rejected`, `completed`, `deleted`, `restoring`
- `type` (list of enum, optional) — `scan` (scan the item) or `open` (open it and scan the contents).
  - Allowed values: `scan`, `open`
- `mail_id` (string, optional)
- `search` (string, optional)
- `sort` (enum, optional)
  - Allowed values: `newest`, `oldest`
- `scanned` (enum, optional)
  - Allowed values: `week`, `month`, `half_year`, `year`

## Response

### 200

- `data` (list of ScanPageDtoDataItems, required)
- `next_cursor` (string, required, nullable) — Pass as `?cursor=` to fetch the next page. Null on the last page.
- `total_count` (integer, required) — Total number of items matching this query across all pages.

## Errors

### 400 Bad Request Error

Bad request.

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `errors` (list of ProblemDetailsDtoErrorsItems, optional)

### 401 Unauthorized Error

Authentication is required or the API key is invalid.

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `errors` (list of ProblemDetailsDtoErrorsItems, optional)

### 403 Forbidden Error

You are not permitted to perform this action.

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `errors` (list of ProblemDetailsDtoErrorsItems, optional)

### 404 Not Found Error

Resource not found.

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `errors` (list of ProblemDetailsDtoErrorsItems, optional)

### 409 Conflict Error

The request conflicts with the current state of the resource.

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `errors` (list of ProblemDetailsDtoErrorsItems, optional)

### 422 Unprocessable Entity Error

Validation failed.

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `errors` (list of ProblemDetailsDtoErrorsItems, optional)

### 429 Too Many Requests Error

Rate limit exceeded.

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `errors` (list of ProblemDetailsDtoErrorsItems, optional)

### 500 Internal Server Error

Internal error.

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `errors` (list of ProblemDetailsDtoErrorsItems, optional)

## Types

### ScanPageDtoDataItems

- `id` (string, required) — Scan id (UUID).
- `mail_id` (string, required) — Id of the scanned mail item (numeric string).
- `type` (string, required) — `SCAN_REQUEST` (scan the item) or `UNBOXING_REQUEST` (open it and scan the contents).
- `status` (string, required) — `IN_PROCESS`, `COMPLETED`, `CANCELLED`, `REJECTED`, `DELETED` or `RESTORING`.
- `is_expedited` (boolean, required)
- `created_at` (datetime, required)
- `updated_at` (datetime, required) — Last change of any kind — use `status_updated_at` for status timing.
- `instruction` (string, optional, nullable)
- `reject_reason` (string, optional, nullable) — Why the request was rejected. Null unless `status` is `REJECTED`.
- `label` (string, optional, nullable) — Short AI-generated label of the scanned document (e.g. "Insurance"). Null until generated; requires a plan that includes scan labeling.
- `status_updated_at` (datetime, optional, nullable) — When the current `status` was reached — for completed scans, the completion time.
- `auto_delete_on` (datetime, optional, nullable) — When the scan file is permanently deleted — download it before this date. Null when no deletion is scheduled.

### ProblemDetailsDtoErrorsItems

- `field` (string, required)
- `message` (string, required)
- `code` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "mail_id": "987654321",
      "type": "SCAN_REQUEST",
      "status": "COMPLETED",
      "is_expedited": false,
      "created_at": "2024-01-10T08:00:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "instruction": "Please scan all pages of the letter.",
      "reject_reason": null,
      "label": "Bank Statement",
      "status_updated_at": "2024-01-15T09:30:00Z",
      "auto_delete_on": "2024-02-15T09:30:00Z"
    }
  ],
  "next_cursor": "eyJjdXJzb3IiOiIyMDI0MDE1MTA5MzAiLCJpZCI6IjNmYTg1ZjY0LTU3MTctNDU2Mi1iM2ZjLTJjOTYzZjY2YWZhNiJ9",
  "total_count": 42
}
```

**SDK Code**

```python
import requests

url = "https://api.usglobalmail.com/v1/scans"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.usglobalmail.com/v1/scans';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.usglobalmail.com/v1/scans"

	payload := strings.NewReader("{}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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://api.usglobalmail.com/v1/scans")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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://api.usglobalmail.com/v1/scans")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.usglobalmail.com/v1/scans', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.usglobalmail.com/v1/scans");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.usglobalmail.com/v1/scans")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```