Skip to main content
GET
/
api
/
v1
/
materials
Get all materials for organization
const url = 'https://studyfetchapi.com/api/v1/materials';
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}, body: undefined};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "materials": [
    {
      "_id": "<string>",
      "name": "<string>",
      "organizationId": "<string>",
      "folderId": "<string>",
      "contentType": "text",
      "content": {
        "text": "<string>",
        "url": "<string>",
        "s3Key": "<string>",
        "s3Url": "<string>",
        "filename": "<string>",
        "fileSize": 123,
        "mimeType": "<string>"
      },
      "metadata": {},
      "status": "active",
      "usage": {},
      "references": [
        {
          "title": "Understanding Photosynthesis",
          "url": "https://example.com/article"
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "totalCount": 123,
  "page": 123,
  "totalPages": 123
}

Authorizations

x-api-key
string
header
required

API Key for authentication

Query Parameters

folderId
string

Filter by folder ID

page
string

Page number (default: 1)

limit
string

Number of items per page (default: 20, max: 200)

Search materials by name

Response

200 - application/json

Materials retrieved successfully

materials
object[]
totalCount
number
page
number
totalPages
number
I