> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.alephant.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.alephant.io/_mcp/server.

# List projects

GET https://alephant.io/api/v1/projects

List projects for an Enterprise workspace. Supports pagination, search, sorting, and analytics period filters; when Collector analytics is configured, cost, requests, and tokens are merged from project assignments. All workspace members may read; PATs require the read scope.

Reference: https://developers.alephant.io/api-reference/saa-s-api/projects/list-projects

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: saas-openapi
  version: 1.0.0
paths:
  /api/v1/projects:
    get:
      operationId: listProjects
      summary: List projects
      description: >-
        List projects for an Enterprise workspace. Supports pagination, search,
        sorting, and analytics period filters; when Collector analytics is
        configured, cost, requests, and tokens are merged from project
        assignments. All workspace members may read; PATs require the read
        scope.
      tags:
        - projects
      parameters:
        - name: page
          in: query
          description: Page number; 0 or omitted uses default 1
          required: false
          schema:
            type: integer
            default: 1
        - name: pageSize
          in: query
          description: Items per page; 0 or omitted uses default 12
          required: false
          schema:
            type: integer
            default: 12
        - name: search
          in: query
          description: Search by project name or description
          required: false
          schema:
            type: string
        - name: sortBy
          in: query
          description: Sort field
          required: false
          schema:
            $ref: '#/components/schemas/ApiV1ProjectsGetParametersSortBy'
            default: updatedAt
        - name: sortDir
          in: query
          description: Sort direction
          required: false
          schema:
            $ref: '#/components/schemas/ApiV1ProjectsGetParametersSortDir'
            default: desc
        - name: period
          in: query
          description: Analytics period
          required: false
          schema:
            $ref: '#/components/schemas/ApiV1ProjectsGetParametersPeriod'
            default: 7d
        - name: Authorization
          in: header
          description: Bearer {access_token}
          required: true
          schema:
            type: string
        - name: X-Workspace-Id
          in: header
          description: Workspace UUID
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: 'data: list, meta: pagination and overview'
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_alephant_backend-saas-service_internal_service.ProjectListResult
        '400':
          description: X-Workspace-Id required
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_alephant_backend-saas-service_internal_api_dto.APIErrorBody
        '401':
          description: AUTH_TOKEN_EXPIRED
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_alephant_backend-saas-service_internal_api_dto.APIErrorBody
        '403':
          description: feature_unavailable or FORBIDDEN
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_alephant_backend-saas-service_internal_api_dto.APIErrorBody
        '422':
          description: validation_error (invalid pagination, sort, or period)
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_alephant_backend-saas-service_internal_api_dto.APIErrorBody
servers:
  - url: https://alephant.io
    description: Production
  - url: https://dev.alephant.io
    description: Development
