Search code examples
trello

Archive a trello board/list (API)


I would like to archive a board/list with the trello API but I can't find a solution.

With https://trello.com/docs/api/list/#post-1-lists-idlist-archiveallcards I can archive all cards inside a list but I can't archive the list itself.

For boards I didn't find anything. But deleting cards are easy with https://trello.com/docs/api/card/#delete-1-cards-card-id-or-shortlink Any ideas or isn't it possible with the API?


Solution

  • The card delete method you've linked to is a full deletion - unlike archiving, the card is irrevocably gone.

    You're looking for the closed property, which can be set on boards, lists, and cards (true to archive, false to unarchive). If you archive all cards inside a list, you'll see that setting closed to true on each of those cards is the only change being made.