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

# List documents

GET https://jusu-agentura.skaitra.com/api/v1/documents

Documents of the companies this key may access, newest first. Filter by company, stage and when they were received.

Reference: https://docs.skaitra.com/api/api-zinynas/documents/list

## Authentication

- `Authorization` header (bearer token, required) — Skaitra API key (`skt_…`).
- `Authorization` header (bearer token, required) — OAuth 2.1 access token issued for the Skaitra resource (`/mcp`); see /.well-known/oauth-protected-resource.

## Request

### Query parameters

- `companyId` (string, optional)
- `stage` (enum, optional)
  - Allowed values: `inbox`, `accounting`, `storage`, `archived`, `split`, `error`
- `receivedFrom` (DocumentsGetParametersReceivedFrom, optional) — Inclusive lower bound.
- `receivedTo` (DocumentsGetParametersReceivedTo, optional) — Exclusive upper bound.
- `limit` (integer, optional, default: 50) — Page size, 1–200.
- `cursor` (string, optional) — `nextCursor` from the previous page.

## Response

### 200

OK

- `data` (list of Document, required)
- `nextCursor` (string, required, nullable)

## Errors

### 400 Bad Request Error

The request is invalid; `error.details.issues` lists the problems.

- `error` (ErrorError, required)

### 401 Unauthorized Error

The API key is missing, invalid, expired or revoked.

- `error` (ErrorError, required)

### 403 Forbidden Error

The key lacks a scope or access to the company.

- `error` (ErrorError, required)

### 404 Not Found Error

Not found, or not visible to this key.

- `error` (ErrorError, required)

## Types

### DocumentsGetParametersReceivedFrom

### DocumentsGetParametersReceivedTo

### Document

- `id` (string, required)
- `accountingDocumentId` (integer, required, nullable)
- `companyId` (string, required, nullable)
- `name` (string, required)
- `originalFilename` (string, required)
- `source` (string, required)
- `receivedAt` (string, required)
- `stage` (enum, required)
  - Allowed values: `inbox`, `accounting`, `storage`, `archived`, `split`, `error`
- `destination` (enum, required, nullable)
  - Allowed values: `accounting`, `storage`, `none`
- `duplicateOfDocumentId` (string, required, nullable)
- `file` (DocumentFile, required, nullable)
- `createdAt` (string, required)
- `updatedAt` (string, required)

### ErrorError

- `code` (enum, required)
  - Allowed values: `INVALID_API_KEY`, `INSUFFICIENT_SCOPE`, `COMPANY_ACCESS_DENIED`, `NOT_FOUND`, `VALIDATION_ERROR`, `INVALID_CURSOR`, `METHOD_NOT_ALLOWED`, `PRECONDITION_REQUIRED`, `PRECONDITION_FAILED`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_KEY_IN_USE`, `CONFLICT`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `STORAGE_UNAVAILABLE`, `FORBIDDEN`, `FEATURE_NOT_INCLUDED`, `RATE_LIMITED`, `APPROVAL_REQUIRED`, `APPROVAL_PENDING`, `APPROVAL_REJECTED`, `INTERNAL_ERROR`
- `message` (string, required)
- `hint` (string, optional)
- `details` (map from string to any, optional)

### DocumentFile

- `sizeBytes` (integer, required)
- `mimeType` (string, required)
- `sha256` (string, required)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "accountingDocumentId": 1,
      "companyId": "string",
      "name": "string",
      "originalFilename": "string",
      "source": "string",
      "receivedAt": "string",
      "stage": "inbox",
      "destination": "accounting",
      "duplicateOfDocumentId": "string",
      "file": {
        "sizeBytes": 1,
        "mimeType": "string",
        "sha256": "string"
      },
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "nextCursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://jusu-agentura.skaitra.com/api/v1/documents"

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

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

print(response.json())
```

```javascript
const url = 'https://jusu-agentura.skaitra.com/api/v1/documents';
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://jusu-agentura.skaitra.com/api/v1/documents"

	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://jusu-agentura.skaitra.com/api/v1/documents")

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://jusu-agentura.skaitra.com/api/v1/documents")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://jusu-agentura.skaitra.com/api/v1/documents', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://jusu-agentura.skaitra.com/api/v1/documents");
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://jusu-agentura.skaitra.com/api/v1/documents")! 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()
```