mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
[Bug]: Cannot add label to card via API – receiving E_NOT_FOUND despite valid cardId and labelId #753
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ftaco-net on GitHub (Jul 7, 2025).
Where is the problem occurring?
I encountered the problem while interacting with the server (Backend)
What browsers are you seeing the problem on?
No response
Current behavior
I'm trying to add an existing label to an existing card via the following API request:
POST /api/cards/:cardId/labels
With the following JSON payload:
{
"labelId": "1549240966907430411"
}
Despite providing a valid cardId and labelId, I consistently receive the following error response:
{
"code": "E_NOT_FOUND"
}
Desired behavior
No response
Steps to reproduce
What I’ve tried:
Confirmed both cardId and labelId exist using the /api/boards/:boardId response
Checked label existence under the correct board
Used both axios and raw HTTP POST with correct headers and body
Verified request works for card creation (/api/lists/:listId/cards) but fails for label assignment
The card is successfully created and the response returns a valid id. Immediately after that, I attempt to add the label using the returned cardId, but still get E_NOT_FOUND.
Please let me know if there are additional permissions or board settings required for label assignments.
Other information
No response
@meltyshev commented on GitHub (Jul 7, 2025):
Hi! The correct request to assign a label is
POST /api/cards/:cardId/card-labels, and the parameters you're using are correct. We avoided using just/labelsat the end of the path because it might be confusing - it could suggest that you're creating a label, whereas this endpoint is only for assigning existing ones.