> 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

## Servers

- `https://alephant.io` (Production, default)
- `https://dev.alephant.io` (Development)

## Request

### Query parameters

- `page` (integer, optional, default: 1) — Page number; 0 or omitted uses default 1
- `pageSize` (integer, optional, default: 12) — Items per page; 0 or omitted uses default 12
- `search` (string, optional) — Search by project name or description
- `sortBy` (enum, optional, default: updatedAt) — Sort field
  - Allowed values: `name`, `updatedAt`
- `sortDir` (enum, optional, default: desc) — Sort direction
  - Allowed values: `asc`, `desc`
- `period` (enum, optional, default: 7d) — Analytics period
  - Allowed values: `1d`, `7d`, `30d`

### Headers

- `Authorization` (string, required) — Bearer \{access\_token}
- `X-Workspace-Id` (string, required) — Workspace UUID

## Response

### 200

data: list, meta: pagination and overview

- `data` (list of object, optional)
  - `activeAgentCount` (long, optional)
  - `activeMemberCount` (long, optional)
  - `analyticsStatus` (string, optional)
  - `cost` (double, optional, nullable)
  - `createdAt` (datetime, optional)
  - `description` (string, optional)
  - `id` (string, optional)
  - `name` (string, optional)
  - `requests` (long, optional, nullable)
  - `tokens` (long, optional, nullable)
  - `updatedAt` (datetime, optional)
- `meta` (object, optional)
  - `overview` (object, optional)
    - `totalActiveAgents` (long, optional)
    - `totalActiveMembers` (long, optional)
    - `totalPeriodCost` (double, optional, nullable)
    - `totalPeriodRequests` (long, optional, nullable)
    - `totalPeriodTokens` (long, optional, nullable)
    - `totalProjects` (long, optional)
  - `page` (integer, optional)
  - `pageSize` (integer, optional)
  - `period` (object, optional)
    - `end` (datetime, optional)
    - `key` (enum, optional)
      - Allowed values: `1d`, `7d`, `30d`
    - `start` (datetime, optional)
    - `timezone` (string, optional)
  - `total` (long, optional)
  - `totalPages` (integer, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "activeAgentCount": 5,
      "activeMemberCount": 12,
      "analyticsStatus": "active",
      "cost": 254.75,
      "createdAt": "2024-04-01T08:15:30Z",
      "description": "Project focused on developing AI-driven analytics tools.",
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "AI Analytics Platform",
      "requests": 125000,
      "tokens": 450000,
      "updatedAt": "2024-04-20T16:45:00Z"
    }
  ],
  "meta": {
    "overview": {
      "totalActiveAgents": 25,
      "totalActiveMembers": 60,
      "totalPeriodCost": 1250.5,
      "totalPeriodRequests": 625000,
      "totalPeriodTokens": 2250000,
      "totalProjects": 8
    },
    "page": 1,
    "pageSize": 12,
    "period": {
      "end": "2024-04-20T23:59:59Z",
      "key": "7d",
      "start": "2024-04-14T00:00:00Z",
      "timezone": "America/New_York"
    },
    "total": 8,
    "totalPages": 1
  }
}
```

**SDK Code**

```python
import requests

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

payload = {}
headers = {
    "Authorization": "Authorization",
    "X-Workspace-Id": "X-Workspace-Id",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, 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',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

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

	payload := strings.NewReader("{}")

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

	req.Header.Add("Authorization", "Authorization")
	req.Header.Add("X-Workspace-Id", "X-Workspace-Id")
	req.Header.Add("Content-Type", "application/json")

	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'
request["Content-Type"] = 'application/json'
request.body = "{}"

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")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://alephant.io/api/v1/projects', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Authorization',
    'Content-Type' => 'application/json',
    '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");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Authorization",
  "X-Workspace-Id": "X-Workspace-Id",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

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
request.httpBody = postData as Data

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()
```