# List projects in current space

`GET /api/project`

URL: https://repsona.com/api/get-project

Returns either joined projects or all projects in the current space.

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `scope` | query | joined \| space |  | `joined` (default) returns the open projects you belong to. `space` returns every project in the space and is available to admins and owners only. |

## Request

```sh
curl -X GET "https://<space>.repsona.com/api/project" \
  -H "Authorization: Bearer $REPSONA_API_KEY"
```

## Responses

- 200: Project list
- 400: Invalid query parameters
- 401: Authentication is required
- 403: Forbidden for scope=space when user is not owner/admin

## Example response

```json
[
  {
    "id": 258,
    "fullName": "Website renewal (phase 2)",
    "name": "WEB-NEXT",
    "avatarUrl": "",
    "backgroundUrl": "",
    "purpose": "",
    "isPublic": false
  },
  {
    "id": 253,
    "fullName": "Website renewal",
    "name": "WEB",
    "avatarUrl": "",
    "backgroundUrl": "",
    "purpose": "Rebuild the marketing site with a new design and faster pages.",
    "isPublic": false
  }
]
```
