Document API: List

The list document API endpoint allows you to list documents in a memory on Langbase dynamically with API. This endpoint requires a User or Org API key.


Generate a User/Org API key

You will need to generate an API key to authenticate your requests. For more information, visit the User/Org API key documentation.


GET/beta/memorysets/{owner}/{memoryName}/documents

Get a list of org/user memory documents

Get a list of documents in a memory by sending a GET request to this endpoint.

Required headers

  • Name
    Content-Type
    Type
    string
    Description

    Request content type. Needs to be application/json.

  • Name
    Authorization
    Type
    string
    Description

    Replace <YOUR_API_KEY> with your User or Org API key.

Required path parameters

  • Name
    owner
    Type
    string
    Description

    The organization or user username.

    Replace {owner} with the organization or user username.

  • Name
    memoryName
    Type
    string
    Description

    The memory name.

    Replace {memoryName} with the memory name.

GET
/beta/memorysets/{owner}/{memoryName}/documents
curl https://api.langbase.com/beta/memorysets/{owner}/{memoryName}/documents \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer <YOUR_API_KEY>"

Response

{
  "docs" : [
    {
      "name": "file.pdf",
      "status": "completed",
      "status_message": null,
      "metadata": {
          "size": 1156,
          "type": "application/pdf"
      },
      "enabled": true,
      "chunk_size": 1024,
      "chunk_overlap": 256,
      "owner_login": "langbase"
    },
    // ...
  ]
}