# List projects

List authorized projects. Service credentials receive cursor pages; legacy callers opt in with pagination=cursor. Reuse nextCursor until null.

`GET /api/projects`

Required permission: `project:read`.

## Parameters

| Name | In | Type | Required | Description |

| --- | --- | --- | --- | --- |

| `pagination` | query | `string` | No | — |

| `cursor` | query | `string` | No | — |

| `limit` | query | `integer` | No | — |

## Example request

```bash
curl --request GET \
  --url https://api.hoplite.sh/api/projects \
  --header "X-Api-Key: $HOPLITE_API_KEY"
```

## 200 response

Organization projects.

Content type: `application/json`. Response type: `ProjectsResponse`.

| Field | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| `nextCursor` | `string \| null` | No | — | — |
| `ok` | `boolean` | Yes | constant true | — |
| `projects` | `Project[]` | Yes | — | — |
| `projects.id` | `string` | Yes | — | — |
| `projects.name` | `string` | Yes | — | — |
| `projects.description` | `string \| null` | No | — | — |
| `projects.taskCode` | `string` | No | — | — |
| `projects.repos` | `RepoRef[]` | No | — | — |
| `projects.repos.repoFullName` | `string` | Yes | min length 1, pattern \S | — |
| `projects.repos.branch` | `string` | No | min length 1, pattern \S | — |
| `projects.githubInstallationId` | `string` | No | — | — |
| `projects.defaultBranch` | `string \| null` | No | — | — |
| `projects.previewPort` | `integer` | Yes | min 3000, max 9999 | — |
| `projects.setupScript` | `string \| null` | No | — | — |
| `projects.runScript` | `string \| null` | No | — | — |
| `projects.archiveScript` | `string \| null` | No | — | — |
| `projects.instructions` | `string \| null` | No | — | — |
| `projects.defaultModel` | `string \| null` | No | — | — |
| `projects.reasoningEffort` | `string \| null` | No | off · none · minimal · low · medium · high · xhigh · max ·  | — |
| `projects.agentSpeed` | `string \| null` | No | standard · fast ·  | — |
| `projects.prReviewAutofixDefault` | `boolean \| null` | No | — | — |
| `projects.sandboxSpec` | `ProjectSandboxSpec \| null` | No | — | — |
| `projects.sandboxSpec.Option 1` | `ProjectSandboxSpec` | No | — | — |
| `projects.sandboxSpec.Option 1.defaultCpu` | `integer \| null` | No | min 1 | — |
| `projects.sandboxSpec.Option 1.defaultMemoryGiB` | `integer \| null` | No | min 1 | — |
| `projects.sandboxSpec.Option 1.maxCpu` | `integer \| null` | No | min 1 | — |
| `projects.sandboxSpec.Option 1.maxDiskGiB` | `integer \| null` | No | min 1 | — |
| `projects.sandboxSpec.Option 1.maxMemoryGiB` | `integer \| null` | No | min 1 | — |
| `projects.sandboxSpec.Option 1.staffMaxCpu` | `integer \| null` | No | min 1 | — |
| `projects.sandboxSpec.Option 1.staffMaxDiskGiB` | `integer \| null` | No | min 1 | — |
| `projects.sandboxSpec.Option 1.staffMaxMemoryGiB` | `integer \| null` | No | min 1 | — |
| `projects.sandboxSpec.Option 1.runtimeProfile` | `string \| null` | No | docker-compose ·  | — |
| `projects.sandboxSpec.Option 2` | `null` | No | — | — |
| `projects.framework` | `string \| null` | No | — | — |
| `projects.prebuildsEnabled` | `boolean` | No | — | — |
| `projects.prebuildsPreference` | `string \| null` | No | enabled · disabled ·  | Explicit user intent behind prebuildsEnabled. null means the platform decided (automatic enablement after a successful workspace setup detected a supported lockfile). |
| `projects.createdAt` | `string<date-time>` | No | — | — |
| `projects.updatedAt` | `string<date-time>` | No | — | — |

```json
{
  "ok": true,
  "projects": [
    {
      "id": "proj_01JQ75",
      "name": "Storefront",
      "description": "Customer-facing web application",
      "repos": [
        {
          "repoFullName": "acme/storefront",
          "branch": "main"
        }
      ],
      "defaultBranch": "main",
      "previewPort": 3000
    }
  ]
}
```

## Response headers

| Header | Type | Statuses | Description |

| --- | --- | --- | --- |

| `RateLimit` | `string` | `200`, `401`, `402`, `403`, `429`, `500`, `501`, `503` | Current ingress policy, remaining requests, and seconds until reset, for example `"ingress";r=599;t=60`. |

| `RateLimit-Policy` | `string` | `200`, `401`, `402`, `403`, `429`, `500`, `501`, `503` | Ingress quota and window, for example `"ingress";q=600;qu="requests";w=60`. |

| `X-RateLimit-Limit` | `integer` | `200`, `401`, `402`, `403`, `429`, `500`, `501`, `503` | Maximum requests allowed in the current rolling window. |

| `X-RateLimit-Remaining` | `integer` | `200`, `401`, `402`, `403`, `429`, `500`, `501`, `503` | Requests remaining in the current rolling window. |

| `X-RateLimit-Reset` | `integer` | `200`, `401`, `402`, `403`, `429`, `500`, `501`, `503` | Unix timestamp when the current rolling window resets. |

| `x-request-id` | `string` | `200`, `401`, `402`, `403`, `429`, `500`, `501`, `503` | Request correlation ID. |

| `Retry-After` | `integer` | `429`, `503` | Seconds until another request should be attempted. |

| `X-Retry-After` | `integer` | `429`, `503` | Legacy retry delay in seconds. |

## Status codes

- `200` — Organization projects.

- `401` — The API key is missing, invalid, or lacks the operation's permission.

- `402` — The organization does not have access to the requested product capability.

- `403` — The key's current user no longer has the required organization membership or role.

- `429` — The API-key rate limit has been exceeded.

- `500` — The API encountered an unexpected failure.

- `501` — The deployment has not configured the requested capability.

- `503` — A required API dependency, including the rate limiter, is unavailable.