components:
  schemas:
    ApiV1ProjectsGetParametersSortBy:
      type: string
      enum:
        - name
        - updatedAt
      default: updatedAt
      title: ApiV1ProjectsGetParametersSortBy
    ApiV1ProjectsGetParametersSortDir:
      type: string
      enum:
        - asc
        - desc
      default: desc
      title: ApiV1ProjectsGetParametersSortDir
    ApiV1ProjectsGetParametersPeriod:
      type: string
      enum:
        - 1d
        - 7d
        - 30d
      default: 7d
      title: ApiV1ProjectsGetParametersPeriod
    github_com_alephant_backend-saas-service_internal_service.ProjectListItem:
      type: object
      properties:
        activeAgentCount:
          type: integer
          format: int64
        activeMemberCount:
          type: integer
          format: int64
        analyticsStatus:
          type: string
        cost:
          type:
            - number
            - 'null'
          format: double
        createdAt:
          type: string
          format: date-time
        description:
          type: string
        id:
          type: string
          format: uuid
        name:
          type: string
        requests:
          type:
            - integer
            - 'null'
          format: int64
        tokens:
          type:
            - integer
            - 'null'
          format: int64
        updatedAt:
          type: string
          format: date-time
      title: >-
        github_com_alephant_backend-saas-service_internal_service.ProjectListItem
    github_com_alephant_backend-saas-service_internal_service.ProjectListOverview:
      type: object
      properties:
        totalActiveAgents:
          type: integer
          format: int64
        totalActiveMembers:
          type: integer
          format: int64
        totalPeriodCost:
          type:
            - number
            - 'null'
          format: double
        totalPeriodRequests:
          type:
            - integer
            - 'null'
          format: int64
        totalPeriodTokens:
          type:
            - integer
            - 'null'
          format: int64
        totalProjects:
          type: integer
          format: int64
      title: >-
        github_com_alephant_backend-saas-service_internal_service.ProjectListOverview
    GithubComAlephantBackendSaasServiceInternalServiceProjectPeriodKey:
      type: string
      enum:
        - 1d
        - 7d
        - 30d
      title: GithubComAlephantBackendSaasServiceInternalServiceProjectPeriodKey
    github_com_alephant_backend-saas-service_internal_service.ProjectPeriod:
      type: object
      properties:
        end:
          type: string
          format: date-time
        key:
          $ref: >-
            #/components/schemas/GithubComAlephantBackendSaasServiceInternalServiceProjectPeriodKey
        start:
          type: string
          format: date-time
        timezone:
          type: string
      title: github_com_alephant_backend-saas-service_internal_service.ProjectPeriod
    github_com_alephant_backend-saas-service_internal_service.ProjectListMeta:
      type: object
      properties:
        overview:
          $ref: >-
            #/components/schemas/github_com_alephant_backend-saas-service_internal_service.ProjectListOverview
        page:
          type: integer
        pageSize:
          type: integer
        period:
          $ref: >-
            #/components/schemas/github_com_alephant_backend-saas-service_internal_service.ProjectPeriod
        total:
          type: integer
          format: int64
        totalPages:
          type: integer
      title: >-
        github_com_alephant_backend-saas-service_internal_service.ProjectListMeta
    github_com_alephant_backend-saas-service_internal_service.ProjectListResult:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/github_com_alephant_backend-saas-service_internal_service.ProjectListItem
        meta:
          $ref: >-
            #/components/schemas/github_com_alephant_backend-saas-service_internal_service.ProjectListMeta
      title: >-
        github_com_alephant_backend-saas-service_internal_service.ProjectListResult
    github_com_alephant_backend-saas-service_internal_api_dto.APIErrorBody:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      title: github_com_alephant_backend-saas-service_internal_api_dto.APIErrorBody

```

## Examples



**Response**

```json
{
  "data": [
    {
      "activeAgentCount": 1,
      "activeMemberCount": 1,
      "analyticsStatus": "string",
      "cost": 1.1,
      "createdAt": "2024-01-15T09:30:00Z",
      "description": "string",
      "id": "string",
      "name": "string",
      "requests": 1,
      "tokens": 1,
      "updatedAt": "2024-01-15T09:30:00Z"
    }
  ],
  "meta": {
    "overview": {
      "totalActiveAgents": 1,
      "totalActiveMembers": 1,
      "totalPeriodCost": 1.1,
      "totalPeriodRequests": 1,
      "totalPeriodTokens": 1,
      "totalProjects": 1
    },
    "page": 1,
    "pageSize": 1,
    "period": {
      "end": "2024-01-15T09:30:00Z",
      "key": "1d",
      "start": "2024-01-15T09:30:00Z",
      "timezone": "string"
    },
    "total": 1,
    "totalPages": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://alephant.io/api/v1/projects"

headers = {
    "Authorization": "Authorization",
    "X-Workspace-Id": "X-Workspace-Id"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://alephant.io/api/v1/projects';
const options = {
  method: 'GET',
  headers: {Authorization: 'Authorization', 'X-Workspace-Id': 'X-Workspace-Id'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://alephant.io/api/v1/projects"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Authorization")
	req.Header.Add("X-Workspace-Id", "X-Workspace-Id")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://alephant.io/api/v1/projects")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Authorization'
request["X-Workspace-Id"] = 'X-Workspace-Id'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://alephant.io/api/v1/projects")
  .header("Authorization", "Authorization")
  .header("X-Workspace-Id", "X-Workspace-Id")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://alephant.io/api/v1/projects', [
  'headers' => [
    'Authorization' => 'Authorization',
    'X-Workspace-Id' => 'X-Workspace-Id',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://alephant.io/api/v1/projects");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Authorization");
request.AddHeader("X-Workspace-Id", "X-Workspace-Id");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Authorization",
  "X-Workspace-Id": "X-Workspace-Id"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://alephant.io/api/v1/projects")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```