> ## Documentation Index
> Fetch the complete documentation index at: https://docs.videnly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve All Projects

> Fetches all projects associated with the authenticated user.

<Note type="warning">**Note:** This operation does not consume any account credits, but rate limits apply.</Note>

## Retrieve All Projects

This endpoint retrieves all projects associated with the authenticated user. You can optionally sort the results by fields such as `updatedAt` or `createdAt`.

### Request

* **Endpoint**: `GET /v1/projects`
* **Authorization**: Bearer token required

#### Query Parameters

* `sort` (string, optional): Specifies the field to sort by, either the date the project was created (`createdAt`) or when it was last updated (`updatedAt`). Defaults to `updatedAt`.
* `order` (string, optional): Specifies the sort order, either ascending (`asc`) or descending (`desc`). Defaults to `desc`.

### Response

A successful response will return an array of projects.

#### Example Response

```json theme={null}
[
   {
      "id": "project123",
      "name": "Marketing Video Project",
      "createdAt": "2024-11-05T10:00:00.000Z",
      "updatedAt": "2024-11-06T14:30:00.000Z"
   },
   {
      "id": "project456",
      "name": "Sales Video Project",
      "createdAt": "2024-11-03T09:15:00.000Z",
      "updatedAt": "2024-11-04T11:20:00.000Z"
   }
]
```


## OpenAPI

````yaml GET /v1/projects
openapi: 3.0.0
info:
  title: Videnly API
  version: 1.0.0
  description: API for managing video generation, queue, and user account details.
servers: []
security: []
paths:
  /v1/projects:
    get:
      tags:
        - Projects
      summary: Retrieve all projects
      description: Fetches all projects associated with the authenticated user.
      operationId: getAllProjects
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - updatedAt
              - createdAt
            default: updatedAt
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
      responses:
        '200':
          description: Projects retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: Project retrieved successfully
                  projects:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
        '400':
          description: Invalid sort or order parameters
        '500':
          description: Server error
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Use format `Bearer YOUR_API_KEY`.

````