> ## Documentation Index
> Fetch the complete documentation index at: https://docs.algoreg.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search documents

> Searches for documents that match the input filters.

## Body parameters

**filters** `SearchDocumentsFiltersInput`

**properties**

**customer\_external\_id** `string`

**display\_name** `string`

**file\_name** `string`

**file\_types** `string[]`

**max\_created\_at** `integer`

**min\_created\_at** `integer`

**tags** `string[]`

**limit** `integer`

**offset** `integer`

## Response body

> [tab] 200
>
> **documents** `CustomerDocument[]`
>
> **properties**
>
> **created\_at** `integer`
>
> **customer\_external\_id** `string`
>
> **display\_name** `string`
>
> **file\_mime** `string`
>
> **file\_name** `string`
>
> **file\_size** `integer`
>
> **file\_source** `string`
>
> **file\_type** `string`
>
> **file\_url** `string`
>
> **id** `string`
>
> **last\_revision\_agent\_id** `integer`
>
> **last\_revision\_created\_at** `integer`
>
> **last\_revision\_id** `string`
>
> **origin** `DocumentOrigin`
>
> **properties**
>
> **type** `CustomerDocumentOriginType`
>
> **properties**
>
> **value** `string`
>
> **tags** `string[]`
>
> **total** `integer`

> [tab] default
>
> unexpected error
>
> **errors** `APIError[]`
>
> Will contain both "v1" (deprecated, or soon to be) errors and "v2" errors. When possible, prefer errors that are not deprecated.
>
> **properties**
>
> **code** `string`
>
> **deprecated** `boolean`
>
> **message** `string`
>
> **will\_be\_deprecated** `boolean`

```json JSON
{
  "filters": {
    "customer_external_id": "string",
    "display_name": "string",
    "file_name": "string",
    "file_types": [
      "string"
    ],
    "max_created_at": "integer",
    "min_created_at": "integer",
    "tags": [
      "string"
    ]
  },
  "limit": "integer",
  "offset": "integer"
}
```

```javascript JavaScript

  const response = await fetch(
    "POST /api/v1/customer_documents/search",
    {
      method: "post",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer {token}`
      },
      body: JSON.stringify({
  "filters": {
    "customer_external_id": "string",
    "display_name": "string",
    "file_name": "string",
    "file_types": [
      "string"
    ],
    "max_created_at": "integer",
    "min_created_at": "integer",
    "tags": [
      "string"
    ]
  },
  "limit": "integer",
  "offset": "integer"
})
    }
  );
            
          
```

```json 200
{
  "documents": [
    {
      "created_at": "integer",
      "customer_external_id": "string",
      "display_name": "string",
      "file_mime": "string",
      "file_name": "string",
      "file_size": "integer",
      "file_source": "string",
      "file_type": "string",
      "file_url": "string",
      "id": "string",
      "last_revision_agent_id": "integer",
      "last_revision_created_at": "integer",
      "last_revision_id": "string",
      "origin": {
        "type": {},
        "value": "string"
      },
      "tags": [
        "string"
      ]
    }
  ],
  "total": "integer"
}
```

```json default
{
  "errors": [
    {
      "code": "string",
      "deprecated": "boolean",
      "message": "string",
      "will_be_deprecated": "boolean"
    }
  ]
}
```



This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.