> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suggestkit.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Suggestion

> Create a new suggestion in your project

Create a new suggestion in your project. This endpoint allows users to submit feature requests, bug reports, or improvement ideas.

<ParamField body="title" type="string" required>
  Clear, concise suggestion title (minimum 1 character)
</ParamField>

<ParamField body="description" type="string" required>
  Detailed description of the suggestion (minimum 1 character)
</ParamField>

<ParamField body="userId" type="string" required>
  ID of the user creating the suggestion (must be valid CUID). This is the user ID of the user who is creating the suggestion.
</ParamField>

<ParamField body="labelId" type="string">
  ID of label to assign to this suggestion
</ParamField>

## Response Fields

| Field        | Type    | Required | Description                                   |
| ------------ | ------- | -------- | --------------------------------------------- |
| id           | string  | Yes      | Unique suggestion identifier (auto-generated) |
| title        | string  | Yes      | Suggestion title                              |
| description  | string  | Yes      | Suggestion description                        |
| status       | string  | Yes      | Current status (PENDING by default)           |
| userId       | string  | No       | ID of the user who created the suggestion     |
| projectId    | string  | Yes      | Project this suggestion belongs to            |
| label        | object  | No       | Label information (id, name, color)           |
| voteCount    | number  | Yes      | Number of votes (0 for new suggestions)       |
| hasUserVoted | boolean | No       | Whether creator has voted (false by default)  |
| sumValue     | number  | Yes      | Total monetary value from votes (0 initially) |
| createdAt    | string  | Yes      | Creation timestamp (ISO 8601)                 |
| updatedAt    | string  | Yes      | Last update timestamp (ISO 8601)              |

## Example Request

```json theme={null}
{
  "title": "Add keyboard shortcuts",
  "description": "It would be great to have keyboard shortcuts for common actions like creating new items (Cmd+N) and searching (Cmd+K)",
  "userId": "clm7x1a2b000008l7h3k1b2c3",
}
```

## Example Response

```json theme={null}
{
  "id": "clm7x1a2b000008l7h3k1b2c3",
  "title": "Add keyboard shortcuts",
  "description": "It would be great to have keyboard shortcuts for common actions like creating new items (Cmd+N) and searching (Cmd+K)",
  "status": "PENDING",
  "userId": "clm7x1a2b000008l7h3k1b2c3",
  "projectId": "clm7x1a2b000008l7h3k1b2c3",
  "label": null,
  "voteCount": 0,
  "hasUserVoted": false,
  "sumValue": 0,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}
```

## Error Responses

| Status Code | Description                           | Example Response                                  |
| :---------- | :------------------------------------ | :------------------------------------------------ |
| 400         | Bad request - Missing required fields | `{"error": "Title and description are required"}` |
| 401         | Unauthorized - Invalid API key        | `{"error": "Unauthorized"}`                       |
| 500         | Internal server error                 | `{"error": "Failed to create suggestion"}`        |
