Skip to content

UpdateBoardPreferencesAsync

Rasmus Wulff Jensen edited this page Apr 1, 2025 · 1 revision

This method allows you to update various preferences for a specific Trello board. By providing the board's ID and a set of preference options, you can modify settings such as visibility, card covers, voting permissions, commenting permissions, and more. Any options not explicitly defined in the input will remain unchanged, ensuring flexibility and precision in updating board configurations.

Method Signature

async Task UpdateBoardPreferencesAsync(string boardId, UpdateBoardPreferencesOptions options)

Parameters

  • boardId The unique identifier of the board whose preferences are to be updated.
  • options An instance of UpdateBoardPreferencesOptions containing the preferences to be updated. This object allows you to specify various settings such as visibility, card covers, voting permissions, commenting permissions, and more. Any properties left undefined will not alter the current settings.

Examples

// Example 1: Update the visibility and card cover settings of a board.
// Example 1: Update the visibility and card cover settings of a board.
string boardId = "<your_board_id>";
UpdateBoardPreferencesOptions options = new UpdateBoardPreferencesOptions
{
    Visibility = BoardPreferenceVisibility.Public,
    CardCovers = BoardPreferenceCardCovers.Show
};
await trelloClient.UpdateBoardPreferencesAsync(boardId, options);
// Example 2: Set permissions for who can comment and vote on cards.
string boardId = "<your_board_id>";
UpdateBoardPreferencesOptions options = new UpdateBoardPreferencesOptions
{
    WhoCanComment = BoardPreferenceWhoCanComment.Members,
    WhoCanVote = BoardPreferenceWhoCanVote.Members
};
await trelloClient.UpdateBoardPreferencesAsync(boardId, options);
// Example 3: Enable self-join for workspace members and set card aging type.
string boardId = "<your_board_id>";
UpdateBoardPreferencesOptions options = new UpdateBoardPreferencesOptions
{
    SelfJoin = BoardPreferenceSelfJoin.Yes,
    CardAging = BoardPreferenceCardAging.Regular
};
await trelloClient.UpdateBoardPreferencesAsync(boardId, options);
Clone this wiki locally