Skip to content
StudyFetch API

Materials

Get all materials for organization

OpenAPI specification
GET/api/v1/materials

Authentication

x-api-key

Request

curl --globoff --request GET \
  --url 'https://api.example.com/api/v1/materials' \
  --header 'x-api-key: <API_KEY>'

Replace credential and <field> placeholders with your own values. URL placeholders appear as %3Cfield%3E. Review the example values before sending your request.

Replace https://api.example.com with the API server URL.

Parameters

folderIdquery · string

Filter by folder ID

pagequery · string

Page number (default: 1)

limitquery · string

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

searchquery · string

Search materials by name

Responses

200Materials retrieved successfully
{
  "type": "object",
  "properties": {
    "materials": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Material ID"
          },
          "name": {
            "type": "string",
            "description": "Material name"
          },
          "organizationId": {
            "type": "string",
            "description": "Organization ID"
          },
          "folderId": {
            "type": "string",
            "description": "Folder ID",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "description": "Content type",
            "enum": [
              "text",
              "pdf",
              "video",
              "audio",
              "image",
              "epub"
            ]
          },
          "content": {
            "type": "object",
            "description": "Material content",
            "properties": {
              "text": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "s3Key": {
                "type": "string"
              },
              "s3Url": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "fileSize": {
                "type": "number"
              },
              "mimeType": {
                "type": "string"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "Material metadata"
          },
          "status": {
            "type": "string",
            "description": "Material status",
            "enum": [
              "active",
              "processing",
              "pending_upload",
              "error",
              "deleted"
            ]
          },
          "usage": {
            "type": "object",
            "description": "Usage information"
          },
          "references": {
            "description": "References that this material cites",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "example": "Understanding Photosynthesis",
                  "description": "Reference title"
                },
                "url": {
                  "type": "string",
                  "example": "https://example.com/article",
                  "description": "Reference URL"
                }
              },
              "required": [
                "title"
              ]
            }
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Creation timestamp"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Last update timestamp"
          }
        },
        "required": [
          "_id",
          "name",
          "organizationId",
          "folderId",
          "contentType",
          "content",
          "status",
          "createdAt",
          "updatedAt"
        ]
      }
    },
    "totalCount": {
      "type": "number"
    },
    "page": {
      "type": "number"
    },
    "totalPages": {
      "type": "number"
    }
  }
}