# Create status

`POST /api/status`

URL: https://repsona.com/api/post-status

Creates a new status lane for the project. Admin/owner only.

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `projectId` | body | integer | required | The ID of the project the status belongs to. |
| `name` | body | string | required | Name of the status (1 to 255 characters). |
| `isClosed` | body | boolean |  | Whether the status counts as done. Tasks in a closed status are treated as completed. Defaults to `false`. The new status is added at the end of its group. |
| `color` | body | string \| null |  | Color of the status as a hex code such as `#3b82f6`. Defaults to `null` (no color). |

## Request

```sh
curl -X POST "https://<space>.repsona.com/api/status" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": 253,
    "name": "In review",
    "isClosed": false,
    "color": "#f59e0b"
  }'
```

## Responses

- 200: Created status
- 400: Invalid request payload
- 401: Authentication is required
- 403: Admin/owner role and project membership are required

## Example response

```json
{
  "id": 172,
  "name": "In review",
  "color": "#f59e0b",
  "sortOrder": 2000,
  "isClosed": false,
  "projectId": 253
}
```
