Clear, concise suggestion title (minimum 1 character)
Detailed description of the suggestion (minimum 1 character)
ID of the user creating the suggestion (must be valid CUID). This is the user ID of the user who is creating the suggestion.
ID of label to assign to this suggestion
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
Example Response
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"} |