Slack.Web.SlackLists (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

create(name, optional_params \\ %{})

Create a List.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • name - Name of the List. ex: My List

Optional Params

  • copy_from_list_id - ID of the List to copy. ex: F1234567
  • description_blocks - A rich text description of the List. ex: [{"type":"rich_text","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"List to keep track of tasks!"}]}]}]
  • include_copied_list_records - Boolean indicating whether to include records when a List is copied. ex: false
  • schema - Column definition for the List. ex: [{ "key": "task_name", "name": "Task Name", "type": "text", "is_primary_column": true }, { "key": "due_date", "name": "Due Date", "type": "date" }, { "key": "status", "name": "Status", "type": "select", "options": { "choices": [ { "value": "not_started", "label": "Not Started", "color": "red" }, { "value": "in_progress", "label": "In Progress", "color": "yellow" }, { "value": "completed", "label": "Completed", "color": "green" } ] } }, { "key": "assignee", "name": "Assignee", "type": "user" }]
  • todo_mode - Boolean indicating whether the List should be used to track todo tasks. ex: true

Errors the API can return:

  • invalid_column_type - Column type not allowed.
  • invalid_copy_and_schema_args - Cannot provide both copy_from_list_id and schema.
  • invalid_primary_column - Missing or more than one primary column.
  • invalid_schema - The schema was invalid.
  • missing_arg_copy_from_list_id - Missing argument copy_from_list_id.
  • over_column_maximum - Cannot create List with more than allowed column count.
  • over_list_file_maximum - Cannot create any more List files.
  • over_title_length_maximum - Title can not exceed defined length.
  • permission_denied - The user does not have permission to perform this action.
  • team_not_found - The team cannot be found.
  • user_not_found - The user cannot be found.

See the Common Errors guide for errors returned by every Web API method.

update(id, optional_params \\ %{})

Update a List.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • id - The ID of the List to update.

Optional Params

  • description_blocks - A rich text description of the List. ex: [{"type":"rich_text","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"My list description!"}]}]}]
  • name - The updated name of the List. ex: My List
  • todo_mode - Boolean indicating whether the List should be in todo mode. ex: true

Errors the API can return:

  • file_channel_rename_error - Failed to rename file channel based on file title.
  • list_editor_upsert_error - Failed to upsert List editor.
  • list_edits_update_error - Failed to update List metadata.
  • list_not_found - The List was not found.
  • missing_arguments - No arguments were provided to update the List.
  • over_title_length_maximum - Title can not exceed defined length.
  • team_not_found - The team cannot be found.
  • unexpected_description_blocks_arg - Unexpected description blocks argument.
  • user_not_found - The user cannot be found.

See the Common Errors guide for errors returned by every Web API method.