> For the complete documentation index, see [llms.txt](https://docs-vnext.kiflo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-vnext.kiflo.com/developers/api-reference/attachments/get-attachments.md).

# Get attachments

Get all attachments, filtered by entity.

```json
{"openapi":"3.0.1","info":{"title":"Kiflo Public API v3","version":"v3"},"security":[{"oauth2":["Attachment.View","Api"]}],"components":{"securitySchemes":{},"schemas":{"AttachmentListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentDto"},"nullable":true},"paginationSkipCount":{"type":"integer","format":"int32"},"totalCount":{"type":"integer","description":"Gets or sets the total number of items that could be returned by this command (without pagination).","format":"int32"}},"additionalProperties":false},"AttachmentDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string","nullable":true},"fileExtension":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64"},"downloadUrl":{"type":"string","nullable":true},"partnerId":{"type":"integer","format":"int32","nullable":true},"dealId":{"type":"integer","format":"int32","nullable":true},"leadId":{"type":"integer","format":"int32","nullable":true},"noteId":{"type":"integer","format":"int32","nullable":true},"payoutId":{"type":"integer","format":"int32","nullable":true},"customerId":{"type":"integer","format":"int32","nullable":true},"collaborationId":{"type":"integer","format":"int32","nullable":true},"creationDate":{"type":"string","format":"date-time"},"createdByUserName":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/v3/attachments":{"get":{"tags":["Attachments"],"summary":"Get attachments","description":"Get all attachments, filtered by entity.","parameters":[{"name":"partner_id","in":"query","description":"A partner ID to filter the attachments on.","schema":{"type":"integer","format":"int32"}},{"name":"deal_id","in":"query","description":"A deal ID to filter the attachments on.","schema":{"type":"integer","format":"int32"}},{"name":"lead_id","in":"query","description":"A lead ID to filter the attachments on.","schema":{"type":"integer","format":"int32"}},{"name":"note_id","in":"query","description":"A note ID to filter the attachments on.","schema":{"type":"integer","format":"int32"}},{"name":"payout_id","in":"query","description":"A payout ID to filter the attachments on.","schema":{"type":"integer","format":"int32"}},{"name":"customer_id","in":"query","description":"A customer ID to filter the attachments on.","schema":{"type":"integer","format":"int32"}},{"name":"collaboration_id","in":"query","description":"A collaboration ID to filter the attachments on.","schema":{"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"The cursor used in pagination. This is the index of the first attachment to be returned.","schema":{"type":"integer","format":"int32"}},{"name":"limit","in":"query","description":"The maximum number of attachments to be returned. The default is 20.","schema":{"type":"integer","format":"int32"}},{"name":"sort_by","in":"query","description":"The property used to sort the attachments by. The default is CreationDate.","schema":{"type":"string"}},{"name":"order_by","in":"query","description":"The sorting direction for the returned attachments. Accepted values: ASC, DESC. The default is DESC.","schema":{"type":"string"}}],"responses":{"200":{"description":"Attachments returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentListResponseDto"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-vnext.kiflo.com/developers/api-reference/attachments/get-attachments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
