Using the Trello UI, it’s really simple to move a card from one column/list to another on the same board. Click the card, drag it over, drop. Done.
Want to move it to a different board? That’s not so difficult, either. Open up the card, click the “Move” option, pick your new board and your new list and you’re good.
Moving a card through the API is also pretty easy. Fire off a PUT request to /1/cards/xxxxxx (where xxxxxx is the card’s ID) with the idList parameter set to the ID of the list you want to move it to. The documentation for the Trello API says that the idList parameter is optional and the reason is that you can update a card without moving it.
List IDs are globally unique. You can request information about any list, regardless of what board it’s on, with a GET request to /1/lists/yyyyyy (where yyyyyy is the list ID).
So if I want to move a card to a list, I just need the list ID, right? Right. Except when you need more.
It turns out that there’s another optional parameter, idBoard. If you’re moving a card to a list on a different board, you are required to specify the optional board ID even though the list IDs are unique, so by defining a list ID you automatically know what board that list belongs to.
I got hung up on this for about 30 minutes today and it annoys me. The list ID is the most specific identifier you can get. Why require a more general one on top of it?
So, yeah, if you’re moving a card with the API, you have to use idList. If you’re moving to another board, you have to use idBoard as well. Hopefully me mentioning it helps someone out.