# Create a project

`POST /api/project`

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

Creates a project with default statuses. The creator joins automatically.

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `key` | body | string | required | Unique key of the project: 3 to 30 characters of letters, numbers, `_`, `-` and `.`. |
| `name` | body | string | required | Display name of the project (up to 255 characters). Falls back to `key` when empty. |
| `memberUserIds` | body | number[] |  | IDs of users to add as members besides you. Users outside the space and deactivated users are ignored. |

## Request

```sh
curl -X POST "https://<space>.repsona.com/api/project" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "WEB",
    "name": "Website renewal",
    "memberUserIds": [
      988
    ]
  }'
```

## Responses

- 200: Created project id
- 400: Invalid project key
- 401: Authentication is required
- 403: Admin only

## Example response

```json
{
  "projectId": 253
}
```
