# uploads

```graphql
query Uploads($input: UploadsInput!) {
  uploads(input: $input) {
    data {
      id
      path
      fileName
      contentType
      sizeBytes
      url
      status
      visibility
      permission
      createdAt
      updatedAt
      deletedAt
    }
    folders {
      path
      visibility
      permission
      createdAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List the uploads the caller can see under an optional folder prefix, newest first by default, with the visible folders in a separate list. Requires project.uploads.read.

## Arguments

| Name                     | Type            | Required | Description                                                                                                                           |
| ------------------------ | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `input`                  | UploadsInput!   | Yes      |                                                                                                                                       |
| `input.projectReference` | String!         | Yes      | Project UUID, slug or configured domain.                                                                                              |
| `input.path`             | String          |          | Folder prefix; a supplied path selects its direct-child uploads. Omit it to list the whole project.                                   |
| `input.recursive`        | Boolean         |          | Expand nested folders in folders (default true). It does not change which uploads are listed.                                         |
| `input.sortBy`           | UploadSortBy    |          | Sort field: created\_at (default), name or size\_bytes. Ties break by upload ID ascending. One of `created_at`, `name`, `size_bytes`. |
| `input.sortOrder`        | UploadSortOrder |          | Sort direction: asc or desc (default). One of `asc`, `desc`.                                                                          |
| `input.cursor`           | String          |          | pageInfo.endCursor of the previous page; send it unchanged with the same path and sort.                                               |
| `input.limit`            | Int             |          | Uploads scanned per page before visibility filtering (default 20, max 100).                                                           |

## Variables

```json
{
  "input": {
    "projectReference": "string"
  }
}
```

## Responses

| Status | Description                      |
| ------ | -------------------------------- |
| 200    | The UploadList! in data.uploads. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query Uploads($input: UploadsInput!) {\n  uploads(input: $input) {\n    data {\n      id\n      path\n      fileName\n      contentType\n      sizeBytes\n      url\n      status\n      visibility\n      permission\n      createdAt\n      updatedAt\n      deletedAt\n    }\n    folders {\n      path\n      visibility\n      permission\n      createdAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "input": {
      "projectReference": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "uploads": {
      "data": [
        {
          "id": "string",
          "path": "string",
          "fileName": "string",
          "contentType": "string",
          "sizeBytes": 0,
          "url": "https://example.com",
          "status": "pending",
          "visibility": "project",
          "permission": "read",
          "createdAt": "2026-01-01T00:00:00Z",
          "updatedAt": "2026-01-01T00:00:00Z",
          "deletedAt": "2026-01-01T00:00:00Z"
        }
      ],
      "folders": [
        {
          "path": "string",
          "visibility": "string",
          "permission": "string",
          "createdAt": "string"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
