Move a card
Moves a card to another area, at a chosen position. This is the drag-and-drop of the interface, as one call.
POST /api/data/cardMove
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
cardId | integer | yes | The card being moved. |
fromAreaId | integer | yes | Where it is now. |
toAreaId | integer | yes | Where it should go. |
newIndex | integer | yes | Its position in the target area, counting from 0. |
curl -X POST "https://boards.example.com/api/data/cardMove" \
-H "X-API-Key: $LOKALBOARDS_KEY" \
-H "Content-Type: application/json" \
-d '{
"cardId": 501,
"fromAreaId": 10,
"toAreaId": 11,
"newIndex": 0
}'
The cards either side are renumbered in the same transaction, and everyone looking at that board sees the card move immediately — a move made through the API is not a second-class one.
To reorder a card within its own area, use
/api/data/cardOrder instead.