Delete Vote
Votes
Delete Vote
Delete a vote to remove a user’s support from a suggestion
DELETE
Delete Vote
Delete a vote to remove a user’s support from a suggestion. This allows users to change their mind and unvote suggestions.
ID of the suggestion to remove vote from (CUID format, e.g., clm7x1a2b000008l7h3k1b2c3)
ID of the user removing the vote
Response Fields
Returns the deleted vote object:| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique vote identifier |
| suggestionId | string | Yes | ID of the suggestion |
| userId | string | Yes | ID of the user who removed the vote |
Example Request
Example Response
Error Responses
| Status Code | Description | Example Response |
|---|---|---|
| 400 | Bad request - User not found | {"error": "User not found"} |
| 401 | Unauthorized - Invalid API key | {"error": "Unauthorized"} |
| 404 | Vote not found | {"error": "Vote not found for this user and suggestion"} |
| 500 | Internal server error | {"error": "Failed to delete vote"} |