# Close or reopen a project

`PATCH /api/project/{projectId}/closed`

URL: https://repsona.com/api/patch-project-projectid-closed

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `projectId` | path | integer | required | The project ID. |

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `isClosed` | body | boolean | required | `true` closes the project; `false` reopens it. Closed projects are hidden from project lists and the `@all` scope. |

## Request

```sh
curl -X PATCH "https://<space>.repsona.com/api/project/{projectId}/closed" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "isClosed": true
  }'
```

## Responses

- 200: Updated
- 401: Authentication is required
- 403: Admin only
- 404: Project not found

## Example response

```json
{
  "ok": true,
  "isClosed": true
}
```
