View Files

This endpoint is used to view all your files uploaded to Supavec.

POST/user_files

Request Body

  • Name
    pagination
    Type
    object
    Description

    Pagination parameters for the query.

    • limit: integer (default: 10) - The number of files to fetch.
    • offset: integer (default: 0) - The offset of the files to fetch.
  • Name
    order_dir
    Type
    string
    Description

    The direction to order the results by. Available options: desc, asc.

JavaScript

const res = await fetch("https://api.supavec.com/user_files", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    authorization: apiKey,
  },
  body: JSON.stringify({ pagination, order_dir }),
});

Response

{
  "success": true,
  "results": [
    {
      "type": "text",
      "file_id": "939b2cd7-56d5-4c44-b491-14bfc202e9a0",
      "created_at": "2025-01-04T03:22:10.713451+00:00",
      "file_name": "test content 4.txt",
      "team_id": "2ce522b2-2045-43ad-ab0a-2f48a9a041e9"
    },
    {
      "type": "pdf",
      "file_id": "4db6b5d7-b199-4bfd-9914-6991cb4ba3b6",
      "created_at": "2025-01-04T02:56:10.252537+00:00",
      "file_name": "1227-2024_WhisperIt-Invoice-Taishi - Invoice.pdf",
        "team_id": "2ce522b2-2045-43ad-ab0a-2f48a9a041e9"
    },
  ],
  "pagination": {
    "offset": 0,
    "limit": 10
  },
  "count": 143
}

Was this page helpful?