diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 29ba864e..546495fc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,4 +13,5 @@ jobs: uses: ruby/setup-ruby@v1 with: bundler-cache: true + ruby-version: '3.4' - run: bundle exec rubocop diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index afec5ba7..cdd16ca6 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -15,6 +15,9 @@ jobs: uses: ruby/setup-ruby@v1 with: bundler-cache: true + ruby-version: '3.4' + - name: Download + run: bundle exec rake api:download - name: Update run: bundle exec rake api:update - name: Validate diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e7b03e3a..059e007d 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -12,5 +12,6 @@ jobs: uses: ruby/setup-ruby@v1 with: bundler-cache: true + ruby-version: '3.4' - name: Validate run: bundle exec rake api:validate diff --git a/.rubocop.yml b/.rubocop.yml index a645dbf6..05b65ece 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,6 @@ inherit_from: .rubocop_todo.yml -require: +plugins: - rubocop-rake AllCops: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ab0b5507..a8e7b724 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,38 +1,75 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-03-19 01:49:28 UTC using RuboCop version 1.36.0. +# on 2025-09-06 23:06:24 UTC using RuboCop version 1.80.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 7 -# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes. +# Offense count: 3 +# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: - Max: 41 + Max: 49 -# Offense count: 2 -# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods. +# Offense count: 1 +# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. # AllowedMethods: refine Metrics/BlockLength: - Max: 80 + Max: 27 # Offense count: 1 # Configuration parameters: CountComments, CountAsOne. Metrics/ClassLength: - Max: 153 + Max: 115 # Offense count: 2 -# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. +# Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/CyclomaticComplexity: - Max: 11 + Max: 20 -# Offense count: 9 -# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods. +# Offense count: 5 +# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. Metrics/MethodLength: - Max: 33 + Max: 32 # Offense count: 1 -# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. +# Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/PerceivedComplexity: - Max: 10 + Max: 19 + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Rake/Desc: + Exclude: + - 'tasks/update.rake' + +# Offense count: 3 +Security/Open: + Exclude: + - 'tasks/lib/docs/events_downloader.rb' + - 'tasks/lib/docs/methods_downloader.rb' + +# Offense count: 4 +# Configuration parameters: AllowedConstants. +Style/Documentation: + Exclude: + - 'spec/**/*' + - 'test/**/*' + - 'tasks/lib/docs/downloader.rb' + - 'tasks/lib/docs/events_downloader.rb' + - 'tasks/lib/docs/methods_downloader.rb' + - 'tasks/lib/slack_api/methods_generator.rb' + +# Offense count: 6 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, always_true, never +Style/FrozenStringLiteralComment: + Exclude: + - '**/*.arb' + - 'tasks/events.rake' + - 'tasks/lib/docs/downloader.rb' + - 'tasks/lib/slack_api/methods_generator.rb' + - 'tasks/methods.rake' + - 'tasks/update.rake' + - 'tasks/validate.rake' diff --git a/Gemfile b/Gemfile index e5dcce07..053b7ee1 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,6 @@ gem 'bundler' gem 'json' gem 'json-schema' gem 'rake' -gem 'spidey' group :test do gem 'rubocop' diff --git a/Gemfile.lock b/Gemfile.lock index 87462cfc..a6964550 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,71 +1,47 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) - ast (2.4.2) - connection_pool (2.2.5) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - http-cookie (1.0.5) - domain_name (~> 0.5) - json (2.6.2) - json-schema (2.8.1) - addressable (>= 2.4) - mechanize (2.8.5) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + ast (2.4.3) + bigdecimal (3.2.3) + json (2.13.2) + json-schema (6.0.0) addressable (~> 2.8) - domain_name (~> 0.5, >= 0.5.20190701) - http-cookie (~> 1.0, >= 1.0.3) - mime-types (~> 3.0) - net-http-digest_auth (~> 1.4, >= 1.4.1) - net-http-persistent (>= 2.5.2, < 5.0.dev) - nokogiri (~> 1.11, >= 1.11.2) - rubyntlm (~> 0.6, >= 0.6.3) - webrick (~> 1.7) - webrobots (~> 0.1.2) - mime-types (3.4.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) - mini_portile2 (2.8.5) - net-http-digest_auth (1.4.1) - net-http-persistent (4.0.1) - connection_pool (~> 2.2) - nokogiri (1.15.6) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - parallel (1.22.1) - parser (3.1.2.1) + bigdecimal (~> 3.1) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + parallel (1.27.0) + parser (3.3.9.0) ast (~> 2.4.1) - public_suffix (4.0.6) - racc (1.7.3) + racc + prism (1.4.0) + public_suffix (6.0.2) + racc (1.8.1) rainbow (3.1.1) - rake (13.0.1) - regexp_parser (2.6.0) - rexml (3.3.9) - rubocop (1.36.0) + rake (13.3.0) + regexp_parser (2.11.2) + rubocop (1.80.2) json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) - parser (>= 3.1.2.1) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.20.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.46.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.21.0) - parser (>= 3.1.1.0) - rubocop-rake (0.6.0) - rubocop (~> 1.0) - ruby-progressbar (1.11.0) - rubyntlm (0.6.3) - spidey (0.1.0) - mechanize - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - unicode-display_width (2.3.0) - webrick (1.8.2) - webrobots (0.1.2) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.46.0) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + ruby-progressbar (1.13.0) + unicode-display_width (3.1.5) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) PLATFORMS ruby @@ -77,7 +53,6 @@ DEPENDENCIES rake rubocop rubocop-rake - spidey BUNDLED WITH - 2.2.33 + 2.6.9 diff --git a/Rakefile b/Rakefile index f77da30d..b8aed0f0 100644 --- a/Rakefile +++ b/Rakefile @@ -2,11 +2,16 @@ require 'json' require 'json-schema' -require 'spidey' require 'rubygems' require 'bundler' require 'fileutils' Bundler.setup :default, :development +load 'tasks/download.rake' +load 'tasks/events.rake' +load 'tasks/methods.rake' +load 'tasks/validate.rake' load 'tasks/update.rake' + +task default: 'api:update' diff --git a/docs.slack.dev/events/events.json b/docs.slack.dev/events/events.json new file mode 100644 index 00000000..2f751d8a --- /dev/null +++ b/docs.slack.dev/events/events.json @@ -0,0 +1,1813 @@ +[ + { + "name": "accounts_changed", + "description": "The list of accounts a user is signed into has changed", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "app_mention", + "description": "Subscribe to only the message events that mention your app or bot", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "app_deleted", + "description": "User has deleted an app", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "app_home_opened", + "description": "User clicked into your App Home", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "app_installed", + "description": "User has installed an app", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "app_rate_limited", + "description": "Indicates your app's event subscriptions are being rate limited", + "automatic": true, + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "app_requested", + "description": "User requested an app", + "automatic": true, + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "app_uninstalled", + "description": "Your Slack app was uninstalled", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "app_uninstalled_team", + "description": "User has uninstalled an app", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "assistant_app_thread", + "description": "The message sent is an app assistant thread.", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "assistant_thread_context_changed", + "description": "The context changed while an AI assistant thread was visible", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "assistant_thread_started", + "description": "An AI assistant thread was started", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "bot_added", + "description": "A bot user was added", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "bot_changed", + "description": "A bot user was changed", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "bot_message", + "scopes": [], + "description": "A message was posted by an integration", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "call_rejected", + "description": "A call was rejected", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "channel_archive", + "description": "A channel was archived", + "scopes": [ + "channels:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_convert_to_private", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "This channel was made private; now it can only be viewed or joined by invitation", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_convert_to_public", + "scopes": [], + "description": "This channel was made public; now any member in this workspace can see and join it", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_created", + "description": "A channel was created", + "bot_user_contexts": [ + "" + ], + "scopes": [ + "channels:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_deleted", + "description": "A channel was deleted", + "scopes": [ + "channels:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_history_changed", + "description": "Bulk updates were made to a channel's history", + "scopes": [ + "channels:history", + "groups:history", + "mpim:history" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_id_changed", + "description": "A channel ID changed", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "channel_join", + "scopes": [], + "description": "A member joined a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_joined", + "description": "You joined a channel", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "channel_leave", + "scopes": [], + "description": "A member left a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_left", + "description": "You left a channel", + "scopes": [ + "channels:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_marked", + "description": "Your channel read marker was updated", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "channel_name", + "scopes": [], + "description": "A channel was renamed", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_posting_permissions", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "The posting permissions for a channel changed", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_purpose", + "scopes": [], + "description": "A channel purpose was updated", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_topic", + "scopes": [], + "description": "A channel topic was updated", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_rename", + "description": "A channel was renamed", + "scopes": [ + "channels:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_shared", + "description": "A channel has been shared with an external workspace", + "scopes": [ + "channels:read", + "groups:read" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "channel_unarchive", + "description": "A channel was unarchived", + "scopes": [ + "channels:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "channel_unshared", + "description": "A channel has been unshared with an external workspace", + "scopes": [ + "channels:read", + "groups:read" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "commands_changed", + "description": "A slash command has been added or changed", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "document_mention", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A bot is mentioned in the body of a canvas", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "dnd_updated", + "description": "Do not Disturb settings changed for the current user", + "scopes": [ + "dnd:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "dnd_updated_user", + "description": "Do not Disturb settings changed for a member", + "scopes": [ + "dnd:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "ekm_access_denied", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "Message content redacted due to Enterprise Key Management (EKM)", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "email_domain_changed", + "description": "The workspace email domain has changed", + "scopes": [ + "team:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "emoji_changed", + "description": "A custom emoji has been added or changed", + "scopes": [ + "emoji:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "external_org_migration_finished", + "description": "An enterprise org migration has finished on an external workspace", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "external_org_migration_started", + "description": "An enterprise org migration has started on an external workspace", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "file_change", + "description": "A file was changed", + "scopes": [ + "files:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_comment", + "scopes": [], + "description": "A comment was added to a file", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_comment_added", + "description": "A file comment was added", + "scopes": [ + "files:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_comment_deleted", + "description": "A file comment was deleted", + "scopes": [ + "files:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_comment_edited", + "description": "A file comment was edited", + "scopes": [ + "files:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_created", + "description": "A file was created", + "scopes": [ + "files:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_deleted", + "description": "A file was deleted", + "scopes": [ + "files:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_mention", + "scopes": [], + "description": "A file was mentioned in a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_public", + "description": "A file was made public", + "scopes": [ + "files:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_share", + "scopes": [], + "description": "A file was shared into a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_shared", + "description": "A file was shared", + "scopes": [ + "files:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "file_unshared", + "description": "A file was unshared", + "scopes": [ + "files:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "function_executed", + "description": "Your app function is executed as a step in a workflow", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "goodbye", + "description": "The server intends to close the connection soon", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "grid_migration_finished", + "description": "An enterprise org migration has finished on this workspace", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "grid_migration_started", + "description": "An enterprise org migration has started on this workspace", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "group_archive", + "description": "A private channel was archived", + "scopes": [ + "groups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_close", + "description": "You closed a private channel", + "scopes": [ + "groups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_deleted", + "description": "A private channel was deleted", + "scopes": [ + "groups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_history_changed", + "description": "Bulk updates were made to a private channel's history", + "scopes": [ + "groups:history" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_join", + "scopes": [], + "description": "A member joined a group", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_joined", + "description": "You joined a private channel", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "group_leave", + "scopes": [], + "description": "A member left a group", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_left", + "description": "You left a private channel", + "scopes": [ + "groups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_marked", + "description": "A private channel read marker was updated", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "group_name", + "scopes": [], + "description": "A group was renamed", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_open", + "description": "You created a group DM", + "scopes": [ + "groups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_purpose", + "scopes": [], + "description": "A group purpose was updated", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_rename", + "description": "A private channel was renamed", + "scopes": [ + "groups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_topic", + "scopes": [], + "description": "A group topic was updated", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "group_unarchive", + "description": "A private channel was unarchived", + "scopes": [ + "groups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "hello", + "description": "The client has successfully connected to the server", + "bot_user_contexts": [ + "" + ], + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "im_close", + "description": "You closed a DM", + "scopes": [ + "im:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "im_created", + "description": "A DM was created", + "scopes": [ + "im:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "im_history_changed", + "description": "Bulk updates were made to a DM's history", + "scopes": [ + "im:history" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "im_marked", + "description": "A direct message read marker was updated", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "im_open", + "description": "You opened a DM", + "scopes": [ + "im:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "invite_requested", + "description": "User requested an invite", + "scopes": [ + "admin.invites:read" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "link_shared", + "description": "A message was posted containing one or more links relevant to your application", + "scopes": [ + "links:read" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "manual_presence_change", + "description": "You manually updated your presence", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "me_message", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A /me message was sent", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "member_joined_channel", + "description": "A user joined a public channel, private channel or MPDM", + "scopes": [ + "channels:read", + "groups:read", + "mpim:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "member_left_channel", + "description": "A user left a public or private channel", + "scopes": [ + "channels:read", + "groups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "message", + "description": "A message was sent to a channel", + "subtypes": { + "assistant_app_thread": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "The message sent is an app assistant thread", + "APIs": [ + "Events", + "RTM" + ] + }, + "bot_message": { + "scopes": [], + "description": "A message was posted by an integration", + "APIs": [ + "Events", + "RTM" + ] + }, + "channel_archive": { + "scopes": [], + "description": "A channel was archived.", + "APIs": [ + "Events" + ] + }, + "channel_convert_to_private": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "This channel was made private. Now, it can only be viewed or joined by invitation", + "APIs": [ + "Events", + "RTM" + ] + }, + "channel_convert_to_public": { + "scopes": [], + "description": "This channel was made public. Any member in this workspace can see and join it", + "APIs": [ + "Events", + "RTM" + ] + }, + "channel_join": { + "scopes": [], + "description": "A member joined a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + "channel_leave": { + "scopes": [], + "description": "A member left a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + "channel_name": { + "scopes": [], + "description": "A channel was renamed", + "APIs": [ + "Events", + "RTM" + ] + }, + "channel_posting_permission": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "The posting permissions for a channel changed", + "APIs": [ + "Events", + "RTM" + ] + }, + "channel_purpose": { + "scopes": [], + "description": "A channel purpose was updated", + "APIs": [ + "Events", + "RTM" + ] + }, + "channel_topic": { + "scopes": [], + "description": "A channel topic was updated", + "APIs": [ + "Events", + "RTM" + ] + }, + "channel_unarchive": { + "scopes": [], + "description": "A channel was unarchived", + "APIs": [ + "RTM" + ] + }, + "document_mention": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A bot is mentioned in the body of a canvas", + "APIs": [ + "Events", + "RTM" + ] + }, + "ekm_access_denied": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "Message content redacted due to Enterprise Key Management (EKM)", + "APIs": [ + "Events", + "RTM" + ] + }, + "file_comment": { + "scopes": [], + "description": "A comment was added to a file", + "APIs": [ + "Events", + "RTM" + ] + }, + "file_mention": { + "scopes": [], + "description": "A file was mentioned in a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + "file_share": { + "scopes": [], + "description": "A file was shared into a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + "group_archive": { + "scopes": [], + "description": "A group was archived", + "APIs": [ + "RTM" + ] + }, + "group_join": { + "scopes": [], + "description": "A member joined a group", + "APIs": [ + "Events", + "RTM" + ] + }, + "group_leave": { + "scopes": [], + "description": "A member left a group", + "APIs": [ + "Events", + "RTM" + ] + }, + "group_name": { + "scopes": [], + "description": "A group was renamed", + "APIs": [ + "Events", + "RTM" + ] + }, + "group_purpose": { + "scopes": [], + "description": "A group purpose was updated", + "APIs": [ + "Events", + "RTM" + ] + }, + "group_topic": { + "scopes": [], + "description": "A group topic was updated", + "APIs": [ + "Events", + "RTM" + ] + }, + "group_unarchive": { + "scopes": [], + "description": "A group was unarchived", + "APIs": [ + "RTM" + ] + }, + "me_message": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A /me message was sent", + "APIs": [ + "Events", + "RTM" + ] + }, + "message_changed": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A message was changed", + "APIs": [ + "Events", + "RTM" + ] + }, + "message_deleted": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A message was deleted", + "APIs": [ + "Events", + "RTM" + ] + }, + "message_locked": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A message thread was locked", + "APIs": [ + "Events", + "RTM" + ] + }, + "message_replied": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A message thread received a reply", + "APIs": [ + "Events", + "RTM" + ] + }, + "pinned_item": { + "scopes": [], + "description": "An item was pinned in a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + "reminder_add": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A reminder was added to the channel", + "APIs": [ + "Events", + "RTM" + ] + }, + "reply_broadcast": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "deprecated": true, + "description": "(No longer served) A message thread's reply was broadcast to a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + "thread_broadcast": { + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A message thread's reply was broadcast to a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + "unpinned_item": { + "scopes": [], + "description": "An item was unpinned from a channel", + "APIs": [ + "Events", + "RTM" + ] + } + }, + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "message.app_home", + "description": "A user sent a message to your Slack app", + "app_permissions_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "message_changed", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A message was changed", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "message.channels", + "description": "A message was posted to a channel", + "scopes": [ + "channels:history" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "message_deleted", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A message was deleted", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "message.groups", + "description": "A message was posted to a private channel", + "scopes": [ + "groups:history" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "message.im", + "description": "A message was posted in a direct message channel", + "scopes": [ + "im:history" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "message.mpim", + "description": "A message was posted in a multiparty direct message channel", + "scopes": [ + "mpim:history" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "message_metadata_deleted", + "description": "Message metadata was deleted", + "scopes": [ + "metadata.message:read" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "message_metadata_posted", + "description": "Message metadata was posted", + "scopes": [ + "metadata.message:read" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "message_metadata_updated", + "description": "Message metadata was updated", + "scopes": [ + "metadata.message:read" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "message_replied", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A message thread received a reply", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "pin_added", + "description": "A pin was added to a channel", + "scopes": [ + "pins:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "pin_removed", + "description": "A pin was removed from a channel", + "scopes": [ + "pins:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "pinned_item", + "scopes": [], + "description": "An item was pinned in a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "pref_change", + "description": "You have updated your preferences", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "presence_change", + "description": "A member's presence changed", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "presence_query", + "description": "Determine the current presence status for a list of users", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "presence_sub", + "description": "Subscribe to presence events for the specified users", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "reaction_added", + "description": "A member has added an emoji reaction to an item", + "scopes": [ + "reactions:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "reaction_removed", + "description": "A member removed an emoji reaction", + "scopes": [ + "reactions:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "reconnect_url", + "description": "Experimental", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "reminder_add", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A reminder was added to the channel", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "reply_broadcast", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "deprecated": true, + "description": "(No longer served) A message thread's reply was broadcast to a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "shared_channel_invite_accepted", + "description": "A shared channel invited was accepted", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "shared_channel_invite_approved", + "description": "A shared channel invited was approved", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "shared_channel_invite_declined", + "description": "A shared channel invited was declined", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "shared_channel_invite_received", + "description": "A shared channel invited was sent to a Slack user", + "scopes": [], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "shared_channel_invite_requested", + "description": "A shared channel invited was requested", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "star_added", + "description": "A member has saved an item for later or starred an item", + "scopes": [ + "stars:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "star_removed", + "description": "A member has removed an item saved for later or starred an item", + "scopes": [ + "stars:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "subteam_created", + "description": "A User Group has been added to the workspace", + "scopes": [ + "usergroups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "subteam_members_changed", + "description": "The membership of an existing User Group has changed", + "scopes": [ + "usergroups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "subteam_self_added", + "description": "You have been added to a User Group", + "scopes": [ + "usergroups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "subteam_self_removed", + "description": "You have been removed from a User Group", + "scopes": [ + "usergroups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "subteam_updated", + "description": "An existing User Group has been updated or its members changed", + "scopes": [ + "usergroups:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "team_access_granted", + "description": "Access to a set of teams was granted to your org app", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "team_access_revoked", + "scopes": [], + "description": "Access to a set of teams was revoked from your org app", + "APIs": [ + "Events" + ] + }, + { + "name": "team_domain_change", + "description": "The workspace domain has changed", + "scopes": [ + "team:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "team_join", + "description": "A new member has joined", + "scopes": [ + "users:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "team_migration_started", + "description": "The workspace is being migrated between servers", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "team_plan_change", + "description": "The account billing plan has changed", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "team_pref_change", + "description": "A preference has been updated", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "team_profile_change", + "description": "The workspace profile fields have been updated", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "team_profile_delete", + "description": "The workspace profile fields have been deleted", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "team_profile_reorder", + "description": "The workspace profile fields have been reordered", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "team_rename", + "description": "The workspace name has changed", + "scopes": [ + "team:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "thread_broadcast", + "scopes": [ + "channels:history", + "groups:history", + "im:history", + "mpim:history" + ], + "description": "A message thread's reply was broadcast to a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "tokens_revoked", + "description": "API tokens for your app were revoked", + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "unpinned_item", + "scopes": [], + "description": "An item was unpinned from a channel", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "url_verification", + "description": "Verifies ownership of an Events API Request URL", + "automatic": true, + "app_event": true, + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "user_change", + "description": "A member's data has changed", + "scopes": [ + "users:read" + ], + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "user_huddle_changed", + "description": "A user's huddle status has changed", + "APIs": [ + "Events", + "RTM" + ] + }, + { + "name": "user_typing", + "description": "A channel member is typing a message", + "scopes": [], + "APIs": [ + "RTM" + ] + }, + { + "name": "workflow_deleted", + "description": "A workflow that contains a step supported by your app was deleted", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "workflow_published", + "description": "A workflow that contains a step supported by your app was published", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "workflow_step_deleted", + "description": "A workflow step supported by your app was removed from a workflow", + "scopes": [ + "pins:read" + ], + "APIs": [ + "Events" + ] + }, + { + "name": "workflow_step_execute", + "description": "A workflow step supported by your app should execute", + "scopes": [], + "APIs": [ + "Events" + ] + }, + { + "name": "workflow_unpublished", + "description": "A workflow that contains a step supported by your app was unpublished", + "scopes": [], + "APIs": [ + "Events" + ] + } +] \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.analytics.getFile.json b/docs.slack.dev/methods/admin.analytics.getFile.json new file mode 100644 index 00000000..b97d7211 --- /dev/null +++ b/docs.slack.dev/methods/admin.analytics.getFile.json @@ -0,0 +1,100 @@ +{ + "desc": "Retrieve analytics data for a given date, presented as a compressed JSON file", + "http_method": "POST", + "scope": "admin.analytics:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "type" + ], + "properties": { + "token": { + "type": "string", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "subtype": "auth", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "date": { + "desc": "Date to retrieve the analytics data for, expressed as `YYYY-MM-DD` in UTC. Required unless `metadata_only` is set to true.", + "example": "2020-09-01", + "schema": "date" + }, + "type": { + "desc": "The type of analytics to retrieve. The options are currently limited to `member` (for Enterprise org member analytics) and `public_channel` (for public channel analytics).", + "type": "string", + "example": "member" + }, + "metadata_only": { + "desc": "Retrieve metadata for the `type` of analytics indicated. Can be used only with `type` set to `public_channel` analytics. See [detail below](#metadata_only). Omit the `date` parameter when using this argument.", + "type": "boolean", + "example": "true", + "default": "false" + } + } + }, + "output": null, + "errors": { + "data_not_available": { + "desc": "The `date` was before the API became available." + }, + "feature_not_available": { + "desc": "The user token does not belong to an Enterprise or Business+ team." + }, + "feature_not_enabled": { + "desc": "This feature is not enabled on your workspace." + }, + "file_not_found": { + "desc": "The analytics data for the `date` specified weren't found." + }, + "file_not_yet_available": { + "desc": "The analytics data for the `date` isn't available yet." + }, + "invalid_arguments": { + "desc": "Arguments weren't fully provided. For example, the `date` argument wasn't passed." + }, + "invalid_date": { + "desc": "The `date` argument was invalid." + }, + "invalid_type": { + "desc": "The analytics data for the `type` specified weren't found." + }, + "member_analytics_disabled": { + "desc": "Member analytics are disabled for your organization." + }, + "metadata_not_available": { + "desc": "Metadata not available for the analytics `type` you provided." + }, + "metadata_only_does_not_support_date": { + "desc": "The `metadata_only` field gets the latest metadata file. The `date` field is not supported." + }, + "missing_scope": { + "desc": "This token doesn't have the scope required." + }, + "not_an_admin": { + "desc": "The user token does not have admin privileges." + }, + "org_level_email_display_disabled": { + "desc": "This API is unavailable for organizations with a _'Hide email addresses'_ policy." + }, + "user_cannot_manage_public_channels": { + "desc": "The user must have permissions to manage public channels at the Enterprise level." + } + }, + "examples": { + "success": { + "url": "/api/admin.analytics.getFile?token=YOUR_TOKEN&date=2020-08-01&type=member", + "description": "A gzipped new-line delimited JSON file presented with a `Content-type: application/gzip` HTTP header. An example file name is `Slack Corp Member Analytics 2020-08-01.json.gz`", + "example": "" + }, + "error": { + "url": "/api/admin.analytics.getFile?token=INVALID_TOKEN&date=2020-08-01&type=member", + "description": "Typical Web API error response is a JSON response with a `Content-type: application/json` HTTP header.", + "example": { + "ok": false, + "error": "org_level_email_display_disabled" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.activities.list.json b/docs.slack.dev/methods/admin.apps.activities.list.json new file mode 100644 index 00000000..4dd18e77 --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.activities.list.json @@ -0,0 +1,167 @@ +{ + "desc": "Get logs for a specified team/org", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.app_activities:read" + }, + "json_input_supported": false, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "example": "A12345", + "desc": "The ID of the app to get activities from.", + "schema": "app_id" + }, + "team_id": { + "type": "string", + "example": "T12345", + "desc": "The team who owns this log." + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "bG9nX2lkOjc5NjQ1NA==", + "type": "string" + }, + "limit": { + "desc": "The maximum number of items to return.", + "example": "100", + "type": "integer" + }, + "min_log_level": { + "desc": "The minimum log level of the log events to be returned. Defaults to `info`. Acceptable values (in order of relative importance from smallest to largest) are `trace`, `debug`, `info`, `warn`, `error` and `fatal`.", + "example": "info", + "type": "string" + }, + "log_event_type": { + "desc": "The event type of log events to be returned.", + "example": "test_log_event", + "type": "string" + }, + "source": { + "desc": "The source of log events to be returned. Acceptable values are `slack` and `developer`.", + "example": "slack", + "type": "string" + }, + "component_type": { + "desc": "The component type of log events to be returned. Acceptable values are `events_api`, `workflows`, `functions` and `tables`.", + "example": "workflows", + "type": "string" + }, + "component_id": { + "desc": "The component ID of log events to be returned. Will be `FnXXXXXX` for functions, and `WfXXXXXX` for workflows", + "example": "Wf013SMGL4V9", + "type": "string" + }, + "trace_id": { + "desc": "The trace ID of log events to be returned.", + "example": "Tr432f2", + "type": "string" + }, + "min_date_created": { + "desc": "The earliest timestamp of the log to retrieve (epoch microseconds).", + "example": "1646665572336251", + "type": "integer" + }, + "max_date_created": { + "desc": "The latest timestamp of the log to retrieve (epoch microseconds).", + "example": "1646665572336299", + "type": "integer" + }, + "sort_direction": { + "desc": "The direction you want the data sorted by (always by timestamp)", + "type": "string", + "example": "asc", + "enum": [ + "asc", + "desc" + ] + } + } + }, + "output": { + "type": "object", + "required": [ + "activities" + ], + "properties": { + "activities": { + "items": { + "schema": "activity" + }, + "type": "array" + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "internal_error": { + "desc": "Something went wrong on our end, please try again." + }, + "invalid_app_id": { + "desc": "App ID provided is not valid." + }, + "invalid_app": { + "desc": "App ID provided is not valid for team and user." + }, + "invalid_args": { + "desc": "Required arguments either were not provided or contain invalid values." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "invalid_team": { + "desc": "Team ID provided is not valid" + } + }, + "examples": { + "success": { + "url": "/api/admin.apps.activities.list", + "description": "Typical success response", + "example": { + "ok": true, + "activities": [ + { + "app_id": "A123456789", + "level": "info", + "event_type": "function_execution_started", + "source": "slack", + "component_type": "functions", + "component_id": "Fn123", + "payload": { + "function_name": "Reverse", + "function_type": "app" + }, + "created": 1650463798824317, + "trace_id": "Tr123" + } + ], + "response_metadata": { + "next_cursor": "" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.approve.json b/docs.slack.dev/methods/admin.apps.approve.json new file mode 100644 index 00000000..a48721ab --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.approve.json @@ -0,0 +1,89 @@ +{ + "desc": "Approve an app for installation on a workspace.", + "http_method": "POST", + "scope": "admin.apps:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "desc": "The id of the app to approve.", + "example": "A12345", + "type": "string" + }, + "request_id": { + "desc": "The id of the request to approve.", + "example": "Ar12345", + "type": "string" + }, + "team_id": { + "desc": "The ID of the workspace to approve the app on", + "example": "T12345", + "schema": "team_id" + }, + "enterprise_id": { + "desc": "The ID of the enterprise to approve the app on", + "example": "E12345", + "schema": "enterprise_id" + } + } + }, + "output": null, + "errors": { + "app_management_app_not_installed_on_org": { + "desc": "The app management app must be installed on the org." + }, + "app_restricted_org_wide": { + "desc": "The app is already restricted org wide." + }, + "custom_integration_not_allowed_at_enterprise": { + "desc": "Returned when the install request is for custom integration app." + }, + "feature_not_enabled": { + "desc": "Returned when the Admin APIs feature is not enabled for this team" + }, + "invalid_request_id": { + "desc": "The `request_id` passed is invalid." + }, + "invalid_app_id": { + "desc": "The `app_id` passed is invalid." + }, + "org_resolution_required": { + "desc": "The `team_id` is in an Enterprise org while `app_id` is certified." + }, + "invalid_scopes": { + "desc": "Some of the provided scopes do not exist" + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins" + }, + "request_already_resolved": { + "desc": "The app request has already been resolved" + }, + "request_id_or_app_id_is_required": { + "desc": "Must include a `request_id` or `app_id`" + }, + "request_id_required_for_custom_integrations": { + "desc": "A `request_id` is required for custom integrations" + }, + "team_not_found": { + "desc": "Returned when team id is not found." + }, + "too_many_ids_provided": { + "desc": "Please provide only `app_id` OR `request_id`" + }, + "too_many_teams_provided": { + "desc": "Please provide only `team_id` OR `enterprise_id`" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.approved.list.json b/docs.slack.dev/methods/admin.apps.approved.list.json new file mode 100644 index 00000000..16e47394 --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.approved.list.json @@ -0,0 +1,164 @@ +{ + "desc": "List approved apps for an org or workspace.", + "http_method": "GET", + "scope": "admin.apps:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "example": "100", + "default": 100, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "5c3e53d5" + }, + "team_id": { + "example": "T0HFE6EBT", + "schema": "team_id" + }, + "enterprise_id": { + "example": "E0AS553RN", + "schema": "enterprise_id" + }, + "certified": { + "desc": "Limit the results to only include certified apps. When false, no certified apps will appear in the result", + "type": "boolean", + "default": "false" + } + } + }, + "output": { + "type": "object", + "required": [ + "approved_apps" + ], + "properties": { + "approved_apps": { + "type": "array", + "items": { + "schema": "resolution" + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "app_management_app_not_installed_on_org": { + "desc": "The app management app must be installed on the org." + }, + "feature_not_enabled": { + "desc": "Returned when the Admin APIs feature is not enabled for this team" + }, + "invalid_actor": { + "desc": "The provided actor_id is not a valid user or application" + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "not_allowed": { + "desc": "The user is not allowed to access this API method" + }, + "not_an_admin": { + "desc": "This method is only accessible by org/workspace owners and admins" + }, + "team_not_found": { + "desc": "Returned when team id is not found." + }, + "too_many_teams_provided": { + "desc": "Please provide only `team_id` OR `enterprise_id`." + }, + "restricted_action": { + "desc": "User does not have permission to access method" + } + }, + "examples": { + "success": { + "url": "/api/admin.apps.approved.list?token=YOUR_TOKEN&enterprise_id=E0AS538RN", + "description": "Typical success response", + "example": { + "ok": true, + "approved_apps": [ + { + "app": { + "id": "A0W7UKG8E", + "name": "My Test App", + "description": "test app", + "help_url": "https://www.slack.com", + "privacy_policy_url": "https://www.slack.com", + "app_homepage_url": "https://www.slack.com", + "app_directory_url": "https://myteam.enterprise.slack.com/apps/A0W7UKG8E-my-test-app", + "is_app_directory_approved": false, + "is_internal": false, + "developer_type": "third_party", + "socket_mode_enabled": false, + "icons": { + "image_32": "https://302674312496446w_2bd4ea1ad1f89a23c242_32.png", + "image_36": "https://302674312496446w_2bd4ea1ad1f89a23c242_36.png", + "image_48": "https://302674312496446w_2bd4ea1ad1f89a23c242_48.png", + "image_64": "https://302674312496446w_2bd4ea1ad1f89a23c242_64.png", + "image_72": "https://302674312496446w_2bd4ea1ad1f89a23c242_72.png", + "image_96": "https://302674312496446w_2bd4ea1ad1f89a23c242_96.png", + "image_128": "https://30267341249446w6_2bd4ea1ad1f89a23c242_128.png", + "image_192": "https://30267431249446w6_2bd4ea1ad1f89a23c242_192.png", + "image_512": "https://30267431249446w6_2bd4ea1ad1f89a23c242_512.png", + "image_1024": "https://3026743124446w96_2bd4ea1ad1f89a23c242_1024.png", + "image_original": "https://302674446w12496_2bd4ea1ad1f89a23c242_original.png" + }, + "additional_info": "" + }, + "scopes": [ + { + "name": "bot", + "description": "Add the ability for people to direct message or mention @my_test_app", + "is_sensitive": true, + "token_type": "bot" + } + ], + "date_updated": 1574296707, + "last_resolved_by": { + "actor_id": "W0G82F4FD", + "actor_type": "user" + } + } + ], + "response_metadata": { + "next_cursor": "" + } + } + }, + "error": { + "url": "/api/admin.apps.approved.list?token=INVALID_TOKEN&team_id=T0AS853RN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.clearResolution.json b/docs.slack.dev/methods/admin.apps.clearResolution.json new file mode 100644 index 00000000..0a6756a1 --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.clearResolution.json @@ -0,0 +1,67 @@ +{ + "desc": "Clear an app resolution", + "http_method": "POST", + "scope": "admin.apps:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "app_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "desc": "The id of the app whose resolution you want to clear/undo.", + "example": "A12345", + "type": "string" + }, + "team_id": { + "example": "T12345", + "desc": "The workspace to clear the app resolution from", + "schema": "team_id" + }, + "enterprise_id": { + "example": "E12345", + "desc": "The enterprise to clear the app resolution from", + "schema": "enterprise_id" + } + } + }, + "output": null, + "errors": { + "app_management_app_not_installed_on_org": { + "desc": "The app management app must be installed on the org." + }, + "feature_not_enabled": { + "desc": "Returned when the Admin APIs feature is not enabled for this team" + }, + "invalid_app_id": { + "desc": "The `app_id` passed is invalid." + }, + "no_resolution_found": { + "desc": "No existing resolutions were found for the given `team` and `app_id`." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins" + }, + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "team_not_found": { + "desc": "Returned when team id is not found." + }, + "too_many_teams_provided": { + "desc": "Please provide only `team_id` OR `enterprise_id`" + }, + "restricted_action": { + "desc": "This actor does not have access to the permissions on this resource." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.config.lookup.json b/docs.slack.dev/methods/admin.apps.config.lookup.json new file mode 100644 index 00000000..e4b8dbfd --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.config.lookup.json @@ -0,0 +1,121 @@ +{ + "desc": "Look up the app config for connectors by their IDs", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.apps:read" + }, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_ids": { + "desc": "An array of app IDs to get app configs for", + "example": "A0A2R51A5,A0A2R51A6", + "type": "array", + "items": { + "schema": "app_id" + }, + "maxItems": 100 + }, + "rich_link_preview_types": { + "desc": "return apps with the corresponding rich link preview layouts", + "example": "limited_details, no_preview", + "type": "array", + "items": { + "type": "string", + "enum": [ + "all_details", + "limited_details", + "no_preview", + "default_to_global_setting" + ] + } + } + } + }, + "output": { + "type": "object", + "required": [ + "configs" + ], + "properties": { + "configs": { + "type": "array", + "items": { + "type": "object", + "required": [ + "app_id", + "workflow_auth_strategy", + "domain_restrictions" + ], + "properties": { + "app_id": { + "schema": "app_id" + }, + "workflow_auth_strategy": { + "type": "string", + "enum": [ + "builder_choice", + "end_user_only" + ] + }, + "domain_restrictions": { + "schema": "admin_app_domain_list" + } + } + } + } + } + }, + "errors": { + "missing_args": { + "desc": "Either app_ids or rich_link_preview_types must be provided" + } + }, + "examples": { + "success": { + "url": "/api/admin.apps.config.lookup?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "configs": [ + { + "app_id": "A123", + "workflow_auth_strategy": "end_user_only", + "rich_link_preview_type": "limited_details", + "domain_restrictions": { + "emails": [ + "my-corp.com", + "yourcorp.com" + ], + "urls": [ + "mycorp.company.com", + "mycorp2.company.com" + ] + } + }, + { + "app_id": "A456", + "workflow_auth_strategy": "builder_choice", + "rich_link_preview_type": "no_preview", + "domain_restrictions": { + "emails": [], + "urls": [] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.config.set.json b/docs.slack.dev/methods/admin.apps.config.set.json new file mode 100644 index 00000000..fda27edb --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.config.set.json @@ -0,0 +1,100 @@ +{ + "desc": "Set the app config for a connector", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.apps:write" + }, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "app_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "desc": "The encoded app ID to set the app config for", + "example": "A12345", + "schema": "app_id" + }, + "workflow_auth_strategy": { + "type": "string", + "enum": [ + "builder_choice", + "end_user_only" + ], + "desc": "The workflow auth permission. Can be one of `builder_choice` or `end_user_only`." + }, + "rich_link_preview_type": { + "type": "string", + "enum": [ + "all_details", + "limited_details", + "no_preview", + "default_to_global_setting" + ], + "desc": "Indicates the app-level override for rich link preview. Unsupported for free teams." + }, + "domain_restrictions": { + "type": "object", + "desc": "Domain restrictions for the app. Should be an object with two properties: `urls` and `emails`. Each is an array of strings, and each sets the allowed URLs and emails for connector authorization, respectively.", + "properties": { + "urls": { + "type": "array", + "desc": "List of URLs for allowed connector authorization", + "example": "['slack.pagerduty.com', 'salesforce.okta.com']", + "items": { + "type": "string" + } + }, + "emails": { + "type": "array", + "desc": "List of emails for allowed connector authorization", + "example": "['slack-corp.com', 'salesforce.com']", + "items": { + "type": "string" + } + } + } + } + } + }, + "output": null, + "errors": { + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "no_domains_provided": { + "desc": "At least one allowed domain must be specified if populating the argument" + }, + "too_many_domains_provided": { + "desc": "Too many domains provided. Please provide 50 or less for each type of domain" + }, + "url_restriction_not_supported": { + "desc": "URL restriction is not supported for this app." + }, + "invalid_domains": { + "desc": "At least one URL or email is invalid" + }, + "invalid_app": { + "desc": "App is invalid" + }, + "invalid_workflow_auth_strategy": { + "desc": "workflow auth strategy is invalid" + }, + "restricted_plan_level": { + "desc": "The given parameter is not supported on this team." + }, + "unknown_method": { + "desc": "This method does not exist." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.requests.cancel.json b/docs.slack.dev/methods/admin.apps.requests.cancel.json new file mode 100644 index 00000000..2c04210d --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.requests.cancel.json @@ -0,0 +1,89 @@ +{ + "desc": "Cancel app request for team", + "http_method": "POST", + "scope": "admin.apps:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "request_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "request_id": { + "desc": "The id of the request to cancel.", + "example": "Ar12345", + "type": "string", + "schema": "app_request_id" + }, + "team_id": { + "desc": "The ID of the workspace where this request belongs", + "example": "T12345", + "subtype": "team", + "schema": "team_id" + }, + "enterprise_id": { + "desc": "The ID of the enterprise where this request belongs", + "example": "E12345", + "subtype": "enterprise", + "schema": "enterprise_id" + } + } + }, + "output": null, + "errors": { + "app_management_app_not_installed_on_org": { + "desc": "The app management app must be installed on the org." + }, + "feature_not_enabled": { + "desc": "Returned when the Admin APIs feature is not enabled for this team" + }, + "invalid_request_id": { + "desc": "The `request_id` passed is invalid." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins" + }, + "request_already_resolved": { + "desc": "The app request has already been resolved" + }, + "team_not_found": { + "desc": "Returned when team id is not found." + }, + "too_many_teams_provided": { + "desc": "Please provide only `team_id` OR `enterprise_id`" + }, + "restricted_action": { + "desc": "User is not authorized to perform this action" + }, + "invalid_auth": { + "desc": "invalid token or actor does not have access" + } + }, + "examples": { + "success": { + "url": "/api/admin.apps.requests.cancel?token=YOUR_TOKEN&request_id=Ar013MJP15CK", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/admin.apps.requests.cancel?token=YOUR_TOKEN&request_id=Ar013MJP15CK", + "description": "Typical error response", + "example": { + "ok": false, + "error": "missing_scope", + "needed": "admin.apps:write", + "provided": "read,client,admin,identify,post,apps" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.requests.list.json b/docs.slack.dev/methods/admin.apps.requests.list.json new file mode 100644 index 00000000..6d8461f3 --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.requests.list.json @@ -0,0 +1,184 @@ +{ + "desc": "List app requests for a team/workspace.", + "http_method": "GET", + "scope": "admin.apps:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "example": "100", + "default": 100, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "5c3e53d5" + }, + "team_id": { + "subtype": "team", + "schema": "team_id" + }, + "enterprise_id": { + "subtype": "enterprise", + "schema": "enterprise_id" + }, + "certified": { + "desc": "Include requests for certified apps", + "type": "boolean", + "default": "false" + } + } + }, + "output": { + "type": "object", + "required": [ + "app_requests" + ], + "properties": { + "app_requests": { + "type": "array", + "items": { + "schema": "request" + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "app_management_app_not_installed_on_org": { + "desc": "The app management app must be installed on the org." + }, + "enterprise_not_found": { + "desc": "Returned when enterprise id is not found." + }, + "feature_not_enabled": { + "desc": "Returned when the Admin APIs feature is not enabled for this team" + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "invalid_auth": { + "desc": "invalid token or actor does not have access" + }, + "not_allowed": { + "desc": "The user is not allowed to access this API method" + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins" + }, + "restricted_action": { + "desc": "The action is restricted for this team" + }, + "user_is_restricted": { + "desc": "This method is only accessible by org owners, admins, and integration managers" + }, + "no_team_or_enterprise_provided": { + "desc": "Must provide team ID or enterprise ID" + }, + "team_not_found": { + "desc": "Returned when team id is not found." + }, + "too_many_teams_provided": { + "desc": "Please provide only `team_id` OR `enterprise_id`" + } + }, + "examples": { + "success": { + "url": "/api/admin.apps.requests.list?token=YOUR_TOKEN&team_id=T0AS553RN", + "description": "Typical success response", + "example": { + "ok": true, + "app_requests": [ + { + "id": "Ar0XJGFLMLS", + "app": { + "id": "A061BL8RQ0", + "name": "Test App", + "description": "", + "help_url": "", + "privacy_policy_url": "https://testapp.com/privacy", + "app_homepage_url": "", + "app_directory_url": "https://acmecorp.slack.com/apps/A061BL8RQ0-test-app", + "is_app_directory_approved": true, + "is_internal": true, + "developer_type": "internal", + "socket_mode_enabled": false, + "icons": { + "image_32": "/cdn/157658203/img/testapp/service_32.png", + "image_36": "/cdn/157658203/img/testapp/service_36.png", + "image_48": "/cdn/157658203/img/testapp/service_48.png", + "image_64": "/cdn/157658203/img/testapp/service_64.png", + "image_72": "/cdn/157658203/img/testapp/service_72.png", + "image_96": "/cdn/157658203/img/testapp/service_96.png", + "image_128": "/cdn/157258203/img/testapp/service_128.png", + "image_192": "/cdn/157258203/img/testapp/service_192.png", + "image_512": "/cdn/15758203/img/testapp/service_512.png", + "image_1024": "/cdn/15258203/img/testapp/service_1024.png" + }, + "additional_info": "" + }, + "previous_resolution": null, + "user": { + "id": "W08RA9G5HR", + "name": "Jane Doe", + "email": "janedoe@example.com" + }, + "team": { + "id": "T0M94LNUCR", + "name": "Acme Corp", + "domain": "acmecorp" + }, + "scopes": [ + { + "name": "incoming-webhook", + "description": "Post messages to specific channels in Slack", + "is_sensitive": false, + "token_type": "user" + } + ], + "message": "Could you please install this app for me, it does everything I need.", + "is_user_app_collaborator": false, + "date_created": 1578956327 + } + ], + "response_metadata": { + "next_cursor": "" + } + } + }, + "error": { + "url": "/api/admin.apps.requests.list?token=INVALID_TOKEN&team_id=T084L553RN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "missing_scope", + "needed": "admin.apps:read", + "provided": "read,client,admin,identify,post,apps" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.restrict.json b/docs.slack.dev/methods/admin.apps.restrict.json new file mode 100644 index 00000000..75785fe2 --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.restrict.json @@ -0,0 +1,83 @@ +{ + "desc": "Restrict an app for installation on a workspace.", + "http_method": "POST", + "scope": "admin.apps:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "desc": "The id of the app to restrict.", + "example": "A12345", + "type": "string" + }, + "request_id": { + "desc": "The id of the request to restrict.", + "example": "Ar12345", + "type": "string" + }, + "team_id": { + "desc": "The ID of the workspace to approve the app on", + "example": "T12345", + "schema": "team_id" + }, + "enterprise_id": { + "desc": "The ID of the enterprise to approve the app on", + "example": "E12345", + "schema": "enterprise_id" + } + } + }, + "output": null, + "errors": { + "app_management_app_not_installed_on_org": { + "desc": "The app management app must be installed on the org." + }, + "custom_integration_not_allowed_at_enterprise": { + "desc": "Returned when the install request is for custom integration app." + }, + "feature_not_enabled": { + "desc": "Returned when the Admin APIs feature is not enabled for this team" + }, + "invalid_request_id": { + "desc": "The `request_id` passed is invalid." + }, + "invalid_app_id": { + "desc": "The `app_id` passed is invalid." + }, + "invalid_scopes": { + "desc": "Some of the provided scopes do not exist" + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins" + }, + "request_already_resolved": { + "desc": "The app request has already been resolved" + }, + "request_id_or_app_id_is_required": { + "desc": "Must include a `request_id` or `app_id`" + }, + "request_id_required_for_custom_integrations": { + "desc": "A `request_id` is required for custom integrations" + }, + "team_not_found": { + "desc": "Returned when team id is not found." + }, + "too_many_ids_provided": { + "desc": "Please provide only `app_id` OR `request_id`" + }, + "too_many_teams_provided": { + "desc": "Please provide only `team_id` OR `enterprise_id`" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.restricted.list.json b/docs.slack.dev/methods/admin.apps.restricted.list.json new file mode 100644 index 00000000..8fa28898 --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.restricted.list.json @@ -0,0 +1,164 @@ +{ + "desc": "List restricted apps for an org or workspace.", + "http_method": "GET", + "scope": "admin.apps:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "example": "100", + "default": 100, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "5c3e53d5" + }, + "team_id": { + "example": "T0HFE6EBT", + "schema": "team_id" + }, + "enterprise_id": { + "example": "E0AS553RN", + "schema": "enterprise_id" + }, + "certified": { + "desc": "Limit the results to only include certified apps. When false, no certified apps will appear in the result", + "type": "boolean", + "default": false + } + } + }, + "output": { + "type": "object", + "required": [ + "restricted_apps" + ], + "properties": { + "restricted_apps": { + "type": "array", + "items": { + "schema": "resolution" + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "app_management_app_not_installed_on_org": { + "desc": "The app management app must be installed on the org." + }, + "feature_not_enabled": { + "desc": "Returned when the Admin APIs feature is not enabled for this team" + }, + "invalid_actor": { + "desc": "The provided actor_id is not a valid user or application" + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "not_allowed": { + "desc": "The user is not allowed to access this API method" + }, + "not_an_admin": { + "desc": "This method is only accessible by org/workspace owners and admins" + }, + "team_not_found": { + "desc": "Returned when team id is not found." + }, + "too_many_teams_provided": { + "desc": "Please provide only `team_id` OR `enterprise_id`." + }, + "restricted_action": { + "desc": "User does not have permission to access method" + } + }, + "examples": { + "success": { + "url": "/api/admin.apps.restricted.list?token=YOUR_TOKEN&team_id=T0AS853RN", + "description": "Typical success response", + "example": { + "ok": true, + "restricted_apps": [ + { + "app": { + "id": "A0FDLP8M2L", + "name": "My Test App", + "description": "A fun test app for Slack", + "help_url": "https://example.com", + "privacy_policy_url": "https://example.com", + "app_homepage_url": "https://example.com", + "app_directory_url": "https://myteam.enterprise.slack.com/apps/A0FDLP8M2L-my-test-app", + "is_app_directory_approved": true, + "is_internal": false, + "developer_type": "third_party", + "socket_mode_enabled": false, + "icons": { + "image_32": "https://143326534038rl8788_eb57dbc818daa4ba15d6_32.png", + "image_36": "https://143326534038rl8788_eb57dbc818daa4ba15d6_36.png", + "image_48": "https://143326534038rl8788_eb57dbc818daa4ba15d6_48.png", + "image_64": "https://143326534038rl8788_eb57dbc818daa4ba15d6_64.png", + "image_72": "https://143326534038rl8788_eb57dbc818daa4ba15d6_72.png", + "image_96": "https://143326534038rl8788_eb57dbc818daa4ba15d6_96.png", + "image_128": "https://4332653438rl87808_eb57dbc818daa4ba15d6_128.png", + "image_192": "https://4332653438rl87808_eb57dbc818daa4ba15d6_192.png", + "image_512": "https://4332653438rl87808_eb57dbc818daa4ba15d6_512.png", + "image_1024": "https://1433265338rl878408_eb57dbc818daa4ba15d6_1024.png", + "image_original": "https://143338rl8782653408_eb57dbc818daa4ba15d6_original.png" + }, + "additional_info": "" + }, + "scopes": [ + { + "name": "files:write:user", + "description": "Upload, edit, and delete files on the user‟s behalf", + "is_sensitive": true, + "token_type": "user" + } + ], + "date_updated": 1574296721, + "last_resolved_by": { + "actor_id": "W0G82LMFD", + "actor_type": "user" + } + } + ], + "response_metadata": { + "next_cursor": "" + } + } + }, + "error": { + "url": "/api/admin.apps.restricted.list?token=INVALID_TOKEN&team_id=T0A8M53RN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.apps.uninstall.json b/docs.slack.dev/methods/admin.apps.uninstall.json new file mode 100644 index 00000000..ad157760 --- /dev/null +++ b/docs.slack.dev/methods/admin.apps.uninstall.json @@ -0,0 +1,69 @@ +{ + "desc": "Uninstall an app from one or many workspaces, or an entire enterprise organization.", + "http_method": "POST", + "scope": "admin.apps:write", + "json_input_supported": true, + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token", + "app_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "desc": "The ID of the app to uninstall.", + "example": "A12345", + "type": "string" + }, + "team_ids": { + "type": "string", + "desc": "IDs of the teams to uninstall from (max 100). With an org-level token, this or `enterprise_id` is required." + }, + "enterprise_id": { + "desc": "The enterprise to completely uninstall the application from (across all workspaces). With an org-level token, this or `team_ids` is required.", + "example": "E12345", + "type": "string" + } + } + }, + "output": null, + "errors": { + "app_not_found": { + "desc": "The provided `app_id` was not found." + }, + "can_not_uninstall": { + "desc": "This application can not be uninstalled via the API." + }, + "enterprise_not_found": { + "desc": "The provided `enterprise_id` was not found." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "must_revoke_access": { + "desc": "Organization-deployed apps cannot be uninstalled from specific workspaces using this API." + }, + "permission_denied": { + "desc": "You do not have permission to uninstall applications from the reqeusted org or workspaces." + }, + "specify_enterprise_or_teams": { + "desc": "Provide exactly one of `enterprise_id` or `team_ids`." + }, + "teams_not_found": { + "desc": "One or more of the provided `team_ids` were not found." + }, + "too_many_teams": { + "desc": "Too many IDs are present in `team_ids`." + }, + "restricted_action": { + "desc": "the user is not authorized to perform this action" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.audit.anomaly.allow.getItem.json b/docs.slack.dev/methods/admin.audit.anomaly.allow.getItem.json new file mode 100644 index 00000000..e3e36c35 --- /dev/null +++ b/docs.slack.dev/methods/admin.audit.anomaly.allow.getItem.json @@ -0,0 +1,50 @@ +{ + "desc": "API to allow Enterprise org admins to read the allow list of IP blocks and ASNs from the enterprise configuration.", + "http_method": "POST", + "scope": "admin", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": {} + }, + "output": { + "type": "object", + "properties": { + "trusted_cidr": { + "desc": "allow list of IPv4 addresses using cidr notation in the Enterprise organization configuration", + "type": "array", + "items": { + "type": "string" + } + }, + "trusted_asns": { + "desc": "allow list of Autonomous System Numbers (ASN) in the Enterprise organization configuration", + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "errors": { + "endpoint_unavailable": { + "desc": "The requested endpoint is currently unavailable." + }, + "not_an_enterprise": { + "desc": "The user is not an enterprise admin." + }, + "not_authed": { + "desc": "auth token is not valid." + }, + "unsupported_action_describe": { + "desc": "The user specified action is unsupported" + }, + "unsupported_action_put": { + "desc": "The user specified action is unsupported" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.audit.anomaly.allow.updateItem.json b/docs.slack.dev/methods/admin.audit.anomaly.allow.updateItem.json new file mode 100644 index 00000000..472db034 --- /dev/null +++ b/docs.slack.dev/methods/admin.audit.anomaly.allow.updateItem.json @@ -0,0 +1,47 @@ +{ + "desc": "API to allow Enterprise org admins to write/overwrite the allow list of IP blocks and ASNs from the enterprise configuration.", + "http_method": "POST", + "scope": "admin", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "trusted_cidr": { + "desc": "allow list of IPv4 addresses using cidr notation in the Enterprise organization configuration", + "type": "array", + "items": { + "type": "string" + } + }, + "trusted_asns": { + "desc": "allow list of Autonomous System Numbers (ASN) in the Enterprise organization configuration", + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "output": null, + "errors": { + "endpoint_unavailable": { + "desc": "The requested endpoint is currently unavailable." + }, + "invalid_field_or_data": { + "desc": "user attempted to write and invalid field or data to the team config" + }, + "unable_to_process_post_request": { + "desc": "The user sent a malformed post request" + }, + "unsupported_action_describe": { + "desc": "The user specified describe action is unsupported" + }, + "unsupported_action_put": { + "desc": "The user specified put action is unsupported" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.auth.policy.assignEntities.json b/docs.slack.dev/methods/admin.auth.policy.assignEntities.json new file mode 100644 index 00000000..8ce3b766 --- /dev/null +++ b/docs.slack.dev/methods/admin.auth.policy.assignEntities.json @@ -0,0 +1,100 @@ +{ + "desc": "Assign entities to a particular authentication policy.", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:write", + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "entity_type", + "entity_ids", + "policy_name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "policy_name": { + "desc": "The name of the authentication policy to assign the entities to. Currently, `email_password` is the only policy that may be used with this method.", + "type": "string", + "example": "email_password" + }, + "entity_type": { + "desc": "The type of entity to assign to the policy. Currently, `USER` is supported.", + "schema": "entity_types" + }, + "entity_ids": { + "desc": "Array of IDs to assign to the policy.", + "type": "array", + "minItems": 1, + "maxItems": 1000, + "example": "['U12345','U27345']", + "items": { + "type": "string" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "entity_total_count" + ], + "properties": { + "entity_total_count": { + "type": "integer", + "desc": "Count of entities under the policy and provided filter conditions", + "example": "50" + } + } + }, + "errors": { + "admin_unauthorized": { + "desc": "The token provided doesn't have permission to revoke a session." + }, + "entity_not_found": { + "desc": "At least one `entity_id` was not found." + }, + "feature_not_enabled": { + "desc": "This method is only available for Enterprise organizations." + }, + "internal_error": { + "desc": "There was an internal error processing this request—please retry." + }, + "invalid_arguments": { + "desc": "Required arguments either were not provided or contain invalid values." + }, + "invalid_auth": { + "desc": "The token doesn't have access to this endpoint." + }, + "not_an_admin": { + "desc": "This method is only accessible by Org Owners and Admins." + }, + "over_max_entity_limit": { + "desc": "The number of entities assigned to this policy has reached its upper limit." + }, + "policy_not_found": { + "desc": "The policy name doesn't match any of the existing org policies." + }, + "ratelimited": { + "desc": "The rate limit for this endpoint has been reached." + }, + "unknown_method": { + "desc": "This method is currently not available." + } + }, + "examples": { + "success": { + "url": "/api/admin.auth.policy.assignEntities?entity_ids=%5B'U123'%2C%20'U234'%5D&entity_type=USER&policy_name=email_password", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.auth.policy.getEntities.json b/docs.slack.dev/methods/admin.auth.policy.getEntities.json new file mode 100644 index 00000000..66390f59 --- /dev/null +++ b/docs.slack.dev/methods/admin.auth.policy.getEntities.json @@ -0,0 +1,138 @@ +{ + "desc": "Fetch all the entities assigned to a particular authentication policy by name.", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:read", + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "policy_name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "policy_name": { + "desc": "The name of the policy to fetch entities for. Currently, `email_password` is the only policy that may be used with this method.", + "type": "string", + "example": "email_password" + }, + "entity_type": { + "desc": "The type of entity to assign to the policy. Currently, `USER` is supported.", + "schema": "entity_types" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 and 1000, both inclusive.", + "example": "100", + "default": 1000, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "example": "5c3e53d5" + } + } + }, + "output": { + "type": "object", + "required": [ + "entities", + "entity_total_count" + ], + "properties": { + "response_metadata": { + "required": [ + "next_cursor" + ], + "type": "object", + "properties": { + "next_cursor": { + "type": "string" + } + } + }, + "entities": { + "type": "array", + "desc": "Entities assigned to the policy", + "items": { + "type": "object", + "required": [ + "entity_type", + "entity_id", + "date_added" + ], + "properties": { + "entity_type": { + "type": "string", + "desc": "The type of entity assigned to the policy. Informs the meaning of the entity_id." + }, + "entity_id": { + "type": "string", + "desc": "Encoded ID of the assigned entity. user_id if the entity_type = USER" + }, + "date_added": { + "type": "integer", + "desc": "The date this entity was assigned to this policy." + } + } + } + }, + "entity_total_count": { + "type": "integer", + "desc": "Count of entities under the policy and provided filter conditions", + "example": "50" + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "This method is only available for Enterprise organizations." + }, + "internal_error": { + "desc": "There was an internal error processing this request—please retry." + }, + "invalid_arguments": { + "desc": "Required arguments either were not provided or contain invalid values." + }, + "invalid_auth": { + "desc": "The token doesn't have access to this endpoint." + }, + "invalid_cursor": { + "desc": "The cursor passed was invalid." + }, + "not_an_admin": { + "desc": "This method is only accessible by Org Owners and Admins." + }, + "policy_not_found": { + "desc": "The `policy_name` could not be found." + }, + "ratelimited": { + "desc": "The rate limit for this endpoint has been reached." + } + }, + "examples": { + "success": { + "url": "/api/admin.auth.policy.getEntities?policy_name=email_password", + "description": "Typical success response", + "example": { + "ok": true, + "entities": [ + { + "entity_type": "USER", + "entity_id": "U1234", + "date_added": 1620836993 + } + ], + "entity_total_count": 1 + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.auth.policy.removeEntities.json b/docs.slack.dev/methods/admin.auth.policy.removeEntities.json new file mode 100644 index 00000000..e73fbb11 --- /dev/null +++ b/docs.slack.dev/methods/admin.auth.policy.removeEntities.json @@ -0,0 +1,91 @@ +{ + "desc": "Remove specified entities from a specified authentication policy.", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:write", + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "policy_name", + "entity_ids", + "entity_type" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "policy_name": { + "desc": "The name of the policy to remove entities from. Currently, `email_password` is the only policy that may be used with this method.", + "type": "string", + "example": "email_password" + }, + "entity_type": { + "desc": "The type of entity to assign to the policy. Currently, `USER` is supported.", + "schema": "entity_types" + }, + "entity_ids": { + "desc": "Encoded IDs of the entities you'd like to remove from the policy.", + "example": "['U1234']", + "type": "array", + "minItems": 1, + "maxItems": 1000, + "items": { + "type": "string" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "entity_total_count" + ], + "properties": { + "entity_total_count": { + "type": "integer", + "desc": "Count of entities under the policy and provided filter conditions", + "example": "50" + } + } + }, + "errors": { + "entity_not_found": { + "desc": "At least one `entity_id` was not found" + }, + "feature_not_enabled": { + "desc": "This method is only available to Enterprise customers." + }, + "internal_error": { + "desc": "There was an internal error processing this request—please retry." + }, + "invalid_arguments": { + "desc": "Required arguments either were not provided or contain invalid values." + }, + "invalid_auth": { + "desc": "The provided token doesn't have access to this endpoint." + }, + "not_an_admin": { + "desc": "This method is only accessible by Org Owners and Admins." + }, + "policy_not_found": { + "desc": "The `policy_name` could not be found." + }, + "ratelimited": { + "desc": "The rate limit for this endpoint has been reached." + } + }, + "examples": { + "success": { + "url": "/api/admin.auth.policy.removeEntities?entity_ids=%5B'U123'%2C%20'U234'%5D&entity_type=USER&policy_name=email_password", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.barriers.create.json b/docs.slack.dev/methods/admin.barriers.create.json new file mode 100644 index 00000000..20b9af71 --- /dev/null +++ b/docs.slack.dev/methods/admin.barriers.create.json @@ -0,0 +1,122 @@ +{ + "desc": "Create an Information Barrier", + "http_method": "POST", + "scope": "admin.barriers:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "primary_usergroup_id", + "barriered_from_usergroup_ids", + "restricted_subjects" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "primary_usergroup_id": { + "desc": "The id of the primary [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-organization)", + "schema": "subteam_id" + }, + "barriered_from_usergroup_ids": { + "desc": "A list of [IDP Groups](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-organization) ids that the primary usergroup is to be barriered from.", + "type": "array", + "items": { + "schema": "subteam_id" + } + }, + "restricted_subjects": { + "desc": "What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg `im, mpim, call`", + "type": "array", + "items": { + "type": "string", + "enum": [ + "im", + "mpim", + "call" + ] + } + } + } + }, + "output": { + "type": "object", + "required": [ + "ok", + "barrier" + ], + "properties": { + "ok": { + "type": "boolean" + }, + "barrier": { + "schema": "information_barrier" + } + } + }, + "errors": { + "barrier_already_exists": { + "desc": "There already exists another barrier restricting activity between two or more of your requested usergroups." + }, + "barriered_from_usergroups_not_found": { + "desc": "One or more of the ids passed in for barriered_from_usergroup_ids can’t be found." + }, + "feature_not_enabled": { + "desc": "The information barrier feature is not enabled, please reach out to your CSM." + }, + "invalid_restricted_subjects": { + "desc": "The restricted subjects provided are invalid or not currently supported." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an org admin." + }, + "primary_usergroup_not_found": { + "desc": "The id passed in for primary_usergroup_id can’t be found." + } + }, + "examples": { + "success": { + "url": "/api/admin.barriers.create?token=YOUR_TOKEN", + "description": "The response includes `primary_usergroup`, `enterprise_id`, `barrier_id`", + "example": { + "ok": true, + "barrier": { + "id": "Ba03T70KB2H3", + "enterprise_id": "E03055H6DAS", + "primary_usergroup": { + "id": "S03TZK4A9H6", + "name": "Company That Pays Contracting Teams" + }, + "barriered_from_usergroups": [ + { + "id": "S03TNHGAUGZ", + "name": "Another External Contracting Team" + }, + { + "id": "S03TNHF56UR", + "name": "External Contracting Team" + } + ], + "restricted_subjects": [ + "im", + "mpim", + "call" + ], + "date_update": 1660224825 + } + }, + "error": { + "url": "/api/admin.barriers.create?token=YOUR_TOKEN", + "description": "Typical error response if you do not have information barrier enabled. Reach out to your CSM.", + "example": { + "ok": false, + "error": "feature_not_enabled" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.barriers.delete.json b/docs.slack.dev/methods/admin.barriers.delete.json new file mode 100644 index 00000000..788a5efb --- /dev/null +++ b/docs.slack.dev/methods/admin.barriers.delete.json @@ -0,0 +1,64 @@ +{ + "desc": "Delete an existing Information Barrier", + "http_method": "POST", + "scope": "admin.barriers:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "barrier_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "barrier_id": { + "desc": "The ID of the barrier you're trying to delete", + "schema": "barrier_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "barrier_not_found": { + "desc": "The barrier you're trying to delete cannot be found." + }, + "feature_not_enabled": { + "desc": "The information barrier feature is not enabled, please reach out to your CSM." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an org admin." + } + }, + "examples": { + "success": { + "url": "/api/admin.barriers.delete?token=YOUR_TOKEN", + "description": "The response includes status code `OK`", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/admin.barriers.delete?token=YOUR_TOKEN", + "description": "Typical error response if you do not have information barrier enabled. Reach out to your CSM.", + "example": { + "ok": false, + "error": "feature_not_enabled" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.barriers.list.json b/docs.slack.dev/methods/admin.barriers.list.json new file mode 100644 index 00000000..4674fe17 --- /dev/null +++ b/docs.slack.dev/methods/admin.barriers.list.json @@ -0,0 +1,151 @@ +{ + "desc": "Get all Information Barriers for your organization", + "http_method": "GET", + "scope": "admin.barriers:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 - 1000 both inclusive", + "example": "100", + "default": 100, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "5c3e53d5" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok", + "barriers" + ], + "properties": { + "ok": { + "type": "boolean" + }, + "barriers": { + "type": "array", + "items": { + "schema": "information_barrier" + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "Feature not enabled" + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an org admin" + } + }, + "examples": { + "success": { + "url": "/api/admin.barriers.list?token=YOUR_TOKEN", + "description": "The response includes a list of `usergroups`, `restricted subjects`, and the time it was last updated.", + "example": { + "ok": true, + "barriers": [ + { + "id": "Ba03T70KB2H3", + "enterprise_id": "E03055H6DAS", + "primary_usergroup": { + "id": "S03TZK4A9H6", + "name": "Company That Pays Contracting Teams" + }, + "barriered_from_usergroups": [ + { + "id": "S03TNHF56UR", + "name": "External Contracting Team" + }, + { + "id": "S03TNHGAUGZ", + "name": "Another External Contracting Team" + } + ], + "restricted_subjects": [ + "im", + "mpim", + "call" + ], + "date_update": 1660224825 + } + ] + } + }, + "success_with_mixed_results": { + "description": "Example response include a top-level `response_metadata` attribute containing a `next_cursor` value", + "example": { + "ok": true, + "barriers": [ + { + "id": "Ba03T70KB2H3", + "enterprise_id": "E03055H6DAS", + "primary_usergroup": { + "id": "S03TZK4A9H6", + "name": "Company That Pays Contracting Teams" + }, + "barriered_from_usergroups": [ + { + "id": "S03TNHF56UR", + "name": "External Contracting Team" + }, + { + "id": "S03TNHGAUGZ", + "name": "Another External Contracting Team" + } + ], + "restricted_subjects": [ + "im", + "mpim", + "call" + ], + "response_metadata": { + "next_cursor": "dGVhbTpDMDYxRkE1UEI=" + }, + "date_update": 1660224825 + } + ] + } + }, + "error": { + "url": "/api/admin.barriers.list?token=YOUR_TOKEN", + "description": "Typical error response if you do not have information barrier enabled. Reach out to your CSM.", + "example": { + "ok": false, + "error": "feature_not_enabled" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.barriers.update.json b/docs.slack.dev/methods/admin.barriers.update.json new file mode 100644 index 00000000..057197c8 --- /dev/null +++ b/docs.slack.dev/methods/admin.barriers.update.json @@ -0,0 +1,126 @@ +{ + "desc": "Update an existing Information Barrier", + "http_method": "POST", + "scope": "admin.barriers:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "barrier_id", + "primary_usergroup_id", + "barriered_from_usergroup_ids", + "restricted_subjects" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "barrier_id": { + "desc": "The ID of the barrier you're trying to modify", + "schema": "barrier_id" + }, + "primary_usergroup_id": { + "desc": "The id of the primary [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-organization)", + "schema": "subteam_id" + }, + "barriered_from_usergroup_ids": { + "desc": "A list of [IDP Groups](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-organization) ids that the primary usergroup is to be barriered from.", + "type": "array", + "items": { + "schema": "subteam_id" + } + }, + "restricted_subjects": { + "desc": "What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg `im, mpim, call`", + "type": "array", + "items": { + "type": "string", + "enum": [ + "im", + "mpim", + "call" + ] + } + } + } + }, + "output": { + "type": "object", + "required": [ + "ok", + "barrier" + ], + "properties": { + "ok": { + "type": "boolean" + }, + "barrier": { + "schema": "information_barrier" + } + } + }, + "errors": { + "barrier_already_exists": { + "desc": "There already exists another barrier restricting activity between two or more of your requested usergroups." + }, + "barrier_not_found": { + "desc": "The barrier you're trying to update cannot be found." + }, + "barriered_from_usergroups_not_found": { + "desc": "One or more of the ids passed in for barriered_from_usergroup_ids can’t be found." + }, + "feature_not_enabled": { + "desc": "The information barrier feature is not enabled, please reach out to your CSM." + }, + "invalid_restricted_subjects": { + "desc": "The restricted subjects provided are invalid or not currently supported." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an org admin." + }, + "primary_usergroup_not_found": { + "desc": "The id passed in for primary_usergroup_id can’t be found." + } + }, + "examples": { + "success": { + "url": "/api/admin.barriers.update?token=YOUR_TOKEN", + "description": "The response includes `enterprise ID`, `barrier ID`", + "example": { + "ok": true, + "barrier": { + "id": "Ba03T70KB2H3", + "enterprise_id": "E03055H6DAS", + "primary_usergroup": { + "id": "S03TZK4A9H6", + "name": "Company That Pays Contracting Teams" + }, + "barriered_from_usergroups": [ + { + "id": "S03TNHGAUGZ", + "name": "Another External Contracting Team" + } + ], + "restricted_subjects": [ + "im", + "mpim", + "call" + ], + "date_update": 1660224825 + } + } + }, + "error": { + "url": "/api/admin.barriers.update?token=YOUR_TOKEN", + "description": "Typical error response if you do not have information barrier enabled. Reach out to your CSM.", + "example": { + "ok": false, + "error": "feature_not_enabled" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.archive.json b/docs.slack.dev/methods/admin.conversations.archive.json new file mode 100644 index 00000000..db674b93 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.archive.json @@ -0,0 +1,73 @@ +{ + "desc": "Archive a public or private channel.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to archive.", + "example": "C12345", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "already_archived": { + "desc": "This channel has already been archived." + }, + "cant_archive_general": { + "desc": "You cannot archive the 'general' channel." + }, + "channel_not_found": { + "desc": "The value passed for `channel` was invalid." + }, + "channel_type_not_supported": { + "desc": "The value passed for `channel` was an MPDM, DM, or the 'general' channel." + }, + "could_not_archive_channel": { + "desc": "The provided channel could not be archived." + }, + "default_org_wide_channel": { + "desc": "The default org-wide channel cannot be archived." + }, + "feature_not_enabled": { + "desc": "The token provided does not have access to this method." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from archiving this channel." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.archive?token=YOUR_TOKEN&channel_id=C12345", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.bulkArchive.json b/docs.slack.dev/methods/admin.conversations.bulkArchive.json new file mode 100644 index 00000000..3d1dd099 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.bulkArchive.json @@ -0,0 +1,116 @@ +{ + "desc": "Archive public or private channels in bulk.", + "http_method": "POST", + "scope": "admin.conversations:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_ids": { + "desc": "An array of channel IDs to archive. No more than 100 items are allowed.", + "type": "array", + "minItems": 1, + "maxItems": 100, + "items": { + "schema": "channel" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "bulk_action_id", + "not_added" + ], + "properties": { + "bulk_action_id": { + "type": "string" + }, + "not_added": { + "desc": "The channel ID and reason it could not be archived.", + "type": "array", + "minItems": 1, + "maxItems": 100, + "items": { + "type": "object", + "required": [ + "channel_id", + "errors" + ], + "properties": { + "channel_id": { + "schema": "workspace_id" + }, + "errors": { + "desc": "The reason the channel was not added", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "errors": { + "action_already_in_progress": { + "desc": "Another bulk action request is currently in progress" + }, + "internal_error": { + "desc": "Something unexpected happened, try again in a little bit. Sorry for that!" + }, + "invalid_enterprise": { + "desc": "Enterprise does not exist" + }, + "no_valid_channels": { + "desc": "All input channels are invalid" + }, + "team_not_found": { + "desc": "Team ID provided does not exist" + }, + "restricted_action": { + "desc": "User does not have permission to perform this action" + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.bulkArchive?token=YOUR_TOKEN&channel_ids=C12345,C12346", + "description": "Success response with a single channel not added for failing validation", + "example": { + "ok": true, + "bulk_action_id": "Ab123456", + "not_added": [ + { + "channel_id": "C12346", + "error": "invalid_channel" + } + ] + } + }, + "error": { + "url": "/api/admin.conversations.bulkArchive?token=INVALID_TOKEN", + "description": "Typical error response when you attempt to add too many channel IDs", + "example": { + "ok": false, + "error": "invalid_arguments", + "response_metadata": { + "messages": [ + "[ERROR] no more than 100 items allowed [json-pointer:/channel_ids]" + ] + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.bulkDelete.json b/docs.slack.dev/methods/admin.conversations.bulkDelete.json new file mode 100644 index 00000000..dcaee953 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.bulkDelete.json @@ -0,0 +1,97 @@ +{ + "desc": "Delete public or private channels in bulk", + "http_method": "POST", + "scope": "admin.conversations:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_ids": { + "desc": "An array of channel IDs.", + "type": "array", + "minItems": 1, + "maxItems": 100, + "items": { + "schema": "channel" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "bulk_action_id", + "not_added" + ], + "properties": { + "bulk_action_id": { + "type": "string" + }, + "not_added": { + "desc": "The channel ID and reason it could not be deleted.", + "type": "array", + "minItems": 1, + "maxItems": 100, + "items": { + "type": "object", + "required": [ + "channel_id", + "errors" + ], + "properties": { + "channel_id": { + "schema": "workspace_id" + }, + "errors": { + "desc": "The reason the channel was not added", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "errors": { + "action_already_in_progress": { + "desc": "Another bulk action request is currently in progress" + }, + "internal_error": { + "desc": "Something unexpected happened, try again in a little bit. Sorry for that!" + }, + "no_valid_channels": { + "desc": "All input channels are invalid" + }, + "restricted_action": { + "desc": "User does not have permission to perform this action" + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.bulkDelete?token=YOUR_TOKEN&channel_ids=C12345,C12346", + "description": "Success response with a single channel not added for failing validation", + "example": { + "ok": true, + "bulk_action_id": "Ab123456", + "not_added": [ + { + "channel_id": "C12346", + "error": "invalid_channel" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.bulkMove.json b/docs.slack.dev/methods/admin.conversations.bulkMove.json new file mode 100644 index 00000000..c390267c --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.bulkMove.json @@ -0,0 +1,110 @@ +{ + "desc": "Move public or private channels in bulk.", + "http_method": "POST", + "scope": "admin.conversations:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "target_team_id", + "channel_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "target_team_id": { + "desc": "Target team ID", + "type": "string", + "subtype": "team", + "schema": "workspace_id" + }, + "channel_ids": { + "desc": "An array of channel IDs.", + "type": "array", + "minItems": 1, + "maxItems": 100, + "items": { + "schema": "channel" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "bulk_action_id", + "not_added" + ], + "properties": { + "bulk_action_id": { + "type": "string" + }, + "not_added": { + "desc": "The channel ID and reason it could not be moved.", + "type": "array", + "minItems": 1, + "maxItems": 100, + "items": { + "type": "object", + "required": [ + "channel_id", + "errors" + ], + "properties": { + "channel_id": { + "schema": "workspace_id" + }, + "errors": { + "desc": "The reason the channel was not added", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "errors": { + "action_already_in_progress": { + "desc": "Another bulk action request is currently in progress" + }, + "team_not_found": { + "desc": "Target team cannot be found" + }, + "internal_error": { + "desc": "Something unexpected happened, try again in a little bit. Sorry for that!" + }, + "no_valid_channels": { + "desc": "All input channels are invalid" + }, + "target_team_not_found": { + "desc": "Target team ID provided does not exist" + }, + "restricted_action": { + "desc": "User does not have permission to perform this action" + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.bulkMove?token=YOUR_TOKEN&channel_ids=C12345,C12346", + "description": "Success response with a single channel not added for failing validation", + "example": { + "ok": true, + "bulk_action_id": "Ab123456", + "not_added": [ + { + "channel_id": "C12346", + "error": "invalid_channel" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.convertToPrivate.json b/docs.slack.dev/methods/admin.conversations.convertToPrivate.json new file mode 100644 index 00000000..78d9b0f0 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.convertToPrivate.json @@ -0,0 +1,81 @@ +{ + "desc": "Convert a public channel to a private channel.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to convert to private.", + "example": "C12345", + "schema": "channel" + }, + "name": { + "desc": "Name of private channel to create. Only respected when converting an MPIM.", + "example": "new_private_channel_name", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "The value passed for `channel` was invalid." + }, + "channel_type_not_supported": { + "desc": "The value passed for `channel` was a DM, MPDM, private, or the 'general' channel." + }, + "could_not_convert_channel": { + "desc": "This channel could not be converted to private." + }, + "default_org_wide_channel": { + "desc": "The default org-wide channel cannot be converted to private." + }, + "external_channel_migrating": { + "desc": "This external channel is migrating, so it can't be converted to private." + }, + "feature_not_enabled": { + "desc": "The provided token doesn't have access to this method." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "name_taken": { + "desc": "A private channel cannot be created with the given name." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from creating private channels." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.convertToPrivate?token=YOUR_TOKEN&channel_id=C12345", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.convertToPublic.json b/docs.slack.dev/methods/admin.conversations.convertToPublic.json new file mode 100644 index 00000000..2c38d953 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.convertToPublic.json @@ -0,0 +1,73 @@ +{ + "desc": "Convert a private channel to a public channel.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to convert to public.", + "example": "C12345", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The feature has not been enabled for this Organization" + }, + "channel_not_found": { + "desc": "The channel requested for conversion to public could not be found." + }, + "not_supported": { + "desc": "Conversion to public channel is not supported for this channel." + }, + "restricted_action": { + "desc": "This user is not able to convert this channel to public." + }, + "missing_scope": { + "desc": "This user is either not an owner or the app does not have the correct scope." + }, + "could_not_convert_channel": { + "desc": "This channel could not be converted to public." + }, + "not_an_enterprise": { + "desc": "Only enterprises can convert channel to public." + }, + "invalid_user": { + "desc": "Value passed for `user_id` was not valid" + }, + "external_limited_restriction": { + "desc": "away-side SC conversion fails due to being under Limited Access (“external_limited” aka “can only post”)" + }, + "channel_owner_restriction": { + "desc": "away-side SC conversion fails due to home-side being private" + }, + "is_idp_managed": { + "desc": "The channel cannot be converted because it is IDP Managed" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.create.json b/docs.slack.dev/methods/admin.conversations.create.json new file mode 100644 index 00000000..5ac0cf9a --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.create.json @@ -0,0 +1,101 @@ +{ + "desc": "Create a public or private channel-based conversation.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "name", + "is_private" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "name": { + "desc": "Name of the public or private channel to create.", + "example": "mychannel", + "type": "string" + }, + "description": { + "desc": "Description of the public or private channel to create.", + "example": "It's a good channel, Bront.", + "type": "string" + }, + "is_private": { + "desc": "When `true`, creates a private channel instead of a public channel", + "example": "true", + "type": "boolean" + }, + "org_wide": { + "desc": "When `true`, the channel will be available org-wide. Note: if the channel is not `org_wide=true`, you must specify a `team_id` for this channel", + "example": "true", + "type": "boolean", + "default": "false" + }, + "team_id": { + "desc": "The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.", + "schema": "workspace_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + }, + "channel_id": { + "schema": "channel" + } + } + }, + "errors": { + "could_not_create_channel": { + "desc": "The channel could not be created." + }, + "feature_not_enabled": { + "desc": "The token provided doesn't have access to this method." + }, + "invalid_name": { + "desc": "The value passed for `name` was invalid." + }, + "invalid_team": { + "desc": "The provided workspace is invalid." + }, + "name_taken": { + "desc": "A channel cannot be created with the given name." + }, + "no_local_user_on_team": { + "desc": "The workspace provided had no users." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from creating channels." + }, + "team_id_or_org_required": { + "desc": "You must provide a `team_id` or set `org_wide` to `true`." + }, + "team_not_found": { + "desc": "No workspace was found for the `team_id` provided." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.create?token=YOUR_TOKEN&name=mychannel&is_private=false", + "description": "Typical success response", + "example": { + "ok": true, + "channel_id": "C12345" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.createForObjects.json b/docs.slack.dev/methods/admin.conversations.createForObjects.json new file mode 100644 index 00000000..a1d5322d --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.createForObjects.json @@ -0,0 +1,81 @@ +{ + "desc": "Create a Salesforce channel for the corresponding object provided.", + "http_method": "POST", + "scope": "admin.conversations:manage_objects", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "object_id", + "salesforce_org_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "object_id": { + "type": "string", + "desc": "Object / Record ID (15 or 18 digit accepted). See [here](https://help.salesforce.com/s/articleView?id=000385008&type=1) for how to look up an ID.", + "example": "0019000000DmehKAAR" + }, + "salesforce_org_id": { + "type": "string", + "desc": "Salesforce org ID (15 or 18 digit accepted). See [here](https://help.salesforce.com/s/articleView?id=000385215&type=1) for how to look up Salesforce org ID.", + "example": "00DGC00000024hsuWY" + }, + "invite_object_team": { + "desc": "Optional flag to add all team members related to the object to the newly created Salesforce channel. When true, adds a maximum of 100 team members to the channel.", + "type": "boolean", + "default": "false", + "example": "true" + } + } + }, + "output": { + "desc": "Returns the created Salesforce channel's id", + "type": "object", + "required": [ + "channel_id" + ], + "properties": { + "channel_id": { + "type": "string", + "desc": "Slack Channel ID, in the format of an alphanumeric string starting with C", + "example": "C1234AB78" + } + } + }, + "errors": { + "restricted_action": { + "desc": "User does not have access to perform this action." + }, + "record_not_found": { + "desc": "Value passed for `object_id` is invalid." + }, + "invalid_org_id": { + "desc": "Value passed for `salesforce_org_id` is invalid." + }, + "feature_not_enabled": { + "desc": "Feature not enabled." + }, + "channel_already_exists": { + "desc": "Object is linked to a different channel." + }, + "missing_record_channel_config": { + "desc": "Record Channels are not enabled for the given object type." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.createForObjects?token=YOUR_TOKEN&object_id=RECORD_ID&salesforce_org_id=YOUR_SALESFORCE_ORG_ID", + "description": "Typical success response", + "example": { + "ok": true, + "channel_id": "C12345" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.delete.json b/docs.slack.dev/methods/admin.conversations.delete.json new file mode 100644 index 00000000..b58b7ede --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.delete.json @@ -0,0 +1,73 @@ +{ + "desc": "Delete a public or private channel.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to delete.", + "example": "C12345", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "The value passed for `channel_id` was invalid." + }, + "channel_type_not_supported": { + "desc": "The provided `channel_id` was a DM, MPDM, or the 'general' channel." + }, + "could_not_delete_channel": { + "desc": "The channel could not be deleted." + }, + "default_org_wide_channel": { + "desc": "The default org-wide channel cannot be deleted." + }, + "feature_not_enabled": { + "desc": "The token provided doesn't have access to this method." + }, + "missing_scope": { + "desc": "The provided token hasn't obtained the necessary scopes to use this method." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an Org Owner or Admin." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from deleting this channel." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.delete?token=YOUR_TOKEN&channel_id=C12345", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.disconnectShared.json b/docs.slack.dev/methods/admin.conversations.disconnectShared.json new file mode 100644 index 00000000..b678a06a --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.disconnectShared.json @@ -0,0 +1,95 @@ +{ + "desc": "Disconnect a connected channel from one or more workspaces.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to be disconnected from some workspaces.", + "example": "C12345", + "schema": "channel" + }, + "leaving_team_ids": { + "type": "array", + "desc": "Used for disconnecting a team from a shared channel. Only one team ID may be passed at a time.", + "items": { + "schema": "team_id" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "cannot_kick_home_team": { + "desc": "The originating workspace cannot be kicked from the channel." + }, + "cannot_kick_team": { + "desc": "Only the originating workspace for a connected channel may remove other workspaces from the channel." + }, + "channel_not_found": { + "desc": "The value passed for `channel_id` was invalid." + }, + "feature_not_enabled": { + "desc": "The token provided does not have access to this method." + }, + "leaving_team_not_in_channel": { + "desc": "The workspace being removed is not connected to the channel." + }, + "leaving_team_required": { + "desc": "There are more than two teams in the channel—you must supplied a `leaving_team_id` parameter." + }, + "missing_scope": { + "desc": "The provided token does not have the required scopes to use this method." + }, + "no_teams_to_disconnect": { + "desc": "This channel is not shared, so there are no workspaces to disconnect." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an Org Admin or Owner." + }, + "not_an_enterprise": { + "desc": "This endpoint can only be called for an Enterprise organization." + }, + "not_supported": { + "desc": "The passed `channel_id` was a DM, MPDM, or the 'general' channel." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from disconnecting a channel." + }, + "team_not_found": { + "desc": "At least one of the supplied `leaving_team_ids` are invalid." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.disconnectShared?token=YOUR_TOKEN&channel_id=C12345&leaving_team_ids=T12345", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo.json b/docs.slack.dev/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo.json new file mode 100644 index 00000000..12a41263 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo.json @@ -0,0 +1,126 @@ +{ + "desc": "List all disconnected channels—i.e., channels that were once connected to other workspaces and then disconnected—and the corresponding original channel IDs for key revocation with EKM.", + "http_method": "POST", + "scope": "admin.conversations:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_ids": { + "type": "string", + "desc": "A comma-separated list of channels to filter to." + }, + "team_ids": { + "type": "string", + "desc": "A comma-separated list of the workspaces to which the channels you would like returned belong." + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "example": "100", + "default": 100, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "example": "5c3e53d5" + } + } + }, + "output": { + "type": "object", + "required": [ + "channels" + ], + "properties": { + "response_metadata": { + "required": [ + "next_cursor" + ], + "type": "object", + "properties": { + "next_cursor": { + "type": "string" + } + } + }, + "channels": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "internal_team_ids", + "original_connected_host_id", + "original_connected_channel_id" + ], + "properties": { + "id": { + "schema": "channel" + }, + "internal_team_ids": { + "type": "array", + "items": { + "schema": "workspace_id" + } + }, + "original_connected_host_id": { + "schema": "workspace_id" + }, + "original_connected_channel_id": { + "schema": "channel" + } + } + } + } + } + }, + "errors": { + "invalid_cursor": { + "desc": "Invalid cursor." + }, + "invalid_limit": { + "desc": "The value passed for `limit` was not valid." + }, + "not_an_admin": { + "desc": "This method is only accessible by Org owners and Admins." + }, + "not_enabled": { + "desc": "The API endpoint is not enabled for your team." + }, + "restricted_action": { + "desc": "The caller of this API is not allowed to perform this operation." + }, + "unsupported_arguments": { + "desc": "The provided method arguments are not supported." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.ekm.listOriginalConnectedChannelInfo?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "channels": [ + { + "id": "string", + "internal_team_ids": "array", + "original_connected_host_id": "string", + "original_connected_channel_id": "string" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.getConversationPrefs.json b/docs.slack.dev/methods/admin.conversations.getConversationPrefs.json new file mode 100644 index 00000000..056b4bc2 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.getConversationPrefs.json @@ -0,0 +1,195 @@ +{ + "desc": "Get conversation preferences for a public or private channel.", + "http_method": "POST", + "scope": "admin.conversations:read", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to get preferences for.", + "example": "C12345", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + }, + "prefs": { + "type": "object", + "properties": { + "who_can_post": { + "type": "object", + "properties": { + "type": { + "desc": "Comma separated string of user types", + "type": "array", + "items": { + "type": "string" + }, + "example": "admin,owner" + }, + "user": { + "desc": "Comma separated string of user IDs", + "type": "array", + "items": { + "type": "string" + }, + "example": "U1234,U5678" + } + } + }, + "can_thread": { + "type": "object", + "properties": { + "type": { + "desc": "Comma separated string of user types", + "type": "array", + "items": { + "type": "string" + }, + "example": "admin,owner" + }, + "user": { + "desc": "Comma separated string of user IDs", + "type": "array", + "items": { + "type": "string" + }, + "example": "U1234,U5678" + } + } + }, + "membership_limit": { + "type": "object", + "properties": { + "value": { + "desc": "Membership limit value", + "type": "integer" + } + } + }, + "can_huddle": { + "type": "object", + "properties": { + "enabled": { + "desc": "Can start a huddle", + "type": "boolean" + } + } + }, + "enable_at_channel": { + "type": "object", + "properties": { + "enabled": { + "desc": "Enable channel mentions in channel.", + "type": "boolean" + } + } + }, + "enable_at_here": { + "type": "object", + "properties": { + "enabled": { + "desc": "Enable here mentions in channel.", + "type": "boolean" + } + } + } + } + } + } + }, + "errors": { + "channel_not_found": { + "desc": "The value passed for `channel_id` was invalid." + }, + "channel_type_not_supported": { + "desc": "The provided `channel_id` was a DM, MPDM, or the 'general' channel." + }, + "could_not_get_conversation_prefs": { + "desc": "There was an error getting the conversation preferences for this channel." + }, + "feature_not_enabled": { + "desc": "The token provided does not have access to this method." + }, + "missing_scope": { + "desc": "The token provided doesn't have the required scopes." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an Org Admin or Owner." + }, + "not_an_enterprise": { + "desc": "This endpoint can only be called by an Enterprise organization." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from listing preferences." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.getConversationPrefs?token=YOUR_TOKEN&channel_id=C12345", + "description": "Get conversation preferences for a public or private channel.", + "example": { + "ok": true, + "prefs": { + "who_can_post": { + "type": "admin", + "user": "U1234" + }, + "can_thread": { + "type": "admin, owner", + "user": "U1234,U5678" + } + } + } + }, + "alternate_success": { + "url": "/api/admin.conversations.getConversationPrefs?token=YOUR_TOKEN", + "description": "Get conversation preferences for a public or private channel.", + "example": { + "ok": true, + "prefs": { + "who_can_post": { + "type": [ + "admin" + ], + "user": [ + "ABCD4567E" + ] + }, + "can_thread": { + "type": [ + "ra" + ], + "user": [] + }, + "enable_at_channel": { + "enabled": false + }, + "enable_at_here": { + "enabled": false + } + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.getCustomRetention.json b/docs.slack.dev/methods/admin.conversations.getCustomRetention.json new file mode 100644 index 00000000..bd7f9bac --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.getCustomRetention.json @@ -0,0 +1,83 @@ +{ + "desc": "This API endpoint can be used by any admin to get a conversation's retention policy.", + "http_method": "POST", + "scope": "admin.conversations:read", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The conversation to get the retention policy for.", + "example": "C12345678", + "type": "string", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "is_policy_enabled", + "duration_days" + ], + "properties": { + "is_policy_enabled": { + "desc": "Is there a policy set on this conversation that overrides the default retention policy.", + "type": "boolean" + }, + "duration_days": { + "desc": "The message retention duration in days to set for this conversation", + "example": "500", + "type": "integer" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value given for `channel_id` was invalid." + }, + "channel_type_not_supported": { + "desc": "Value given for `channel_id` was a #general channel." + }, + "could_not_get_retention": { + "desc": "The retention policy could not be retrieved." + }, + "default_org_wide_channel": { + "desc": "The channel given is a default org-wide channel." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an org admin." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from modifying the retention policy of this channel." + }, + "retention_override_not_allowed": { + "desc": "The current org retention policy disallows modifying the retention policy of this channel." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.getCustomRetention?token=YOUR_TOKEN&channel_id=YOUR_CHANNEL_ID", + "description": "Typical success response", + "example": { + "ok": true, + "is_policy_enabled": true, + "duration_days": 70 + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.getTeams.json b/docs.slack.dev/methods/admin.conversations.getTeams.json new file mode 100644 index 00000000..923ae56d --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.getTeams.json @@ -0,0 +1,105 @@ +{ + "desc": "Get all the workspaces a given public or private channel is connected to within this Enterprise org.", + "http_method": "POST", + "scope": "admin.conversations:read", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to determine connected workspaces within the organization for.", + "example": "C12345", + "schema": "channel" + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "5c3e53d5" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "example": "100", + "default": 100, + "minimum": 1, + "maximum": 1000 + } + } + }, + "output": { + "type": "object", + "required": [ + "ok", + "team_ids" + ], + "properties": { + "ok": { + "type": "boolean" + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "channel_not_found": { + "desc": "The channel wasn't found or isn't connected to multiple workspaces." + }, + "channel_type_not_supported": { + "desc": "The `channel_id` provided was a DM, MPDM, or the 'general' channel." + }, + "could_not_get_teams": { + "desc": "Could not fetch the workspaces that the channel is shared with in this organization." + }, + "external_channel_migrating": { + "desc": "The channel is actively being migrated" + }, + "feature_not_enabled": { + "desc": "The token provided doesn't have access to this method." + }, + "invalid_cursor": { + "desc": "The provided cursor wasn't valid." + }, + "invalid_limit": { + "desc": "The value passed for `limit` wasn't valid." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from listing the workspaces connected to a channel." + }, + "unsupported_team_type": { + "desc": "This endpoint can only called by Enterprise organizations." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.getTeams?token=YOUR_TOKEN&channel_id=C12345", + "description": "Typical success response", + "example": { + "ok": true, + "team_ids": [ + "T1234", + "T5679" + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.invite.json b/docs.slack.dev/methods/admin.conversations.invite.json new file mode 100644 index 00000000..7aef9aa6 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.invite.json @@ -0,0 +1,81 @@ +{ + "desc": "Invite a user to a public or private channel.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "user_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user_ids": { + "type": "array", + "items": { + "schema": "user_id" + }, + "example": "U1234,U2345,U3456", + "minItems": 1, + "maxItems": 1000, + "desc": "The users to invite." + }, + "channel_id": { + "example": "C12345", + "desc": "The channel that the users will be invited to.", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "The value passed for `channel_id` was invalid." + }, + "channel_type_not_supported": { + "desc": "The provided `channel_id` was a DM, MPDM, or the 'general' channel." + }, + "default_org_wide_channel": { + "desc": "Users may not be invited to the default org-wide channel." + }, + "failed_for_some_users": { + "desc": "The method failed for a subset of the users passed." + }, + "feature_not_enabled": { + "desc": "The token provided doesn't have access to this method." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from inviting." + }, + "user_must_be_admin": { + "desc": "The token provided must be associated with an Org Admin or Owner." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.invite?token=YOUR_TOKEN&channel_id=C12345&user_ids=U12345", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.linkObjects.json b/docs.slack.dev/methods/admin.conversations.linkObjects.json new file mode 100644 index 00000000..59eacbe0 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.linkObjects.json @@ -0,0 +1,75 @@ +{ + "desc": "Link a Salesforce record to a channel", + "http_method": "POST", + "scope": "admin.conversations:manage_objects", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "record_id", + "salesforce_org_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel ID for Slack channel that will be linked to a Salesforce record.", + "type": "string", + "subtype": "channel" + }, + "record_id": { + "type": "string", + "desc": "Salesforce record ID (15 or 18 digit accepted). See [here](https://help.salesforce.com/s/articleView?id=000385008&type=1) for how to look up record ID.", + "example": "0019000000DmehKAAR" + }, + "salesforce_org_id": { + "type": "string", + "desc": "Salesforce org ID (15 or 18 digit accepted). See [here](https://help.salesforce.com/s/articleView?id=000385215&type=1) for how to look up Salesforce org ID.", + "example": "00DGC00000024hsuWY" + } + } + }, + "output": null, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` is invalid." + }, + "restricted_action": { + "desc": "User does not have access to perform this action." + }, + "record_not_found": { + "desc": "Value passed for `record_id` is invalid." + }, + "channel_is_archived": { + "desc": "Channel is archived." + }, + "channel_not_org_wide_shared": { + "desc": "Channel is not Org-wide shared." + }, + "channel_shared_with_nonapproved_team": { + "desc": "Channel is shared with a non-approved external team." + }, + "record_channel_already_exists": { + "desc": "Record is linked to a different channel." + }, + "invalid_channel_type": { + "desc": "Channel type cannot be linked." + }, + "name_taken": { + "desc": "A channel cannot be created with the given name." + }, + "not_allowed_for_grid_workspace": { + "desc": "Channel type is not allowed for this Enterprise org workspace." + }, + "channel_conversion_incomplete": { + "desc": "An active channel conversion is preventing linking." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.lookup.json b/docs.slack.dev/methods/admin.conversations.lookup.json new file mode 100644 index 00000000..c703d33e --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.lookup.json @@ -0,0 +1,92 @@ +{ + "desc": "Returns channels on the given team using the filters.", + "http_method": "POST", + "scope": "admin.conversations:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_ids", + "last_message_activity_before" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_ids": { + "desc": "Array of team IDs to filter by", + "type": "array", + "items": { + "type": "string", + "subtype": "team", + "schema": "workspace_id" + } + }, + "max_member_count": { + "desc": "Filter by *public* channels with member count *equal to or less than* the specified number", + "type": "integer", + "default": 1, + "minimum": 0 + }, + "last_message_activity_before": { + "desc": "Filter by *public* channels where the most recent message was sent *before* last_message_activity", + "type": "integer" + }, + "cursor": { + "desc": "Set `cursor` to `next_cursor` returned in the previous call, to fetch the next page.", + "type": "string", + "default": "*" + }, + "limit": { + "desc": "Maximum number of results", + "type": "integer", + "default": 1000, + "minimum": 1, + "maximum": 1000 + } + } + }, + "output": { + "type": "object", + "required": [ + "channel_ids" + ], + "properties": { + "channel_ids": { + "type": "array", + "items": { + "schema": "channel" + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "internal_error": { + "desc": "Something unexpected happened, try again in a little bit. Sorry for that!" + }, + "feature_not_enabled": { + "desc": "The feature is not enabled" + }, + "no_valid_teams": { + "desc": "The team_ids argument doesn't contain any valid teams" + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.removeCustomRetention.json b/docs.slack.dev/methods/admin.conversations.removeCustomRetention.json new file mode 100644 index 00000000..e10504c1 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.removeCustomRetention.json @@ -0,0 +1,64 @@ +{ + "desc": "This API endpoint can be used by any admin to remove a conversation's retention policy.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The conversation to set the retention policy for.", + "example": "C12345678", + "type": "string", + "schema": "channel" + } + } + }, + "output": null, + "errors": { + "channel_not_found": { + "desc": "Value given for `channel_id` was invalid." + }, + "channel_type_not_supported": { + "desc": "Value given for `channel_id` was a #general channel." + }, + "could_not_remove_retention": { + "desc": "The retention policy could not be removed." + }, + "default_org_wide_channel": { + "desc": "The channel given is a default org-wide channel." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an admin." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from modifying the retention policy of this channel." + }, + "retention_override_not_allowed": { + "desc": "The current retention policy disallows modifying the retention policy of this channel." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.removeCustomRetention?token=YOUR_TOKEN&channel_id=YOUR_CHANNEL_ID", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.rename.json b/docs.slack.dev/methods/admin.conversations.rename.json new file mode 100644 index 00000000..f23097a9 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.rename.json @@ -0,0 +1,74 @@ +{ + "desc": "Rename a public or private channel.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to rename.", + "example": "C12345", + "schema": "channel" + }, + "name": { + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "The value passed for `channel_id` was invalid." + }, + "channel_type_not_supported": { + "desc": "The provided `channel_id` was a DM, MPDM, or the 'general' channel." + }, + "could_not_rename_channel": { + "desc": "The channel could not be renamed." + }, + "default_org_wide_channel": { + "desc": "The default org-wide channel can't be renamed." + }, + "feature_not_enabled": { + "desc": "The token provided doesn't have access to this method." + }, + "name_taken": { + "desc": "The channel's name is already being used elsewhere." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from renaming a channel." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.rename?token=YOUR_TOKEN&channel_id=C12345&name=newandimprovedchannel", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.restrictAccess.addGroup.json b/docs.slack.dev/methods/admin.conversations.restrictAccess.addGroup.json new file mode 100644 index 00000000..a00c0397 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.restrictAccess.addGroup.json @@ -0,0 +1,104 @@ +{ + "desc": "Add an allowlist of IDP groups for accessing a channel", + "http_method": "GET", + "scope": "admin.conversations:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "group_id", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.", + "schema": "workspace_id" + }, + "group_id": { + "desc": "The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-organization) ID to be an allowlist for the private channel.", + "schema": "subteam_id" + }, + "channel_id": { + "desc": "The channel to link this group to.", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "cannot_add_more_channels_to_group": { + "desc": "The maximum number of channels have already been linked to the group." + }, + "cannot_add_more_groups_to_channel": { + "desc": "The maximum number of groups have already been linked to the channel." + }, + "channel_is_not_private": { + "desc": "The channel is a public channel, a multi-party direct message, a direct message, or is externally-shared." + }, + "channel_not_found": { + "desc": "`channel_id` can’t be found." + }, + "default_channel_restricted": { + "desc": "The channel is a default channel on the workspace." + }, + "feature_not_enabled": { + "desc": "Feature not enabled" + }, + "group_already_linked_to_channel": { + "desc": "The IDP group is already linked to the channel" + }, + "group_must_not_be_empty": { + "desc": "The IDP group is currently empty." + }, + "group_not_found": { + "desc": "`group_id` can’t be found." + }, + "invalid_auth": { + "desc": "Token does not belong to enterprise or team id passed in not part of this enterprise" + }, + "invalid_channel": { + "desc": "The channel can’t be linked to an IDP group (i.e., it's a public channel or external shared channel)." + }, + "invalid_channel_type": { + "desc": "The channel is a public channel, a multi-party direct message, a direct message, or is externally-shared." + }, + "no_channel_memberships": { + "desc": "The channel has no members." + }, + "not_an_admin": { + "desc": "This token does not belong to an Org Admin or Owner." + }, + "team_not_found": { + "desc": "`team_id` can’t be found." + }, + "unable_to_link_idp_group_and_channel": { + "desc": "The IDP group and the channel cannot be linked." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.restrictAccess.addGroup?token=YOUR_TOKEN&group_id=YOUR_GROUP_ID&channel_id=C12345&team_id=T1234", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.restrictAccess.listGroups.json b/docs.slack.dev/methods/admin.conversations.restrictAccess.listGroups.json new file mode 100644 index 00000000..5db64b67 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.restrictAccess.listGroups.json @@ -0,0 +1,78 @@ +{ + "desc": "List all IDP Groups linked to a channel", + "http_method": "GET", + "scope": "admin.conversations:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "schema": "channel" + }, + "team_id": { + "desc": "The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.", + "schema": "workspace_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok", + "group_ids" + ], + "properties": { + "ok": { + "type": "boolean" + }, + "group_ids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "errors": { + "channel_not_found": { + "desc": "`channel_id` wasn't found." + }, + "feature_not_enabled": { + "desc": "Feature not enabled" + }, + "invalid_auth": { + "desc": "Token does not belong to enterprise or team id passed in not part of this enterprise" + }, + "invalid_channel": { + "desc": "The requested channel couldn’t be linked to an IDP group. It might be a public channel or an externally-shared channel." + }, + "not_an_admin": { + "desc": "This token doesn't belong to an Org Admin or Owner." + }, + "team_not_found": { + "desc": "`team_id` wasn't found." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.restrictAccess.listGroups?token=YOUR_TOKEN&channel_id=C12345&team_id=T1234", + "description": "Typical success response", + "example": { + "ok": true, + "group_ids": [ + "YOUR_GROUP_ID" + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.restrictAccess.removeGroup.json b/docs.slack.dev/methods/admin.conversations.restrictAccess.removeGroup.json new file mode 100644 index 00000000..917577b6 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.restrictAccess.removeGroup.json @@ -0,0 +1,90 @@ +{ + "desc": "Remove a linked IDP group linked from a private channel", + "http_method": "GET", + "scope": "admin.conversations:write", + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "group_id", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.", + "schema": "workspace_id" + }, + "group_id": { + "desc": "The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-organization) ID to remove from the private channel.", + "schema": "subteam_id" + }, + "channel_id": { + "desc": "The channel to remove the linked group from.", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "`channel_id` can’t be found." + }, + "failed_to_remove_group_users": { + "desc": "Returned when could not remove the users in the channel of the group being removed" + }, + "failed_to_unlink_channel": { + "desc": "Removing the link in the database failed. Please retry." + }, + "feature_not_enabled": { + "desc": "Feature not enabled" + }, + "group_not_found": { + "desc": "`group_id` can’t be found." + }, + "invalid_auth": { + "desc": "Token does not belong to enterprise or team id passed in not part of this enterprise" + }, + "invalid_channel": { + "desc": "The channel could not be linked to an IDP group (i.e., it's a public channel or external shared channel)." + }, + "link_not_found": { + "desc": "There was no link found between the specified channel and the IDP group." + }, + "not_an_admin": { + "desc": "This token does not belong to an Org Admin or Owner." + }, + "team_not_found": { + "desc": "`team_id` can’t be found." + }, + "unable_to_unlink_idp_group_and_channel": { + "desc": "The IDP group and channel cannot be unlinked." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.restrictAccess.removeGroup?token=YOUR_TOKEN&group_id=YOUR_GROUP_ID&channel_id=C12345&team_id=T1234", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.search.json b/docs.slack.dev/methods/admin.conversations.search.json new file mode 100644 index 00000000..776156c1 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.search.json @@ -0,0 +1,205 @@ +{ + "desc": "Search for public or private channels in an Enterprise organization.", + "http_method": "POST", + "scope": "admin.conversations:read", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_ids": { + "desc": "Comma separated string of team IDs, signifying the internal workspaces to search through.", + "type": "array", + "items": { + "type": "string" + }, + "example": "T00000000,T00000001" + }, + "connected_team_ids": { + "desc": "Array of encoded team IDs, signifying the external orgs to search through.", + "type": "array", + "items": { + "type": "string" + }, + "example": "['T00000000','T00000001']" + }, + "query": { + "desc": "Name of the the channel to query by.", + "type": "string", + "example": "announcement" + }, + "limit": { + "desc": "Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.", + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 20, + "example": "20" + }, + "cursor": { + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "type": "string", + "example": "dXNlcjpVMEc5V0ZYTlo=" + }, + "search_channel_types": { + "desc": "The type of channel to include or exclude in the search. For example `private` will search private channels, while `private_exclude` will exclude them. For a full list of types, check the [Types section](#types).", + "type": "array", + "items": { + "type": "string" + }, + "example": "private,archived" + }, + "sort": { + "desc": "Possible values are `relevant` (search ranking based on what we think is closest), `name` (alphabetical), `member_count` (number of users in the channel), and `created` (date channel was created). You can optionally pair this with the `sort_dir` arg to change how it is sorted ", + "type": "string", + "example": "name", + "default": "member_count" + }, + "sort_dir": { + "desc": "Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or (c, b, a)", + "type": "string", + "example": "asc", + "default": "desc" + }, + "total_count_only": { + "desc": "Only return the total_count of channels. Omits channel data and allows access for admins without channel manager permissions.", + "type": "boolean", + "default": false + } + } + }, + "output": { + "type": "object", + "required": [ + "conversations", + "next_cursor", + "total_count" + ], + "properties": { + "conversations": { + "type": "array", + "items": { + "refs": "../../common/schemas/common_objects_schema.json#/channel" + } + }, + "next_cursor": { + "type": "string", + "desc": "Encoded string for the next cursor value" + }, + "total_count": { + "type": "integer", + "desc": "Total number of channels that exist in the search index and match the query string" + }, + "error": { + "type": "string", + "desc": "A string representation of the error type" + } + } + }, + "errors": { + "connected_team_passed_in_is_not_top_level_team": { + "desc": "One of the orgs provided in the external connected teams filter is not a top level team." + }, + "external_team_not_connected_to_this_org": { + "desc": "One of the teams provided in the external connected teams filter is not connected to the org." + }, + "feature_not_enabled": { + "desc": "The token provided doesn't have access to this method." + }, + "invalid_auth": { + "desc": "The token provided does not belong to an Enterprise organization, or a specified workspace wasn't part of this Enterprise." + }, + "invalid_cursor": { + "desc": "The provided cursor is not valid, often due to not urlencoding query parameters." + }, + "invalid_search_channel_type": { + "desc": "An invalid `search_channel_types` arg was passed. Make sure there are no spaces between your args and that each is one of the enumerated options listed above." + }, + "invalid_sort": { + "desc": "The provided `sort` argument wasn't valid." + }, + "invalid_sort_dir": { + "desc": "The provided `sort_dir` argument wasn't valid." + }, + "not_allowed": { + "desc": "The authenticated user does not have the permission to call this method." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an Org Admin or Owner." + }, + "not_an_enterprise": { + "desc": "This endpoint can only be called by an Enterprise organization." + }, + "team_not_found": { + "desc": "One of the workspaces provided in the list wasn't found." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.rename?limit=2&cursor=aWQ6Mg%3D%3D", + "description": "Typical success response", + "example": { + "ok": true, + "conversations": [ + { + "id": "GSEV0B5PY", + "name": "privacy-channel", + "purpose": "Group messaging with: @rita @nwhere @meanie", + "member_count": -1, + "created": 1578423973, + "creator_id": "WPQ65MVKK", + "is_private": true, + "is_archived": true, + "is_general": false, + "last_activity_ts": 1583198954000200, + "is_ext_shared": false, + "is_global_shared": true, + "is_org_default": false, + "is_org_mandatory": false, + "is_org_shared": true, + "is_frozen": false, + "connected_team_ids": [], + "internal_team_ids_count": 4, + "internal_team_ids_sample_team": "T013F30DBAB", + "pending_connected_team_ids": [], + "is_pending_ext_shared": false + }, + { + "id": "C013JDPD6CR", + "name": "proj-decomposed-monolith", + "purpose": "", + "member_count": 1, + "created": 1588786531, + "creator_id": "WPQ65MVKK", + "is_private": false, + "is_archived": false, + "is_general": false, + "last_activity_ts": 1589854024000200, + "is_ext_shared": false, + "is_global_shared": false, + "is_org_default": false, + "is_org_mandatory": false, + "is_org_shared": true, + "is_frozen": false, + "connected_team_ids": [], + "internal_team_ids_count": 1, + "internal_team_ids_sample_team": "TPQ67R81F", + "pending_connected_team_ids": [], + "is_pending_ext_shared": false + } + ], + "next_cursor": "aWQ6Mw==", + "total_count": 14823 + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.setConversationPrefs.json b/docs.slack.dev/methods/admin.conversations.setConversationPrefs.json new file mode 100644 index 00000000..aad05957 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.setConversationPrefs.json @@ -0,0 +1,85 @@ +{ + "desc": "Set the posting permissions for a public or private channel.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "prefs", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to set the prefs for", + "example": "C1234", + "type": "string" + }, + "prefs": { + "desc": "The prefs for this channel in a stringified JSON format.", + "example": "{'who_can_post':'type:admin,user:U1234'}", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "channel_mention_sync_required": { + "desc": "If setting channel mention restriction prefs, both mention prefs must be passed and they must be the same value." + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "channel_type_not_supported": { + "desc": "Value given for `channel_id` was a #general channel." + }, + "could_not_set_channel_pref": { + "desc": "Setting the preference or permission failed." + }, + "default_org_wide_channel": { + "desc": "Returned when you try to modify a default org wide channel." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_value": { + "desc": "Value passed for the preferences are invalid" + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an org admin." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from archiving." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.setConversationPrefs?token=YOUR_TOKEN&channel_id=C12345&prefs=%22{'who_can_post':'type:admin,user:U1234,subteam:S1234','can_thread':'type:user'}%22", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.setCustomRetention.json b/docs.slack.dev/methods/admin.conversations.setCustomRetention.json new file mode 100644 index 00000000..f4816f4b --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.setCustomRetention.json @@ -0,0 +1,73 @@ +{ + "desc": "This API endpoint can be used by any admin to set a conversation's retention policy.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "duration_days" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The conversation to set the retention policy for.", + "example": "C12345678", + "type": "string", + "schema": "channel" + }, + "duration_days": { + "desc": "The message retention duration in days to set for this conversation", + "example": "500", + "type": "integer" + } + } + }, + "output": null, + "errors": { + "channel_not_found": { + "desc": "Value given for `channel_id` was invalid." + }, + "channel_type_not_supported": { + "desc": "Value given for `channel_id` was a group dm, direct message, or #general channel." + }, + "could_not_set_retention": { + "desc": "The retention policy could not be set." + }, + "default_org_wide_channel": { + "desc": "The channel given is a default org-wide channel." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_duration": { + "desc": "Retention `duration_days` must be an integer greater than 0 days and less than 36500 days (100 years)." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an admin." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from modifying the retention policy of this channel." + }, + "retention_override_not_allowed": { + "desc": "The current retention policy disallows modifying the retention policy of this channel." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.setCustomRetention?token=YOUR_TOKEN&channel_id=YOUR_CHANNEL_ID", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.setTeams.json b/docs.slack.dev/methods/admin.conversations.setTeams.json new file mode 100644 index 00000000..678b4e35 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.setTeams.json @@ -0,0 +1,117 @@ +{ + "desc": "Set the workspaces in an Enterprise org that connect to a public or private channel.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The encoded `channel_id` to add or remove to workspaces.", + "type": "string" + }, + "team_id": { + "desc": "The workspace to which the channel belongs if the channel is a local workspace channel. Omit this argument if the channel is a cross-workspace or org-wide shared channel.", + "schema": "workspace_id" + }, + "target_team_ids": { + "desc": "A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.", + "type": "array", + "items": { + "type": "string" + }, + "example": "T1234,T5678,T9012,T3456" + }, + "org_channel": { + "desc": "True if channel has to be converted to an org channel", + "type": "boolean", + "example": "true", + "default": "false" + } + } + }, + "output": { + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "schema": "channel" + } + } + }, + "errors": { + "cannot_add_legacy_disconnected_channel_to_workspaces": { + "desc": "Cannot add legacy disconnected channel to workspaces" + }, + "cannot_move_local_channel": { + "desc": "This API cannot be used to move a local channel from one workspace to another." + }, + "channel_cannot_be_unshared": { + "desc": "Channel cannot be unshared from this workspace." + }, + "channel_not_found": { + "desc": "The channel wasn't found or isn't shared to this workspace." + }, + "channel_type_not_supported": { + "desc": "The requested `channel_id` is not a supported type of channel." + }, + "could_not_set_teams_for_channel": { + "desc": "The requested `channel_id` has not been shared with the target workspace." + }, + "default_org_wide_channel": { + "desc": "Default org wide channel cannot be unshared from a workspace." + }, + "externally_shared_or_disconnected_channel": { + "desc": "The channel is or was externally shared." + }, + "invalid_channel_id": { + "desc": "`channel_id` was invalid." + }, + "invalid_target_team": { + "desc": "Target workspace is invalid." + }, + "managed_channel_not_supported": { + "desc": "Cannot unshare a managed channel" + }, + "name_taken": { + "desc": "The proposed new name for the channel is already in use within your organization." + }, + "not_allowed_for_grid_workspace": { + "desc": "Slack Connect is not allowed for this Enterprise org workspace" + }, + "not_enabled": { + "desc": "The API endpoint is not enabled for your team." + }, + "restricted_action": { + "desc": "The caller of this API is not allowed to perform this operation." + }, + "too_many_target_teams": { + "desc": "Too many `target_team_ids` were provided." + }, + "unsupported_arguments": { + "desc": "The provided method arguments are not supported." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.setTeams?token=YOUR_TOKEN&target_team_ids=%5B%22T1234%22%2C%22T5678%22%5D&channel_id=C9876", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.unarchive.json b/docs.slack.dev/methods/admin.conversations.unarchive.json new file mode 100644 index 00000000..37e41a94 --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.unarchive.json @@ -0,0 +1,73 @@ +{ + "desc": "Unarchive a public or private channel.", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "The channel to unarchive.", + "example": "C12345", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "channel_not_archived": { + "desc": "The passed channel is not currently archived." + }, + "channel_not_found": { + "desc": "The value passed for `channel_id` was invalid." + }, + "channel_type_not_supported": { + "desc": "The value passed for `channel` was a DM, MPDM, or the 'general' channel" + }, + "could_not_unarchive_channel": { + "desc": "The channel could not be unarchived." + }, + "default_org_wide_channel": { + "desc": "You can't unarchive a default org-wide channel." + }, + "feature_not_enabled": { + "desc": "The token provided doesn't have access to this method." + }, + "missing_scope": { + "desc": "The token provided doesn't have the required scopes." + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from unarchiving." + } + }, + "examples": { + "success": { + "url": "/api/admin.conversations.unarchive?token=YOUR_TOKEN&channel_id=C12345", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.conversations.unlinkObjects.json b/docs.slack.dev/methods/admin.conversations.unlinkObjects.json new file mode 100644 index 00000000..815ff6cb --- /dev/null +++ b/docs.slack.dev/methods/admin.conversations.unlinkObjects.json @@ -0,0 +1,47 @@ +{ + "desc": "Unlink a Salesforce record from a channel", + "http_method": "POST", + "scope": "admin.conversations:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "new_name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel ID for Slack channel that will be unlinked from the Salesforce record.", + "type": "string", + "subtype": "channel" + }, + "new_name": { + "type": "string", + "desc": "Channel name you would like to give to the channel that is being unlinked from the Salesforce record." + } + } + }, + "output": null, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` is invalid." + }, + "restricted_action": { + "desc": "User does not have access to perform this action." + }, + "invalid_name_specials": { + "desc": "Value passed for `name` contained unallowed special characters or upper case characters." + }, + "name_taken": { + "desc": "A channel cannot be created with the given name." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.emoji.add.json b/docs.slack.dev/methods/admin.emoji.add.json new file mode 100644 index 00000000..ec154a6e --- /dev/null +++ b/docs.slack.dev/methods/admin.emoji.add.json @@ -0,0 +1,99 @@ +{ + "desc": "Add an emoji.", + "http_method": "GET", + "scope": "admin.teams:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "name", + "url" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "name": { + "type": "string", + "desc": "The name of the emoji to be added (using lower-case letters only). Colons (`:myemoji:`) around the value are not required, although they may be included." + }, + "url": { + "type": "string", + "desc": "The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best." + } + } + }, + "output": null, + "errors": { + "emoji_limit_reached": { + "desc": "Unable to add emoji due to limit reached." + }, + "error_bad_format": { + "desc": "Invalid image data was provided." + }, + "error_bad_name_i18n": { + "desc": "Value passed for `name` was invalid." + }, + "error_bad_upload": { + "desc": "There was an error uploading the image." + }, + "error_bad_wide": { + "desc": "The image width or height is too large." + }, + "error_missing_name": { + "desc": "Value passed for `name` is missing or empty." + }, + "error_name_taken": { + "desc": "Value passed for `name` already exists." + }, + "error_name_taken_i18n": { + "desc": "Value passed for `name` already exists." + }, + "error_no_image": { + "desc": "Empty image data was provided." + }, + "error_too_big": { + "desc": "The image file size is too large." + }, + "error_lower_case_names_only": { + "desc": "Capital letters are not allowed in emoji names." + }, + "failed_to_add_emoji": { + "desc": "Failed to add the specified emoji." + }, + "failed_to_fetch_active_team": { + "desc": "There are no active teams on the org and we need at least one." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "no_image_uploaded": { + "desc": "No image data was provided." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and Admins." + }, + "ratelimited": { + "desc": "Too many api calls in a time period." + }, + "resized_but_still_too_large": { + "desc": "The image is still too large after resizing." + }, + "too_many_frames": { + "desc": "The image has too many frames." + } + }, + "examples": { + "success": { + "url": "/api/admin.emoji.add?token=YOUR_TOKEN&name=custom&image=custom_image", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.emoji.addAlias.json b/docs.slack.dev/methods/admin.emoji.addAlias.json new file mode 100644 index 00000000..0bea7c98 --- /dev/null +++ b/docs.slack.dev/methods/admin.emoji.addAlias.json @@ -0,0 +1,72 @@ +{ + "desc": "Add an emoji alias.", + "http_method": "GET", + "scope": "admin.teams:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "name", + "alias_for" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "name": { + "type": "string", + "desc": "The new alias for the specified emoji. Any wrapping whitespace or colons will be automatically trimmed." + }, + "alias_for": { + "type": "string", + "desc": "Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed." + } + } + }, + "output": null, + "errors": { + "emoji_limit_reached": { + "desc": "Unable to add emoji due to limit reached." + }, + "error_bad_name_i18n": { + "desc": "Value passed for `name` was invalid." + }, + "error_invalid_alias": { + "desc": "Value passed for `alias_for` does not exist." + }, + "error_missing_name": { + "desc": "Value passed for `name` is missing or empty." + }, + "error_name_taken": { + "desc": "Value passed for `name` already exists." + }, + "error_name_taken_i18n": { + "desc": "The name has already been taken by another emoji, in the international set. Emoji must have unique names." + }, + "failed_to_alias_emoji": { + "desc": "Failed to alias the specified emoji." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "no_alias_selected": { + "desc": "Value passed for `alias_for` was invalid." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and Admins." + } + }, + "examples": { + "success": { + "url": "/api/admin.emoji.addAlias?token=YOUR_TOKEN&name=raised_hands&alias_for=yasss", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.emoji.list.json b/docs.slack.dev/methods/admin.emoji.list.json new file mode 100644 index 00000000..f4959d3a --- /dev/null +++ b/docs.slack.dev/methods/admin.emoji.list.json @@ -0,0 +1,130 @@ +{ + "desc": "List emoji for an Enterprise organization.", + "http_method": "GET", + "scope": "admin.teams:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "5c3e53d5" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "example": "100", + "default": 100, + "minimum": 1, + "maximum": 1000 + } + } + }, + "output": { + "type": "object", + "required": [ + "emoji" + ], + "properties": { + "emoji": { + "type": "object" + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and Admins." + } + }, + "examples": { + "success": { + "url": "/api/admin.emoji.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "emoji": { + "workflow": { + "url": "https://emoji.slack-edge.com/TM315QLU8/workflow/530de66adccc59c5.png", + "date_created": 1591720632, + "uploaded_by": "WLWLQDAL9" + }, + "welcome": { + "url": "https://emoji.slack-edge.com/TM315QLU8/welcome/763d3659699d2ef7.gif", + "date_created": 1593383451, + "uploaded_by": "WPU7MCTFH" + }, + "person": { + "url": "https://emoji.slack-edge.com/TM315QLU8/person/81295a4f69d8b122.png", + "date_created": 1593383817, + "uploaded_by": "WPU7MCTFH" + }, + "people": { + "url": "https://emoji.slack-edge.com/TM315QLU8/people/0b40796ab677b47f.png", + "date_created": 1593383822, + "uploaded_by": "WPU7MCTFH" + }, + "slackbot": { + "url": "https://emoji.slack-edge.com/TM315QLU8/slackbot/561d6e545263d92b.png", + "date_created": 1593383989, + "uploaded_by": "WPU7MCTFH" + }, + "plus1": { + "url": "https://emoji.slack-edge.com/TM315QLU8/plus1/42b92e57a79eb27e.png", + "date_created": 1593724572, + "uploaded_by": "WPU7MCTFH" + }, + "bc": { + "url": "https://emoji.slack-edge.com/TM315QLU8/bc/fb3dfdea697528b9.png", + "date_created": 1594854289, + "uploaded_by": "WPU7MCTFH" + }, + "wf": { + "url": "https://emoji.slack-edge.com/TM315QLU8/wf/04dad3aa28b57cd3.png", + "date_created": 1594854443, + "uploaded_by": "WPU7MCTFH" + }, + "kb": { + "url": "https://emoji.slack-edge.com/TM315QLU8/kb/bab417c375703f7b.png", + "date_created": 1598467537, + "uploaded_by": "WPU7MCTFH" + }, + "ignore": { + "url": "https://emoji.slack-edge.com/TM315QLU8/ignore/9506cda43addbad8.png", + "date_created": 1598467835, + "uploaded_by": "WPU7MCTFH" + } + }, + "response_metadata": { + "next_cursor": "" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.emoji.remove.json b/docs.slack.dev/methods/admin.emoji.remove.json new file mode 100644 index 00000000..22b65cb6 --- /dev/null +++ b/docs.slack.dev/methods/admin.emoji.remove.json @@ -0,0 +1,52 @@ +{ + "desc": "Remove an emoji across an Enterprise organization", + "http_method": "GET", + "scope": "admin.teams:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "name": { + "type": "string", + "desc": "The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included." + } + } + }, + "output": null, + "errors": { + "emoji_not_found": { + "desc": "Value passed for `name` was invalid." + }, + "failed_to_remove_emoji": { + "desc": "Failed to remove the specified emoji." + }, + "failure_removing_emoji": { + "desc": "This emoji could not be removed. It might be part of the standard Unicode set or the default Slack package." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and Admins." + } + }, + "examples": { + "success": { + "url": "/api/admin.emoji.remove?token=YOUR_TOKEN&name=tada", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.emoji.rename.json b/docs.slack.dev/methods/admin.emoji.rename.json new file mode 100644 index 00000000..b45f5acb --- /dev/null +++ b/docs.slack.dev/methods/admin.emoji.rename.json @@ -0,0 +1,72 @@ +{ + "desc": "Rename an emoji.", + "http_method": "GET", + "scope": "admin.teams:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "name", + "new_name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "name": { + "type": "string", + "desc": "The name of the emoji to be renamed. Colons (`:myemoji:`) around the value are not required, although they may be included." + }, + "new_name": { + "type": "string", + "desc": "The new name of the emoji." + } + } + }, + "output": null, + "errors": { + "cannot_resolve_alias": { + "desc": "The alias emoji could not be resolved" + }, + "error_bad_name_i18n": { + "desc": "Value passed for `new_name` was invalid." + }, + "error_invalid_emoji_to_rename": { + "desc": "Value passed for `name` was invalid." + }, + "error_missing_name": { + "desc": "Value passed for `name` is missing or empty." + }, + "error_name_taken": { + "desc": "Value passed for `name` already exists." + }, + "error_name_taken_i18n": { + "desc": "The name has already been taken by another emoji, in the international set. Emoji must have unique names." + }, + "failed_to_fetch_active_team": { + "desc": "There are no active teams on the org and we need at least one." + }, + "failed_to_rename_emoji": { + "desc": "The emoji could not be renamed." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and Admins." + } + }, + "examples": { + "success": { + "url": "/api/admin.emoji.rename?token=YOUR_TOKEN&name=custom&new_name=customer", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.functions.list.json b/docs.slack.dev/methods/admin.functions.list.json new file mode 100644 index 00000000..d4b454b8 --- /dev/null +++ b/docs.slack.dev/methods/admin.functions.list.json @@ -0,0 +1,130 @@ +{ + "desc": "Look up functions by a set of apps", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.workflows:read" + }, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "app_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The team context to retrieve functions from", + "example": "T00000001", + "schema": "workspace_id" + }, + "app_ids": { + "type": "array", + "desc": "Comma-separated array of app IDs to get functions for; max 50", + "example": "A02,A1234", + "items": { + "schema": "app_id" + }, + "maxItems": 50 + }, + "cursor": { + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "limit": { + "desc": "The number of results that will be returned by the API on each invocation. Must be between 1 and 1000, both inclusive", + "example": "20", + "type": "integer", + "default": 100, + "minimum": 1, + "maximum": 1000 + } + } + }, + "output": { + "type": "object", + "required": [ + "functions" + ], + "properties": { + "functions": { + "type": "array", + "items": { + "schema": "function" + } + }, + "response_metadata": { + "schema": "response_metadata_new" + } + } + }, + "errors": { + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "not_allowed": { + "desc": "The user is not allowed to access this API method" + }, + "restricted_action": { + "desc": "The user is not allowed to access this API method" + } + }, + "examples": { + "success": { + "url": "/api/admin.functions.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "functions": [ + { + "id": "123ABC456DE", + "callback_id": "sample_function", + "title": "Sample function", + "description": "A sample function", + "type": "app", + "input_parameters": [ + { + "type": "string", + "name": "message", + "description": "Message to be posted", + "title": "Message", + "is_required": true + }, + { + "type": "slack#/reference/objects/user-object_id", + "name": "user", + "description": "The user invoking the workflow", + "title": "User", + "is_required": false + } + ], + "output_parameters": [ + { + "type": "string", + "name": "updatedMsg", + "description": "Updated message to be posted", + "title": "Updated Msg", + "is_required": true + } + ], + "app_id": "789FGH1011IJ", + "date_created": 1692283027, + "date_updated": 1692725035, + "date_deleted": 0 + } + ], + "response_metadata": { + "next_cursor": "aWQ6MTE3MDk1NTIzNDAxOQ==" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.functions.permissions.lookup.json b/docs.slack.dev/methods/admin.functions.permissions.lookup.json new file mode 100644 index 00000000..6889adfd --- /dev/null +++ b/docs.slack.dev/methods/admin.functions.permissions.lookup.json @@ -0,0 +1,84 @@ +{ + "desc": "Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities.", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.workflows:read" + }, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "function_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "function_ids": { + "type": "array", + "minItems": 1, + "maxItems": 1000, + "desc": "An array of function IDs to get permissions for", + "items": { + "schema": "function_id" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "permissions", + "errors", + "metadata" + ], + "properties": { + "metadata": { + "type": "object", + "patternProperties": { + "^Fn[A-Z0-9]{8,}$": { + "type": "object", + "properties": { + "workflows_using": { + "type": "integer", + "desc": "the number of workflows with a step function of this type" + } + } + } + } + }, + "errors": { + "type": "object", + "patternProperties": { + "../common/schemas/common_defs_schema.json#/function_id": { + "type": "string" + } + } + } + } + }, + "errors": { + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "restricted_action": { + "desc": "User does not have access to this API" + } + }, + "examples": { + "success": { + "url": "/api/admin.functions.permissions.lookup?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "errors": {} + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.functions.permissions.set.json b/docs.slack.dev/methods/admin.functions.permissions.set.json new file mode 100644 index 00000000..cd5ea4bb --- /dev/null +++ b/docs.slack.dev/methods/admin.functions.permissions.set.json @@ -0,0 +1,70 @@ +{ + "desc": "Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.workflows:write" + }, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "function_id", + "visibility" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "function_id": { + "type": "string", + "desc": "The function ID to set permissions for" + }, + "visibility": { + "type": "string", + "desc": "The function visibility", + "enum": [ + "everyone", + "app_collaborators", + "named_entities", + "no_one" + ] + }, + "user_ids": { + "type": "array", + "desc": "List of user IDs to allow for named_entities visibility", + "example": "['U00000001', 'U00000002', 'U00000003']", + "items": { + "schema": "user_id" + }, + "maxItems": 50 + } + } + }, + "output": null, + "errors": { + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "function_not_found": { + "desc": "The referenced function does not exist." + }, + "invalid_visibility": { + "desc": "Invalid value for visibility" + }, + "unknown_method": { + "desc": "This method does not exist." + }, + "invalid_setting": { + "desc": "The app_collaborators setting is not allowed for apps not owned by your team/org" + }, + "restricted_action": { + "desc": "This actor does not have access to the permissions on this resource." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.inviteRequests.approve.json b/docs.slack.dev/methods/admin.inviteRequests.approve.json new file mode 100644 index 00000000..7a9e377d --- /dev/null +++ b/docs.slack.dev/methods/admin.inviteRequests.approve.json @@ -0,0 +1,55 @@ +{ + "desc": "Approve a workspace invite request.", + "http_method": "POST", + "scope": "admin.invites:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "invite_request_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "ID for the workspace where the invite request was made.", + "type": "string" + }, + "invite_request_id": { + "desc": "ID of the request to invite.", + "type": "string", + "example": "Ir1234" + } + } + }, + "output": null, + "errors": { + "already_processed": { + "desc": "The `invite_request_id` passed has already been approved or denied." + }, + "failed_to_send_invite": { + "desc": "The actual invite (separate from approval) failed to process. This may happen because the user is disabled, already in the team, etc." + }, + "feature_not_enabled": { + "desc": "The Invite Request Admin APIs are not enabled for this team." + }, + "invalid_request": { + "desc": "The `invite_request_id` passed is invalid." + }, + "missing_scope": { + "desc": "This token doesn't have the scope required." + }, + "not_an_admin": { + "desc": "This token doesn't have admin privileges." + }, + "team_not_found": { + "desc": "The `team_id` specified wasn't found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.inviteRequests.approved.list.json b/docs.slack.dev/methods/admin.inviteRequests.approved.list.json new file mode 100644 index 00000000..b5443529 --- /dev/null +++ b/docs.slack.dev/methods/admin.inviteRequests.approved.list.json @@ -0,0 +1,79 @@ +{ + "desc": "List all approved workspace invite requests.", + "http_method": "POST", + "scope": "admin.invites:read", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "ID for the workspace where the invite requests were made.", + "type": "string", + "example": "" + }, + "cursor": { + "desc": "Value of the `next_cursor` field sent as part of the previous API response", + "type": "string", + "example": "5cweb43" + }, + "limit": { + "desc": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100, + "example": "100" + } + } + }, + "output": { + "desc": "returns all the properties of invite request object", + "type": "object", + "required": [ + "approved_requests" + ], + "properties": { + "response_metadata": { + "required": [ + "next_cursor" + ], + "type": "object", + "properties": { + "next_cursor": { + "type": "string" + } + } + }, + "approved_requests": { + "type": "array", + "items": { + "schema": "approved_request" + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The Invite Requests admin APIs feature is not enabled" + }, + "missing_scope": { + "desc": "This token doesn't have the scope required." + }, + "not_an_admin": { + "desc": "This token doesn't have admin privileges." + }, + "team_not_found": { + "desc": "The `team_id` specified wasn't found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.inviteRequests.denied.list.json b/docs.slack.dev/methods/admin.inviteRequests.denied.list.json new file mode 100644 index 00000000..958487b5 --- /dev/null +++ b/docs.slack.dev/methods/admin.inviteRequests.denied.list.json @@ -0,0 +1,79 @@ +{ + "desc": "List all denied workspace invite requests.", + "http_method": "POST", + "scope": "admin.invites:read", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "ID for the workspace where the invite requests were made", + "example": "T0U9RERW4", + "schema": "team_id" + }, + "cursor": { + "desc": "Value of the `next_cursor` field sent as part of the previous api response", + "type": "string", + "example": "5cweb43" + }, + "limit": { + "desc": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive", + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100, + "example": "100" + } + } + }, + "output": { + "desc": "Returns all denied invite requests, along with the user that denied the request", + "type": "object", + "required": [ + "denied_requests" + ], + "properties": { + "response_metadata": { + "required": [ + "next_cursor" + ], + "type": "object", + "properties": { + "next_cursor": { + "type": "string" + } + } + }, + "denied_requests": { + "type": "array", + "items": { + "schema": "denied_request" + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The Invite Request admin APIs feature is not enabled" + }, + "missing_scope": { + "desc": "This token doesn't have the scope required." + }, + "not_an_admin": { + "desc": "This token doesn't have admin privileges." + }, + "team_not_found": { + "desc": "The `team_id` specified wasn't found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.inviteRequests.deny.json b/docs.slack.dev/methods/admin.inviteRequests.deny.json new file mode 100644 index 00000000..16a2deba --- /dev/null +++ b/docs.slack.dev/methods/admin.inviteRequests.deny.json @@ -0,0 +1,52 @@ +{ + "desc": "Deny a workspace invite request.", + "http_method": "POST", + "scope": "admin.invites:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "invite_request_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "ID for the workspace where the invite request was made.", + "type": "string" + }, + "invite_request_id": { + "desc": "ID of the request to invite.", + "type": "string", + "example": "Ir1234" + } + } + }, + "output": null, + "errors": { + "already_processed": { + "desc": "The `invite_request_id` passed has already been approved or denied." + }, + "feature_not_enabled": { + "desc": "The Invite Request Admin APIs feature is not enabled" + }, + "invalid_request": { + "desc": "The `invite_request_id` passed is invalid." + }, + "missing_scope": { + "desc": "This token doesn't have the scope required." + }, + "not_an_admin": { + "desc": "This token doesn't have admin privileges." + }, + "team_not_found": { + "desc": "The `team_id` specified wasn't found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.inviteRequests.list.json b/docs.slack.dev/methods/admin.inviteRequests.list.json new file mode 100644 index 00000000..75028691 --- /dev/null +++ b/docs.slack.dev/methods/admin.inviteRequests.list.json @@ -0,0 +1,79 @@ +{ + "desc": "List all pending workspace invite requests.", + "http_method": "POST", + "scope": "admin.invites:read", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "ID for the workspace where the invite requests were made.", + "type": "string", + "example": "" + }, + "cursor": { + "desc": "Value of the `next_cursor` field sent as part of the previous API response", + "type": "string", + "example": "5cweb43" + }, + "limit": { + "desc": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100, + "example": "100" + } + } + }, + "output": { + "desc": "returns all the properties of invite request object", + "type": "object", + "required": [ + "invite_requests" + ], + "properties": { + "response_metadata": { + "required": [ + "next_cursor" + ], + "type": "object", + "properties": { + "next_cursor": { + "type": "string" + } + } + }, + "invite_requests": { + "type": "array", + "items": { + "schema": "invite_request" + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The Invite Request Admin APIs feature is not enabled" + }, + "missing_scope": { + "desc": "This token doesn't have the scope required." + }, + "not_an_admin": { + "desc": "This token doesn't have admin privileges." + }, + "team_not_found": { + "desc": "The `team_id` specified wasn't found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.roles.addAssignments.json b/docs.slack.dev/methods/admin.roles.addAssignments.json new file mode 100644 index 00000000..a204a965 --- /dev/null +++ b/docs.slack.dev/methods/admin.roles.addAssignments.json @@ -0,0 +1,110 @@ +{ + "desc": "Adds members to the specified role with the specified scopes", + "http_method": "POST", + "scope": "admin.roles:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "role_id", + "entity_ids", + "user_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "role_id": { + "type": "string", + "desc": "ID of the role to which users will be assigned", + "example": "R0001", + "schema": "role_id" + }, + "entity_ids": { + "type": "array", + "desc": "List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs", + "example": "['T00000001', 'E00000002']", + "items": { + "type": "string" + } + }, + "user_ids": { + "type": "array", + "desc": "List of IDs from the users to be added to the given role", + "example": "['U00000001', 'U00000002', 'U00000003']", + "items": { + "schema": "user_id" + } + } + } + }, + "output": { + "type": "object", + "properties": { + "error": { + "type": "string", + "desc": "A string representation of the error type" + } + } + }, + "errors": { + "failed_for_some_entities": { + "desc": "At least one role scope ID was invalid" + }, + "failed_for_some_users": { + "desc": "At least one user ID was invalid" + }, + "failed_for_some_users_and_entities": { + "desc": "At least one role scope ID was invalid" + }, + "feature_not_enabled": { + "desc": "This API is currently not enabled." + }, + "invalid_actor": { + "desc": "This API is only enabled for the Admins/Owners." + }, + "invalid_role_id": { + "desc": "The role type passed does not exist." + }, + "no_valid_entities": { + "desc": "None of the entities passed were valid." + }, + "no_valid_users": { + "desc": "None of the users passed were valid." + }, + "too_many_entities": { + "desc": "More than 10 role scopes were passed." + }, + "too_many_users": { + "desc": "More than 10 users were passed." + } + }, + "examples": { + "success": { + "url": "/api/admin.roles.addAssignments?token=YOUR_TOKEN", + "description": "This returns an `ok: true` response letting you know you successfully added the user(s) to the assigned role(s).", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/admin.roles.addAssignments?token=YOUR_TOKEN", + "description": "Typical error response if at least one role scope was invalid for the role you were adding. In the example you can see the Enterprise ID is what is causing the issue.", + "example": { + "ok": false, + "error": "failed_for_some_entities", + "rejected_entities": [ + { + "id": "E123ABC456", + "error": "invalid_auth" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.roles.listAssignments.json b/docs.slack.dev/methods/admin.roles.listAssignments.json new file mode 100644 index 00000000..2eef36b3 --- /dev/null +++ b/docs.slack.dev/methods/admin.roles.listAssignments.json @@ -0,0 +1,173 @@ +{ + "desc": "Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities", + "http_method": "POST", + "scope": "admin.roles:read", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "5c3e53d5" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 - 200 both inclusive.", + "example": "50", + "default": 200, + "minimum": 1, + "maximum": 200 + }, + "role_ids": { + "type": "array", + "desc": "collection of role ids to scope results by", + "example": "['Rl01', 'Rl0A']", + "items": { + "type": "string", + "schema": "role_id" + } + }, + "entity_ids": { + "desc": "The entities for which the roles apply", + "type": "array", + "example": "['T12345', 'C12345']", + "items": { + "type": "string", + "schema": "entity_id" + } + }, + "sort_dir": { + "desc": "Sort direction. Default is descending on date_create, can be either ASC or DESC", + "type": "string", + "example": "DESC" + } + } + }, + "output": { + "type": "object", + "required": [ + "role_assignments", + "next_cursor" + ], + "properties": { + "error": { + "type": "string", + "desc": "A string representation of the error type" + }, + "role_assignments": { + "type": "array", + "items": { + "type": "object", + "required": [ + "role_id", + "entity_id", + "user_id", + "date_create" + ], + "properties": { + "role_id": { + "type": "string", + "desc": "ID of the role that is assigned", + "schema": "role_id" + }, + "entity_id": { + "type": "string", + "desc": "ID of entity for which the role is assigned" + }, + "user_id": { + "type": "string", + "desc": "ID of the user for which the role is assigned", + "schema": "user_id" + }, + "date_create": { + "type": "integer", + "desc": "Timestamp of when the membership was created." + } + } + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "This API is currently not enabled." + }, + "invalid_actor": { + "desc": "This API is only enabled for the Admins/Owners." + }, + "invalid_arguments": { + "desc": "Required arguments either were not provided or contain invalid values." + }, + "invalid_cursor": { + "desc": "The passed cursor was invalid." + }, + "invalid_sort": { + "desc": "Sort parameters are invalid." + }, + "invalid_role_id": { + "desc": "One or more role IDs could not be validated." + } + }, + "examples": { + "success": { + "url": "/api/admin.roles.listAssignments?token=YOUR_TOKEN", + "description": "The response includes the `role_id`, `entity_id`, `user_id`, and a date the role assignment was created.", + "example": { + "ok": true, + "role_assignments": [ + { + "role_id": "Rl0C", + "entity_id": "T123ABC456", + "user_id": "U123ABC456", + "date_create": 1677038902 + }, + { + "role_id": "Rl0C", + "entity_id": "T123ABC456", + "user_id": "U123ABC456", + "date_create": 1677038902 + }, + { + "role_id": "Rl0A", + "entity_id": "C123ABC456", + "user_id": "U123ABC456", + "date_create": 1666624374 + }, + { + "role_id": "Rl03", + "entity_id": "E123ABC456", + "user_id": "U123ABC456", + "date_create": 1663617026 + }, + { + "role_id": "Rl01", + "entity_id": "E123ABC456", + "user_id": "U123ABC456", + "date_create": 1643231331 + } + ], + "response_metadata": { + "next_cursor": "dXNlcl9pZDozMDA1NjIwNTc0MjYyO2VudGl0eV90eXBlOjE7ZW50aXR5X2lkOjMwMDUxODcyMTczNjY7ZGF0ZV9jcmVhdGU6MTY0MzIzMTMzMQ==" + } + } + }, + "error": { + "url": "/api/admin.roles.listAssignments?token=YOUR_TOKEN", + "description": "Typical error response if you're attempting to call this without a token created by an Admin, or an Owner.", + "example": { + "ok": false, + "error": "invalid_actor" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.roles.removeAssignments.json b/docs.slack.dev/methods/admin.roles.removeAssignments.json new file mode 100644 index 00000000..de352068 --- /dev/null +++ b/docs.slack.dev/methods/admin.roles.removeAssignments.json @@ -0,0 +1,109 @@ +{ + "desc": "Removes a set of users from a role for the given scopes and entities", + "http_method": "POST", + "scope": "admin.roles:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "role_id", + "entity_ids", + "user_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "role_id": { + "type": "string", + "desc": "ID of the role to which users will be assigned", + "example": "R0001", + "schema": "role_id" + }, + "entity_ids": { + "type": "array", + "desc": "List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs", + "example": "['T00000001', 'E00000002']", + "items": { + "type": "string" + } + }, + "user_ids": { + "type": "array", + "desc": "List of IDs of the users whose roles will be revoked", + "example": "['U00000001', 'U00000002', 'U00000003']", + "items": { + "schema": "user_id" + } + } + } + }, + "output": { + "type": "object", + "properties": { + "error": { + "type": "string", + "desc": "A string representation of the error type" + } + } + }, + "errors": { + "failed_for_some_entities": { + "desc": "At least one role scope ID was invalid" + }, + "failed_for_some_users": { + "desc": "At least one user ID was invalid" + }, + "failed_for_some_users_and_entities": { + "desc": "At least one role scope ID was invalid" + }, + "feature_not_enabled": { + "desc": "This API is currently not enabled." + }, + "invalid_actor": { + "desc": "This API is only enabled for the Admins/Owners." + }, + "invalid_role_id": { + "desc": "The role type passed does not exist." + }, + "no_valid_entities": { + "desc": "None of the entities passed were valid." + }, + "no_valid_users": { + "desc": "None of the users passed were valid." + }, + "too_many_entities": { + "desc": "More than 10 role scopes were passed." + }, + "too_many_users": { + "desc": "More than 10 users were passed." + } + }, + "examples": { + "success": { + "url": "/api/admin.roles.removeAssignments?token=YOUR_TOKEN", + "description": "This returns an `ok: true` response letting you know you have successfully removed the user(s) to the assigned role(s).", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/admin.roles.removeAssignments?token=YOUR_TOKEN", + "description": "Typical error response if at least one role scope was invalid for the role you were removing. In the example you can see the Enterprise ID is what is causing the issue.", + "example": { + "ok": false, + "error": "failed_for_some_entities", + "rejected_entities": [ + { + "id": "E123ABC456", + "error": "invalid_auth" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.admins.list.json b/docs.slack.dev/methods/admin.teams.admins.list.json new file mode 100644 index 00000000..35cf2834 --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.admins.list.json @@ -0,0 +1,80 @@ +{ + "desc": "List all of the admins on a given workspace.", + "http_method": "GET", + "scope": "admin.teams:read", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "team_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "limit": { + "desc": "The maximum number of items to return.", + "type": "integer", + "example": "200" + }, + "cursor": { + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "type": "string", + "example": "dXNlcjpVMEc5V0ZYTlo=" + }, + "team_id": { + "schema": "workspace_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "admin_ids" + ], + "properties": { + "admin_ids": { + "type": "array", + "items": { + "schema": "user_id" + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_auth": { + "desc": "The given token is not authorized for the requested `team_id`." + }, + "invalid_cursor": { + "desc": "Invalid cursor." + }, + "invalid_limit": { + "desc": "Limit must be between 1 and 1000 inclusive." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins." + }, + "team_not_found": { + "desc": "`team_id` was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.teams.admins.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "admin_ids": [ + "U1234" + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.create.json b/docs.slack.dev/methods/admin.teams.create.json new file mode 100644 index 00000000..2a442ea2 --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.create.json @@ -0,0 +1,89 @@ +{ + "desc": "Create an Enterprise team.", + "http_method": "POST", + "scope": "admin.teams:write", + "json_input_supported": true, + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token", + "team_domain", + "team_name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_domain": { + "type": "string", + "desc": "Team domain (for example, slacksoftballteam). Domains are limited to 21 characters." + }, + "team_name": { + "type": "string", + "desc": "Team name (for example, Slack Softball Team)." + }, + "team_description": { + "type": "string", + "desc": "Description for the team." + }, + "team_discoverability": { + "type": "string", + "desc": "Who can join the team. A team's discoverability can be `open`, `closed`, `invite_only`, or `unlisted`." + } + } + }, + "output": { + "type": "object", + "required": [ + "team" + ], + "properties": { + "team": { + "schema": "workspace_id" + } + } + }, + "errors": { + "bad_url": { + "desc": "Invalid URL. Note that domains can be at most 21 characters." + }, + "could_not_create_workspace": { + "desc": "The workspace could not be created." + }, + "discoverability_setting_invalid": { + "desc": "The given discoverability setting is invalid." + }, + "domain_taken": { + "desc": "The requested domain is taken." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "must_provide_team_domain": { + "desc": "No team domain has been provided." + }, + "must_provide_team_name": { + "desc": "No team name has been provided." + }, + "name_taken_in_org": { + "desc": "The team with the specified name already exists in the org." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins." + } + }, + "examples": { + "success": { + "url": "/api/admin.teams.create?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "team": "T12345" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.list.json b/docs.slack.dev/methods/admin.teams.list.json new file mode 100644 index 00000000..1d161fdb --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.list.json @@ -0,0 +1,125 @@ +{ + "desc": "List all teams in an Enterprise organization", + "http_method": "POST", + "scope": "admin.teams:read", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be a positive integer no larger than 1000.", + "example": "50", + "default": 100, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "example": "5c3e53d5" + } + } + }, + "output": { + "type": "object", + "required": [ + "team" + ], + "properties": { + "teams": { + "type": "array", + "items": { + "type": "object", + "required": [ + "team_id", + "name", + "discoverability", + "primary_owner", + "team_url" + ], + "properties": { + "id": { + "type": "string", + "desc": "Encoded ID of the workspace" + }, + "name": { + "type": "string", + "desc": "Name of the workspace" + }, + "discoverability": { + "type": "string", + "desc": "Who is able to join this workspace" + }, + "primary_owner": { + "type": "object", + "required": [ + "user_id", + "email" + ], + "properties": { + "user_id": { + "type": "string", + "desc": "Encoded user ID of the primary owner of the workspace" + }, + "email": { + "type": "string", + "desc": "Email of the primary owner of the workspace" + } + } + }, + "team_url": { + "type": "string", + "desc": "The URL of the workspace" + } + } + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_cursor": { + "desc": "Invalid cursor." + }, + "invalid_limit": { + "desc": "Value passed for `limit` was not valid." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins." + } + }, + "examples": { + "success": { + "url": "/api/admin.teams.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "teams": [ + { + "id": "T1234", + "name": "My Team", + "discoverability": "hidden", + "primary_owner": { + "user_id": "W1234", + "email": "bront@slack.com" + }, + "team_url": "https://subarachnoid.slack.com/" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.owners.list.json b/docs.slack.dev/methods/admin.teams.owners.list.json new file mode 100644 index 00000000..72830f7c --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.owners.list.json @@ -0,0 +1,80 @@ +{ + "desc": "List all of the owners on a given workspace.", + "http_method": "GET", + "scope": "admin.teams:read", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "team_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "schema": "workspace_id" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "example": "100", + "default": 100, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "example": "5c3e53d5" + } + } + }, + "output": { + "type": "object", + "required": [ + "owner_ids" + ], + "properties": { + "owner_ids": { + "type": "array", + "items": { + "schema": "user_id" + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_auth": { + "desc": "The given token is not authorized for the requested team." + }, + "invalid_cursor": { + "desc": "Invalid cursor." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins." + }, + "team_not_found": { + "desc": "`team_id was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.teams.owners.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "owner_ids": [ + "U1234" + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.settings.info.json b/docs.slack.dev/methods/admin.teams.settings.info.json new file mode 100644 index 00000000..326fdf83 --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.settings.info.json @@ -0,0 +1,99 @@ +{ + "desc": "Fetch information about settings in a workspace", + "http_method": "POST", + "scope": "admin.teams:read", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "team_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "schema": "workspace_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok", + "team" + ], + "properties": { + "ok": { + "type": "boolean" + }, + "team": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "email_domain": { + "type": "string" + }, + "icon": { + "type": "array" + }, + "enterprise_id": { + "type": "string" + }, + "enterprise_name": { + "type": "string" + }, + "default_channels": { + "type": "array" + } + } + } + } + } + }, + "errors": { + "failed_to_fetch_info": { + "desc": "There was an error fetching info for this workspace." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "team_not_found": { + "desc": "The `team_id` was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.teams.settings.info?token=YOUR_TOKEN&team_id=T1234", + "description": "Typical success response", + "example": { + "ok": true, + "team": { + "id": "string", + "name": "string", + "domain": "string", + "email_domain": "string", + "icon": "array", + "enterprise_id": "string", + "enterprise_name": "string", + "default_channels": "array" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.settings.setDefaultChannels.json b/docs.slack.dev/methods/admin.teams.settings.setDefaultChannels.json new file mode 100644 index 00000000..be460cfb --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.settings.setDefaultChannels.json @@ -0,0 +1,71 @@ +{ + "desc": "Set the default channels of a workspace.", + "http_method": "GET", + "scope": "admin.teams:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "channel_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "ID for the workspace to set the default channel for.", + "schema": "workspace_id" + }, + "channel_ids": { + "desc": "An array of channel IDs.", + "type": "array", + "minItems": 1, + "maxItems": 100, + "items": { + "schema": "channel_id" + } + } + } + }, + "output": { + "type": "object", + "properties": {} + }, + "errors": { + "failed_to_set_default_channels": { + "desc": "We encountered an error while trying to set the default channel." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_auth": { + "desc": "The given token is not authorized for the requested `team_id`." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins." + }, + "one_or_more_invalid_channels": { + "desc": "One or more of the passed channel IDs was invalid." + }, + "restricted_action": { + "desc": "The actor does not have admin permissions for the team in context" + }, + "team_not_found": { + "desc": "`team_id` was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.teams.settings.setDefaultChannels?token=YOUR_TOKEN&team+id=1234&channel_ids=C9876", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.settings.setDescription.json b/docs.slack.dev/methods/admin.teams.settings.setDescription.json new file mode 100644 index 00000000..c89135f3 --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.settings.setDescription.json @@ -0,0 +1,53 @@ +{ + "desc": "Set the description of a given workspace.", + "http_method": "POST", + "scope": "admin.teams:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "description" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "ID for the workspace to set the description for.", + "schema": "workspace_id" + }, + "description": { + "type": "string", + "desc": "The new description for the workspace." + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "failed_to_set_description": { + "desc": "There was an error setting the description." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "team_not_found": { + "desc": "The requested `team_id` can't be found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.settings.setDiscoverability.json b/docs.slack.dev/methods/admin.teams.settings.setDiscoverability.json new file mode 100644 index 00000000..07c47901 --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.settings.setDiscoverability.json @@ -0,0 +1,65 @@ +{ + "desc": "An API method that allows admins to set the discoverability of a given workspace", + "http_method": "POST", + "scope": "admin.teams:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "discoverability" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID of the workspace to set discoverability on.", + "schema": "workspace_id" + }, + "discoverability": { + "type": "string", + "desc": "This workspace's discovery setting. It must be set to one of `open`, `invite_only`, `closed`, or `unlisted`." + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "discoverability_setting_invalid": { + "desc": "The discovery setting must be set to one of `open`, `invite_only`, `closed`, or `unlisted`." + }, + "failed_to_set_discoverability": { + "desc": "There was an error setting the discoverability of this workspace." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "team_not_found": { + "desc": "The `team_id` was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.teams.settings.setDiscoverability?token=YOUR_TOKEN&team+id=1234&discoverability=open", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.settings.setIcon.json b/docs.slack.dev/methods/admin.teams.settings.setIcon.json new file mode 100644 index 00000000..77a32272 --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.settings.setIcon.json @@ -0,0 +1,55 @@ +{ + "desc": "Sets the icon of a workspace.", + "http_method": "GET", + "scope": "admin.teams:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "image_url" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "image_url": { + "desc": "Image URL for the icon", + "type": "string", + "example": "http://mysite.com/icon.jpeg" + }, + "team_id": { + "desc": "ID for the workspace to set the icon for.", + "schema": "workspace_id" + } + } + }, + "output": { + "type": "object", + "properties": {} + }, + "errors": { + "failed_to_set_icon": { + "desc": "Setting the url in the database failed. This may be transient, please try again soon." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_auth": { + "desc": "The given token is not authorized for the requested `team_id`." + }, + "invalid_url": { + "desc": "Invalid url." + }, + "not_an_admin": { + "desc": "This method is only accessible by org owners and admins." + }, + "team_not_found": { + "desc": "`team_id` was not found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.teams.settings.setName.json b/docs.slack.dev/methods/admin.teams.settings.setName.json new file mode 100644 index 00000000..5433d75a --- /dev/null +++ b/docs.slack.dev/methods/admin.teams.settings.setName.json @@ -0,0 +1,53 @@ +{ + "desc": "Set the name of a given workspace.", + "http_method": "POST", + "scope": "admin.teams:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "ID for the workspace to set the name for.", + "schema": "workspace_id" + }, + "name": { + "type": "string", + "desc": "The new name of the workspace." + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "failed_to_set_name": { + "desc": "Returned when there is an error to set the name" + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "team_not_found": { + "desc": "Returned when team_id can’t be resolved" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.usergroups.addChannels.json b/docs.slack.dev/methods/admin.usergroups.addChannels.json new file mode 100644 index 00000000..b05d099a --- /dev/null +++ b/docs.slack.dev/methods/admin.usergroups.addChannels.json @@ -0,0 +1,106 @@ +{ + "desc": "Add up to one hundred default channels to an IDP group.", + "http_method": "POST", + "scope": "admin.usergroups:write", + "json_input_supported": true, + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token", + "usergroup_id", + "channel_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "usergroup_id": { + "desc": "ID of the IDP group to add default channels for.", + "type": "string", + "example": "S00000000" + }, + "team_id": { + "desc": "The workspace to add default channels in.", + "type": "string", + "example": "T00000000" + }, + "channel_ids": { + "desc": "Comma separated string of channel IDs.", + "type": "array", + "items": { + "type": "string" + }, + "example": "C00000000,C00000001" + } + } + }, + "output": { + "type": "object", + "properties": { + "error": { + "type": "string", + "desc": "A string representation of the error type" + }, + "invalid_channels": { + "type": "array", + "items": { + "type": "string" + }, + "desc": "List of channel IDs that are not valid for this action" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "At least one of the provided channel IDs could not be found, or one of the channels has a type that is not supported." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this workspace." + }, + "invalid_auth": { + "desc": "The workspace specified is not part of this organization." + }, + "invalid_channels_limit": { + "desc": "The number of channel IDs passed in is larger than 100." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an Org Admin or Owner." + }, + "not_an_enterprise": { + "desc": "The token passed in does not belong to an Enterprise organization." + }, + "team_not_found": { + "desc": "The workspace provided was not found." + }, + "usergroup_not_found": { + "desc": "The IDP group provided was not found." + }, + "usergroup_not_linked_to_team": { + "desc": "The IDP group provided is not linked to the workspace." + }, + "usergroup_team_not_provisioned": { + "desc": "The IDP group provided is linked to a workspace that has auto-provision disabled." + } + }, + "examples": { + "success": { + "url": "/api/admin.usergroups.addChannels?token=YOUR_TOKEN&usergroup_id=S00000&team_id=T00000&channel_ids=C00000", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/admin.usergroups.addChannels?token=YOUR_TOKEN&usergroup_id=S00000&team_id=T00000&channel_ids=C00000", + "description": "Typical error response if the token provided is not associated with an Org Admin or Owner", + "example": { + "ok": false, + "error": "not_an_admin" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.usergroups.addTeams.json b/docs.slack.dev/methods/admin.usergroups.addTeams.json new file mode 100644 index 00000000..927572a6 --- /dev/null +++ b/docs.slack.dev/methods/admin.usergroups.addTeams.json @@ -0,0 +1,69 @@ +{ + "desc": "Associate one or more default workspaces with an organization-wide IDP group.", + "http_method": "POST", + "scope": "admin.teams:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "usergroup_id", + "team_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "usergroup_id": { + "desc": "An encoded usergroup (IDP Group) ID.", + "type": "string", + "example": "S12345678" + }, + "team_ids": { + "desc": "A comma separated list of encoded team (workspace) IDs. Each workspace *MUST* belong to the organization associated with the token.", + "type": "array", + "items": { + "type": "string" + }, + "example": "T12345678,T98765432" + }, + "auto_provision": { + "desc": "When `true`, this method automatically creates new workspace accounts for the IDP group members.", + "type": "boolean", + "default": "false", + "example": "true" + } + } + }, + "output": {}, + "errors": { + "auto_provision_failure": { + "desc": "A failure occurred while assigning IDP group members to a specific workspace; see `errors` element for a list of failed team IDs." + }, + "internal_error": { + "desc": "An unexpected error occurred." + }, + "invalid_team_ids": { + "desc": "One or more team IDs provided were invalid; see the `errors` field in the response for the list of invalid team IDs." + }, + "no_team_ids_given": { + "desc": "The `team_ids` parameter was empty." + }, + "usergroup_not_found": { + "desc": "`usergroup_id` wasn't found." + } + }, + "examples": { + "success": { + "url": "/api/admin.usergroups.addTeams?token=YOUR_TOKEN&usergroup_id=S00000&team_ids=T00000&auto_provision=true", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.usergroups.listChannels.json b/docs.slack.dev/methods/admin.usergroups.listChannels.json new file mode 100644 index 00000000..f1dd98ba --- /dev/null +++ b/docs.slack.dev/methods/admin.usergroups.listChannels.json @@ -0,0 +1,127 @@ +{ + "desc": "List the channels linked to an org-level IDP group (user group).", + "http_method": "POST", + "scope": "admin.usergroups:read", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "usergroup_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "usergroup_id": { + "desc": "ID of the IDP group to list default channels for.", + "example": "S00000000", + "schema": "subteam_id" + }, + "team_id": { + "desc": "ID of the the workspace.", + "type": "string", + "example": "T00000000", + "schema": "workspace_id" + }, + "include_num_members": { + "desc": "Flag to include or exclude the count of members per channel.", + "type": "boolean", + "example": "true" + } + } + }, + "output": { + "type": "object", + "required": [ + "channels" + ], + "properties": { + "channels": { + "type": "array", + "items": { + "schema": "channel" + } + }, + "error": { + "type": "string", + "desc": "A string representation of the error type" + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this workspace." + }, + "invalid_auth": { + "desc": "The workspace specified is not part of this Enterprise organization." + }, + "invalid_user": { + "desc": "The calling user is not valid." + }, + "not_allowed": { + "desc": "The calling user is not an admin or does not have necessary role" + }, + "not_an_admin": { + "desc": "The token provided is not associated with an Org Admin or Owner." + }, + "not_an_enterprise": { + "desc": "The token passed in does not belong to an Enterprise organization." + }, + "team_not_found": { + "desc": "The workspace was not found." + }, + "usergroup_not_found": { + "desc": "The IDP group provided was not found." + }, + "usergroup_not_linked_to_team": { + "desc": "The IDP group provided is not linked to the specified workspace." + } + }, + "examples": { + "success": { + "url": "/api/admin.usergroups.listChannels?token=YOUR_TOKEN&usergroup_id=S00000", + "description": "Typical success response", + "example": { + "ok": true, + "channels": [ + { + "id": "C024BE91L", + "name": "fun", + "team_id": "T024BE911", + "num_members": 34 + }, + { + "id": "C024BE91K", + "name": "more fun", + "team_id": "T024BE912" + }, + { + "id": "C024BE91M", + "name": "public-channel", + "team_id": "T024BE911", + "is_redacted": true, + "num_members": 34 + }, + { + "id": "C024BE91N", + "name": "some more fun", + "team_id": "T024BE921" + } + ] + } + }, + "error": { + "url": "/api/admin.usergroups.listChannels?token=YOUR_TOKEN&usergroup_id=S00000", + "description": "Typical error response if the token provided is not associated with an Org Admin or Owner", + "example": { + "ok": false, + "error": "not_an_admin" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.usergroups.removeChannels.json b/docs.slack.dev/methods/admin.usergroups.removeChannels.json new file mode 100644 index 00000000..c6a36cec --- /dev/null +++ b/docs.slack.dev/methods/admin.usergroups.removeChannels.json @@ -0,0 +1,95 @@ +{ + "desc": "Remove one or more default channels from an org-level IDP group (user group).", + "http_method": "POST", + "scope": "admin.usergroups:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "usergroup_id", + "channel_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "usergroup_id": { + "desc": "ID of the IDP Group", + "type": "string", + "example": "S00000000" + }, + "channel_ids": { + "desc": "Comma-separated string of channel IDs", + "type": "array", + "items": { + "type": "string" + }, + "example": "C00000000,C00000001" + } + } + }, + "output": { + "type": "object", + "properties": { + "error": { + "type": "string", + "desc": "A string representation of the error type" + }, + "invalid_channels": { + "type": "array", + "items": { + "type": "string" + }, + "desc": "List of channel IDs that are not valid for this action" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "At least one of the provided channel IDs could not be found, or one of those channels has a type that is not supported." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this workspace." + }, + "invalid_auth": { + "desc": "The workspace specified is not part of this Enterprise organization." + }, + "invalid_channels_limit": { + "desc": "The number of channel IDs passed in is larger than 100." + }, + "not_an_admin": { + "desc": "The token provided is not associated with an Org Admin or Owner." + }, + "not_an_enterprise": { + "desc": "The token passed in does not belong to an Enterprise organization." + }, + "usergroup_not_found": { + "desc": "The IDP group provided was not found." + }, + "internal_error": { + "desc": "There was an internal error processing this request—please retry." + } + }, + "examples": { + "success": { + "url": "/api/admin.usergroups.removeChannels?token=YOUR_TOKEN&usergroup_id=S00000&channel_ids=C00000", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/admin.usergroups.removeChannels?token=YOUR_TOKEN&usergroup_id=S00000&channel_ids=C00000", + "description": "Typical error response if the token provided is not associated with an Org Admin or Owner", + "example": { + "ok": false, + "error": "not_an_admin" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.assign.json b/docs.slack.dev/methods/admin.users.assign.json new file mode 100644 index 00000000..112bb783 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.assign.json @@ -0,0 +1,91 @@ +{ + "desc": "Add an Enterprise user to a workspace.", + "http_method": "POST", + "scope": "admin.users:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "user_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID (`T1234`) of the workspace.", + "schema": "workspace_id" + }, + "user_id": { + "desc": "The ID of the user to add to the workspace.", + "schema": "user_id" + }, + "is_restricted": { + "desc": "True if user should be added to the workspace as a guest.", + "type": "boolean", + "example": "true", + "default": false + }, + "is_ultra_restricted": { + "desc": "True if user should be added to the workspace as a single-channel guest.", + "type": "boolean", + "example": "true", + "default": false + }, + "channel_ids": { + "desc": "Comma separated values of channel IDs to add user in the new workspace.", + "type": "string", + "example": "C123,C3456", + "default": "" + } + } + }, + "output": null, + "errors": { + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team" + }, + "invalid_role_for_user": { + "desc": "The requested status is incompatible with the user's role on another workspace." + }, + "invited_user_not_created": { + "desc": "The invited user could not be created." + }, + "invited_user_not_reactivated": { + "desc": "The invited user could not be reactivated." + }, + "invitor_cannot_see_channel": { + "desc": "The invitor is not part of one or many channels that the user was requested to be added to" + }, + "not_an_admin": { + "desc": "This method wasn't called by an admin." + }, + "team_not_found": { + "desc": "`team_id was not found." + }, + "user_already_team_member": { + "desc": "The given user is already active on the given team." + }, + "user_is_bot": { + "desc": "The given user is a bot from an app. This api only works with humans." + }, + "user_not_found": { + "desc": "`user_id` was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.assign?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.invite.json b/docs.slack.dev/methods/admin.users.invite.json new file mode 100644 index 00000000..30e84956 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.invite.json @@ -0,0 +1,136 @@ +{ + "desc": "Invite a user to a workspace.", + "http_method": "POST", + "scope": "admin.users:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "email", + "team_id", + "channel_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID (`T1234`) of the workspace.", + "schema": "workspace_id" + }, + "email": { + "desc": "The email address of the person to invite.", + "type": "string", + "example": "joe@email.com" + }, + "channel_ids": { + "desc": "A comma-separated list of `channel_id`s for this user to join. At least one channel is required.", + "type": "string", + "example": "C1A2B3C4D,C26Z25Y24" + }, + "custom_message": { + "desc": "An optional message to send to the user in the invite email.", + "type": "string", + "example": "Come and join our team!" + }, + "real_name": { + "desc": "Full name of the user.", + "type": "string", + "example": "{\"full_name\":\"Joe Smith\"}" + }, + "resend": { + "desc": "Allow this invite to be resent in the future if a user has not signed up yet. Resending can only be done via the UI and has no expiration. (default: false)", + "type": "boolean", + "example": "true" + }, + "is_restricted": { + "desc": "Is this user a multi-channel guest user? (default: false)", + "type": "boolean" + }, + "is_ultra_restricted": { + "desc": "Is this user a single channel guest user? (default: false)", + "type": "boolean" + }, + "guest_expiration_ts": { + "desc": "Timestamp when guest account should be disabled. Only include this timestamp if you are inviting a guest user and you want their account to expire on a certain date.", + "type": "string", + "example": "0123456789.012345", + "schema": "ts" + }, + "email_password_policy_enabled": { + "desc": "Allow invited user to sign in via email and password. Only available for Enterprise org teams via admin invite.", + "example": "true", + "type": "boolean" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "already_in_team": { + "desc": "The user is already on the team." + }, + "already_in_team_invited_user": { + "desc": "The user has already been invited to the team." + }, + "failed_looking_up_user": { + "desc": "We couldn't find the requested user." + }, + "failed_to_send_invite": { + "desc": "The invite failed to send." + }, + "failed_to_validate_caller": { + "desc": "The token calling this method doesn't have permission to invite a user." + }, + "failed_to_validate_channels": { + "desc": "`channel_ids` was invalid." + }, + "failed_to_validate_custom_message": { + "desc": "`extra_message` was invalid." + }, + "failed_to_validate_expiration": { + "desc": "`expiration_ts` was invalid." + }, + "failed_to_validate_team": { + "desc": "The team calling this method was invalid." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_email": { + "desc": "Email address was not valid." + }, + "not_an_admin": { + "desc": "The user token does not have admin privileges." + }, + "team_not_found": { + "desc": "`team_id` was not found." + }, + "user_disabled": { + "desc": "The user is disabled." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.invite?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.list.json b/docs.slack.dev/methods/admin.users.list.json new file mode 100644 index 00000000..73c1e7cd --- /dev/null +++ b/docs.slack.dev/methods/admin.users.list.json @@ -0,0 +1,210 @@ +{ + "desc": "List users on a workspace", + "http_method": "POST", + "scope": "admin.users:read", + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID (T1234) of a workspace. Filters results to just the specified workspace.", + "schema": "workspace_id" + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "example": "5c3e53d5" + }, + "is_active": { + "type": "boolean", + "desc": "If true, only active users will be returned. If false, only deactivated users will be returned. Default is true." + }, + "include_deactivated_user_workspaces": { + "type": "boolean", + "desc": "Only applies with org token and no team_id. If true, return `workspaces` for a user even if they may be deactivated on them. If false, return `workspaces` for a user only when user is active on them. Default is false." + }, + "only_guests": { + "type": "boolean", + "desc": "If true, returns only guests and their expiration dates that belong to the team_id" + }, + "limit": { + "desc": "Limit for how many users to be retrieved per page", + "type": "integer", + "example": "50", + "default": 100, + "minimum": 1, + "maximum": 100 + } + } + }, + "output": { + "type": "object", + "required": [ + "users" + ], + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "email", + "is_admin", + "is_owner", + "is_primary_owner", + "is_restricted", + "is_ultra_restricted", + "is_bot" + ], + "properties": { + "id": { + "type": "string", + "desc": "Encoded user ID" + }, + "username": { + "type": "string", + "desc": "Username of user" + }, + "full_name": { + "type": "string", + "desc": "Full name of user" + }, + "has_2fa": { + "type": "boolean", + "desc": "If 2FA is enabled. Only returned with org token and no team_id." + }, + "has_sso": { + "type": "boolean", + "desc": "If SSO is enabled. Only returned with org token and no team_id." + }, + "email": { + "type": "string", + "desc": "Email address of user" + }, + "is_admin": { + "type": "boolean", + "desc": "Is this user an admin?" + }, + "is_owner": { + "type": "boolean", + "desc": "Is this user an owner?" + }, + "is_primary_owner": { + "type": "boolean", + "desc": "Is this user the primary owner of the workspace?" + }, + "is_restricted": { + "type": "boolean", + "desc": "Is this user a restricted (guest) user?" + }, + "is_ultra_restricted": { + "type": "boolean", + "desc": "Is this user an ultra-restricted user?" + }, + "is_bot": { + "type": "boolean", + "desc": "Is this user a bot user?" + }, + "expiration_ts": { + "type": "number", + "desc": "For a guest user, what is their expiration timestamp? (On workspaces only.)" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + }, + "desc": "Roles that a user has" + }, + "last_active_ts": { + "type": "number", + "desc": "Last active timestamp for a user. Only applies with org token and no team_id" + }, + "workspaces": { + "type": "array", + "items": { + "schema": "workspace_id" + }, + "desc": "IDs of the workspaces that a user belongs to" + }, + "is_active": { + "type": "boolean", + "desc": "Is this user active?" + }, + "date_created": { + "type": "number", + "desc": "date of when the user was created, returned as epoch seconds" + }, + "deactivated_ts": { + "type": "number", + "desc": "date of when the user was deactivated, returned as epoch seconds" + } + } + } + } + } + }, + "errors": { + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_arguments": { + "desc": "The passed arguments were invalid." + }, + "invalid_auth": { + "desc": "This request could not be authorized." + }, + "invalid_cursor": { + "desc": "The passed cursor could not be validated." + }, + "team_not_found": { + "desc": "`team_id` was not found." + }, + "include_deactivated_user_workspaces_invalid": { + "desc": "`include_deactivated_user_workspaces` only applies with org token and no team_id." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.list?token=YOUR_TOKEN&team_id=T1234", + "description": "Typical success response", + "example": { + "ok": true, + "users": [ + { + "id": "W0L3P31SP", + "email": "john.doe@slack.com", + "is_admin": false, + "is_owner": false, + "is_primary_owner": false, + "is_restricted": false, + "is_ultra_restricted": false, + "is_bot": false, + "username": "john_doe", + "full_name": "John Doe", + "is_active": true, + "date_created": 1566922090, + "deactivated_ts": 1678435283, + "expiration_ts": 0, + "workspaces": [ + "T123" + ], + "has_2fa": false, + "has_sso": false + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.remove.json b/docs.slack.dev/methods/admin.users.remove.json new file mode 100644 index 00000000..0bc157e6 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.remove.json @@ -0,0 +1,69 @@ +{ + "desc": "Remove a user from a workspace.", + "http_method": "POST", + "scope": "admin.users:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "user_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID (`T1234`) of the workspace.", + "schema": "workspace_id" + }, + "user_id": { + "desc": "The ID of the user to remove.", + "type": "string", + "example": "W12345678", + "schema": "user_id" + } + } + }, + "output": null, + "errors": { + "cannot_modify_primary_owner": { + "desc": "The primary owner cannot be modified." + }, + "failed_to_remove_user_from_workspace": { + "desc": "Removing this user from the workspace failed." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_auth": { + "desc": "The request could not be authorized" + }, + "invalid_permissions": { + "desc": "This method is only accessible by org owners and admins." + }, + "team_not_found": { + "desc": "`team_id` was not found." + }, + "user_already_deleted": { + "desc": "The requested user has already been marked as deleted." + }, + "user_not_found": { + "desc": "The user was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.remove?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.session.clearSettings.json b/docs.slack.dev/methods/admin.users.session.clearSettings.json new file mode 100644 index 00000000..a881af47 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.session.clearSettings.json @@ -0,0 +1,80 @@ +{ + "desc": "Clear user-specific session settings—the session duration and what happens when the client closes—for a list of users.", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:write", + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "user_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user_ids": { + "desc": "The IDs of users you'd like to clear session settings for.", + "example": "['U1234']", + "items": { + "type": "string", + "schema": "user_id" + }, + "type": "array" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "admin_unauthorized": { + "desc": "The owner of this token isn't authorized to clear sessions." + }, + "bots_not_allowed": { + "desc": "Bot users may not have their settings cleared." + }, + "feature_not_enabled": { + "desc": "This method is only available to Enterprise customers." + }, + "internal_error": { + "desc": "There was an internal error processing this request—please retry." + }, + "invalid_arguments": { + "desc": "Required arguments either were not provided or contain invalid values." + }, + "invalid_auth": { + "desc": "The provided token doesn't have access to this endpoint." + }, + "not_an_admin": { + "desc": "The owner of this token isn't an Org Owner or Admin." + }, + "unknown_method": { + "desc": "This method is currently not available." + }, + "user_not_found": { + "desc": "There was an error finding a requested user." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.session.clearSettings?user_ids=%5B%27U1234%27%5D&token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.session.getSettings.json b/docs.slack.dev/methods/admin.users.session.getSettings.json new file mode 100644 index 00000000..694f2d09 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.session.getSettings.json @@ -0,0 +1,134 @@ +{ + "desc": "Get user-specific session settings—the session duration and what happens when the client closes—given a list of users.", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:read", + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "user_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user_ids": { + "desc": "The IDs of users you'd like to fetch session settings for. Note: if a user does not have any active sessions, they will not be returned in the response.", + "example": "['U1234']", + "items": { + "type": "string", + "schema": "user_id" + }, + "type": "array" + } + } + }, + "output": { + "type": "object", + "properties": { + "session_settings": { + "type": "array", + "desc": "User specific session settings", + "items": { + "type": "object", + "required": [ + "user_id", + "desktop_app_browser_quit", + "duration" + ], + "properties": { + "user_id": { + "type": "string", + "desc": "Encoded ID of the user" + }, + "desktop_app_browser_quit": { + "oneOf": [ + { + "type": "boolean", + "desc": "Session expiry on browser or app quit" + }, + { + "type": "null", + "desc": "Session expiry on browser or app quit" + } + ] + }, + "duration": { + "oneOf": [ + { + "type": "integer", + "desc": "User's session duration" + }, + { + "type": "null", + "desc": "User's session duration" + } + ] + } + } + } + }, + "no_settings_applied": { + "type": "array", + "desc": "The IDs of users requested that do not have any user session settings applied.", + "items": { + "type": "string" + } + } + } + }, + "errors": { + "admin_unauthorized": { + "desc": "The owner of this token isn't authorized to list sessions." + }, + "bots_not_allowed": { + "desc": "Bot sessions are not listed by this method." + }, + "feature_not_enabled": { + "desc": "This method is only available to Enterprise customers." + }, + "internal_error": { + "desc": "There was an internal error processing this request—please retry." + }, + "invalid_arguments": { + "desc": "Required arguments either were not provided or contain invalid values." + }, + "invalid_auth": { + "desc": "The provided token doesn't have access to this endpoint." + }, + "restricted_action": { + "desc": "The owner of this token isn't an Org Owner or Admin." + }, + "not_an_admin": { + "desc": "The owner of this token isn't an Org Owner or Admin." + }, + "unknown_method": { + "desc": "This method is currently not available." + }, + "user_not_found": { + "desc": "There was an error finding the requested user." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.session.getSettings?user_ids=%5B%27U1234%27%5D&token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "session_settings": [ + { + "user_id": "U1234", + "desktop_app_browser_quit": true, + "duration": 315569520 + } + ], + "no_settings_applied": [] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.session.invalidate.json b/docs.slack.dev/methods/admin.users.session.invalidate.json new file mode 100644 index 00000000..15e8d1e9 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.session.invalidate.json @@ -0,0 +1,77 @@ +{ + "desc": "Revoke a single session for a user. The user will be forced to login to Slack.", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "user_id", + "session_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "ID of the workspace that the session belongs to.", + "example": "T1234", + "schema": "team_id" + }, + "user_id": { + "desc": "ID of the user that the session belongs to.", + "example": "U12345", + "schema": "user_id" + }, + "session_id": { + "desc": "ID of the session to invalidate.", + "example": "12345", + "type": "integer" + } + } + }, + "output": null, + "errors": { + "admin_unauthorized": { + "desc": "The token provided doesn't have permission to revoke a session." + }, + "cannot_invalidate_primary_owner": { + "desc": "Only the primary owner of an organization can invalidate a primary owner's sessions." + }, + "feature_not_enabled": { + "desc": "The token provided can't call this method." + }, + "invalid_auth": { + "desc": "The provided token doesn't have access to this endpoint." + }, + "not_an_admin": { + "desc": "This method must be called by an Org Owner or Admin." + }, + "session_invalidation_failed": { + "desc": "There was an error invalidating the session." + }, + "session_not_found": { + "desc": "The requested session wasn't found." + }, + "unknown_method": { + "desc": "This method is currently not available." + }, + "user_not_found": { + "desc": "The requested user wasn't found." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.session.invalidate?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.session.list.json b/docs.slack.dev/methods/admin.users.session.list.json new file mode 100644 index 00000000..52c8fbea --- /dev/null +++ b/docs.slack.dev/methods/admin.users.session.list.json @@ -0,0 +1,208 @@ +{ + "desc": "List active user sessions for an organization", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID of the workspace you'd like active sessions for. If you pass a `team_id`, you'll need to pass a `user_id` as well.", + "example": "T1234", + "type": "string" + }, + "user_id": { + "desc": "The ID of user you'd like active sessions for. If you pass a `user_id`, you'll need to pass a `team_id` as well.", + "example": "U1234", + "type": "string" + }, + "limit": { + "default": 1000, + "desc": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "example": "100", + "maximum": 1000, + "minimum": 1, + "type": "integer" + }, + "cursor": { + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "example": "5c3e53d5", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "active_sessions" + ], + "properties": { + "response_metadata": { + "required": [ + "next_cursor" + ], + "type": "object", + "properties": { + "next_cursor": { + "type": "string" + } + } + }, + "active_sessions": { + "type": "array", + "desc": "Active user session data", + "items": { + "type": "object", + "required": [ + "user_id", + "team_id", + "session_id", + "created" + ], + "properties": { + "user_id": { + "type": "string", + "desc": "Encoded ID of the user" + }, + "team_id": { + "type": "string", + "desc": "Encoded ID of the team" + }, + "session_id": { + "type": "integer", + "desc": "ID of the session" + }, + "recent": { + "type": "object", + "properties": { + "device_hardware": { + "type": "string", + "desc": "Type of device" + }, + "os": { + "type": "string", + "desc": "Type of OS" + }, + "os_version": { + "type": "string", + "desc": "Version of the OS" + }, + "slack_client_version": { + "type": "string", + "desc": "Version of the Slack client (if available)" + }, + "ip": { + "type": "string", + "desc": "IP address" + } + } + }, + "created": { + "type": "object", + "properties": { + "device_hardware": { + "type": "string", + "desc": "Type of device used when session was created" + }, + "os": { + "type": "string", + "desc": "Type of OS used when session was created" + }, + "os_version": { + "type": "string", + "desc": "Version of the OS used when session was created" + }, + "slack_client_version": { + "type": "string", + "desc": "Version of the Slack client (if available) used when session was created" + }, + "ip": { + "type": "string", + "desc": "IP address used when session was created" + } + } + } + } + } + } + } + }, + "errors": { + "admin_unauthorized": { + "desc": "The owner of this token isn't authorized to list sessions." + }, + "bots_not_allowed": { + "desc": "Bot sessions are not listed by this method." + }, + "feature_not_enabled": { + "desc": "This method is only available to Enterprise customers." + }, + "invalid_auth": { + "desc": "The provided token doesn't have access to this endpoint." + }, + "invalid_cursor": { + "desc": "The cursor passed was invalid." + }, + "no_active_sessions": { + "desc": "No active sessions were found." + }, + "not_an_admin": { + "desc": "The owner of this token isn't an Org Owner or Admin." + }, + "missing_team": { + "desc": "A `team_id` must be provided with a `user_id`." + }, + "missing_user": { + "desc": "A `user_id` must be provided with a `team_id`." + }, + "team_not_found": { + "desc": "There was an error finding the requested workspace." + }, + "unknown_method": { + "desc": "This method is currently not available." + }, + "user_not_found": { + "desc": "There was an error finding the requested user." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.session.list?token=YOUR_TOKEN&team_id=T12345&user_id=U12345", + "description": "Typical success response", + "example": { + "ok": true, + "active_sessions": [ + { + "user_id": "U012S9M77JP", + "team_id": "E011E2SBBFC", + "session_id": 1112275520242, + "recent": { + "device_hardware": "Intel", + "os": "OS X", + "os_version": "10.15.7", + "slack_client_version": "91.0.4472.77", + "ip": "24.6.145.138" + }, + "created": { + "device_hardware": "Intel", + "os": "OS X", + "os_version": "10.15.7", + "slack_client_version": "91.0.4472.77", + "ip": "24.6.145.138" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.session.reset.json b/docs.slack.dev/methods/admin.users.session.reset.json new file mode 100644 index 00000000..e1439db8 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.session.reset.json @@ -0,0 +1,65 @@ +{ + "desc": "Wipes all valid sessions on all devices for a given user", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "user_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user_id": { + "desc": "The ID of the user to wipe sessions for", + "type": "string", + "example": "W12345678" + }, + "mobile_only": { + "desc": "Only expire mobile sessions (default: false)", + "type": "boolean" + }, + "web_only": { + "desc": "Only expire web sessions (default: false)", + "type": "boolean" + } + } + }, + "output": null, + "errors": { + "cannot_reset_bot": { + "desc": "Cannot reset bot users" + }, + "cannot_reset_primary_owner": { + "desc": "Only primary owner can reset primary owner's sessions" + }, + "feature_not_enabled": { + "desc": "This method is not available for this product level" + }, + "internal_error": { + "desc": "There was an internal error processing this request! Please try again." + }, + "invalid_auth": { + "desc": "The token doesn't have access to this endpoint" + }, + "not_an_admin": { + "desc": "This method is only accessible by org/compliance team owners and admins" + }, + "unknown_method": { + "desc": "This method is currently not available" + }, + "user_not_found": { + "desc": "Error fetching user" + }, + "user_session_reset_failed": { + "desc": "There was an error starting the session reset. Try again." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.session.resetBulk.json b/docs.slack.dev/methods/admin.users.session.resetBulk.json new file mode 100644 index 00000000..621284a2 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.session.resetBulk.json @@ -0,0 +1,97 @@ +{ + "desc": "Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "user_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user_ids": { + "desc": "The list of up to 1,000 user IDs to wipe sessions for", + "type": "array", + "items": { + "type": "string", + "schema": "user_id" + }, + "minItems": 1, + "maxItems": 1000, + "example": "[\"W12345678\", \"W98765432\"]" + }, + "mobile_only": { + "desc": "Only expire mobile sessions (default: false)", + "type": "boolean" + }, + "web_only": { + "desc": "Only expire web sessions (default: false)", + "type": "boolean" + } + } + }, + "output": null, + "errors": { + "cannot_reset_bot": { + "desc": "Cannot reset bot users" + }, + "cannot_reset_primary_owner": { + "desc": "Only primary owner can reset primary owner's sessions" + }, + "failed_for_some_users": { + "desc": "Some user ids failed to have their session invalidated. Details in extended comments" + }, + "feature_not_enabled": { + "desc": "This method is not available for this product level" + }, + "internal_error": { + "desc": "There was an internal error processing this request! Please try again." + }, + "invalid_auth": { + "desc": "The token doesn't have access to this endpoint" + }, + "not_an_admin": { + "desc": "This method is only accessible by org/compliance team owners and admins" + }, + "session_reset_not_allowed": { + "desc": "Only primary owner can reset primary owner's sessions" + }, + "unknown_method": { + "desc": "This method is currently not available" + }, + "user_not_found": { + "desc": "Error fetching user" + }, + "user_session_reset_failed": { + "desc": "There was an error starting the session reset. Try again." + }, + "restricted_action": { + "desc": "Restricted action." + } + }, + "examples": { + "success": { + "description": "Typical success response", + "url": "/api/admin.users.session.resetBulk?user_ids=%5B%22U1234%22%2C%20%22U2345%22%2C%20%22U3456%22%5D&token=YOUR_TOKEN", + "example": { + "ok": true + } + }, + "error": { + "description": "Typical error response", + "url": "/api/admin.users.session.resetBulk/api/admin.users.session.resetBulk?user_ids=%5B%22U1234%22%2C%20%22U2345%22%2C%20%22U3456%22%&token=INVALID_TOKEN", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.session.setSettings.json b/docs.slack.dev/methods/admin.users.session.setSettings.json new file mode 100644 index 00000000..3ef741c3 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.session.setSettings.json @@ -0,0 +1,113 @@ +{ + "desc": "Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users.", + "http_method": "POST", + "json_input_supported": true, + "scope": "admin.users:write", + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "user_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user_ids": { + "desc": "The list of up to 1,000 user IDs to apply the session settings for", + "type": "array", + "minItems": 1, + "maxItems": 1000, + "example": "['U12345','U67890']", + "items": { + "type": "string", + "schema": "user_id" + } + }, + "duration": { + "desc": "The session duration, in seconds. The minimum value is 28800, which represents 8 hours; the max value is 315569520 or 10 years (that's a long Slack session).", + "type": "integer", + "example": "86400", + "minimum": 180, + "maximum": 315569520, + "default": null + }, + "desktop_app_browser_quit": { + "desc": "Terminate the session when the client—either the desktop app or a browser window—is closed.", + "type": "boolean", + "example": "true", + "default": null + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "admin_unauthorized": { + "desc": "The token provided doesn't have permission to revoke a session." + }, + "at_least_one_session_setting_required": { + "desc": "At least one session setting is required." + }, + "bots_not_allowed": { + "desc": "Bot sessions are not listed by this method." + }, + "feature_not_enabled": { + "desc": "This method is only available for Enterprise organizations." + }, + "internal_error": { + "desc": "There was an internal error processing this request—please retry." + }, + "invalid_arguments": { + "desc": "Required arguments either were not provided or contain invalid values." + }, + "invalid_auth": { + "desc": "The token doesn't have access to this endpoint." + }, + "not_an_admin": { + "desc": "This method is only accessible by Org Owners and Admins" + }, + "ratelimited": { + "desc": "The rate limit for this endpoint has been reached." + }, + "unable_to_update_existing_sessions": { + "desc": "The session settings could not be applied to users' existing sessions." + }, + "unknown_method": { + "desc": "This method is currently not available." + }, + "user_not_found": { + "desc": "At least one of the requested users doesn't exist." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.session.setSettings?user_ids=%5B%27U1234%27%5D&duration=315569520&desktop_app_browser_quit=true&token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/admin.users.session.setSettings?user_ids=%5B%27U1234%27%5D&duration=315569520&desktop_app_browser_quit=true&token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.setAdmin.json b/docs.slack.dev/methods/admin.users.setAdmin.json new file mode 100644 index 00000000..4c6e920f --- /dev/null +++ b/docs.slack.dev/methods/admin.users.setAdmin.json @@ -0,0 +1,69 @@ +{ + "desc": "Set an existing regular user or owner to be a workspace admin.", + "http_method": "POST", + "scope": "admin.users:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "user_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID (`T1234`) of the workspace.", + "schema": "workspace_id" + }, + "user_id": { + "desc": "The ID of the user to designate as an admin.", + "type": "string", + "example": "W12345678", + "schema": "user_id" + } + } + }, + "output": null, + "errors": { + "cannot_modify_primary_owner": { + "desc": "The primary owner cannot be modified." + }, + "failed_to_set_user_to_admin": { + "desc": "Designating this user as an admin failed." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_permissions": { + "desc": "This method is only accessible by org owners and admins." + }, + "invalid_role_for_user": { + "desc": "The user cannot be made into an admin." + }, + "not_an_admin": { + "desc": "This method can only be accessed by org owners and admins." + }, + "team_not_found": { + "desc": "`team_id` was not found." + }, + "user_not_found": { + "desc": "The user was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.setAdmin?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.setExpiration.json b/docs.slack.dev/methods/admin.users.setExpiration.json new file mode 100644 index 00000000..2906bcc2 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.setExpiration.json @@ -0,0 +1,102 @@ +{ + "desc": "Set an expiration for a guest user", + "http_method": "POST", + "scope": "admin.users:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "user_id", + "expiration_ts" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID (`T1234`) of the workspace.", + "schema": "workspace_id" + }, + "user_id": { + "desc": "The ID of the user to set an expiration for.", + "type": "string", + "example": "W12345678", + "schema": "user_id" + }, + "expiration_ts": { + "desc": "Epoch timestamp in seconds when guest account should be disabled.", + "type": "integer", + "example": "1234567890" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "failed_looking_up_user": { + "desc": "We couldn't find the requested user." + }, + "failed_to_set_expiration": { + "desc": "The expiration could not be set for the user." + }, + "failed_to_validate_caller": { + "desc": "The token calling this method doesn't have permission to invite a user." + }, + "failed_to_validate_expiration": { + "desc": "`expiration_ts` was invalid." + }, + "failed_to_validate_team": { + "desc": "The team calling this method was invalid." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_arguments": { + "desc": "The passed arguments were invalid." + }, + "invalid_auth": { + "desc": "This action could not be authorized." + }, + "team_id_required_for_enterprise": { + "desc": "Team ID required." + }, + "team_not_found": { + "desc": "`team_id` was not found." + }, + "user_is_already_deleted": { + "desc": "The user has already been deleted and disabled." + }, + "user_is_deactivated": { + "desc": "User has been deactivated." + }, + "user_is_not_a_guest": { + "desc": "The passed user_id does not belong to a guest user." + }, + "user_not_found": { + "desc": "The user could not be found." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.setExpiration?token=YOUR_TOKEN&team_id=T1234&user_id=U1234&expiration_ts=12345", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.setOwner.json b/docs.slack.dev/methods/admin.users.setOwner.json new file mode 100644 index 00000000..add7a660 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.setOwner.json @@ -0,0 +1,70 @@ +{ + "desc": "Set an existing regular user or admin to be a workspace owner.", + "http_method": "POST", + "scope": "admin.users:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "user_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID (`T1234`) of the workspace.", + "schema": "workspace_id" + }, + "user_id": { + "desc": "Id of the user to promote to owner.", + "schema": "user_id" + } + } + }, + "output": null, + "errors": { + "cannot_modify_primary_owner": { + "desc": "The primary owner cannot be modified." + }, + "failed_to_set_user_to_owner": { + "desc": "The change to the user's role failed." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "invalid_role_for_user": { + "desc": "The user cannot be made into an owner." + }, + "not_an_admin": { + "desc": "This method can only be accessed by org owners and admins." + }, + "not_supported": { + "desc": "This is not a supported action." + }, + "team_not_found": { + "desc": "`team_id` was not found." + }, + "user_must_be_in_workspace": { + "desc": "This user must be a member of at least one workspace." + }, + "user_not_found": { + "desc": "The requested user was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.setOwner?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.setRegular.json b/docs.slack.dev/methods/admin.users.setRegular.json new file mode 100644 index 00000000..1feee035 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.setRegular.json @@ -0,0 +1,65 @@ +{ + "desc": "Set an existing guest user, admin user, or owner to be a regular user.", + "http_method": "POST", + "scope": "admin.users:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "team_id", + "user_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "The ID (`T1234`) of the workspace.", + "schema": "workspace_id" + }, + "user_id": { + "desc": "The ID of the user to designate as a regular user.", + "type": "string", + "example": "W12345678" + } + } + }, + "output": null, + "errors": { + "cannot_set_this_guest_to_regular_at_team_level": { + "desc": "This guest cannot be set to regular because they are active on multiple workspaces." + }, + "cannot_modify_primary_owner": { + "desc": "The primary owner cannot be modified." + }, + "failed_to_set_user_to_regular": { + "desc": "Changing a user to a regular member failed." + }, + "feature_not_enabled": { + "desc": "The Admin APIs feature is not enabled for this team." + }, + "not_an_admin": { + "desc": "This method can only be accessed by org owners and admins." + }, + "team_not_found": { + "desc": "`team_id` was not found." + }, + "user_not_found": { + "desc": "The requested user was not found." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.setRegular?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.users.unsupportedVersions.export.json b/docs.slack.dev/methods/admin.users.unsupportedVersions.export.json new file mode 100644 index 00000000..4d829f85 --- /dev/null +++ b/docs.slack.dev/methods/admin.users.unsupportedVersions.export.json @@ -0,0 +1,60 @@ +{ + "desc": "Ask Slackbot to send you an export listing all workspace members using unsupported software, presented as a zipped CSV file.", + "http_method": "POST", + "scope": "admin.users:read", + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "date_sessions_started": { + "desc": "Unix timestamp of a date to start looking for user sessions. If not provided will start six months ago.", + "type": "integer", + "default": 0 + }, + "date_end_of_support": { + "desc": "Unix timestamp of the date of past or upcoming end of support cycles. If not provided will include all announced end of support cycles.", + "type": "integer", + "default": 0 + } + } + }, + "output": null, + "errors": { + "could_not_export": { + "desc": "For some reason, the export could not be started" + }, + "invalid_auth": { + "desc": "Invalid authentication token provided." + }, + "invalid_team_id": { + "desc": "The team ID passed is invalid" + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "not_authed": { + "desc": "No authentication token provided." + }, + "not_an_enterprise": { + "desc": "Only enterprises are supported." + } + }, + "examples": { + "success": { + "url": "/api/admin.users.unsupportedVersions.export?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.workflows.collaborators.add.json b/docs.slack.dev/methods/admin.workflows.collaborators.add.json new file mode 100644 index 00000000..e22285cc --- /dev/null +++ b/docs.slack.dev/methods/admin.workflows.collaborators.add.json @@ -0,0 +1,54 @@ +{ + "desc": "Add collaborators to workflows within the team or enterprise", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.workflows:write" + }, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "workflow_ids", + "collaborator_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "workflow_ids": { + "type": "array", + "desc": "Array of workflow IDs to edit; max 50", + "items": { + "schema": "workflow_id" + }, + "minItems": 1, + "maxItems": 50 + }, + "collaborator_ids": { + "type": "array", + "desc": "Array of collaborators (encoded user IDs) to add; max 50", + "items": { + "subtype": "user", + "schema": "user_id" + }, + "minItems": 1, + "maxItems": 50 + } + } + }, + "output": {}, + "errors": { + "not_allowed": { + "desc": "The user is not allowed to access this API method" + }, + "error_adding_collaborators": { + "desc": "There were one or more errors adding workflow collaborators" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.workflows.collaborators.remove.json b/docs.slack.dev/methods/admin.workflows.collaborators.remove.json new file mode 100644 index 00000000..66fb65db --- /dev/null +++ b/docs.slack.dev/methods/admin.workflows.collaborators.remove.json @@ -0,0 +1,54 @@ +{ + "desc": "Remove collaborators from workflows within the team or enterprise", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.workflows:write" + }, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "workflow_ids", + "collaborator_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "workflow_ids": { + "type": "array", + "desc": "Array of workflow IDs to edit; max 50", + "items": { + "schema": "workflow_id" + }, + "minItems": 1, + "maxItems": 50 + }, + "collaborator_ids": { + "type": "array", + "desc": "Array of collaborators (encoded user IDs) to remove; max 50", + "items": { + "subtype": "user", + "schema": "user_id" + }, + "minItems": 1, + "maxItems": 50 + } + } + }, + "output": {}, + "errors": { + "not_allowed": { + "desc": "The user is not allowed to access this API method" + }, + "error_removing_collaborators": { + "desc": "There were one or more errors adding workflow collaborators" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.workflows.permissions.lookup.json b/docs.slack.dev/methods/admin.workflows.permissions.lookup.json new file mode 100644 index 00000000..29bf0421 --- /dev/null +++ b/docs.slack.dev/methods/admin.workflows.permissions.lookup.json @@ -0,0 +1,58 @@ +{ + "desc": "Look up the permissions for a set of workflows", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.workflows:read" + }, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "workflow_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "workflow_ids": { + "desc": "An array of workflow IDs to look up permissions for", + "type": "array", + "minItems": 1, + "maxItems": 50, + "items": { + "schema": "workflow_id" + } + }, + "max_workflow_triggers": { + "desc": "Maximum number of triggers to fetch for each workflow when determining overall run permissions; max 1000", + "type": "integer", + "default": 100, + "maximum": 1000, + "minimum": 1 + } + } + }, + "output": { + "type": "object", + "required": [ + "permissions" + ], + "properties": {} + }, + "errors": {}, + "examples": { + "success": { + "url": "/api/admin.worksflows.permissions?token=YOUR_TOKEN&workflow_ids=Wf123,Wf456", + "description": "Typical success response", + "example": { + "ok": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.workflows.search.json b/docs.slack.dev/methods/admin.workflows.search.json new file mode 100644 index 00000000..3385d2de --- /dev/null +++ b/docs.slack.dev/methods/admin.workflows.search.json @@ -0,0 +1,393 @@ +{ + "desc": "Search workflows within the team or enterprise", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.workflows:read" + }, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "query": { + "type": "string", + "desc": "A search query to filter for workflow name or description", + "example": "Time off" + }, + "app_id": { + "desc": "The parent app ID for which to return workflows", + "example": "A12345", + "schema": "app_id" + }, + "cursor": { + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "limit": { + "desc": "The number of results that will be returned by the API on each invocation", + "example": "20", + "type": "integer", + "default": 20, + "minimum": 1, + "maximum": 50 + }, + "no_collaborators": { + "desc": "Only include workflows with no collaborators in the result; default is false", + "type": "boolean", + "default": false + }, + "collaborator_ids": { + "desc": "Only include workflows where all of the provided user IDs are a manager/collaborator of that workflow", + "type": "array", + "items": { + "type": "string" + } + }, + "num_trigger_ids": { + "desc": "Number of trigger IDs to fetch for each workflow; default is 10", + "type": "integer", + "default": 10, + "maximum": 100 + }, + "is_sales_elevate": { + "type": "boolean", + "desc": "Filter workflows by their Sales Elevate status" + }, + "source": { + "desc": "Source of workflow creation, either from code or workflow builder", + "type": "string", + "enum": [ + "code", + "workflow_builder", + "sales_home" + ] + }, + "sort": { + "desc": "The field used to sort the returned workflows", + "type": "string", + "default": "name", + "enum": [ + "name" + ] + }, + "sort_dir": { + "desc": "Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or (c, b, a)", + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ] + }, + "trigger_type_id": { + "desc": "Only include workflows with this trigger type", + "type": "string", + "schema": "function_trigger_type_id" + }, + "publish_status": { + "desc": "Filter workflows by their published status", + "type": "string", + "enum": [ + "all", + "published", + "unpublished" + ], + "default": "published" + }, + "step_function_ids": { + "desc": "Only include workflows that use all of the provided step function ids", + "type": "array", + "items": { + "schema": "function_id" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "workflows", + "total_found" + ], + "properties": { + "workflows": { + "type": "array", + "items": { + "schema": "workflow-with-trigger-ids" + } + }, + "response_metadata": { + "schema": "response_metadata_new" + }, + "total_found": { + "type": "integer", + "desc": "The total number of workflows that match this search criteria" + } + } + }, + "errors": { + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "not_allowed": { + "desc": "The user is not allowed to access this API method." + } + }, + "examples": { + "success": { + "url": "/api/admin.workflows.list?token=YOUR_TOKEN&limit=2", + "description": "Typical success response", + "example": { + "ok": true, + "total_found": 2, + "workflows": [ + { + "id": "Wf014FQ97ZT5", + "workflow_function_id": "Fn014EPW7SBU", + "callback_id": "untitled_workflow", + "title": "Hello there", + "description": "A brand new workflow", + "input_parameters": { + "Ft014FQ980RZ__user_id": { + "type": "slack#/reference/objects/user-object_id", + "name": "Ft014FQ980RZ__user_id", + "description": "User who reacted to the message", + "title": "User who reacted to the message", + "is_required": false + }, + "Ft014FQ980RZ__message_context": { + "type": "slack#/types/message_context", + "name": "Ft014FQ980RZ__message_context", + "description": "Reference to the message that was reacted to", + "title": "Reference to the message that was reacted to", + "is_required": true + } + }, + "steps": [ + { + "id": "a1468ed7-82a2-4d3a-8598-d67194a10148", + "function_id": "Fn010P", + "inputs": { + "message": { + "value": [ + { + "type": "rich_text", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "text": "Hello ", + "type": "text" + }, + { + "id": "{{inputs.Ft014FQ980RZ__user_id}}", + "type": "workflowtoken", + "property": "", + "data_type": "slack#/reference/objects/user-object_id" + } + ] + } + ] + } + ], + "locked": false + }, + "message_context": { + "value": "{{inputs.Ft014FQ980RZ__message_context}}", + "locked": false + }, + "reply_broadcast": { + "value": "false", + "locked": false + } + } + } + ], + "collaborators": [ + "U014FM2DQF5" + ], + "icons": { + "image_96": "https://slack-pantry.dev.slack.com/11d89af/img/apps/workflows_96.png", + "image_192": "https://slack-pantry.dev.slack.com/11d89af/img/apps/workflows_192.png" + }, + "is_published": true, + "last_updated_by": "U014FM2DQF5", + "unpublished_change_count": 0, + "app_id": "A014EPW7S3U", + "source": "workflow_builder", + "billing_type": "simple", + "date_updated": 1715661162, + "is_billable": false, + "creation_source_type": 1, + "creation_source_id": "Wt06DWT50W57", + "last_published_version_id": "Wfv014FQ9NHCK", + "last_published_date": "1674675746", + "trigger_ids": [ + "Ft050QQ638NS" + ], + "is_sales_home_workflow": false, + "is_sales_elevate": false, + "trigger_types": [ + { + "id": "Ftt0102", + "type": "event", + "subtype": "slack#/events/reaction_added" + } + ] + }, + { + "id": "Wf014HH0GN9G", + "workflow_function_id": "Fn014HH0GN82", + "callback_id": "give_kudos_workflow", + "title": "Give kudos", + "description": "Acknowledge the impact someone had on you", + "input_parameters": { + "interactivity": { + "type": "slack#/types/interactivity", + "name": "interactivity", + "title": "Interactivity", + "is_required": true + } + }, + "steps": [ + { + "id": "0", + "function_id": "Fn010N", + "inputs": { + "title": { + "value": "Give someone kudos", + "locked": false + }, + "fields": { + "value": { + "elements": [ + { + "name": "doer_of_good_deeds", + "type": "slack#/reference/objects/user-object_id", + "title": "Whose deeds are deemed worthy of a kudo?", + "description": "Recognizing such deeds is dazzlingly desirable of you!" + }, + { + "name": "kudo_channel", + "type": "slack#/reference/objects/channel-object_id", + "title": "Where should this message be shared?" + }, + { + "long": true, + "name": "kudo_message", + "type": "string", + "title": "What would you like to say?" + }, + { + "enum": [ + "Appreciation for someone 🫂", + "Celebrating a victory 🏆", + "Thankful for great teamwork ⚽️", + "Amazed at awesome work ☄️", + "Excited for the future 🎉", + "No vibes, just plants 🪴" + ], + "name": "kudo_vibe", + "type": "string", + "title": "What is this kudo's \"vibe\"?", + "description": "What sorts of energy is given off?" + } + ], + "required": [ + "doer_of_good_deeds", + "kudo_channel", + "kudo_message" + ] + }, + "locked": false + }, + "description": { + "value": "Continue the positive energy through your written word", + "locked": false + }, + "submit_label": { + "value": "Share", + "locked": false + }, + "interactivity": { + "value": "{{inputs.interactivity}}", + "locked": false + } + } + }, + { + "id": "1", + "function_id": "Fn014JHDUP3M", + "inputs": { + "vibe": { + "value": "{{steps.0.fields.kudo_vibe}}", + "locked": false + } + } + }, + { + "id": "2", + "function_id": "Fn0102", + "inputs": { + "message": { + "value": "*Hey <@{{steps.0.fields.doer_of_good_deeds}}>!* Someone wanted to share some kind words with you :otter:\n> {{steps.0.fields.kudo_message}}\n{{steps.1.URL}}", + "locked": false + }, + "channel_id": { + "value": "{{steps.0.fields.kudo_channel}}", + "locked": false + } + } + } + ], + "collaborators": [ + "U014ELP4Z9Q" + ], + "icons": { + "image_96": "https://example.com/avatars/2023-03-01/1153578567186_dd65b1ee58919c5d8665_96.png", + "image_192": "https://example.com/avatars/2023-03-01/1153578567186_dd65b1ee58919c5d8665_192.png" + }, + "is_published": true, + "last_updated_by": "U014ELP4Z9Q", + "unpublished_change_count": 0, + "app_id": "A014HH0GN7L", + "source": "app", + "billing_type": "complex", + "date_updated": 1715661162, + "is_billable": true, + "creation_source_type": 1, + "creation_source_id": "Wt06DWT50W57", + "last_published_version_id": "Wfv014JHDUP4K", + "last_published_date": "1677682235", + "trigger_ids": [ + "Ft0481M8V85R" + ], + "is_sales_home_workflow": false, + "is_sales_elevate": false, + "trigger_types": [ + { + "id": "Ftt0101", + "type": "shortcut" + } + ] + } + ], + "response_metadata": { + "next_cursor": "aWQ6MTE1MzU3ODU2NjMyMg==" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.workflows.triggers.types.permissions.lookup.json b/docs.slack.dev/methods/admin.workflows.triggers.types.permissions.lookup.json new file mode 100644 index 00000000..c62667bd --- /dev/null +++ b/docs.slack.dev/methods/admin.workflows.triggers.types.permissions.lookup.json @@ -0,0 +1,81 @@ +{ + "desc": "list the permissions for using each trigger type", + "http_method": "POST", + "scope": "client", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "trigger_type_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "trigger_type_ids": { + "type": "array", + "minItems": 1, + "maxItems": 1000, + "desc": "The trigger types IDs for which to get the permissions", + "example": "['FTT01', 'FTT02', 'FTT03']", + "items": { + "schema": "function_trigger_type_id" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "permissions", + "metadata" + ], + "properties": { + "metadata": { + "type": "object", + "patternProperties": { + "^Ftt[A-Z0-9]{4,}$": { + "type": "object", + "required": [ + "date_released", + "workflows_using", + "available_in_workflow_builder" + ], + "properties": { + "date_released": { + "type": "integer", + "desc": "the date this trigger type was released" + }, + "workflows_using": { + "type": "integer", + "desc": "the number of workflows with a trigger of this type" + }, + "available_in_workflow_builder": { + "type": "boolean", + "desc": "Is the trigger available for use in workflow builder" + } + } + } + } + } + } + }, + "errors": { + "restricted_action": { + "desc": "This actor does not have access to view the permissions on this resource" + }, + "trigger_type_id_not_found": { + "desc": "The given trigger type ID(s) do not map to valid trigger types" + } + }, + "warnings": { + "one_or_more_trigger_type_ids_not_found": { + "desc": "One or more of the given IDs do not map to a valid trigger type" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.workflows.triggers.types.permissions.set.json b/docs.slack.dev/methods/admin.workflows.triggers.types.permissions.set.json new file mode 100644 index 00000000..20e06af1 --- /dev/null +++ b/docs.slack.dev/methods/admin.workflows.triggers.types.permissions.set.json @@ -0,0 +1,61 @@ +{ + "desc": "Set the permissions for using a trigger type", + "http_method": "POST", + "scope": "client", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "id", + "visibility" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "id": { + "desc": "The trigger type ID for which to set the permissions", + "example": "['FTT01', 'FTT02', 'FTT03']", + "schema": "function_trigger_type_id" + }, + "visibility": { + "type": "string", + "desc": "The function visibility", + "enum": [ + "everyone", + "named_entities", + "no_one" + ] + }, + "user_ids": { + "type": "array", + "desc": "List of user IDs to allow for named_entities visibility", + "example": "['U00000001', 'U00000002', 'U00000003']", + "items": { + "schema": "user_id" + }, + "maxItems": 50 + } + } + }, + "output": null, + "errors": { + "restricted_action": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "trigger_type_id_not_found": { + "desc": "The referenced trigger type ID does not exist." + }, + "visibility_is_not_named_entities": { + "desc": "The visibility should be named enitites when the user_ids, team_ids, or org_ids args are set" + }, + "invalid_named_entities": { + "desc": "Named entities visibility requires a valid set of named entities to be specified" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/admin.workflows.unpublish.json b/docs.slack.dev/methods/admin.workflows.unpublish.json new file mode 100644 index 00000000..89b61b12 --- /dev/null +++ b/docs.slack.dev/methods/admin.workflows.unpublish.json @@ -0,0 +1,43 @@ +{ + "desc": "Unpublish workflows within the team or enterprise", + "http_method": "POST", + "scope": "read", + "scope_by_token_type": { + "oauth": "admin.workflows:write" + }, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "workflow_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "workflow_ids": { + "type": "array", + "desc": "Array of workflow IDs to unpublish", + "items": { + "schema": "workflow_id" + }, + "minItems": 1, + "maxItems": 50 + } + } + }, + "output": {}, + "errors": { + "not_allowed": { + "desc": "The user is not allowed to access this API method" + }, + "error_unpublishing_workflows": { + "desc": "There were one or more errors unpublishing workflows" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/api.test.json b/docs.slack.dev/methods/api.test.json new file mode 100644 index 00000000..25fcad4f --- /dev/null +++ b/docs.slack.dev/methods/api.test.json @@ -0,0 +1,55 @@ +{ + "desc": "Checks API calling code.", + "http_method": "POST", + "scope": "none", + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "properties": { + "error": { + "type": "string", + "desc": "Error response to return", + "example": "my_error" + } + } + }, + "output": { + "type": "object", + "properties": { + "args": { + "type": "object" + } + } + }, + "examples": { + "success": { + "description": "Standard success response", + "url": "/api/api.test", + "example": { + "ok": true + } + }, + "success_with_params": { + "description": "Artificial parameter echoing response by passing `foo=bar`", + "url": "/api/api.test?foo=bar", + "example": { + "ok": true, + "args": { + "foo": "bar" + } + } + }, + "error": { + "description": "Artificial error response", + "url": "/api/api.test?error=my_error", + "example": { + "ok": false, + "error": "my_error", + "args": { + "error": "my_error" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.activities.list.json b/docs.slack.dev/methods/apps.activities.list.json new file mode 100644 index 00000000..a1ee88ad --- /dev/null +++ b/docs.slack.dev/methods/apps.activities.list.json @@ -0,0 +1,167 @@ +{ + "desc": "Get logs for a specified app", + "http_method": "POST", + "scope": "hosting:read", + "json_input_supported": false, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "app_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "example": "A12345", + "desc": "The id of the app to get activities from.", + "schema": "app_id" + }, + "team_id": { + "type": "string", + "example": "T12345", + "desc": "The team who owns this log." + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "bG9nX2lkOjc5NjQ1NA==", + "type": "string" + }, + "limit": { + "desc": "The maximum number of items to return.", + "example": "100", + "type": "integer" + }, + "min_log_level": { + "desc": "The minimum log level of the log events to be returned. Defaults to 'info'. Acceptable values (in order of relative importance from smallest to largest) are ('trace', 'debug', 'info', 'warn', 'error', 'fatal').", + "example": "info", + "type": "string" + }, + "log_event_type": { + "desc": "The event type of log events to be returned.", + "example": "test_log_event", + "type": "string" + }, + "source": { + "desc": "The source of log events to be returned. Acceptable values are ('slack', 'developer').", + "example": "slack", + "type": "string" + }, + "component_type": { + "desc": "The component type of log events to be returned. Acceptable values are ('events_api', 'workflows', 'functions', 'tables').", + "example": "workflows", + "type": "string" + }, + "component_id": { + "desc": "The component id of log events to be returned. Will be 'FnXXXXXX' for functions, and 'WfXXXXXX' for workflows", + "example": "Wf013SMGL4V9", + "type": "string" + }, + "trace_id": { + "desc": "The trace id of log events to be returned.", + "example": "Tr432f2", + "type": "string" + }, + "min_date_created": { + "desc": "The earliest timestamp of the log to retrieve (epoch microseconds).", + "example": "1646665572336251", + "type": "integer" + }, + "max_date_created": { + "desc": "The latest timestamp of the log to retrieve (epoch microseconds).", + "example": "1646665572336299", + "type": "integer" + }, + "sort_direction": { + "desc": "The direction you want the data sorted by (always by timestamp)", + "type": "string", + "example": "asc", + "enum": [ + "asc", + "desc" + ] + } + } + }, + "output": { + "type": "object", + "required": [ + "activities" + ], + "properties": { + "activities": { + "items": { + "schema": "activity" + }, + "type": "array" + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "internal_error": { + "desc": "Something went wrong on our end, please try again." + }, + "invalid_app_id": { + "desc": "App ID provided is not valid." + }, + "invalid_app": { + "desc": "App ID provided is not valid for team and user." + }, + "invalid_args": { + "desc": "Required arguments either were not provided or contain invalid values." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "free_team_not_allowed": { + "desc": "Feature is only available on a paid team." + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.activities.list", + "description": "Typical success response", + "example": { + "ok": true, + "activities": [ + { + "level": "info", + "event_type": "function_execution_started", + "source": "slack", + "component_type": "functions", + "component_id": "Fn123", + "payload": { + "function_name": "Reverse", + "function_type": "app" + }, + "created": 1650463798824317, + "trace_id": "Tr123" + } + ], + "response_metadata": { + "next_cursor": "" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.auth.external.delete.json b/docs.slack.dev/methods/apps.auth.external.delete.json new file mode 100644 index 00000000..a5f489e1 --- /dev/null +++ b/docs.slack.dev/methods/apps.auth.external.delete.json @@ -0,0 +1,62 @@ +{ + "desc": "Delete external auth tokens only on the Slack side", + "http_method": "POST", + "scope": "none", + "no_scope_required": true, + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "desc": "The id of the app whose tokens you want to delete", + "example": "A12345", + "type": "string" + }, + "provider_key": { + "desc": "The provider key of the provider whose tokens you want to delete", + "type": "string" + }, + "external_token_id": { + "desc": "The id of the token that you want to delete", + "type": "string" + } + } + }, + "output": null, + "errors": { + "unable_to_delete": { + "desc": "There was an error deleting tokens" + }, + "providers_not_found": { + "desc": "The provided `provider_key` is invalid" + }, + "no_tokens_found": { + "desc": "No tokens found to delete" + }, + "method_not_supported": { + "desc": "This API method is not supported" + }, + "app_not_found": { + "desc": "The provided `app_id` was not found" + }, + "token_not_found": { + "desc": "The token pointed to by the external_token_id input is not found" + }, + "invalid_auth": { + "desc": "The token used to invoke this API doesn't have permission to delete the token pointed to by the external_token_id input" + }, + "invalid_args": { + "desc": "The arguments provided to this API are invalid" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.auth.external.get.json b/docs.slack.dev/methods/apps.auth.external.get.json new file mode 100644 index 00000000..2caf05fd --- /dev/null +++ b/docs.slack.dev/methods/apps.auth.external.get.json @@ -0,0 +1,81 @@ +{ + "desc": "Get the access token for the provided token ID", + "http_method": "POST", + "scope": "none", + "no_scope_required": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "external_token_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "external_token_id": { + "desc": "The id of the token you want to get the token for", + "example": "Et12345ABCDE", + "type": "string" + }, + "force_refresh": { + "desc": "Always refresh existing token before returning even when the token has not expired", + "example": "true", + "type": "boolean" + } + } + }, + "output": { + "required": [ + "external_token", + "token_response_extras" + ], + "type": "object", + "properties": { + "external_token": { + "type": "string" + }, + "token_response_extras": { + "type": [ + "object", + "null" + ] + } + } + }, + "errors": { + "token_not_found": { + "desc": "No token found for the passed external_token_id" + }, + "method_not_supported": { + "desc": "This API method is not supported" + }, + "no_refresh_token": { + "desc": "No refresh token found for the passed external_token_id" + }, + "access_token_exchange_failed": { + "desc": "There was an error while attempting to exchange or refresh token" + } + }, + "examples": { + "success": { + "description": "Typical success response", + "example": { + "ok": true, + "external_token": "00D3j00000025Zh!AQ4AQMAl46qme3wdZiKo5j3WHcJujZXoB0FtsFuC5JxWZdje2aiecF9vY5KdY5wTPUZIYBekIraDWuw_u_ZUgeIA1.opF6L9" + } + }, + "error": { + "description": "Typical error response", + "example": { + "ok": false, + "error": "not_allowed_token_type" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.connections.open.json b/docs.slack.dev/methods/apps.connections.open.json new file mode 100644 index 00000000..6490eda5 --- /dev/null +++ b/docs.slack.dev/methods/apps.connections.open.json @@ -0,0 +1,61 @@ +{ + "desc": "Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over.", + "http_method": "POST", + "scope": "connections:write", + "rate_limits": "t3", + "json_input_supported": true, + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "desc": "The URL to connect to.", + "type": "string", + "subtype": "auth" + } + } + }, + "errors": { + "forbidden_team": { + "desc": "The authenticated team cannot use this API" + }, + "insecure_request": { + "desc": "The method was not called via a `POST` request." + }, + "internal_error": { + "desc": "An unexpected exception with the service has occurred." + }, + "invalid_auth": { + "desc": "The provided [app-level token](/authentication/tokens#app) wasn't valid." + }, + "missing_args": { + "desc": "An [app-level token](/authentication/tokens#app) wasn't provided." + } + }, + "examples": { + "success": { + "url": "/api/apps.connections.open?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "url": "wss://wss-somethiing.slack.com/link/?ticket=12348&app_id=5678" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.datastore.bulkDelete.json b/docs.slack.dev/methods/apps.datastore.bulkDelete.json new file mode 100644 index 00000000..ee0129a9 --- /dev/null +++ b/docs.slack.dev/methods/apps.datastore.bulkDelete.json @@ -0,0 +1,118 @@ +{ + "desc": "Delete items from a datastore in bulk", + "http_method": "POST", + "scope": "datastore:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "datastore", + "ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "ids": { + "desc": "IDs of items to be deleted", + "example": "[\"7c6dd137\", \"c7d6d731\"]", + "type": "array", + "minItems": 1, + "maxItems": 25, + "items": { + "type": "string" + } + }, + "app_id": { + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "properties": { + "failed_items": { + "desc": "attribute names and values of the items that failed to be processed", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "The request is missing required arguments." + }, + "invalid_datastore": { + "desc": "The provided datastore is invalid." + }, + "invalid_auth": { + "desc": "Not authorized to create datastore items." + }, + "app_not_hosted": { + "desc": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps." + }, + "datastore_error": { + "desc": "Datastore error" + }, + "access_denied": { + "desc": "Not authorized to access the datastore." + }, + "invalid_app_id": { + "desc": "The app_id provided is not valid for team and user." + }, + "free_team_not_allowed": { + "desc": "Datastore put not allowed on a free team." + }, + "team_quota_exceeded": { + "desc": "Total number of requests exceeded team quota." + }, + "datastore_migration_in_progress": { + "desc": "The datastore is currently unavailable due to an in progress Enterprise org migration." + }, + "unknown_method": { + "desc": "This method does not exist" + }, + "partial_failure": { + "desc": "some items failed to be deleted" + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.datastore.bulkDelete", + "description": "Typical success response", + "example": { + "ok": true, + "failed_items": [] + } + }, + "error": { + "url": "/api/apps.datastore.bulkDelete", + "description": "Error response for invalid datastore parameter", + "example": { + "ok": false, + "error": "datastore_error", + "errors": [ + { + "code": "datastore_config_not_found", + "message": "The datastore configuration could not be found", + "pointer": "/datastores" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.datastore.bulkGet.json b/docs.slack.dev/methods/apps.datastore.bulkGet.json new file mode 100644 index 00000000..d013902e --- /dev/null +++ b/docs.slack.dev/methods/apps.datastore.bulkGet.json @@ -0,0 +1,131 @@ +{ + "desc": "Get items from a datastore in bulk", + "http_method": "POST", + "scope": "datastore:read", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "datastore", + "ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "ids": { + "desc": "items' ids", + "example": "[\"7c6dd137\", \"c7d6d731\"]", + "type": "array", + "minItems": 1, + "maxItems": 25, + "items": { + "type": "string" + } + }, + "app_id": { + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "properties": { + "items": { + "desc": "array of attribute names and values of each item", + "type": "array", + "items": { + "type": "object" + } + }, + "failed_items": { + "desc": "attribute names and values of the items that failed to be processed", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "The request is missing required arguments." + }, + "invalid_datastore": { + "desc": "The provided datastore is invalid." + }, + "invalid_auth": { + "desc": "Not authorized to create datastore items." + }, + "app_not_hosted": { + "desc": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps." + }, + "datastore_error": { + "desc": "Datastore error" + }, + "access_denied": { + "desc": "Not authorized to access the datastore." + }, + "invalid_app_id": { + "desc": "The app_id provided is not valid for team and user." + }, + "free_team_not_allowed": { + "desc": "Datastore put not allowed on a free team." + }, + "team_quota_exceeded": { + "desc": "Total number of requests exceeded team quota." + }, + "datastore_migration_in_progress": { + "desc": "The datastore is currently unavailable due to an in progress Enterprise org migration." + }, + "unknown_method": { + "desc": "This method does not exist" + }, + "partial_failure": { + "desc": "some items failed to be retrieved" + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.datastore.bulkGet", + "description": "Typical success response", + "example": { + "ok": true, + "datastore": "delicious_meals", + "items": [ + { + "id": "12462", + "meal": "Shawarma" + } + ] + } + }, + "error": { + "url": "/api/apps.datastore.bulkGet", + "description": "Error response for invalid datastore parameter", + "example": { + "ok": false, + "error": "datastore_error", + "errors": [ + { + "code": "datastore_config_not_found", + "message": "The datastore configuration could not be found", + "pointer": "/datastores" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.datastore.bulkPut.json b/docs.slack.dev/methods/apps.datastore.bulkPut.json new file mode 100644 index 00000000..a1c5d895 --- /dev/null +++ b/docs.slack.dev/methods/apps.datastore.bulkPut.json @@ -0,0 +1,123 @@ +{ + "desc": "Creates or replaces existing items in bulk", + "http_method": "POST", + "scope": "datastore:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "datastore", + "items" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "items": { + "desc": "attribute names and values of the items; limit of 25", + "example": "[{\"id\": \"7c6dd137\", \"favourite_meal\": \"Shawarma\", \"reason\": \"Who doesn't like Shawarma?\"}]", + "type": "array", + "minItems": 1, + "maxItems": 25, + "items": { + "type": "object" + } + }, + "app_id": { + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "properties": { + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "failed_items": { + "desc": "attribute names and values of the items that failed to be processed", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "The request is missing required arguments." + }, + "invalid_datastore": { + "desc": "The provided datastore is invalid." + }, + "invalid_auth": { + "desc": "Not authorized to create datastore items." + }, + "app_not_hosted": { + "desc": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps." + }, + "datastore_error": { + "desc": "Datastore error" + }, + "access_denied": { + "desc": "Not authorized to access the datastore." + }, + "invalid_app_id": { + "desc": "The app_id provided is not valid for team and user." + }, + "free_team_not_allowed": { + "desc": "Datastore put not allowed on a free team." + }, + "team_quota_exceeded": { + "desc": "Total number of requests exceeded team quota." + }, + "datastore_migration_in_progress": { + "desc": "The datastore is currently unavailable due to an in progress Enterprise org migration." + }, + "unknown_method": { + "desc": "This method does not exist" + }, + "partial_failure": { + "desc": "some items failed to be updated" + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.datastore.bulkPut", + "description": "Typical success response", + "example": { + "ok": true, + "datastore": "delicious_meals", + "failed_items": [] + } + }, + "error": { + "url": "/api/apps.datastore.bulkPut", + "description": "Error response for invalid datastore parameter", + "example": { + "ok": false, + "error": "datastore_error", + "errors": [ + { + "code": "datastore_config_not_found", + "message": "The datastore configuration could not be found", + "pointer": "/datastores" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.datastore.count.json b/docs.slack.dev/methods/apps.datastore.count.json new file mode 100644 index 00000000..c5aec08f --- /dev/null +++ b/docs.slack.dev/methods/apps.datastore.count.json @@ -0,0 +1,120 @@ +{ + "desc": "Count the number of items in a datastore that match a query", + "http_method": "POST", + "scope": "datastore:read", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "datastore" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "datastore": { + "desc": "Name of the datastore", + "type": "string" + }, + "expression": { + "desc": "A query filter expression", + "type": "string", + "example": "#artist = :artist_name" + }, + "expression_attributes": { + "desc": "A map of attributes referenced in expression", + "type": "object", + "example": "{ \"#artist\": \"artist\" }" + }, + "expression_values": { + "desc": "A map of values referenced in expression", + "type": "object", + "example": "{ \":artist_name\": \"Fred Rogers\" }" + }, + "app_id": { + "desc": "Required if calling with user token", + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "properties": { + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "count": { + "desc": "number of matching items", + "example": "5", + "type": "integer" + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "The request is missing required arguments." + }, + "invalid_datastore": { + "desc": "The provided datastore is invalid." + }, + "invalid_auth": { + "desc": "Not authorized to access datastore items." + }, + "app_not_hosted": { + "desc": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps." + }, + "datastore_error": { + "desc": "Datastore error" + }, + "access_denied": { + "desc": "Not authorized to access the datastore." + }, + "invalid_app_id": { + "desc": "The app_id provided is not valid for team and user." + }, + "free_team_not_allowed": { + "desc": "Datastore query not allowed on a free team." + }, + "team_quota_exceeded": { + "desc": "Total number of requests exceeded team quota." + }, + "datastore_migration_in_progress": { + "desc": "The datastore is currently unavailable due to an in progress Enterprise org migration." + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.datastore.count", + "description": "Typical success response", + "example": { + "ok": true, + "datastore": "good_tunes", + "count": 2 + } + }, + "error": { + "url": "/api/apps.datastore.count", + "description": "Error response for invalid datastore parameter", + "example": { + "ok": false, + "error": "datastore_error", + "errors": [ + { + "code": "datastore_config_not_found", + "message": "The datastore configuration could not be found", + "pointer": "/datastores" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.datastore.delete.json b/docs.slack.dev/methods/apps.datastore.delete.json new file mode 100644 index 00000000..d46b0e17 --- /dev/null +++ b/docs.slack.dev/methods/apps.datastore.delete.json @@ -0,0 +1,92 @@ +{ + "desc": "Delete an item from a datastore", + "http_method": "POST", + "scope": "datastore:write", + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "datastore", + "id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "id": { + "desc": "item id", + "type": "string", + "minLength": 1 + }, + "app_id": { + "schema": "app_id" + } + } + }, + "output": null, + "errors": { + "invalid_arguments": { + "desc": "The request is missing required arguments." + }, + "invalid_datastore": { + "desc": "The provided datastore is invalid." + }, + "invalid_auth": { + "desc": "Not authorized to delete datastore items." + }, + "app_not_hosted": { + "desc": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps." + }, + "datastore_error": { + "desc": "Datastore error" + }, + "access_denied": { + "desc": "Not authorized to access the datastore." + }, + "invalid_app_id": { + "desc": "The app_id provided is not valid for team and user." + }, + "free_team_not_allowed": { + "desc": "Datastore delete not allowed on a free team." + }, + "datastore_migration_in_progress": { + "desc": "The datastore is currently unavailable due to an in progress Enterprise org migration." + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.datastore.delete", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/apps.datastore.delete", + "description": "Error response for invalid datastore parameter", + "example": { + "ok": false, + "error": "datastore_error", + "errors": [ + { + "code": "datastore_config_not_found", + "message": "The datastore configuration could not be found", + "pointer": "/datastores" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.datastore.get.json b/docs.slack.dev/methods/apps.datastore.get.json new file mode 100644 index 00000000..b338f4d3 --- /dev/null +++ b/docs.slack.dev/methods/apps.datastore.get.json @@ -0,0 +1,113 @@ +{ + "desc": "Get an item from a datastore", + "http_method": "POST", + "scope": "datastore:read", + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "datastore", + "id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "id": { + "desc": "item id", + "type": "string", + "minLength": 1 + }, + "app_id": { + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "properties": { + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "item": { + "desc": "attribute names and values of the item", + "type": "object" + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "The request is missing required arguments." + }, + "invalid_datastore": { + "desc": "The provided datastore is invalid." + }, + "invalid_auth": { + "desc": "Not authorized to get datastore items." + }, + "app_not_hosted": { + "desc": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps." + }, + "datastore_error": { + "desc": "Datastore error." + }, + "access_denied": { + "desc": "Not authorized to access to the datastore." + }, + "invalid_app_id": { + "desc": "The app_id provided is not valid for team and user." + }, + "free_team_not_allowed": { + "desc": "Datastore get not allowed on a free team." + }, + "team_quota_exceeded": { + "desc": "Total number of requests exceeded team quota." + }, + "datastore_migration_in_progress": { + "desc": "The datastore is currently unavailable due to an in progress Enterprise org migration." + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.datastore.get", + "description": "Typical success response", + "example": { + "ok": true, + "datastore": "good_tunes", + "item": { + "artist": "Whitney Houston", + "song": "I Will Always Love You", + "id": "4" + } + } + }, + "error": { + "url": "/api/apps.datastore.get", + "description": "Error response for invalid datastore parameter", + "example": { + "ok": false, + "error": "datastore_error", + "errors": [ + { + "code": "datastore_config_not_found", + "message": "The datastore configuration could not be found", + "pointer": "/datastores" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.datastore.put.json b/docs.slack.dev/methods/apps.datastore.put.json new file mode 100644 index 00000000..0a949f38 --- /dev/null +++ b/docs.slack.dev/methods/apps.datastore.put.json @@ -0,0 +1,112 @@ +{ + "desc": "Creates a new item, or replaces an old item with a new item.", + "http_method": "POST", + "scope": "datastore:write", + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "datastore", + "item" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "item": { + "desc": "attribute names and values of the item", + "type": "object" + }, + "app_id": { + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "properties": { + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "item": { + "desc": "attribute names and values of the item", + "type": "object" + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "The request is missing required arguments." + }, + "invalid_datastore": { + "desc": "The provided datastore is invalid." + }, + "invalid_auth": { + "desc": "Not authorized to create datastore items." + }, + "app_not_hosted": { + "desc": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps." + }, + "datastore_error": { + "desc": "Datastore error" + }, + "access_denied": { + "desc": "Not authorized to access the datastore." + }, + "invalid_app_id": { + "desc": "The app_id provided is not valid for team and user." + }, + "free_team_not_allowed": { + "desc": "Datastore put not allowed on a free team." + }, + "team_quota_exceeded": { + "desc": "Total number of requests exceeded team quota." + }, + "datastore_migration_in_progress": { + "desc": "The datastore is currently unavailable due to an in progress Enterprise org migration." + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.datastore.put", + "description": "Typical success response", + "example": { + "ok": true, + "datastore": "good_tunes", + "item": { + "artist": "Whitney Houston", + "song": "I Will Always Love You", + "id": "4" + } + } + }, + "error": { + "url": "/api/apps.datastore.put", + "description": "Error response for invalid datastore parameter", + "example": { + "ok": false, + "error": "datastore_error", + "errors": [ + { + "code": "datastore_config_not_found", + "message": "The datastore configuration could not be found", + "pointer": "/datastores" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.datastore.query.json b/docs.slack.dev/methods/apps.datastore.query.json new file mode 100644 index 00000000..c5be0ea6 --- /dev/null +++ b/docs.slack.dev/methods/apps.datastore.query.json @@ -0,0 +1,158 @@ +{ + "desc": "Query a datastore for items", + "http_method": "POST", + "scope": "datastore:read", + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "datastore" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "datastore": { + "desc": "Name of the datastore", + "type": "string" + }, + "expression": { + "desc": "A query filter expression", + "type": "string", + "example": "#artist = :artist_name" + }, + "expression_attributes": { + "desc": "A map of attributes referenced in expression", + "type": "object", + "example": "{ \"#artist\": \"artist\" }" + }, + "expression_values": { + "desc": "A map of values referenced in expression", + "type": "object", + "example": "{ \":artist_name\": \"Fred Rogers\" }" + }, + "app_id": { + "desc": "Required if calling with user token", + "schema": "app_id" + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "example": "5c3e53d5" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of items to evaluate for a given request (not necessarily the number of matching items). If the given request dataset size exceeds 1 MB before reaching the limit, the returned item count will likely be less than the limit. In any case where there are more items available beyond an imposed limit, a `next_cursor` value will be provided for use in subsequent requests.", + "example": "100", + "default": 100, + "minimum": 1, + "maximum": 1000 + } + } + }, + "output": { + "type": "object", + "properties": { + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "items": { + "desc": "attribute names and values of the items", + "example": "[{\"id\": \"7c6dd137\", \"artist\": \"Fred Rogers\", \"song\": \"Won't You Be My Neighbor?\"}]", + "type": "array", + "items": { + "type": "object" + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "The request is missing required arguments." + }, + "invalid_datastore": { + "desc": "The provided datastore is invalid." + }, + "invalid_auth": { + "desc": "Not authorized to access datastore items." + }, + "app_not_hosted": { + "desc": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps." + }, + "datastore_error": { + "desc": "Datastore error" + }, + "access_denied": { + "desc": "Not authorized to access the datastore." + }, + "invalid_app_id": { + "desc": "The app_id provided is not valid for team and user." + }, + "free_team_not_allowed": { + "desc": "Datastore query not allowed on a free team." + }, + "team_quota_exceeded": { + "desc": "Total number of requests exceeded team quota." + }, + "datastore_migration_in_progress": { + "desc": "The datastore is currently unavailable due to an in progress Enterprise org migration." + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.datastore.query", + "description": "Typical success response", + "example": { + "ok": true, + "datastore": "good_tunes", + "items": [ + { + "artist": "Whitney Houston", + "song": "I Will Always Love You", + "id": "4" + }, + { + "artist": "Fred Rogers", + "song": "Won't You Be My Neighbor?", + "id": "5" + } + ] + } + }, + "error": { + "url": "/api/apps.datastore.query", + "description": "Error response for invalid datastore parameter", + "example": { + "ok": false, + "error": "datastore_error", + "errors": [ + { + "code": "datastore_config_not_found", + "message": "The datastore configuration could not be found", + "pointer": "/datastores" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.datastore.update.json b/docs.slack.dev/methods/apps.datastore.update.json new file mode 100644 index 00000000..7997130d --- /dev/null +++ b/docs.slack.dev/methods/apps.datastore.update.json @@ -0,0 +1,112 @@ +{ + "desc": "Edits an existing item's attributes, or adds a new item if it does not already exist.", + "http_method": "POST", + "scope": "datastore:write", + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "datastore", + "item" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "item": { + "desc": "attribute names and values to be updated", + "type": "object" + }, + "app_id": { + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "properties": { + "datastore": { + "desc": "name of the datastore", + "type": "string" + }, + "item": { + "desc": "attribute names and values of the item, including those updated", + "type": "object" + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "The request is missing required arguments." + }, + "invalid_datastore": { + "desc": "The provided datastore is invalid." + }, + "invalid_auth": { + "desc": "Not authorized to create datastore items." + }, + "app_not_hosted": { + "desc": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps." + }, + "datastore_error": { + "desc": "Datastore error" + }, + "access_denied": { + "desc": "Not authorized to access the datastore." + }, + "invalid_app_id": { + "desc": "The app_id provided is not valid for team and user." + }, + "free_team_not_allowed": { + "desc": "Datastore put not allowed on a free team." + }, + "team_quota_exceeded": { + "desc": "Total number of requests exceeded team quota." + }, + "datastore_migration_in_progress": { + "desc": "The datastore is currently unavailable due to an in progress Enterprise org migration." + }, + "restricted_plan_level": { + "desc": "Feature is not available on this team" + } + }, + "examples": { + "success": { + "url": "/api/apps.datastore.update", + "description": "Typical success response that includes the complete item including any updated fields", + "example": { + "ok": true, + "datastore": "good_tunes", + "item": { + "artist": "Whitney Houston", + "song": "I Will Always Love You", + "id": "4" + } + } + }, + "error": { + "url": "/api/apps.datastore.update", + "description": "Error response for invalid datastore parameter", + "example": { + "ok": false, + "error": "datastore_error", + "errors": [ + { + "code": "datastore_config_not_found", + "message": "The datastore configuration could not be found", + "pointer": "/datastores" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.event.authorizations.list.json b/docs.slack.dev/methods/apps.event.authorizations.list.json new file mode 100644 index 00000000..3159d3ce --- /dev/null +++ b/docs.slack.dev/methods/apps.event.authorizations.list.json @@ -0,0 +1,124 @@ +{ + "desc": "Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.", + "http_method": "POST", + "json_input_supported": true, + "scope": "authorizations:read", + "rate_limits": "t5", + "args": { + "type": "object", + "required": [ + "event_context", + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "event_context": { + "type": "string" + }, + "cursor": { + "type": "string" + }, + "limit": { + "type": "integer" + } + } + }, + "output": { + "type": "object", + "required": [ + "authorizations" + ], + "properties": { + "cursor_next": { + "desc": "The next cursor for use in [pagination](/apis/web-api/pagination). If present, pass this in subsequent calls to get additional results", + "type": "string" + }, + "authorizations": { + "type": "array", + "items": { + "type": "object", + "required": [ + "enterprise_id", + "team_id", + "user_id", + "is_bot", + "is_enterprise_install" + ], + "properties": { + "enterprise_id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "team_id": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "user_id": { + "type": "string" + }, + "is_bot": { + "type": "boolean" + }, + "is_enterprise_install": { + "type": "boolean" + } + } + } + } + } + }, + "errors": { + "auth_mismatch": { + "desc": "The given authorization token is not associated with the app that sent this event." + }, + "internal_error": { + "desc": "An unexpected error occurred while finding authorizations for this event." + }, + "invalid_cursor": { + "desc": "The `cursor` argument was invalid." + }, + "invalid_event_context": { + "desc": "The given `event_context` didn't match an event." + } + }, + "examples": { + "success": { + "url": "/api/apps.event.authorizations.list?token=YOUR_TOKEN&event_content=E12345", + "description": "Typical success response", + "example": { + "ok": true, + "authorizations": [ + { + "enterprise_id": "string", + "team_id": "string", + "user_id": "string", + "is_bot": "string" + }, + { + "enterprise_id": "string2", + "team_id": "string2", + "user_id": "string2", + "is_bot": "string2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.manifest.create.json b/docs.slack.dev/methods/apps.manifest.create.json new file mode 100644 index 00000000..d9bf49d7 --- /dev/null +++ b/docs.slack.dev/methods/apps.manifest.create.json @@ -0,0 +1,115 @@ +{ + "desc": "Create an app from an app manifest.", + "http_method": "POST", + "scope": "app_configurations:write", + "json_input_supported": true, + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token", + "manifest" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "An [app configuration access token](/authentication/tokens#config).", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "manifest": { + "type": "string", + "desc": "A JSON app manifest encoded as a string. This manifest **must** use a valid [app manifest schema - read our guide to creating one](/app-manifests/configuring-apps-with-app-manifests#fields)." + } + } + }, + "output": { + "type": "object", + "required": [ + "app_id", + "credentials" + ], + "properties": { + "app_id": { + "schema": "app_id" + }, + "credentials": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "verification_token": { + "type": "string" + }, + "signing_secret": { + "type": "string" + } + } + }, + "oauth_authorize_url": { + "type": "string" + }, + "team_id": { + "type": "string", + "desc": "The team ID where the app was created on" + }, + "team_domain": { + "type": "string", + "desc": "The team domain where the app was created on" + } + } + }, + "errors": { + "invalid_app": { + "desc": "An app created from the provided manifest would not be valid." + }, + "invalid_manifest": { + "desc": "The provided manifest file does not validate against schema. Consult the additional errors field to locate specific issues." + }, + "invalid_team_id": { + "desc": "The provided team ID is not valid" + }, + "not_in_team": { + "desc": "Cannot create an app in a team that user is not a member of" + }, + "failed_adding_collaborator": { + "desc": "Failed writing a collaborator record for this new app" + }, + "failed_creating_app": { + "desc": "Failed to create the app model" + }, + "failed_datastore_operation": { + "desc": "Failed while managing datastore infrastructure" + }, + "ratelimited": { + "desc": "Too many calls in succession to create endpoint during a short period of time." + }, + "enterprise_is_restricted": { + "desc": "Org-level tokens are not allowed." + }, + "unknown_method": { + "desc": "Unknown method" + } + }, + "examples": { + "success": { + "url": "/api/apps.manifest.create", + "description": "Typical success response", + "example": { + "ok": true, + "app_id": "A012ABCD0A0", + "credentials": { + "client_id": "...", + "client_secret": "...", + "verification_token": "...", + "signing_secret": "..." + }, + "oauth_authorize_url": "https://slack.com/oauth/v2/authorize?client_id=...&scope=commands,workflow.steps:execute" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.manifest.delete.json b/docs.slack.dev/methods/apps.manifest.delete.json new file mode 100644 index 00000000..253ff23c --- /dev/null +++ b/docs.slack.dev/methods/apps.manifest.delete.json @@ -0,0 +1,64 @@ +{ + "desc": "Permanently deletes an app created through app manifests", + "http_method": "POST", + "scope": "app_configurations:write", + "json_input_supported": true, + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token", + "app_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "desc": "The ID of the app you want to delete.", + "schema": "app_id" + } + } + }, + "output": null, + "errors": { + "app_not_eligible": { + "desc": "The specified app is not elgible for this API." + }, + "app_not_found": { + "desc": "The specified app was not found." + }, + "internal_error": { + "desc": "Internal error." + }, + "invalid_app_id": { + "desc": "The app ID passed in was invalid." + }, + "no_permission": { + "desc": "User described by the used token does not have proper permissions to take this action." + }, + "published_app_only": { + "desc": "This action is only permitted for published app IDs." + } + }, + "examples": { + "success": { + "url": "/api/apps.manifest.delete", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/apps.manifest.delete", + "description": "Typical error response if invalid app ID used", + "example": { + "ok": false, + "error": "invalid_app_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.manifest.export.json b/docs.slack.dev/methods/apps.manifest.export.json new file mode 100644 index 00000000..6d41d724 --- /dev/null +++ b/docs.slack.dev/methods/apps.manifest.export.json @@ -0,0 +1,139 @@ +{ + "desc": "Export an app manifest from an existing app", + "http_method": "POST", + "scope": "app_configurations:read", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "app_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "desc": "The ID of the app whose configuration you want to export as a manifest.", + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "manifest" + ], + "properties": { + "manifest": { + "schema": "manifest" + } + } + }, + "errors": { + "app_not_eligible": { + "desc": "The specified app is not elgible for this API." + }, + "app_not_found": { + "desc": "The specified app was not found." + }, + "failed_export": { + "desc": "Failed to export manifest for given app ID" + }, + "internal_error": { + "desc": "Internal error." + }, + "invalid_app_id": { + "desc": "The app ID passed is invalid." + }, + "no_permission": { + "desc": "User does not have proper permissions." + }, + "unknown_method": { + "desc": "This method does not exist." + } + }, + "examples": { + "success": { + "url": "/api/apps.manifest.export", + "description": "Typical success response", + "example": { + "ok": true, + "manifest": { + "_metadata": { + "major_version": 1, + "minor_version": 1 + }, + "display_information": { + "name": "Zork", + "description": "You are likely to be eaten by a grue.", + "background_color": "#0000AA", + "long_description": "Play the Infocom classic text adventure and find your way to the end of the maze. ZORK is a game of adventure, danger, and low cunning. In it you will explore some of the most amazing territory ever seen by mortals. No workspace should be without one!" + }, + "features": { + "app_home": { + "home_tab_enabled": true, + "messages_tab_enabled": false, + "messages_tab_read_only_enabled": false + }, + "bot_user": { + "display_name": "zork", + "always_online": true + }, + "slash_commands": [ + { + "command": "/zork", + "description": "You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here.", + "usage_hint": "/zork open mailbox", + "should_escape": false + } + ], + "workflow_steps": [ + { + "name": "Example step", + "callback_id": "tutorial_example_step" + } + ] + }, + "oauth_config": { + "redirect_urls": [ + "https://example.com/slack/auth" + ], + "scopes": { + "bot": [ + "commands", + "workflow.steps:execute" + ] + } + }, + "settings": { + "event_subscriptions": { + "bot_events": [ + "workflow_step_execute" + ] + }, + "interactivity": { + "is_enabled": true + }, + "org_deploy_enabled": false, + "socket_mode_enabled": true, + "is_hosted": false, + "token_rotation_enabled": false + } + } + } + }, + "error": { + "url": "/api/apps.manifest.export", + "description": "Typical error response if invalid app ID used", + "example": { + "ok": false, + "error": "invalid_app_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.manifest.update.json b/docs.slack.dev/methods/apps.manifest.update.json new file mode 100644 index 00000000..3e8e000c --- /dev/null +++ b/docs.slack.dev/methods/apps.manifest.update.json @@ -0,0 +1,88 @@ +{ + "desc": "Update an app from an app manifest", + "http_method": "POST", + "scope": "app_configurations:write", + "json_input_supported": true, + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token", + "manifest", + "app_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "manifest": { + "type": "string", + "desc": "A JSON app manifest encoded as a string. This manifest **must** use a valid [app manifest schema - read our guide to creating one](/app-manifests/configuring-apps-with-app-manifests#fields). As this method entirely _replaces_ any previous configuration, manifest must contain both unmodified and modified fields." + }, + "app_id": { + "desc": "The ID of the app whose configuration you want to update.", + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "app_id" + ], + "properties": { + "app_id": { + "schema": "app_id" + }, + "permissions_updated": { + "type": "boolean" + } + } + }, + "errors": { + "app_not_eligible": { + "desc": "The specified app is not elgible for this API." + }, + "failed_adding_collaborator": { + "desc": "Failed writing a collaborator record for this new app" + }, + "failed_creating_app": { + "desc": "Failed to create the app model" + }, + "failed_datastore_operation": { + "desc": "Failed while managing datastore infrastructure" + }, + "internal_error": { + "desc": "Internal error." + }, + "invalid_app": { + "desc": "An app created from the provided manifest would not be valid." + }, + "invalid_app_id": { + "desc": "The app id passed is invalid." + }, + "invalid_manifest": { + "desc": "The provided manifest file does not validate against schema." + }, + "no_permission": { + "desc": "User does not have permission to update app" + }, + "unknown_method": { + "desc": "Unknown method" + } + }, + "examples": { + "success": { + "url": "/api/apps.manifest.update", + "description": "Typical success response", + "example": { + "ok": true, + "app_id": "A012ABCD0A0", + "permissions_updated": false + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.manifest.validate.json b/docs.slack.dev/methods/apps.manifest.validate.json new file mode 100644 index 00000000..3b6c2ca8 --- /dev/null +++ b/docs.slack.dev/methods/apps.manifest.validate.json @@ -0,0 +1,124 @@ +{ + "desc": "Validate an app manifest", + "http_method": "POST", + "scope": "app_configurations:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "manifest" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "manifest": { + "type": "string", + "desc": "The manifest to be validated. Will be validated against the [app manifest schema - read our guide](/app-manifests/configuring-apps-with-app-manifests#fields)." + }, + "app_id": { + "desc": "The ID of the app whose configuration you want to validate.", + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "errors" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "type": "string" + } + }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "pointer": { + "type": "string" + } + } + }, + "desc": "Non-blocking warnings from app manifest validation." + } + } + }, + "errors": { + "app_not_eligible": { + "desc": "The specified app is not eligible for this API." + }, + "invalid_app": { + "desc": "An app created from the provided manifest would not be valid." + }, + "invalid_app_id": { + "desc": "The app id passed is invalid." + }, + "invalid_manifest": { + "desc": "The provided manifest file does not validate against schema." + }, + "failed_adding_collaborator": { + "desc": "Failed writing a collaborator record for this new app" + }, + "failed_creating_app": { + "desc": "Failed to create the app model" + }, + "unknown_method": { + "desc": "Unknown method" + }, + "no_permission": { + "desc": "User described by the used token does not have proper permissions to take this action." + } + }, + "examples": { + "success": { + "url": "/api/apps.manifest.validate", + "description": "Typical success response", + "example": { + "ok": true, + "errors": [] + } + }, + "error": { + "url": "/api/apps.manifest.validate", + "description": "Typical error response if invalid manifest schema used", + "example": { + "ok": false, + "error": "invalid_manifest", + "errors": [ + { + "message": "Event Subscription requires either Request URL or Socket Mode Enabled", + "pointer": "/settings/event_subscriptions" + }, + { + "message": "Interactivty requires a Request URL", + "pointer": "/settings/interactivity" + }, + { + "message": "Interactivity requires Socket Mode enabled", + "pointer": "/settings/interactivity" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/apps.uninstall.json b/docs.slack.dev/methods/apps.uninstall.json new file mode 100644 index 00000000..52f0de63 --- /dev/null +++ b/docs.slack.dev/methods/apps.uninstall.json @@ -0,0 +1,62 @@ +{ + "desc": "Uninstalls your app from a workspace.", + "http_method": "POST", + "scope": "none", + "no_scope_required": true, + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token", + "client_id", + "client_secret" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "client_id": { + "desc": "Issued when you created your application.", + "example": "56579136444.26251006572", + "type": "string" + }, + "client_secret": { + "desc": "Issued when you created your application.", + "example": "f25b5ceaf8a3c2a2c4f52bb4f0b0499e", + "type": "string", + "subtype": "password" + } + } + }, + "output": { + "type": "object", + "required": [ + "uninstalled" + ], + "properties": { + "uninstalled": { + "type": "boolean" + } + } + }, + "errors": { + "bad_client_secret": { + "desc": "Value passed for `client_secret` was invalid." + }, + "client_id_token_mismatch": { + "desc": "The provided client ID and token do not belong to the same app." + }, + "internal_error": { + "desc": "Internal error uninstall" + }, + "invalid_client_id": { + "desc": "Value passed for `client_id` was invalid." + }, + "no_permission": { + "desc": "Granular bot not allowed to uninstall" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/assistant.search.context.json b/docs.slack.dev/methods/assistant.search.context.json new file mode 100644 index 00000000..555d9f67 --- /dev/null +++ b/docs.slack.dev/methods/assistant.search.context.json @@ -0,0 +1,451 @@ +{ + "desc": "Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval.", + "http_method": "POST", + "scope": "search:read", + "scope_by_token_type": { + "granular_bot": "search:read.public", + "oauth": "search:read.public" + }, + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "query" + ], + "properties": { + "token": { + "desc": "Auth token to authenticate the session", + "type": "string", + "subtype": "auth" + }, + "query": { + "desc": "User prompt or search query", + "example": "What is project gizmo?", + "type": "string" + }, + "action_token": { + "desc": "Send action_token as received in a message event", + "example": "12345.98765.abcd2358fdea", + "type": "string" + }, + "channel_types": { + "default": "public_channel", + "desc": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", + "example": "public_channel,private_channel", + "type": "array", + "items": { + "type": "string", + "enum": [ + "public_channel", + "private_channel", + "mpim", + "im" + ] + } + }, + "content_types": { + "default": "messages", + "desc": "Content types to include, a comma-separated list of any combination of `messages`, `files`, `channels`, `users`", + "example": "messages,files", + "type": "array", + "items": { + "type": "string", + "enum": [ + "messages", + "files", + "enterprise", + "channels", + "users" + ] + } + }, + "include_bots": { + "default": null, + "desc": "If you want the results to include bots.", + "example": "true", + "type": "boolean" + }, + "before": { + "desc": "UNIX timestamp filter. If present, filters for results before this date", + "example": "1754670081", + "type": "integer" + }, + "after": { + "desc": "UNIX timestamp filter. If present, filters for results after this date", + "example": "1754670081", + "type": "integer" + }, + "include_context_messages": { + "desc": "Whether to include context messages surrounding the main message result. Defaults to false if unspecified", + "type": "boolean", + "example": "true", + "default": false + }, + "context_channel_id": { + "desc": "Context channel ID to support scoping the search when applicable", + "subtype": "channel", + "schema": "channel" + }, + "cursor": { + "desc": "The cursor returned by the API. Leave this blank for the first request, and use this to get the next page of results", + "example": "asf91j9jfd", + "type": "string" + }, + "limit": { + "desc": "Number of results to return, up to a max of 20. Defaults to 20.", + "example": "20", + "type": "integer" + }, + "sort": { + "type": "string", + "desc": "The field to sort the results by. Defaults to score. Can be one of: score, timestamp", + "enum": [ + "score", + "timestamp" + ], + "default": "score" + }, + "sort_dir": { + "type": "string", + "desc": "The direction to sort the results by. Defaults to desc.", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + }, + "include_message_blocks": { + "type": "boolean", + "desc": "Whether to return the message blocks in the response", + "default": false + }, + "highlight": { + "type": "boolean", + "desc": "Whether to highlight the search query in the results. Defaults to false if unspecified", + "default": false + }, + "term_clauses": { + "type": "array", + "desc": "A list of term clauses. A term clause is a string with search terms. Search results returned will match every term clause specified (i.e. conjunctive normal form).", + "minItems": 1, + "maxItems": 5, + "items": { + "type": "string", + "desc": "A term clause is a string that contains search terms separated by whitespace. Our API will return results matching at least 1 term within the clause. For example, if your clause is `double electron capture`, then the search result will only need to match one of the terms `double`, `electron`, or `capture`.", + "example": "banana milkshake", + "minLength": 1, + "maxLength": 500 + } + } + } + }, + "output": { + "type": "object", + "required": [ + "results" + ], + "properties": { + "results": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "type": "object", + "required": [ + "author_name", + "author_user_id", + "team_id", + "channel_id", + "channel_name", + "message_ts", + "content", + "is_author_bot", + "permalink" + ], + "properties": { + "author_name": { + "desc": "Full name of the user who authored the message", + "type": "string" + }, + "author_user_id": { + "desc": "ID of the user who authored the message", + "schema": "user_id" + }, + "team_id": { + "desc": "ID of the workspace in which the message was sent", + "schema": "team_id" + }, + "channel_id": { + "desc": "ID of the channel in which the message was sent", + "schema": "channel" + }, + "channel_name": { + "desc": "Name of the channel in which the message was sent", + "type": "string" + }, + "message_ts": { + "desc": "Slack-format timestamp at which the message was sent", + "type": "string", + "schema": "ts" + }, + "content": { + "desc": "Content from the retrieved message", + "type": "string" + }, + "is_author_bot": { + "type": "boolean", + "desc": "whether the message was authored by a bot (app) or not" + }, + "permalink": { + "type": "string", + "format": "uri" + }, + "context_messages": { + "type": "object", + "properties": { + "before": { + "type": "array", + "desc": "Messages before the current message, if applicable", + "items": { + "schema": "context_msg" + } + }, + "after": { + "type": "array", + "desc": "Messages after the current message", + "items": { + "schema": "context_msg" + } + } + } + }, + "blocks": { + "type": "array", + "desc": "Blocks from the retrieved message" + } + } + } + }, + "files": { + "type": "array", + "items": { + "type": "object", + "required": [ + "author_name", + "author_user_id", + "uploader_user_id", + "team_id", + "file_id", + "date_created", + "date_updated", + "title", + "file_type", + "permalink", + "content" + ], + "properties": { + "author_name": { + "desc": "Full name of the user who uploaded or created the file", + "type": "string" + }, + "author_user_id": { + "desc": "ID of the user who uploaded or created the file", + "schema": "user_id" + }, + "uploader_user_id": { + "desc": "ID of the user who uploaded the file", + "schema": "user_id" + }, + "team_id": { + "desc": "ID of the workspace in which the file was uploaded", + "schema": "team_id" + }, + "file_id": { + "desc": "ID of the file", + "schema": "file_id" + }, + "date_created": { + "desc": "Epoch timestamp in microseconds at which the file was created", + "type": "integer" + }, + "date_updated": { + "desc": "Epoch timestamp in microseconds at which the file was uploaded", + "type": "integer" + }, + "title": { + "desc": "Title of the file", + "type": "string" + }, + "file_type": { + "desc": "Type of the file", + "type": "string" + }, + "permalink": { + "desc": "Permanent link to the file in Slack", + "type": "string", + "format": "uri" + }, + "content": { + "desc": "Content from the retrieved file", + "type": "string" + } + } + } + }, + "enterprise": { + "type": "array", + "items": { + "schema": "external-record" + } + }, + "channels": { + "type": "array", + "items": { + "type": "object", + "required": [ + "team_id", + "creator_user_id", + "date_created", + "date_updated", + "name", + "permalink" + ], + "properties": { + "team_id": { + "desc": "ID of the workspace in which the channel was created", + "schema": "team_id" + }, + "creator_user_id": { + "desc": "ID of the user who created the channel", + "schema": "user_id" + }, + "creator_name": { + "desc": "Full name of the user who created the channel", + "type": "string" + }, + "date_created": { + "desc": "Epoch timestamp in microseconds at which the channel was created", + "type": "integer" + }, + "date_updated": { + "desc": "Epoch timestamp in microseconds at which the channel was updated", + "type": "integer" + }, + "name": { + "desc": "Name of the channel", + "type": "string" + }, + "topic": { + "desc": "Topic of the channel", + "type": "string" + }, + "purpose": { + "desc": "Purpose of the channel", + "type": "string" + }, + "permalink": { + "desc": "Permanent link to the channel in Slack", + "type": "string", + "format": "uri" + } + } + } + }, + "users": { + "type": "array", + "items": { + "type": "object", + "required": [ + "user_id", + "permalink", + "full_name", + "title", + "timezone", + "email" + ], + "properties": { + "user_id": { + "type": "string", + "desc": "The encoded user ID", + "example": "U029UHAVA1X" + }, + "permalink": { + "type": "string", + "desc": "The permalink to the user in Slack", + "example": "https://salesforce.enterprise.slack.com/team/U029UHAVA1X" + }, + "profile_pic_permalink": { + "type": "string", + "desc": "The permalink to the user's profile photo", + "example": "https://avatars.slack-edge.com/2023-08-09/5739941374304_d04c0f1e5aeb5fc6aa45_original.jpg" + }, + "full_name": { + "type": "string", + "desc": "The user's full name, it might be different from the display name", + "example": "Jamie Scheinblum" + }, + "title": { + "type": "string", + "desc": "The user's job title", + "example": "Senior Product Manager" + }, + "timezone": { + "type": "string", + "desc": "The user's local timezone", + "example": "America/Los_Angeles" + }, + "email": { + "type": "string", + "desc": "The user's email address", + "example": "jamie@salesforce.com" + } + } + } + } + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string", + "desc": "The cursor you can use to fetch the next set of results. When there are no more results, next_cursor will be an empty string.", + "example": "asf91j9jfd112" + } + } + } + } + }, + "errors": { + "internal_error": { + "desc": "internal error" + }, + "rate_limited": { + "desc": "rate limited" + }, + "missing_query": { + "desc": "missing query" + }, + "query_too_long": { + "desc": "query too long" + }, + "feature_not_enabled": { + "desc": "The feature is not available on the current workspace" + }, + "invalid_action_token": { + "desc": "action_token provided is not valid" + }, + "invalid_cursor": { + "desc": "cursormark provided is not valid" + }, + "context_channel_not_found": { + "desc": "Specified context_channel_id is invalid, or the user lacks permission to view it" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/assistant.search.info.json b/docs.slack.dev/methods/assistant.search.info.json new file mode 100644 index 00000000..4c4e6d4f --- /dev/null +++ b/docs.slack.dev/methods/assistant.search.info.json @@ -0,0 +1,47 @@ +{ + "desc": "Returns search capabilities on a given team.", + "http_method": "POST", + "scope": "search:read", + "scope_by_token_type": { + "granular_bot": "search:read.public", + "oauth": "search:read.public" + }, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "desc": "Auth token to authenticate the session", + "type": "string", + "subtype": "auth" + } + } + }, + "output": { + "type": "object", + "required": [ + "is_ai_search_enabled" + ], + "properties": { + "is_ai_search_enabled": { + "type": "boolean", + "desc": "Whether AI search is enabled for the team" + } + } + }, + "errors": {}, + "examples": { + "success": { + "url": "/api/assistant.search.info?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "is_ai_search_enabled": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/assistant.threads.setStatus.json b/docs.slack.dev/methods/assistant.threads.setStatus.json new file mode 100644 index 00000000..9272c3e6 --- /dev/null +++ b/docs.slack.dev/methods/assistant.threads.setStatus.json @@ -0,0 +1,64 @@ +{ + "desc": "Set the status for an AI assistant thread.", + "http_method": "POST", + "scope": "assistant:write", + "json_input_supported": true, + "rate_limits": "t5", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "thread_ts", + "status" + ], + "properties": { + "token": { + "type": "string", + "desc": "Auth token with which to authenticate the session", + "subtype": "auth", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "Channel ID containing the assistant thread.", + "subtype": "channel", + "schema": "channel" + }, + "thread_ts": { + "type": "string", + "desc": "Message timestamp of the thread of where to set the status." + }, + "status": { + "type": "string", + "desc": "Status of the specified bot user, e.g. 'is thinking...'" + } + } + }, + "output": {}, + "errors": { + "channel_not_found": { + "desc": "Error returned when given an invalid channel_id" + }, + "invalid_thread_ts": { + "desc": "Error returned when given an invalid thread_ts" + } + }, + "examples": { + "success": { + "url": "/api/assistant.threads.setStatus?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/assistant.threads.setStatus?token=YOUR_TOKEN", + "description": "Typical error response for invalid channel", + "example": { + "ok": false, + "error": "channel_not_found", + "detail": "Invalid channel_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/assistant.threads.setSuggestedPrompts.json b/docs.slack.dev/methods/assistant.threads.setSuggestedPrompts.json new file mode 100644 index 00000000..0bc3ff5d --- /dev/null +++ b/docs.slack.dev/methods/assistant.threads.setSuggestedPrompts.json @@ -0,0 +1,71 @@ +{ + "desc": "Set suggested prompts for the given assistant thread", + "http_method": "POST", + "scope": "assistant:write", + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "thread_ts", + "prompts" + ], + "properties": { + "token": { + "desc": "Token with which to authenticate the session", + "type": "string", + "subtype": "auth", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "Channel ID containing the assistant thread.", + "subtype": "channel", + "schema": "channel" + }, + "thread_ts": { + "desc": "Message timestamp of the thread to set suggested prompts for.", + "type": "string" + }, + "prompts": { + "desc": "Each prompt should be supplied with its `title` and `message` attribute.", + "schema": "prompts" + }, + "title": { + "desc": "Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.", + "type": "string" + } + } + }, + "output": {}, + "errors": { + "invalid_thread_ts": { + "desc": "Thread not found" + }, + "channel_not_found": { + "desc": "Error returned when given an invalid channel_id" + }, + "message_not_found": { + "desc": "Error returned when given an invalid message" + } + }, + "examples": { + "success": { + "url": "/api/assistant.threads.setSuggestedPrompts?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/assistant.threads.setSuggestedPrompts?token=YOUR_TOKEN", + "description": "Typical error response for invalid thread", + "example": { + "ok": false, + "error": "invalid_thread_ts", + "detail": "Thread not found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/assistant.threads.setTitle.json b/docs.slack.dev/methods/assistant.threads.setTitle.json new file mode 100644 index 00000000..ca940335 --- /dev/null +++ b/docs.slack.dev/methods/assistant.threads.setTitle.json @@ -0,0 +1,64 @@ +{ + "desc": "Set the title for the given assistant thread", + "http_method": "POST", + "scope": "assistant:write", + "json_input_supported": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "thread_ts", + "title" + ], + "properties": { + "token": { + "desc": "Auth token with which to authenticate the session", + "type": "string", + "subtype": "auth", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "Channel ID containing the assistant thread.", + "subtype": "channel", + "schema": "channel" + }, + "thread_ts": { + "desc": "Message timestamp of the thread to set suggested prompts for.", + "type": "string" + }, + "title": { + "desc": "The title to use for the thread.", + "type": "string" + } + } + }, + "output": {}, + "errors": { + "invalid_thread_ts": { + "desc": "Thread not found" + }, + "channel_not_found": { + "desc": "Error returned when given an invalid channel_id" + } + }, + "examples": { + "success": { + "url": "/api/assistant.threads.setTitle?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/assistant.threads.setTitle?token=YOUR_TOKEN", + "description": "Typical error response for invalid channel", + "example": { + "ok": false, + "error": "channel_not_found", + "detail": "Invalid channel_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/auth.revoke.json b/docs.slack.dev/methods/auth.revoke.json new file mode 100644 index 00000000..537e912b --- /dev/null +++ b/docs.slack.dev/methods/auth.revoke.json @@ -0,0 +1,63 @@ +{ + "desc": "Revokes a token.", + "http_method": "GET", + "scope": "none", + "no_scope_required": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "test": { + "desc": "Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked.", + "example": "true", + "type": "boolean" + } + } + }, + "output": { + "required": [ + "revoked" + ], + "type": "object", + "properties": { + "revoked": { + "type": "boolean" + } + } + }, + "errors": { + "internal_error": { + "desc": "Internal system error" + }, + "not_bearer_token": { + "desc": "Incompatible token type provided" + } + }, + "examples": { + "success": { + "url": "/api/auth.revoke?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "revoked": true + } + }, + "error": { + "url": "/api/auth.revoke?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/auth.teams.list.json b/docs.slack.dev/methods/auth.teams.list.json new file mode 100644 index 00000000..1fe99709 --- /dev/null +++ b/docs.slack.dev/methods/auth.teams.list.json @@ -0,0 +1,135 @@ +{ + "desc": "Obtain a full list of workspaces your org-wide app has been approved for.", + "http_method": "POST", + "scope": "none", + "no_scope_required": true, + "json_input_supported": false, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of workspaces to return. Must be a positive integer no larger than 1000.", + "example": "50", + "default": 100, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "type": "string", + "desc": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "example": "5c3e53d5" + }, + "include_icon": { + "type": "boolean", + "default": "false", + "desc": "Whether to return icon paths for each workspace. An icon path represents a URI pointing to the image signifying the workspace.", + "example": "false" + } + } + }, + "output": { + "type": "object", + "required": [ + "team" + ], + "properties": { + "teams": { + "type": "array", + "items": { + "type": "object", + "required": [ + "team_id", + "name" + ], + "properties": { + "id": { + "type": "string", + "desc": "ID of the workspace" + }, + "name": { + "type": "string", + "desc": "Name of the workspace" + }, + "icon": { + "type": "object", + "desc": "Paths to icons", + "properties": { + "image_34": { + "type": "string" + }, + "image_44": { + "type": "string" + }, + "image_68": { + "type": "string" + }, + "image_88": { + "type": "string" + }, + "image_102": { + "type": "string" + }, + "image_132": { + "type": "string" + }, + "image_230": { + "type": "string" + }, + "image_default": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "errors": { + "invalid_cursor": { + "desc": "Invalid cursor." + }, + "invalid_limit": { + "desc": "The value passed for `limit` was not valid." + }, + "invalid_auth": { + "desc": "The token doesn't have access to this endpoint." + }, + "internal_error": { + "desc": "There was an internal error." + } + }, + "examples": { + "success": { + "url": "/api/auth.teams.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "teams": [ + { + "name": "Shinichi's workspace", + "id": "T12345678" + }, + { + "name": "Migi's workspace", + "id": "T12345679" + } + ], + "response_metadata": { + "next_cursor": "dXNlcl9pZDo5MTQyOTI5Mzkz" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/auth.test.json b/docs.slack.dev/methods/auth.test.json new file mode 100644 index 00000000..dc7a310d --- /dev/null +++ b/docs.slack.dev/methods/auth.test.json @@ -0,0 +1,125 @@ +{ + "desc": "Checks authentication & identity.", + "http_method": "POST", + "scope": "none", + "json_input_supported": true, + "no_scope_required": true, + "rate_limits": "t5", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": { + "type": "object", + "properties": { + "user_id": { + "schema": "user_id" + }, + "url": { + "type": "string" + }, + "team_id": { + "schema": "team_id" + }, + "user": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "team": { + "type": "string" + }, + "app_id": { + "schema": "app_id" + }, + "app_name": { + "type": "string" + }, + "enterprise_id": { + "schema": "enterprise_id" + }, + "bot_id": { + "schema": "bot_id" + }, + "is_enterprise_install": { + "type": "boolean" + }, + "expires_in": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "integer" + } + ] + } + } + }, + "errors": { + "internal_error": { + "desc": "An internal error has been found." + }, + "invalid_auth": { + "desc": "Method was called with invalid credentials" + } + }, + "examples": { + "success": { + "description": "Standard success response when used with a user token", + "url": "/api/auth.test?token=YOUR_TOKEN", + "example": { + "ok": true, + "url": "https://subarachnoid.slack.com/", + "team": "Subarachnoid Workspace", + "user": "grace", + "team_id": "T12345678", + "user_id": "W12345678" + } + }, + "error": { + "description": "Standard failure response when used with an invalid token", + "url": "/api/auth.test?token=INVALID_TOKEN", + "example": { + "ok": false, + "error": "invalid_auth" + } + }, + "success_with_bot_token": { + "url": "/api/auth.test?token=BOT_USER_TOKEN", + "description": "Success response when using a bot user token", + "example": { + "ok": true, + "url": "https://subarachnoid.slack.com/", + "team": "Subarachnoid Workspace", + "user": "bot", + "team_id": "T0G9PQBBK", + "user_id": "W23456789", + "bot_id": "BZYBOTHED" + } + }, + "error_with_no_token": { + "description": "Error response when omitting a token", + "url": "/api/auth.test", + "example": { + "ok": false, + "error": "not_authed" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/bookmarks.add.json b/docs.slack.dev/methods/bookmarks.add.json new file mode 100644 index 00000000..c4079ffa --- /dev/null +++ b/docs.slack.dev/methods/bookmarks.add.json @@ -0,0 +1,193 @@ +{ + "desc": "Add bookmark to a channel.", + "http_method": "POST", + "scope": "bookmarks:write", + "scope_by_token_type": { + "app": "bookmarks:write", + "granular_bot": "bookmarks:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "title", + "type", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "Channel to add bookmark in.", + "type": "string", + "subtype": "channel" + }, + "title": { + "desc": "Title for the bookmark.", + "type": "string", + "maxLength": 256 + }, + "link": { + "desc": "Link to bookmark.", + "type": "string", + "maxLength": 2048 + }, + "type": { + "desc": "Type of the bookmark i.e link.", + "type": "string" + }, + "emoji": { + "desc": "Emoji tag to apply to the link.", + "type": "string" + }, + "entity_id": { + "desc": "ID of the entity being bookmarked. Only applies to message and file types.", + "type": "string" + }, + "access_level": { + "desc": "The level that we are setting the file's permission to (read or write)", + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "parent_id": { + "type": "string", + "desc": "Id of this bookmark's parent" + } + } + }, + "output": { + "type": "object", + "required": [ + "bookmark" + ], + "properties": { + "bookmark": { + "type": "object", + "schema": "bookmark" + } + } + }, + "errors": { + "access_denied": { + "desc": "Actor lacks access to the requested resource." + }, + "cannot_bookmark_from_external_org": { + "desc": "File is an external file and cannot be bookmarked." + }, + "cannot_bookmark_restricted_sharing_enabled": { + "desc": "File has restricted sharing enabled and cannot be bookmarked." + }, + "channel_not_found": { + "desc": "Channel cannot be found." + }, + "file_already_added": { + "desc": "The file has already been added to the folder." + }, + "file_not_found": { + "desc": "File cannot be found." + }, + "invalid_bookmark_type": { + "desc": "Bookmark type is not valid." + }, + "invalid_app_action_type": { + "desc": "App action type is not valid." + }, + "invalid_shortcut_type": { + "desc": "Shortcut type is not valid." + }, + "invalid_child_type": { + "desc": "Child type is not valid." + }, + "invalid_emoji": { + "desc": "Invalid emoji, does not follow the pattern of a valid emoji name." + }, + "invalid_entity_id": { + "desc": "Invalid entity_id, file or message type bookmark should have original file or message ID." + }, + "invalid_link": { + "desc": "Invalid link, link should begin with either http:// or https://." + }, + "invalid_parent_type": { + "desc": "Parent type is not valid." + }, + "not_implemented": { + "desc": "bookmarking not available for the user." + }, + "parent_bookmark_disabled": { + "desc": "Parent bookmark feature flag is off." + }, + "parent_with_link": { + "desc": "Parent bookmark should not have link." + }, + "permission_denied": { + "desc": "No permission to perform this operation." + }, + "slack_connect_file_upload_sharing_blocked": { + "desc": "Admin has disabled File uploads in all Slack Connect communications" + }, + "slack_connect_clip_sharing_blocked": { + "desc": "Admin has disabled Clip sharing in Slack Connect channels" + }, + "slack_connect_blocked_file_type": { + "desc": "Files with certain extensions are blocked from being uploaded in all Slack Connect communications" + }, + "too_many_bookmarks": { + "desc": "Bookmark limit reached for channel." + }, + "too_many_tabs": { + "desc": "tab limit reached for channel." + } + }, + "warnings": { + "found_existing_app": { + "desc": "Found an existing bookmark with the same app_action_id for this channel." + }, + "found_existing_shortcut": { + "desc": "Found an existing bookmark with the same shortcut_id for this channel." + } + }, + "examples": { + "success": { + "url": "/api/bookmarks.list?channel_id=C1RQ000", + "description": "Typical success response", + "example": { + "ok": true, + "bookmark": { + "id": "Bk033XFJ9BTJ", + "channel_id": "C1RQ000", + "title": "bookmark-1", + "link": "https://google.com", + "emoji": ":clap:", + "icon_url": "https://www.google.com/favicon.ico", + "type": "link", + "entity_id": null, + "date_created": 1644956055, + "date_updated": 0, + "rank": "g", + "last_updated_by_user_id": "U0334B6G6G5", + "last_updated_by_team_id": "T018DF03GHY", + "shortcut_id": null, + "app_id": null + } + } + }, + "error": { + "url": "/api/bookmarks.list?channel_id=C1RQ000", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/bookmarks.edit.json b/docs.slack.dev/methods/bookmarks.edit.json new file mode 100644 index 00000000..ccddd569 --- /dev/null +++ b/docs.slack.dev/methods/bookmarks.edit.json @@ -0,0 +1,135 @@ +{ + "desc": "Edit bookmark.", + "http_method": "POST", + "scope": "bookmarks:write", + "scope_by_token_type": { + "app": "bookmarks:write", + "granular_bot": "bookmarks:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "bookmark_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "Channel to update bookmark in.", + "type": "string", + "subtype": "channel" + }, + "bookmark_id": { + "desc": "Bookmark to update.", + "type": "string" + }, + "title": { + "desc": "Title for the bookmark.", + "type": "string", + "maxLength": 256 + }, + "link": { + "desc": "Link to bookmark.", + "type": "string", + "maxLength": 2048 + }, + "emoji": { + "desc": "Emoji tag to apply to the link.", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "bookmark" + ], + "properties": { + "bookmark": { + "type": "object", + "schema": "bookmark" + } + } + }, + "errors": { + "access_denied": { + "desc": "Actor lacks access to the requested resource." + }, + "channel_not_found": { + "desc": "Channel cannot be found." + }, + "invalid_bookmark_type": { + "desc": "Bookmark type is not valid." + }, + "invalid_emoji": { + "desc": "Invalid emoji, does not follow the pattern of a valid emoji name." + }, + "invalid_link": { + "desc": "Invalid link, link should begin with either http:// or https://." + }, + "not_found": { + "desc": "Bookmark cannot be found." + }, + "not_implemented": { + "desc": "bookmarking not available for the user." + }, + "parent_with_link": { + "desc": "Parent bookmark should not have link." + }, + "permission_denied": { + "desc": "No permission to perform this operation." + }, + "slack_connect_file_upload_sharing_blocked": { + "desc": "Admin has disabled File uploads in all Slack Connect communications" + }, + "slack_connect_clip_sharing_blocked": { + "desc": "Admin has disabled Clip sharing in Slack Connect channels" + }, + "slack_connect_blocked_file_type": { + "desc": "Files with certain extensions are blocked from being uploaded in all Slack Connect communications" + } + }, + "examples": { + "success": { + "url": "/api/bookmarks.edit?bookmark_id=C1RQ7PPA7&channel_id=C1RQ7PPA7", + "description": "Typical success response", + "example": { + "ok": true, + "bookmark": { + "id": "Bk033XFJ9BTJ", + "channel_id": "C1RQ000", + "title": "bookmark-1", + "link": "https://google.com", + "emoji": ":clap:", + "icon_url": "https://www.google.com/favicon.ico", + "type": "link", + "entity_id": null, + "date_created": 1644956055, + "date_updated": 0, + "rank": "g", + "last_updated_by_user_id": "U0334B6G6G5", + "last_updated_by_team_id": "T018DF03GHY", + "shortcut_id": null, + "app_id": null + } + } + }, + "error": { + "url": "/api/bookmarks.edit?bookmark_id=C1RQ7PPA7&channel_id=C1RQ7PPA7", + "description": "Typical error response", + "example": { + "ok": false, + "error": "not_authed" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/bookmarks.list.json b/docs.slack.dev/methods/bookmarks.list.json new file mode 100644 index 00000000..be159ddf --- /dev/null +++ b/docs.slack.dev/methods/bookmarks.list.json @@ -0,0 +1,93 @@ +{ + "desc": "List bookmark for the channel.", + "http_method": "POST", + "scope": "bookmarks:read", + "scope_by_token_type": { + "app": "bookmarks:read", + "granular_bot": "bookmarks:read" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "Channel to list bookmarks in.", + "type": "string", + "subtype": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "bookmarks" + ], + "properties": { + "bookmarks": { + "type": "array", + "items": { + "schema": "bookmark" + } + } + } + }, + "errors": { + "access_denied": { + "desc": "Actor lacks access to the requested resource." + }, + "channel_not_found": { + "desc": "Channel cannot be found." + }, + "not_implemented": { + "desc": "bookmarking not available for the user." + } + }, + "examples": { + "success": { + "url": "/api/bookmarks.list?channel_id=C1RQ7000", + "description": "Typical success response", + "example": { + "ok": true, + "bookmarks": [ + { + "id": "Bk123ABC4DEF", + "channel_id": "C1RQ000", + "title": "bookmark-1", + "link": "https://google.com", + "emoji": ":clap:", + "icon_url": "https://www.google.com/favicon.ico", + "type": "link", + "entity_id": null, + "date_created": 1644956055, + "date_updated": 0, + "rank": "g", + "last_updated_by_user_id": "U0123A1B1C1", + "last_updated_by_team_id": "T012AB34CDE", + "shortcut_id": null, + "app_id": null + } + ] + } + }, + "error": { + "url": "/api/bookmarks.list?channel_id=C1RQ7000", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/bookmarks.remove.json b/docs.slack.dev/methods/bookmarks.remove.json new file mode 100644 index 00000000..8fb27781 --- /dev/null +++ b/docs.slack.dev/methods/bookmarks.remove.json @@ -0,0 +1,82 @@ +{ + "desc": "Remove bookmark from the channel.", + "http_method": "POST", + "scope": "bookmarks:write", + "scope_by_token_type": { + "app": "bookmarks:write", + "granular_bot": "bookmarks:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "bookmark_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "Channel to remove bookmark.", + "type": "string", + "subtype": "channel" + }, + "bookmark_id": { + "desc": "Bookmark to remove.", + "type": "string" + }, + "quip_section_id": { + "desc": "Quip section ID to unbookmark", + "type": "string" + } + } + }, + "output": null, + "errors": { + "access_denied": { + "desc": "Actor lacks access to the requested resource." + }, + "channel_not_found": { + "desc": "Channel cannot be found." + }, + "user_not_found": { + "desc": "User cannot be found." + }, + "invalid_bookmark_type": { + "desc": "Bookmark type is not valid." + }, + "not_found": { + "desc": "Bookmark cannot be found." + }, + "not_implemented": { + "desc": "bookmarking not available for the user." + }, + "permission_denied": { + "desc": "No permission to perform this operation." + } + }, + "examples": { + "success": { + "url": "/api/bookmarks.remove?bookmark_id=Bk032T42309M&channel_id=C0330JVH00", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/bookmarks.remove?bookmark_id=Bk032T42309M&channel_id=C0330JVH00", + "description": "Typical error response", + "example": { + "ok": false, + "error": "not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/bots.info.json b/docs.slack.dev/methods/bots.info.json new file mode 100644 index 00000000..e3587622 --- /dev/null +++ b/docs.slack.dev/methods/bots.info.json @@ -0,0 +1,195 @@ +{ + "desc": "Gets information about a bot user.", + "http_method": "GET", + "scope": "users:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "bot": { + "desc": "Bot user to get info on", + "example": "B12345678", + "type": "string", + "subtype": "bot" + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "encoded team id or enterprise id where the bot exists, required if org token is used" + } + } + }, + "output": { + "type": "object", + "properties": { + "bots": { + "items": { + "required": [ + "updated", + "deleted", + "id" + ], + "type": "object", + "properties": { + "updated": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "icons": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "image_36": { + "type": "string" + }, + "image_48": { + "type": "string" + }, + "image_64": { + "type": "string" + }, + "image_72": { + "type": "string" + } + } + }, + "deleted": { + "type": "boolean" + }, + "app_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_workflow_bot": { + "type": "boolean" + }, + "is_connector_bot": { + "type": "boolean" + }, + "is_legacy_workflow_bot": { + "type": "boolean" + }, + "user_id": { + "type": "string" + } + } + }, + "type": "array" + }, + "bot": { + "type": "object", + "required": [ + "updated", + "deleted", + "id" + ], + "properties": { + "updated": { + "type": "integer" + }, + "user_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "icons": { + "type": "object", + "properties": { + "emoji": { + "type": "string" + }, + "image_36": { + "type": "string" + }, + "image_48": { + "type": "string" + }, + "image_64": { + "type": "string" + }, + "image_72": { + "type": "string" + } + } + }, + "deleted": { + "type": "boolean" + }, + "app_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_workflow_bot": { + "type": "boolean" + }, + "is_connector_bot": { + "type": "boolean" + }, + "is_legacy_workflow_bot": { + "type": "boolean" + } + } + } + } + }, + "errors": { + "bot_not_found": { + "desc": "Value passed for `bot` was invalid." + }, + "bots_not_found": { + "desc": "At least one value passed for `bots` was invalid." + }, + "missing_argument": { + "desc": "A required argument is missing." + } + }, + "examples": { + "success": { + "url": "/api/bots.info?token=YOUR_TOKEN&bot=B061F7JQ1", + "description": "When successful, returns bot info by bot ID.", + "example": { + "ok": true, + "bot": { + "id": "B123456", + "deleted": false, + "name": "beforebot", + "updated": 1449272004, + "app_id": "A123456", + "user_id": "U123456", + "icons": { + "image_36": "https://...", + "image_48": "https://...", + "image_72": "https://..." + } + } + } + }, + "error": { + "url": "/api/bots.info?token=YOUR_TOKEN&bot=BOGUS", + "description": "When no bot can be found, it returns an error.", + "example": { + "ok": false, + "error": "bot_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/calls.add.json b/docs.slack.dev/methods/calls.add.json new file mode 100644 index 00000000..c34d0da9 --- /dev/null +++ b/docs.slack.dev/methods/calls.add.json @@ -0,0 +1,97 @@ +{ + "desc": "Registers a new Call.", + "http_method": "POST", + "scope": "calls:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "external_unique_id", + "join_url" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "external_unique_id": { + "type": "string", + "desc": "An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.", + "example": "025169F6-E37A-4E62-BB54-7F93A0FC4C1F" + }, + "external_display_id": { + "type": "string", + "desc": "An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.", + "example": "705-292-868" + }, + "join_url": { + "type": "string", + "desc": "The URL required for a client to join the Call.", + "example": "https://example.com/calls/1234567890" + }, + "desktop_app_join_url": { + "type": "string", + "desc": "When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.", + "example": "callapp://join/1234567890" + }, + "date_start": { + "type": "integer", + "desc": "Unix timestamp of the call start time", + "example": "1562002086" + }, + "title": { + "type": "string", + "desc": "The name of the Call.", + "example": "Kimpossible sync up" + }, + "created_by": { + "type": "string", + "desc": "The valid Slack user ID of the user who created this Call. When this method is called with a user token, the `created_by` field is optional and defaults to the authed user of the token. Otherwise, the field is required.", + "example": "U1H77" + }, + "users": { + "type": "array", + "items": { + "schema": "user" + }, + "desc": "The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users).", + "example": "[{\"slack_id\": \"U1H77\"}, {\"external_id\": \"54321678\", \"display_name\": \"External User\", \"avatar_url\": \"https://example.com/users/avatar1234.jpg\"}]" + } + } + }, + "output": { + "type": "object", + "required": [ + "call" + ], + "properties": { + "call": { + "schema": "info" + } + } + }, + "errors": { + "internal_error": { + "desc": "An unexpected error has occurred while trying to register the Call." + }, + "invalid_created_by": { + "desc": "The `created_by` user ID is invalid." + }, + "invalid_start_time": { + "desc": "The start time is invalid." + }, + "not_authorized": { + "desc": "The specified user is not authorized to create a Call in this channel." + }, + "not_implemented": { + "desc": "This method is not available." + }, + "user_not_found": { + "desc": "A specified user wasn't found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/calls.end.json b/docs.slack.dev/methods/calls.end.json new file mode 100644 index 00000000..29fe06c7 --- /dev/null +++ b/docs.slack.dev/methods/calls.end.json @@ -0,0 +1,57 @@ +{ + "desc": "Ends a Call.", + "http_method": "POST", + "scope": "calls:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "id": { + "type": "string", + "desc": "`id` returned when registering the call using the [`calls.add`](/reference/methods/calls.add) method.", + "example": "R0E69JAIF" + }, + "duration": { + "type": "integer", + "desc": "Call duration in seconds", + "example": "1800" + } + } + }, + "output": { + "type": "object", + "required": [ + "call" + ], + "properties": { + "call": { + "schema": "info" + } + } + }, + "errors": { + "inactive_call": { + "desc": "The Call has been already stopped." + }, + "internal_error": { + "desc": "An unexpected error has occurred while ending the Call." + }, + "invalid_call_id": { + "desc": "Invalid Call ID." + }, + "not_implemented": { + "desc": "This method is not publicly available yet." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/calls.info.json b/docs.slack.dev/methods/calls.info.json new file mode 100644 index 00000000..bf5777d7 --- /dev/null +++ b/docs.slack.dev/methods/calls.info.json @@ -0,0 +1,46 @@ +{ + "desc": "Returns information about a Call.", + "http_method": "POST", + "scope": "calls:read", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "id": { + "type": "string", + "desc": "`id` of the Call returned by the [`calls.add`](/reference/methods/calls.add) method.", + "example": "R0E69JAIF" + } + } + }, + "output": { + "type": "object", + "required": [ + "call" + ], + "properties": { + "call": { + "schema": "info" + } + } + }, + "errors": { + "internal_error": { + "desc": "An unexpected error occurred while finding information about this Call." + }, + "not_implemented": { + "desc": "This method is not available." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/calls.participants.add.json b/docs.slack.dev/methods/calls.participants.add.json new file mode 100644 index 00000000..722364b1 --- /dev/null +++ b/docs.slack.dev/methods/calls.participants.add.json @@ -0,0 +1,70 @@ +{ + "desc": "Registers new participants added to a Call.", + "http_method": "POST", + "scope": "calls:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "id", + "users" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "id": { + "type": "string", + "desc": "`id` returned by the [`calls.add`](/reference/methods/calls.add) method.", + "example": "R0E69JAIF" + }, + "users": { + "type": "array", + "items": { + "schema": "user" + }, + "desc": "The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users).", + "example": "[{\"slack_id\": \"U1H77\"}, {\"external_id\": \"54321678\", \"display_name\": \"External User\", \"avatar_url\": \"https://example.com/users/avatar1234.jpg\"}]" + } + } + }, + "output": { + "type": "object", + "required": [ + "call" + ], + "properties": { + "call": { + "schema": "info" + } + } + }, + "errors": { + "bad_users": { + "desc": "At least one specified user is already part of the Call." + }, + "inactive_call": { + "desc": "The Call has been already ended." + }, + "internal_error": { + "desc": "An unexpected exception occurred while adding a Call participant." + }, + "invalid_call_id": { + "desc": "The specified Call wasn't found." + }, + "missing_argument": { + "desc": "A required argument is missing." + }, + "not_implemented": { + "desc": "This method is not available." + }, + "user_not_found": { + "desc": "At least one specified user wasn't found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/calls.participants.remove.json b/docs.slack.dev/methods/calls.participants.remove.json new file mode 100644 index 00000000..752a6377 --- /dev/null +++ b/docs.slack.dev/methods/calls.participants.remove.json @@ -0,0 +1,70 @@ +{ + "desc": "Registers participants removed from a Call.", + "http_method": "POST", + "scope": "calls:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "id", + "users" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "id": { + "type": "string", + "desc": "`id` returned by the [`calls.add`](/reference/methods/calls.add) method.", + "example": "R0E69JAIF" + }, + "users": { + "type": "array", + "items": { + "schema": "user" + }, + "desc": "The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users).", + "example": "[{\"slack_id\": \"U1H77\"}, {\"external_id\": \"54321678\", \"display_name\": \"External User\", \"avatar_url\": \"https://example.com/users/avatar1234.jpg\"}]" + } + } + }, + "output": { + "type": "object", + "required": [ + "call" + ], + "properties": { + "call": { + "schema": "info" + } + } + }, + "errors": { + "bad_users": { + "desc": "At least one specified user is not part of the Call." + }, + "inactive_call": { + "desc": "The Call has been already ended." + }, + "internal_error": { + "desc": "An unexpected exception occurred while removing participants from the Call." + }, + "invalid_call_id": { + "desc": "The specified Call wasn't found." + }, + "missing_argument": { + "desc": "A required argument is missing." + }, + "not_implemented": { + "desc": "This method is not available." + }, + "user_not_found": { + "desc": "At least one specified user wasn't found." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/calls.update.json b/docs.slack.dev/methods/calls.update.json new file mode 100644 index 00000000..92df45c2 --- /dev/null +++ b/docs.slack.dev/methods/calls.update.json @@ -0,0 +1,64 @@ +{ + "desc": "Updates information about a Call.", + "http_method": "POST", + "scope": "calls:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "id": { + "type": "string", + "desc": "`id` returned by the [`calls.add`](/reference/methods/calls.add) method.", + "example": "R0E69JAIF" + }, + "title": { + "type": "string", + "desc": "The name of the Call.", + "example": "Kimpossible sync up call" + }, + "join_url": { + "type": "string", + "desc": "The URL required for a client to join the Call.", + "example": "https://example.com/calls/0987654321" + }, + "desktop_app_join_url": { + "type": "string", + "desc": "When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.", + "example": "callapp://join/0987654321" + } + } + }, + "output": { + "type": "object", + "required": [ + "call" + ], + "properties": { + "call": { + "schema": "info" + } + } + }, + "errors": { + "internal_error": { + "desc": "An unexpected exception occurred while updating the Call info." + }, + "invalid_call_id": { + "desc": "The Call's `id` was invalid." + }, + "not_implemented": { + "desc": "This method is not available." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/canvases.access.delete.json b/docs.slack.dev/methods/canvases.access.delete.json new file mode 100644 index 00000000..f8d71876 --- /dev/null +++ b/docs.slack.dev/methods/canvases.access.delete.json @@ -0,0 +1,105 @@ +{ + "desc": "Remove access to a canvas for specified entities", + "http_method": "POST", + "scope": "canvases:write", + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "canvas_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "canvas_id": { + "desc": "Encoded ID of the canvas", + "example": "F1234ABCD", + "subtype": "canvas", + "schema": "file_id" + }, + "channel_ids": { + "desc": "List of channels you wish to update access for", + "example": "[\"C1234ABCD\"]", + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "schema": "channel_id" + } + }, + "user_ids": { + "desc": "List of users you wish to update access for", + "example": "[\"U1234ABCD\"]", + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "schema": "user_id" + } + } + } + }, + "output": { + "type": "object", + "properties": { + "failed_to_update_channel_ids": { + "desc": "The channel IDs that could not be updated", + "type": "array", + "items": { + "schema": "channel" + } + }, + "failed_to_update_user_ids": { + "desc": "The user IDs that could not be updated", + "type": "array", + "items": { + "schema": "user_id" + } + } + } + }, + "errors": { + "canvas_not_found": { + "desc": "The canvas you wish to revoke permissions for is not available." + }, + "restricted_action": { + "desc": "User does not have permission to perform this action." + }, + "canvas_disabled_user_team": { + "desc": "Canvas is disabled on user's team." + }, + "invalid_parameters": { + "desc": "One of user_ids and channel_ids must be defined." + }, + "channel_not_found": { + "desc": "A channel could not be found." + }, + "user_not_found": { + "desc": "A user could not be found." + } + }, + "examples": { + "success": { + "url": "/api/canvases.access.delete?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/canvases.access.delete?token=YOUR_TOKEN", + "description": "Typical error response when attempting to change the access of a channel canvas", + "example": { + "ok": false, + "error": "canvas_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/canvases.access.set.json b/docs.slack.dev/methods/canvases.access.set.json new file mode 100644 index 00000000..a0657e71 --- /dev/null +++ b/docs.slack.dev/methods/canvases.access.set.json @@ -0,0 +1,118 @@ +{ + "desc": "Sets the access level to a canvas for specified entities", + "http_method": "POST", + "scope": "canvases:write", + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "canvas_id", + "access_level" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "canvas_id": { + "desc": "Encoded ID of the canvas", + "example": "F1234ABCD", + "subtype": "canvas", + "schema": "file_id" + }, + "access_level": { + "desc": "Desired level of access", + "enum": [ + "read", + "write", + "owner" + ], + "schema": "file_access_level" + }, + "channel_ids": { + "desc": "List of channels you wish to update access for. Can only be used if user_ids is not provided.", + "example": "[\"C1234ABCD\"]", + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "schema": "channel_id" + } + }, + "user_ids": { + "desc": "List of users you wish to update access for. Can only be used if channel_ids is not provided.", + "example": "[\"U1234ABCD\"]", + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "schema": "user_id" + } + } + } + }, + "output": { + "type": "object", + "properties": { + "failed_to_update_channel_ids": { + "desc": "The channel IDs that could not be updated", + "type": "array", + "items": { + "schema": "channel" + } + }, + "failed_to_update_user_ids": { + "desc": "The user IDs that could not be updated", + "type": "array", + "items": { + "schema": "user_id" + } + } + } + }, + "errors": { + "canvas_disabled_user_team": { + "desc": "Canvas is disabled on user's team" + }, + "canvas_not_found": { + "desc": "The canvas you wish to update permissions for is not available." + }, + "channel_not_found": { + "desc": "A channel could not be found." + }, + "failed_to_update_user_ids": { + "desc": "Failed to update the specified user_ids." + }, + "invalid_parameters": { + "desc": "One of user_ids or channel_ids must be defined, but not both." + }, + "restricted_action": { + "desc": "User does not have permission to perform this action." + }, + "user_not_found": { + "desc": "A user could not be found." + } + }, + "examples": { + "success": { + "url": "/api/canvases.access.set?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/canvases.access.set?token=YOUR_TOKEN", + "description": "Typical error response when attempting to change the access of a channel canvas", + "example": { + "ok": false, + "error": "canvas_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/canvases.create.json b/docs.slack.dev/methods/canvases.create.json new file mode 100644 index 00000000..9c1e9065 --- /dev/null +++ b/docs.slack.dev/methods/canvases.create.json @@ -0,0 +1,82 @@ +{ + "desc": "Create canvas for a user", + "http_method": "POST", + "scope": "canvases:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "desc": "Auth token with which to authenticate the session", + "type": "string", + "subtype": "auth", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "title": { + "type": "string", + "example": "Your Brilliant Title", + "desc": "Title of the newly created canvas" + }, + "document_content": { + "example": "{\"type\": \"markdown\", \"markdown\": \"> standalone canvas!\"}", + "desc": "Structure describing the type and value of the content to create", + "schema": "selection" + }, + "channel_id": { + "desc": "Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.", + "type": "string", + "subtype": "channel", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "canvas_id" + ], + "properties": { + "canvas_id": { + "desc": "Encoded ID of the canvas", + "schema": "file_id" + } + } + }, + "errors": { + "canvas_disabled_user_team": { + "desc": "Canvas is disabled on user's team" + }, + "free_teams_cannot_create_standalone_canvases": { + "desc": "Free teams cannot create standalone canvases" + }, + "restricted_action": { + "desc": "User does not have permission to perform this action." + }, + "canvas_creation_failed": { + "desc": "Canvas was unable to be created." + } + }, + "examples": { + "success": { + "url": "/api/canvases.create?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "canvas_id": "F1234ABCD" + } + }, + "error": { + "url": "/api/canvases.create?token=YOUR_TOKEN", + "description": "Typical error response for bad content", + "example": { + "ok": false, + "error": "canvas_creation_failed", + "detail": "'content' error: line 28: Unsupported block type (List) within block quote" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/canvases.delete.json b/docs.slack.dev/methods/canvases.delete.json new file mode 100644 index 00000000..c8ed7f79 --- /dev/null +++ b/docs.slack.dev/methods/canvases.delete.json @@ -0,0 +1,57 @@ +{ + "desc": "Deletes a canvas", + "http_method": "POST", + "scope": "canvases:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "canvas_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "canvas_id": { + "desc": "Encoded ID of the canvas", + "example": "F1234ABCD", + "subtype": "canvas", + "schema": "file_id" + } + } + }, + "output": null, + "errors": { + "canvas_deleting_disabled": { + "desc": "This functionality is disabled." + }, + "canvas_not_found": { + "desc": "The canvas does not exist, or is not visible to the calling user." + }, + "restricted_action": { + "desc": "User does not have permission to perform this action." + } + }, + "examples": { + "success": { + "url": "/api/canvases.delete?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/canvases.delete?token=INVALID_TOKEN", + "description": "Typical error response for a non-existent canvas", + "example": { + "ok": false, + "error": "canvas_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/canvases.edit.json b/docs.slack.dev/methods/canvases.edit.json new file mode 100644 index 00000000..20b5412f --- /dev/null +++ b/docs.slack.dev/methods/canvases.edit.json @@ -0,0 +1,75 @@ +{ + "desc": "Update an existing canvas", + "http_method": "POST", + "scope": "canvases:write", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "canvas_id", + "changes" + ], + "properties": { + "token": { + "desc": "Auth token with which to authenticate the session", + "type": "string", + "subtype": "auth", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "canvas_id": { + "desc": "Encoded ID of the canvas", + "example": "F1234ABCD", + "subtype": "canvas", + "schema": "file_id" + }, + "changes": { + "desc": "List of changes to apply on the specified canvas", + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "schema": "selection" + }, + "example": "[{\"operation\":\"insert_before\",\"document_content\":{\"type\":\"markdown\",\"markdown\":\"Example content\"},\"section_id\":\"temp:C:AAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}]" + } + } + }, + "output": null, + "errors": { + "canvas_not_found": { + "desc": "The canvas you wish to apply changes to is not available." + }, + "canvas_disabled_user_team": { + "desc": "Canvas is disabled on user's team" + }, + "free_teams_cannot_edit_standalone_canvases": { + "desc": "Free teams cannot edit standalone canvases" + }, + "restricted_action": { + "desc": "User does not have permission to perform this action." + }, + "canvas_editing_failed": { + "desc": "The changes to the canvas failed to be applied." + } + }, + "examples": { + "success": { + "url": "/api/canvases.edit?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/canvases.edit?token=YOUR_TOKEN", + "description": "Typical error response for bad content", + "example": { + "ok": false, + "error": "canvas_editing_failed", + "detail": "'content' error: line 28: Unsupported block type (List) within block quote" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/canvases.sections.lookup.json b/docs.slack.dev/methods/canvases.sections.lookup.json new file mode 100644 index 00000000..c2c45dd1 --- /dev/null +++ b/docs.slack.dev/methods/canvases.sections.lookup.json @@ -0,0 +1,93 @@ +{ + "desc": "Find sections matching the provided criteria", + "http_method": "POST", + "scope": "canvases:read", + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "canvas_id", + "criteria" + ], + "properties": { + "token": { + "desc": "Auth token with which to authenticate the session", + "type": "string", + "subtype": "auth", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "canvas_id": { + "desc": "Encoded ID of the canvas", + "example": "F1234ABCD", + "subtype": "canvas", + "schema": "file_id" + }, + "criteria": { + "example": "{\"section_types\": [\"any_header\"], \"contains_text\": \"CAN Report\"}", + "desc": "Filtering criteria", + "schema": "criteria" + } + } + }, + "output": { + "type": "object", + "required": [ + "sections" + ], + "properties": { + "sections": { + "desc": "Sections in the canvas that match the provided criteria", + "type": "array", + "items": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + } + } + } + }, + "errors": { + "canvas_deleted": { + "desc": "The canvas you wish to search is not available." + }, + "canvas_disabled_user_team": { + "desc": "Canvas is disabled on user's team." + }, + "canvas_not_found": { + "desc": "The canvas you wish to search for is not available." + }, + "internal_error": { + "desc": "Something went wrong on our end, please try again." + } + }, + "examples": { + "success": { + "url": "/api/canvases.sections.lookup?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "sections": [ + { + "id": "temp:C:eBa219af721c664422cb90a52fac" + } + ] + } + }, + "error": { + "url": "/api/canvases.sections.lookup?token=YOUR_TOKEN", + "description": "Typical error for a canvas that the actor does not have access to", + "example": { + "ok": false, + "error": "canvas_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.delete.json b/docs.slack.dev/methods/chat.delete.json new file mode 100644 index 00000000..d49b298b --- /dev/null +++ b/docs.slack.dev/methods/chat.delete.json @@ -0,0 +1,89 @@ +{ + "desc": "Deletes a message.", + "http_method": "POST", + "scope": "chat:write", + "scope_by_token_type": { + "app": "chat:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "ts", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "as_user": { + "desc": "Pass true to delete the message as the authed user with `chat:write:user` scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", + "example": "true", + "type": "boolean" + }, + "channel": { + "desc": "Channel containing the message to be deleted.", + "type": "string", + "subtype": "channel" + }, + "ts": { + "desc": "Timestamp of the message to be deleted.", + "example": "\"1405894322.002768\"", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": { + "type": "object", + "required": [ + "channel", + "ts" + ], + "properties": { + "channel": { + "type": "string", + "subtype": "channel" + }, + "ts": { + "schema": "ts" + } + } + }, + "errors": { + "cant_delete_message": { + "desc": "Authenticated user does not have permission to delete this message." + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "message_not_found": { + "desc": "No message exists with the requested timestamp." + } + }, + "examples": { + "success": { + "url": "/api/chat.delete?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "channel": "C123ABC456", + "ts": "1401383885.000061" + } + }, + "error": { + "url": "/api/chat.delete?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "error": "message_not_found", + "ok": false + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.deleteScheduledMessage.json b/docs.slack.dev/methods/chat.deleteScheduledMessage.json new file mode 100644 index 00000000..6b5a8d9b --- /dev/null +++ b/docs.slack.dev/methods/chat.deleteScheduledMessage.json @@ -0,0 +1,69 @@ +{ + "desc": "Deletes a pending scheduled message from the queue.", + "http_method": "POST", + "scope": "chat:write", + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "scheduled_message_id", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "as_user": { + "desc": "Pass true to delete the message as the authed user with `chat:write:user` scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", + "example": "true", + "type": "boolean" + }, + "channel": { + "desc": "The channel the scheduled_message is posting to", + "example": "C123456789", + "type": "string", + "subtype": "channel" + }, + "scheduled_message_id": { + "desc": "`scheduled_message_id` returned from call to chat.scheduleMessage", + "example": "Q1234ABCD", + "type": "string" + } + } + }, + "output": null, + "errors": { + "bad_token": { + "desc": "The provided `token` was invalid." + }, + "channel_not_found": { + "desc": "The `channel` passed is either an invalid ID or does not exist." + }, + "invalid_scheduled_message_id": { + "desc": "The `scheduled_message_id` passed is either an invalid ID, or the scheduled message it's referencing has already been sent or deleted." + } + }, + "examples": { + "success": { + "url": "/api/chat.deletesSheduledMessage?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/chat.deleteScheduledMessage?token=YOUR_TOKEN", + "description": "Typical error response if no message is found", + "example": { + "ok": false, + "error": "invalid_scheduled_message_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.getPermalink.json b/docs.slack.dev/methods/chat.getPermalink.json new file mode 100644 index 00000000..8fe536a1 --- /dev/null +++ b/docs.slack.dev/methods/chat.getPermalink.json @@ -0,0 +1,85 @@ +{ + "desc": "Retrieve a permalink URL for a specific extant message", + "http_method": "GET", + "scope": "none", + "no_scope_required": true, + "rate_limits": "t5", + "slack_connect_workspaces_allowed": true, + "args": { + "type": "object", + "required": [ + "token", + "channel", + "message_ts" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "The ID of the conversation or channel containing the message", + "type": "string", + "subtype": "channel" + }, + "message_ts": { + "type": "string", + "subtype": "timestamp", + "desc": "A message's `ts` value, uniquely identifying it within a channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "permalink", + "channel" + ], + "properties": { + "permalink": { + "type": "string" + }, + "channel": { + "type": "string", + "subtype": "channel" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "message_not_found": { + "desc": "The message identified by `message_ts` could not be found." + } + }, + "examples": { + "success": { + "description": "Standard success response", + "url": "/api/chat.getPermalink?message_ts=1358546515.000008&channel=C1H9RESGL", + "example": { + "ok": true, + "channel": "C123ABC456", + "permalink": "https://ghostbusters.slack.com/archives/C1H9RESGA/p135854651500008" + } + }, + "success_with_thread": { + "description": "When the provided `message_ts` is part of a thread, the permalink format changes. Note that the `p135854651700023` value in the example below was to the threaded message, and the query parameters refer to the top-level message.", + "url": "/api/chat.getPermalink?message_ts=1358546517.000023&channel=C1H9RESGA", + "example": { + "ok": true, + "channel": "C123ABC456", + "permalink": "https://ghostbusters.slack.com/archives/C1H9RESGL/p135854651700023?thread_ts=1358546515.000008&cid=C1H9RESGL" + } + }, + "error": { + "description": "Error response when channel cannot be found", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.meMessage.json b/docs.slack.dev/methods/chat.meMessage.json new file mode 100644 index 00000000..9a02d404 --- /dev/null +++ b/docs.slack.dev/methods/chat.meMessage.json @@ -0,0 +1,84 @@ +{ + "desc": "Share a me message into a channel.", + "http_method": "POST", + "scope": "chat:write", + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "text" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.", + "type": "string", + "subtype": "channel" + }, + "text": { + "desc": "Text of the message to send.", + "example": "Hello world", + "type": "string" + } + } + }, + "output": { + "type": "object", + "properties": { + "ts": { + "schema": "ts" + }, + "channel": { + "schema": "channel" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "is_archived": { + "desc": "Channel has been archived." + }, + "msg_too_long": { + "desc": "Message text is too long" + }, + "no_text": { + "desc": "No message text provided" + }, + "not_in_channel": { + "desc": "Cannot post user messages to a channel they are not in." + }, + "rate_limited": { + "desc": "Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information" + } + }, + "examples": { + "success": { + "url": "/api/chat.meMessage?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "channel": "C123ABC456", + "ts": "1417671948.000006" + } + }, + "error": { + "url": "/api/chat.meMessage?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.postEphemeral.json b/docs.slack.dev/methods/chat.postEphemeral.json new file mode 100644 index 00000000..896a2415 --- /dev/null +++ b/docs.slack.dev/methods/chat.postEphemeral.json @@ -0,0 +1,212 @@ +{ + "desc": "Sends an ephemeral message to a user in a channel.", + "http_method": "POST", + "scope": "chat:write", + "scope_by_token_type": { + "app": "chat:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "user", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "as_user": { + "desc": "(Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.", + "example": "true", + "type": "boolean" + }, + "attachments": { + "desc": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "example": "[{\"pretext\": \"pre-hello\", \"text\": \"text-world\"}]", + "subtype": "attachments", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "blocks": { + "desc": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "example": "[{\"type\": \"section\", \"text\": {\"type\": \"plain_text\", \"text\": \"Hello world\"}}]", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "channel": { + "desc": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.", + "type": "string", + "subtype": "channel" + }, + "icon_emoji": { + "desc": "Emoji to use as the icon for this message. Overrides `icon_url`.", + "example": ":chart_with_upwards_trend:", + "type": "string" + }, + "icon_url": { + "desc": "URL to an image to use as the icon for this message.", + "example": "http://lorempixel.com/48/48", + "type": "string" + }, + "link_names": { + "desc": "Find and link channel names and usernames.", + "example": "true", + "type": "boolean" + }, + "markdown_text": { + "desc": "Accepts message text formatted in markdown. This argument should not be used in conjunction with `blocks` or `text`. Limit this field to 12,000 characters.", + "type": "string", + "example": "**This is bold text**" + }, + "parse": { + "desc": "Change how messages are treated. Defaults to `none`. See [below](#formatting).", + "example": "full", + "anyOf": [ + { + "enum": [ + "", + "none", + "full", + "mrkdwn", + "false" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "text": { + "desc": "How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail.", + "example": "Hello world", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "thread_ts": { + "desc": "Provide another message's `ts` value to post this message in a thread. Avoid using a reply's `ts` value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread.", + "subtype": "timestamp", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "user": { + "desc": "`id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument.", + "example": "U0BPQUNTA", + "subtype": "user", + "schema": "user_id" + }, + "username": { + "desc": "Set your bot's user name.", + "example": "My Bot", + "type": "string" + } + } + }, + "output": { + "required": [ + "message_ts" + ], + "type": "object", + "properties": { + "message_ts": { + "type": "string" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "invalid_blocks": { + "desc": "Blocks submitted with this message are not valid" + }, + "invalid_blocks_format": { + "desc": "The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax." + }, + "is_archived": { + "desc": "Channel has been archived." + }, + "markdown_text_conflict": { + "desc": "Markdown text cannot be used in conjunction with `blocks` or `text` argument." + }, + "message_limit_exceeded": { + "desc": "Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces" + }, + "messages_tab_disabled": { + "desc": "Messages tab for the app is disabled." + }, + "msg_too_long": { + "desc": "Message text is too long" + }, + "no_text": { + "desc": "No message text provided" + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from posting." + }, + "too_many_attachments": { + "desc": "Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message." + }, + "user_not_in_channel": { + "desc": "Intended recipient is not in the specified channel." + }, + "not_in_channel": { + "desc": "Cannot post user messages to a channel they are not in." + }, + "invalid_attachments": { + "desc": "Attachments that contain blocks are not valid" + }, + "cannot_reply_to_message": { + "desc": "This message type cannot have thread replies." + } + }, + "examples": { + "success": { + "url": "/api/chat.postEphemeral?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "message_ts": "1502210682.580145" + } + }, + "error": { + "url": "/api/chat.postEphemeral?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "user_not_in_channel" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.postMessage.json b/docs.slack.dev/methods/chat.postMessage.json new file mode 100644 index 00000000..92dcdcf1 --- /dev/null +++ b/docs.slack.dev/methods/chat.postMessage.json @@ -0,0 +1,341 @@ +{ + "desc": "Sends a message to a channel.", + "http_method": "POST", + "scope": "chat:write", + "scope_by_token_type": { + "app": "chat:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t5", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "as_user": { + "desc": "(Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps. See [legacy `as_user` parameter](#legacy_as_user) below.", + "example": "true", + "type": "boolean" + }, + "attachments": { + "desc": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "example": "[{\"pretext\": \"pre-hello\", \"text\": \"text-world\"}]", + "anyOf": [ + { + "type": "string", + "subtype": "attachments" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "blocks": { + "desc": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "example": "[{\"type\": \"section\", \"text\": {\"type\": \"plain_text\", \"text\": \"Hello world\"}}]", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "channel": { + "desc": "An encoded ID or channel name that represents a channel, private group, or IM channel to send the message to. See [below](#channels) for more details.", + "type": "string", + "subtype": "channel" + }, + "icon_emoji": { + "desc": "Emoji to use as the icon for this message. Overrides `icon_url`.", + "example": ":chart_with_upwards_trend:", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "icon_url": { + "desc": "URL to an image to use as the icon for this message.", + "example": "http://lorempixel.com/48/48", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "link_names": { + "desc": "Find and link user groups. No longer supports linking individual users; use syntax shown in [Mentioning Users](/messaging/formatting-message-text#mentioning-users) instead.", + "example": "true", + "type": "boolean" + }, + "markdown_text": { + "desc": "Accepts message text formatted in markdown. This argument should not be used in conjunction with `blocks` or `text`. Limit this field to 12,000 characters.", + "type": "string", + "example": "**This is bold text**" + }, + "metadata": { + "desc": "JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.", + "example": "{\"event_type\": \"task_created\", \"event_payload\": { \"id\": \"11223\", \"title\": \"Redesign Homepage\"}}", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "mrkdwn": { + "default": "true", + "desc": "Disable Slack markup parsing by setting to `false`. Enabled by default.", + "example": "false", + "type": "boolean" + }, + "parse": { + "desc": "Change how messages are treated. See [below](#formatting).", + "example": "full", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reply_broadcast": { + "desc": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", + "example": "true", + "type": "boolean" + }, + "text": { + "desc": "How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail.", + "example": "Hello world", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "thread_ts": { + "desc": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "unfurl_links": { + "desc": "Pass true to enable unfurling of primarily text-based content.", + "example": "true", + "type": "boolean" + }, + "unfurl_media": { + "desc": "Pass false to disable unfurling of media content.", + "example": "false", + "type": "boolean" + }, + "username": { + "desc": "Set your bot's user name.", + "example": "My Bot", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + } + }, + "output": { + "required": [ + "channel", + "ts" + ], + "properties": { + "channel": { + "schema": "channel" + }, + "ts": { + "schema": "ts" + }, + "message": { + "schema": "message" + }, + "is_duplicate": { + "desc": "Pass true if duplicate message is attempted to be sent.", + "example": "true", + "type": "boolean" + } + }, + "type": "object" + }, + "errors": { + "as_user_not_supported": { + "desc": "The `as_user` parameter does not function with workspace apps." + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "duplicate_channel_not_found": { + "desc": "Channel associated with `client_msg_id` was invalid." + }, + "duplicate_message_not_found": { + "desc": "No duplicate message exists associated with `client_msg_id`." + }, + "ekm_access_denied": { + "desc": "Your message couldn’t be sent because your admins have disabled sending messages to this channel." + }, + "invalid_blocks": { + "desc": "Blocks submitted with this message are not valid" + }, + "invalid_blocks_format": { + "desc": "The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax." + }, + "invalid_metadata_format": { + "desc": "Invalid metadata format provided" + }, + "invalid_metadata_schema": { + "desc": "Invalid metadata schema provided" + }, + "is_archived": { + "desc": "Channel has been archived." + }, + "markdown_text_conflict": { + "desc": "Markdown text cannot be used in conjunction with `blocks` or `text` argument." + }, + "message_limit_exceeded": { + "desc": "Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces" + }, + "messages_tab_disabled": { + "desc": "Messages tab for the app is disabled." + }, + "metadata_must_be_sent_from_app": { + "desc": "Message metadata can only be posted or updated using an app-level token" + }, + "metadata_too_large": { + "desc": "Metadata exceeds size limit" + }, + "msg_blocks_too_long": { + "desc": "Blocks submitted with this message are too long." + }, + "no_text": { + "desc": "No message text provided" + }, + "not_in_channel": { + "desc": "Cannot post user messages to a channel they are not in." + }, + "rate_limited": { + "desc": "Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information" + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from posting." + }, + "restricted_action_non_threadable_channel": { + "desc": "Cannot post thread replies into a non_threadable channel." + }, + "restricted_action_read_only_channel": { + "desc": "Cannot post any message into a read-only channel." + }, + "restricted_action_thread_locked": { + "desc": "Cannot post replies to a thread that has been locked by admins." + }, + "restricted_action_thread_only_channel": { + "desc": "Cannot post top-level messages into a thread-only channel." + }, + "slack_connect_canvas_sharing_blocked": { + "desc": "Admin has disabled Canvas File sharing in all Slack Connect communications" + }, + "slack_connect_file_link_sharing_blocked": { + "desc": "Admin has disabled Slack File sharing in all Slack Connect communications" + }, + "slack_connect_lists_sharing_blocked": { + "desc": "Admin has disabled Lists sharing in all Slack Connect communications" + }, + "team_not_found": { + "desc": "This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`." + }, + "too_many_attachments": { + "desc": "Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message." + }, + "too_many_contact_cards": { + "desc": "Too many contact_cards were provided with this message. A maximum of 10 contact cards are allowed on a message." + }, + "cannot_reply_to_message": { + "desc": "This message type cannot have thread replies." + }, + "missing_file_data": { + "desc": "Attempted to share a file but some required data was missing." + }, + "attachment_payload_limit_exceeded": { + "desc": "Attachment payload size is too long." + } + }, + "warnings": { + "message_truncated": { + "desc": "The `text` field of a message should have no more than 40,000 characters. We [truncate really long messages](/changelog/2018-04-truncating-really-long-messages)." + } + }, + "examples": { + "success": { + "url": "/api/chat.postMessage?token=YOUR_TOKEN", + "description": "The response includes the \"timestamp ID\" (`ts`) and the channel-like thing where the message was posted. It also includes the complete message object, as parsed by our servers. This may differ from the provided arguments as our servers sanitize links, attachments, and other properties. Your message may mutate.", + "example": { + "ok": true, + "channel": "C123ABC456", + "ts": "1503435956.000247", + "message": { + "text": "Here's a message for you", + "username": "ecto1", + "bot_id": "B123ABC456", + "attachments": [ + { + "text": "This is an attachment", + "id": 1, + "fallback": "This is an attachment's fallback" + } + ], + "type": "message", + "subtype": "bot_message", + "ts": "1503435956.000247" + } + } + }, + "error": { + "url": "/api/chat.postMessage?token=INVALID_TOKEN", + "description": "Typical error response if too many attachments are included", + "example": { + "ok": false, + "error": "too_many_attachments" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.scheduleMessage.json b/docs.slack.dev/methods/chat.scheduleMessage.json new file mode 100644 index 00000000..d45d2e86 --- /dev/null +++ b/docs.slack.dev/methods/chat.scheduleMessage.json @@ -0,0 +1,243 @@ +{ + "desc": "Schedules a message to be sent to a channel.", + "http_method": "POST", + "scope": "chat:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "post_at" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "as_user": { + "desc": "Set to `true` to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by [new Slack apps](/quickstart). See [chat.postMessage](chat.postMessage#authorship).", + "example": "true", + "type": "boolean" + }, + "attachments": { + "desc": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "example": "[{\"pretext\": \"pre-hello\", \"text\": \"text-world\"}]", + "type": "string" + }, + "blocks": { + "desc": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "example": "[{\"type\": \"section\", \"text\": {\"type\": \"plain_text\", \"text\": \"Hello world\"}}]", + "type": "string" + }, + "channel": { + "desc": "Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", + "type": "string", + "subtype": "channel" + }, + "link_names": { + "desc": "Find and link user groups. No longer supports linking individual users; use syntax shown in [Mentioning Users](/messaging/formatting-message-text#mentioning-users) instead.", + "example": "true", + "type": "boolean" + }, + "markdown_text": { + "desc": "Accepts message text formatted in markdown. This argument should not be used in conjunction with `blocks` or `text`. Limit this field to 12,000 characters.", + "type": "string", + "example": "**This is bold text**" + }, + "parse": { + "desc": "Change how messages are treated. See [chat.postMessage](chat.postMessage#formatting).", + "example": "full", + "type": "string", + "enum": [ + "none", + "full" + ] + }, + "post_at": { + "desc": "Unix timestamp representing the future time the message should post to Slack.", + "example": "299876400", + "type": "integer" + }, + "reply_broadcast": { + "desc": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", + "example": "true", + "type": "boolean" + }, + "text": { + "desc": "How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail.", + "example": "Hello world", + "type": "string" + }, + "thread_ts": { + "desc": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", + "type": "string" + }, + "unfurl_links": { + "desc": "Pass true to enable unfurling of primarily text-based content.", + "example": "true", + "type": "boolean" + }, + "unfurl_media": { + "desc": "Pass false to disable unfurling of media content.", + "example": "false", + "type": "boolean" + }, + "metadata": { + "desc": "JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.", + "example": "{\"event_type\": \"task_created\", \"event_payload\": { \"id\": \"11223\", \"title\": \"Redesign Homepage\"}}", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + } + }, + "output": { + "required": [ + "channel", + "post_at", + "scheduled_message_id", + "message" + ], + "properties": { + "channel": { + "schema": "channel" + }, + "post_at": { + "type": "integer" + }, + "scheduled_message_id": { + "type": "string" + }, + "message": { + "type": "object" + } + }, + "type": "object" + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "is_archived": { + "desc": "Channel has been archived." + }, + "invalid_blocks": { + "desc": "Blocks submitted with this message are not valid" + }, + "invalid_blocks_format": { + "desc": "The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax." + }, + "invalid_metadata_format": { + "desc": "Invalid metadata format provided" + }, + "invalid_metadata_schema": { + "desc": "Invalid metadata schema provided" + }, + "invalid_time": { + "desc": "value passed for `post_time` was invalid." + }, + "markdown_text_conflict": { + "desc": "Markdown text cannot be used in conjunction with `blocks` or `text` argument." + }, + "message_limit_exceeded": { + "desc": "Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces" + }, + "metadata_must_be_sent_from_app": { + "desc": "Message metadata can only be posted or updated using an app-level token" + }, + "metadata_too_large": { + "desc": "Metadata exceeds size limit" + }, + "msg_too_long": { + "desc": "Message text is too long" + }, + "no_text": { + "desc": "No message text provided" + }, + "not_in_channel": { + "desc": "Cannot post user messages to a channel they are not in." + }, + "rate_limited": { + "desc": "Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information" + }, + "restricted_action": { + "desc": "A workspace preference prevents the authenticated user from posting." + }, + "restricted_action_non_threadable_channel": { + "desc": "Cannot post thread replies into a non_threadable channel." + }, + "restricted_action_read_only_channel": { + "desc": "Cannot post any message into a read-only channel." + }, + "restricted_action_thread_only_channel": { + "desc": "Cannot post top-level messages into a thread-only channel." + }, + "restricted_too_many": { + "desc": "Too many messages were scheduled in the channel for a given period. See [usage info](/reference/methods/chat.scheduleMessage#restrictions) for additional details" + }, + "slack_connect_file_link_sharing_blocked": { + "desc": "Admin has disabled Slack File sharing in all Slack Connect communications" + }, + "time_in_past": { + "desc": "value passed for `post_time` was in the past." + }, + "time_too_far": { + "desc": "value passed for `post_time` was too far into the future." + }, + "too_many_attachments": { + "desc": "Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message." + }, + "invalid_token": { + "desc": "The passed token is invalid or not supported by this method." + } + }, + "warnings": { + "message_truncated": { + "desc": "The `text` field of a message should have no more than 40,000 characters. We [truncate really long messages](/changelog/2018-04-truncating-really-long-messages)." + } + }, + "examples": { + "success": { + "url": "/api/chat.scheduleMessage?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "channel": "C123ABC456", + "scheduled_message_id": "Q1298393284", + "post_at": "1562180400", + "message": { + "text": "Here's a message for you in the future", + "username": "ecto1", + "bot_id": "B123ABC456", + "attachments": [ + { + "text": "This is an attachment", + "id": 1, + "fallback": "This is an attachment's fallback" + } + ], + "type": "delayed_message", + "subtype": "bot_message" + } + } + }, + "error": { + "url": "/api/chat.scheduleMessage?token=INVALID_TOKEN", + "description": "Typical error response if the `post_at` is invalid (ex. in the past or too far into the future)", + "example": { + "ok": false, + "error": "time_in_past" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.scheduledMessages.list.json b/docs.slack.dev/methods/chat.scheduledMessages.list.json new file mode 100644 index 00000000..ba0c5851 --- /dev/null +++ b/docs.slack.dev/methods/chat.scheduledMessages.list.json @@ -0,0 +1,147 @@ +{ + "desc": "Returns a list of scheduled messages.", + "http_method": "POST", + "scope": "none", + "json_input_supported": true, + "no_scope_required": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "The channel of the scheduled messages", + "example": "C123456789", + "type": "string", + "subtype": "channel" + }, + "cursor": { + "desc": "For pagination purposes, this is the `cursor` value returned from a previous call to `chat.scheduledmessages.list` indicating where you want to start this call from.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "latest": { + "desc": "A Unix timestamp of the latest value in the time range", + "example": "1562137200", + "type": "string", + "subtype": "timestamp" + }, + "limit": { + "desc": "Maximum number of original entries to return.", + "example": "100", + "type": "integer" + }, + "oldest": { + "desc": "A Unix timestamp of the oldest value in the time range", + "example": "1562137200", + "type": "string", + "subtype": "timestamp" + }, + "team_id": { + "desc": "encoded team id to list channels in, required if org token is used", + "type": "string", + "subtype": "team" + } + } + }, + "output": { + "type": "object", + "required": [ + "scheduled_messages" + ], + "properties": { + "scheduled_messages": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "channel_id", + "post_at", + "date_created" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[Q][A-Z0-9]{8,}$" + }, + "channel_id": { + "schema": "channel" + }, + "post_at": { + "type": "integer", + "pattern": "^\\d{10}$" + }, + "date_created": { + "type": "integer", + "pattern": "^\\d{10}$" + }, + "text": { + "type": "string" + } + } + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "invalid_channel": { + "desc": "The channel passed is invalid" + }, + "invalid_cursor": { + "desc": "Provided cursor is invalid" + }, + "invalid_token": { + "desc": "Token is invalid" + } + }, + "examples": { + "success": { + "url": "/api/chat.scheduledMessages.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "scheduled_messages": [ + { + "id": 1298393284, + "channel_id": "C1H9RESGL", + "post_at": 1551991428, + "date_created": 1551891734, + "text": "Here's a message for you in the future" + } + ], + "response_metadata": { + "next_cursor": "" + } + } + }, + "error": { + "url": "/api/chat.scheduledMessages.list?channel=INVALID_CHANNEL", + "description": "Typical error response if the channel passed is invalid", + "example": { + "ok": false, + "error": "invalid_channel" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.unfurl.json b/docs.slack.dev/methods/chat.unfurl.json new file mode 100644 index 00000000..4821fa7e --- /dev/null +++ b/docs.slack.dev/methods/chat.unfurl.json @@ -0,0 +1,155 @@ +{ + "desc": "Provide custom unfurl behavior for user-posted URLs", + "http_method": "POST", + "scope": "links:write", + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "ts", + "unfurls" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel ID of the message. Both `channel` and `ts` must be provided together, *or* `unfurl_id` and `source` must be provided together.", + "type": "string", + "subtype": "channel" + }, + "ts": { + "desc": "Timestamp of the message to add unfurl behavior to.", + "type": "string" + }, + "unfurls": { + "desc": "URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.", + "type": "string" + }, + "user_auth_message": { + "desc": "Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, `Not now` or `Never ask me again`.", + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "user_auth_required": { + "default": "0", + "desc": "Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain", + "type": "boolean" + }, + "user_auth_url": { + "desc": "Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.", + "example": "https://example.com/onboarding?user_id=xxx", + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "user_auth_blocks": { + "desc": "Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior", + "schema": "blocks" + }, + "unfurl_id": { + "type": "string", + "desc": "The ID of the link to unfurl. Both `unfurl_id` and `source` must be provided together, *or* `channel` and `ts` must be provided together.", + "example": "Uxxxxxxx-909b5454-75f8-4ac4-b325-1b40e230bbd8" + }, + "source": { + "type": "string", + "desc": "The source of the link to unfurl. The source may either be `composer`, when the link is inside the message composer, or `conversations_history`, when the link has been posted to a conversation.", + "example": "composer", + "enum": [ + "composer", + "conversations_history" + ] + } + } + }, + "output": null, + "errors": { + "cannot_auth_user": { + "desc": "The current user cannot be authenticated." + }, + "cannot_find_channel": { + "desc": "The specified channel could not be located for this token." + }, + "cannot_find_message": { + "desc": "The `ts` value in the request does not match a message." + }, + "cannot_find_service": { + "desc": "A record of your app being allowed to unfurl for this workspace could not be found." + }, + "cannot_parse_attachment": { + "desc": "The provided `unfurls` argument could not be parsed or understood." + }, + "cannot_prompt": { + "desc": "The current user has already interacted with and dismissed a prompt for this application." + }, + "cannot_unfurl_message": { + "desc": "The URL cannot be unfurled because the URL provided does not appear in the message." + }, + "cannot_unfurl_url": { + "desc": "The URL cannot be unfurled. This error may be returned if you haven't acknowledged a `link_shared` event tied to the same URL. It is also returned when the domain appears in a workspace's administrative blocklists." + }, + "invalid_unfurl_id": { + "desc": "The unfurl ID is invalid." + }, + "invalid_unfurls_format": { + "desc": "The `unfurls` parameter cannot be JSON-decoded into a map of URLs to attachments." + }, + "invalid_metadata_format": { + "desc": "The `metadata` parameter cannot be JSON-decoded into the expected format." + }, + "invalid_source": { + "desc": "The unfurl source is invalid." + }, + "missing_channel": { + "desc": "The request is missing the `channel` parameter" + }, + "missing_source": { + "desc": "The request is missing the `source` parameter." + }, + "missing_ts": { + "desc": "The request is missing the `ts` parameter" + }, + "missing_unfurl_id": { + "desc": "The request is missing the `unfurl_id` parameter." + }, + "missing_unfurls": { + "desc": "The request is missing the `unfurls` parameter." + } + }, + "examples": { + "success": { + "url": "/api/chat.unfurl?token=YOUR_TOKEN", + "description": "Typical, minimal success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/chat.unfurl?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "cannot_unfurl_url" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/chat.update.json b/docs.slack.dev/methods/chat.update.json new file mode 100644 index 00000000..b23021b9 --- /dev/null +++ b/docs.slack.dev/methods/chat.update.json @@ -0,0 +1,298 @@ +{ + "desc": "Updates a message.", + "http_method": "POST", + "scope": "chat:write", + "scope_by_token_type": { + "app": "chat:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "ts", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "as_user": { + "desc": "Pass true to update the message as the authed user. Bot users in this context are considered authed users.", + "example": "true", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "attachments": { + "desc": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "example": "[{\"pretext\": \"pre-hello\", \"text\": \"text-world\"}]", + "anyOf": [ + { + "type": "string", + "subtype": "attachments" + }, + { + "type": "null" + } + ] + }, + "blocks": { + "desc": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "example": "[{\"type\": \"section\", \"text\": {\"type\": \"plain_text\", \"text\": \"Hello world\"}}]", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "markdown_text": { + "desc": "Accepts message text formatted in markdown. This argument should not be used in conjunction with `blocks` or `text`. Limit this field to 12,000 characters.", + "type": "string", + "example": "**This is bold text**" + }, + "metadata": { + "desc": "JSON object with event_type and event_payload fields, presented as a URL-encoded string. If you don't include this field, the message's previous `metadata` will be retained. To remove previous `metadata`, include an empty object for this field. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.", + "example": "{\"event_type\": \"task_created\", \"event_payload\": { \"id\": \"11223\", \"title\": \"Redesign Homepage\"}}", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "channel": { + "desc": "Channel containing the message to be updated. For direct messages, ensure that this value is a DM ID (starts with `D`) instead of a User ID (starts with either `U` or `W`).", + "type": "string", + "subtype": "channel" + }, + "link_names": { + "desc": "Find and link channel names and usernames. Defaults to `none`. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, `none`.", + "example": "true", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "parse": { + "desc": "Change how messages are treated. Defaults to `client`, unlike `chat.postMessage`. Accepts either `none` or `full`. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, `client`.", + "example": "none", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "text": { + "desc": "How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail.", + "example": "Hello world", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "ts": { + "desc": "Timestamp of the message to be updated.", + "example": "\"1405894322.002768\"", + "type": "string", + "subtype": "timestamp" + }, + "reply_broadcast": { + "desc": "Broadcast an existing thread reply to make it visible to everyone in the channel or conversation.", + "type": "boolean", + "example": "true", + "default": "false" + }, + "file_ids": { + "desc": "Array of new file ids that will be sent with this message.", + "example": "F013GKY52QK,F013GL22D0T or [\"F013GKY52QK\",\"F013GL22D0T\"]", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "output": { + "required": [ + "channel", + "ts", + "text", + "message" + ], + "properties": { + "channel": { + "type": "string" + }, + "ts": { + "type": "string" + }, + "text": { + "type": "string" + }, + "message": { + "title": "Message object", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + }, + "blocks": { + "schema": "blocks" + }, + "attachments": { + "type": "array", + "items": { + "type": "object" + } + }, + "metadata": { + "type": "object" + } + } + } + }, + "type": "object" + }, + "errors": { + "as_user_not_supported": { + "desc": "The `as_user` parameter does not function with workspace apps." + }, + "block_mismatch": { + "desc": "Rich-text blocks cannot be replaced with non-rich-text blocks" + }, + "cant_broadcast_message": { + "desc": "Unable to broadcast this message." + }, + "cant_update_message": { + "desc": "Authenticated user does not have permission to update this message." + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "edit_window_closed": { + "desc": "The message cannot be edited due to the team message edit settings" + }, + "external_channel_migrating": { + "desc": "The channel is in the process of migrating and so the message cannot be updated at this time." + }, + "invalid_attachments": { + "desc": "The attachments were invalid." + }, + "invalid_blocks": { + "desc": "The blocks were invalid for the requesting user." + }, + "invalid_metadata_format": { + "desc": "Invalid metadata format provided" + }, + "invalid_metadata_schema": { + "desc": "Invalid metadata schema provided" + }, + "is_inactive": { + "desc": "The message cannot be edited within a frozen, archived or deleted channel." + }, + "markdown_text_conflict": { + "desc": "Markdown text cannot be used in conjunction with `blocks` or `text` argument." + }, + "message_not_found": { + "desc": "No message exists with the requested timestamp." + }, + "metadata_must_be_sent_from_app": { + "desc": "Message metadata can only be posted or updated using an app-level token" + }, + "metadata_too_large": { + "desc": "Metadata exceeds size limit" + }, + "msg_too_long": { + "desc": "Message text is too long. The `text` field cannot exceed 4,000 characters." + }, + "no_dual_broadcast_content_update": { + "desc": "Can't broadcast an old reply and update the content at the same time." + }, + "no_text": { + "desc": "No message text provided" + }, + "slack_connect_file_link_sharing_blocked": { + "desc": "Admin has disabled Slack File sharing in all Slack Connect communications" + }, + "team_not_found": { + "desc": "Team associated with the message and channel could not be found." + }, + "too_many_attachments": { + "desc": "Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message." + }, + "update_failed": { + "desc": "Internal update failure." + }, + "invalid_blocks_format": { + "desc": "The `blocks` array is not a valid JSON object or doesn't match the Block Kit syntax." + }, + "streaming_state_conflict": { + "desc": "The message is currently streaming text and cannot be edited." + } + }, + "warnings": { + "message_truncated": { + "desc": "The `text` field of a message should have no more than 40,000 characters. We [truncate really long messages](/changelog/2018-04-truncating-really-long-messages)." + } + }, + "examples": { + "success": { + "url": "/api/chat.update?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "channel": "C123ABC456", + "ts": "1401383885.000061", + "text": "Updated text you carefully authored", + "message": { + "text": "Updated text you carefully authored", + "user": "U34567890" + } + } + }, + "error": { + "url": "/api/chat.update?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "cant_update_message" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.acceptSharedInvite.json b/docs.slack.dev/methods/conversations.acceptSharedInvite.json new file mode 100644 index 00000000..15299b5f --- /dev/null +++ b/docs.slack.dev/methods/conversations.acceptSharedInvite.json @@ -0,0 +1,175 @@ +{ + "desc": "Accepts an invitation to a Slack Connect channel.", + "http_method": "POST", + "scope": "post", + "json_input_supported": true, + "scope_by_token_type": { + "granular_bot": "conversations.connect:write" + }, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_name": { + "desc": "Name of the channel. If the channel does not exist already in your workspace, this name is the one that the channel will take.", + "example": "puppies-r-us", + "type": "string" + }, + "is_private": { + "desc": "Whether the channel should be private.", + "example": "true", + "type": "boolean" + }, + "free_trial_accepted": { + "desc": "Whether you'd like to use your workspace's free trial to begin using Slack Connect.", + "type": "boolean" + }, + "invite_id": { + "desc": "ID of the invite that you’d like to accept. Must provide either `invite_id` or `channel_id`. See the [`shared_channel_invite_received`](/reference/events/shared_channel_invite_received) event payload for more details on how to retrieve the ID of the invitation.", + "schema": "invite_id" + }, + "channel_id": { + "desc": "ID of the channel that you'd like to accept. Must provide either `invite_id` or `channel_id`.", + "schema": "channel_id" + }, + "team_id": { + "subtype": "team", + "desc": "The ID of the workspace to accept the channel in. If an org-level token is used to call this method, the `team_id` argument is required.", + "schema": "workspace_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "implicit_approval", + "channel_id", + "invite_id", + "can_open_scdm" + ], + "properties": { + "implicit_approval": { + "desc": "Indicates if the shared channel invite was implicitly approved by the away team.", + "type": "boolean" + }, + "channel_id": { + "schema": "channel_id" + }, + "invite_id": { + "schema": "invite_id" + }, + "can_open_scdm": { + "desc": "Indicates if the acceptor can SCDM the inviter", + "type": "boolean" + } + } + }, + "errors": { + "channel_conversion_in_progress": { + "desc": "Unable to create a channel connection while a channel conversion is in progress" + }, + "connection_limit_exceeded": { + "desc": "This channel has hit the limit of external connections." + }, + "email_does_not_match": { + "desc": "User's email does not match the email in the invite." + }, + "failed_to_start_trial": { + "desc": "Unable to initiate a trial on shared invite acceptance" + }, + "has_already_connected_to_org": { + "desc": "A team on the workspace of the org is already in the channel." + }, + "invalid_arguments": { + "desc": "Invalid API arguments were provided. Either `sig` or `invite_id` must be specified." + }, + "invalid_emoji_not_allowed": { + "desc": "The desired name contains emoji." + }, + "invalid_host_team": { + "desc": "The host workspace is invalid." + }, + "invalid_link": { + "desc": "We couldn't find an invite associated with the ID provided." + }, + "invalid_name": { + "desc": "The value passed for `channel_name` was invalid." + }, + "invalid_name_maxlength": { + "desc": "The value passed for `channel_name` exceeded the maximum length." + }, + "invalid_name_punctuation": { + "desc": "The value passed for `channel_name` contained only punctuation." + }, + "invalid_name_required": { + "desc": "The value passed for `channel_name` was empty." + }, + "invalid_name_specials": { + "desc": "The value passed for `channel_name` contained unallowed special characters or upper case characters." + }, + "invite_from_same_org": { + "desc": "You can't accept an invite from the same org or workspace." + }, + "invite_not_found": { + "desc": "We couldn't find a Slack Connect channel invite with the ID provided." + }, + "invalid_privacy": { + "desc": "An invalid channel privacy was provided." + }, + "invalid_recipient_team": { + "desc": "The accepting team does not match the expected recipient team." + }, + "invalid_target_team": { + "desc": "The target workspace is invalid." + }, + "invite_used": { + "desc": "This invite has already been accepted." + }, + "is_pending_connected_to_org": { + "desc": "A team pending to join the channel is on the org of the team trying to accept." + }, + "legacy_connection_invalid_org": { + "desc": "Teams not previously connected to this legacy channel can't connect." + }, + "legacy_connection_limit_exceeded": { + "desc": "You cannot share a legacy ESC channel with a third team" + }, + "name_taken": { + "desc": "The desired channel name is already taken in your workspace." + }, + "not_allowed_for_grid_workspace": { + "desc": "Acceptance is not allowed for this workspace." + }, + "not_paid": { + "desc": "This workspace doesn't have access to this feature." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from creating private channels." + }, + "team_not_found": { + "desc": "The team provided in the `team_id` argument does not exits." + }, + "user_cannot_create_channel": { + "desc": "This user is not allowed to create a channel." + }, + "user_is_restricted": { + "desc": "This user is restricted and cannot accept the invite." + }, + "user_not_found": { + "desc": "The user accepting the invite is not a member of the team provided in the `team_id` argument." + }, + "user_required_to_accept_as_private_but_cannot": { + "desc": "This uer cannot accept a private channel invitation." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.approveSharedInvite.json b/docs.slack.dev/methods/conversations.approveSharedInvite.json new file mode 100644 index 00000000..0e7bed07 --- /dev/null +++ b/docs.slack.dev/methods/conversations.approveSharedInvite.json @@ -0,0 +1,79 @@ +{ + "desc": "Approves an invitation to a Slack Connect channel", + "http_method": "POST", + "scope": "post", + "scope_by_token_type": { + "granular_bot": "conversations.connect:manage" + }, + "rate_limits": "t3", + "json_input_supported": true, + "args": { + "type": "object", + "required": [ + "token", + "invite_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "invite_id": { + "desc": "ID of the shared channel invite to approve", + "schema": "invite_id" + }, + "target_team": { + "desc": "The team or enterprise id of the other party involved in the invitation you are approving", + "schema": "team_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "already_approved": { + "desc": "This invite was already approved by this team." + }, + "approval_inactive": { + "desc": "The approval associated with the invite ID is not active." + }, + "approval_not_found": { + "desc": "We could not find an approval associated with the invite ID provided." + }, + "channel_conversion_in_progress": { + "desc": "A channel conversion is in progress" + }, + "channel_not_found": { + "desc": "The channel associated with this invite wasn't found." + }, + "invalid_action": { + "desc": "This action is no longer valid, e.g., trying to approve an invite that has already been approved." + }, + "invalid_link": { + "desc": "The link provided was invalid." + }, + "invite_not_found": { + "desc": "The invite specified wasn't found." + }, + "missing_target_team": { + "desc": "The `target_team` parameter is required for this request. The inviting team must provide this argument." + }, + "not_paid": { + "desc": "The team attempting to approve this invite is not paid and therefore not eligible." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from creating private channels." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.archive.json b/docs.slack.dev/methods/conversations.archive.json new file mode 100644 index 00000000..83086a79 --- /dev/null +++ b/docs.slack.dev/methods/conversations.archive.json @@ -0,0 +1,75 @@ +{ + "desc": "Archives a conversation.", + "http_method": "POST", + "scope": "conversations:write", + "scope_by_token_type": { + "app": "conversations:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "ID of conversation to archive", + "subtype": "channel", + "schema": "channel" + } + } + }, + "output": null, + "errors": { + "already_archived": { + "desc": "Channel has already been archived." + }, + "cant_archive_general": { + "desc": "You cannot archive the general channel" + }, + "cant_archive_required": { + "desc": "You cannot archive a required channel" + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "not_in_channel": { + "desc": "The token can not be found in channel." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from archiving." + } + }, + "examples": { + "success": { + "url": "/api/conversations.archive?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/conversations.archive?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.canvases.create.json b/docs.slack.dev/methods/conversations.canvases.create.json new file mode 100644 index 00000000..1319ab7d --- /dev/null +++ b/docs.slack.dev/methods/conversations.canvases.create.json @@ -0,0 +1,94 @@ +{ + "desc": "Create a channel canvas for a channel", + "http_method": "POST", + "scope": "canvases:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id" + ], + "properties": { + "token": { + "desc": "Auth token with which to authenticate the session", + "type": "string", + "subtype": "auth", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel_id": { + "desc": "Channel ID of the channel the canvas will be tabbed in.", + "type": "string", + "subtype": "channel", + "schema": "channel" + }, + "document_content": { + "example": "{\"type\": \"markdown\", \"markdown\": \"> channel canvas!\"}", + "desc": "Structure describing the type and value of the content to create", + "schema": "selection" + }, + "title": { + "type": "string", + "example": "The Coolest Title Ever", + "desc": "Title of the newly created canvas" + } + } + }, + "output": { + "type": "object", + "required": [ + "canvas_id" + ], + "properties": { + "canvas_id": { + "desc": "Encoded ID of the canvas", + "schema": "file_id" + } + } + }, + "errors": { + "canvas_disabled_user_team": { + "desc": "Canvas is disabled on user's team" + }, + "restricted_action": { + "desc": "User does not have permission to perform this action." + }, + "channel_canvas_creation_failed": { + "desc": "Channel canvas was unable to be created." + }, + "channel_canvas_already_exists": { + "desc": "Channel canvas for the specified channel already exists." + }, + "team_tier_cannot_create_channel_canvases": { + "desc": "Team tier cannot create channel canvases" + }, + "canvas_creation_failed": { + "desc": "Canvas was unable to be created." + }, + "canvas_tab_creation_failed": { + "desc": "Canvas tab was unable to be created." + }, + "free_team_canvas_tab_already_exists": { + "desc": "Canvas tab for specified channel and team tier already exists." + } + }, + "examples": { + "success": { + "url": "/api/conversations.canvases.create?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "canvas_id": "F1234ABCD" + } + }, + "error": { + "url": "/api/conversations.canvases.create?token=YOUR_TOKEN", + "description": "Typical error response when the channel canvas has already been created for the channel", + "example": { + "ok": false, + "error": "channel_canvas_already_exists" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.close.json b/docs.slack.dev/methods/conversations.close.json new file mode 100644 index 00000000..0b44ec21 --- /dev/null +++ b/docs.slack.dev/methods/conversations.close.json @@ -0,0 +1,84 @@ +{ + "desc": "Closes a direct message or multi-person direct message.", + "http_method": "POST", + "scope": "conversations:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Conversation to close.", + "subtype": "channel_group", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "properties": { + "already_closed": { + "type": "boolean" + }, + "no_op": { + "type": "boolean" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "user_does_not_own_channel": { + "desc": "Calling user does not own this DM channel." + }, + "not_permitted": { + "desc": "Not permitted." + }, + "external_channel_migrating": { + "desc": "External channel migrating." + } + }, + "examples": { + "success": { + "url": "/api/conversations.close?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "success_but_no_op": { + "description": "If the channel was already closed the response will include `no_op` and `already_closed` properties. It means Slack did nothing really.", + "example": { + "ok": true, + "no_op": true, + "already_closed": true + } + }, + "error": { + "url": "/api/conversations.close?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.create.json b/docs.slack.dev/methods/conversations.create.json new file mode 100644 index 00000000..87fd9085 --- /dev/null +++ b/docs.slack.dev/methods/conversations.create.json @@ -0,0 +1,159 @@ +{ + "desc": "Initiates a public or private channel-based conversation", + "http_method": "POST", + "scope": "conversations:write", + "scope_by_token_type": { + "app": "conversations:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "is_private": { + "desc": "Create a private channel instead of a public one", + "example": "true", + "type": "boolean" + }, + "name": { + "desc": "Name of the public or private channel to create", + "example": "mychannel", + "type": "string" + }, + "team_id": { + "desc": "encoded team id to create the channel in, required if org token is used", + "subtype": "team", + "anyOf": [ + { + "type": "string", + "subtype": "team" + }, + { + "type": "null" + } + ] + } + } + }, + "output": { + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "schema": "conversation" + } + } + }, + "errors": { + "cannot_create_channel": { + "desc": "This channel is unable to be created." + }, + "invalid_name": { + "desc": "Value passed for `name` was invalid." + }, + "invalid_name_maxlength": { + "desc": "Value passed for `name` exceeded max length." + }, + "invalid_name_punctuation": { + "desc": "Value passed for `name` contained only punctuation." + }, + "invalid_name_required": { + "desc": "Value passed for `name` was empty." + }, + "invalid_name_specials": { + "desc": "Value passed for `name` contained unallowed special characters or upper case characters." + }, + "missing_argument": { + "desc": "A required argument is missing." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "name_taken": { + "desc": "A channel cannot be created with the given name." + }, + "no_channel": { + "desc": "Value passed for `name` was empty." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from creating channels." + }, + "canvas_disabled_user_team": { + "desc": "Canvas is disabled on user's team" + } + }, + "examples": { + "success": { + "url": "/api/conversations.create?token=YOUR_TOKEN", + "description": "If successful, the command returns a [conversation object](/reference/objects/conversation-object).", + "example": { + "ok": true, + "channel": { + "id": "C0EAQDV4Z", + "name": "endeavor", + "is_channel": true, + "is_group": false, + "is_im": false, + "created": 1504554479, + "creator": "U0123456", + "is_archived": false, + "is_general": false, + "unlinked": 0, + "name_normalized": "endeavor", + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_member": true, + "is_private": false, + "is_mpim": false, + "last_read": "0000000000.000000", + "latest": null, + "unread_count": 0, + "unread_count_display": 0, + "topic": { + "value": "", + "creator": "", + "last_set": 0 + }, + "properties": { + "canvas": { + "file_id": "F123ABC456", + "is_empty": true, + "quip_thread_id": "JAB1CDefGhI" + } + }, + "purpose": { + "value": "", + "creator": "", + "last_set": 0 + }, + "previous_names": [], + "priority": 0 + } + } + }, + "error": { + "url": "/api/conversations.create?token=INVALID_TOKEN", + "description": "Typical error response when name already in use", + "example": { + "ok": false, + "error": "name_taken" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.declineSharedInvite.json b/docs.slack.dev/methods/conversations.declineSharedInvite.json new file mode 100644 index 00000000..26df4a26 --- /dev/null +++ b/docs.slack.dev/methods/conversations.declineSharedInvite.json @@ -0,0 +1,67 @@ +{ + "desc": "Declines a Slack Connect channel invite.", + "http_method": "GET", + "scope": "post", + "scope_by_token_type": { + "granular_bot": "conversations.connect:manage" + }, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "invite_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "invite_id": { + "desc": "ID of the Slack Connect invite to decline. Subscribe to the [`shared_channel_invite_accepted`](/reference/events/shared_channel_invite_accepted) event to receive IDs of Slack Connect channel invites that have been accepted and are awaiting approval.", + "schema": "invite_id" + }, + "target_team": { + "desc": "The team or enterprise id of the other party involved in the invitation you are declining", + "schema": "team_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "approval_inactive": { + "desc": "This approval is no longer active, it may have expired or been declined." + }, + "approval_not_found": { + "desc": "We could not find a Slack Connect approval for the invite provided." + }, + "inactive_invite": { + "desc": "This invitation is no longer active, it may have expired or been revoked." + }, + "invite_not_found": { + "desc": "We could not find a Slack Connect invite associated with the ID provided." + }, + "missing_target_team": { + "desc": "The `target_team` parameter is required for this request." + }, + "not_paid": { + "desc": "The workspace is not eligible to use Slack Connect." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from declining Slack Connect invites.." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.externalInvitePermissions.set.json b/docs.slack.dev/methods/conversations.externalInvitePermissions.set.json new file mode 100644 index 00000000..c527b291 --- /dev/null +++ b/docs.slack.dev/methods/conversations.externalInvitePermissions.set.json @@ -0,0 +1,91 @@ +{ + "desc": "Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'.", + "http_method": "POST", + "scope": "conversations:write", + "scope_by_token_type": { + "granular_bot": "conversations.connect:manage" + }, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "target_team", + "action" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "The channel ID to change external invite permissions for", + "example": "C123456", + "subtype": "channel", + "schema": "channel_id" + }, + "target_team": { + "desc": "The encoded team ID of the target team. Must be in the specified channel.", + "example": "T726G27TT", + "schema": "team_id" + }, + "action": { + "desc": "Type of action to be taken: upgrade or downgrade", + "example": "upgrade", + "enum": [ + "upgrade", + "downgrade" + ], + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Cannot find channel" + }, + "not_supported": { + "desc": "Attempting to upgrade a channel that cannot be upgraded" + }, + "restricted_action": { + "desc": "A team preference prevents the user from taking this action." + }, + "invalid_target_team": { + "desc": "The target team provided is not valid for the channel." + }, + "invalid_action": { + "desc": "The user did not provid a valid action. Valid actions are 'upgrade' or 'downgrade'." + } + }, + "examples": { + "success": { + "url": "/api/conversations.externalInvitePermissions.set?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/conversations.externalInvitePermissions.set?token=YOUR_TOKEN", + "description": "Typical error response if channel was not found", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.history.json b/docs.slack.dev/methods/conversations.history.json new file mode 100644 index 00000000..0623afb0 --- /dev/null +++ b/docs.slack.dev/methods/conversations.history.json @@ -0,0 +1,294 @@ +{ + "desc": "Fetches a conversation's history of messages and events.", + "http_method": "GET", + "scope": "conversations:history", + "scope_by_token_type": { + "app": "conversations:history" + }, + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Conversation ID to fetch history for.", + "type": "string", + "subtype": "channel" + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "include_all_metadata": { + "default": 0, + "desc": "Return all metadata associated with this message.", + "type": "boolean", + "example": "true" + }, + "inclusive": { + "default": 0, + "desc": "Include messages with `oldest` or `latest` timestamps in results. Ignored unless either timestamp is specified.", + "example": "true", + "type": "boolean" + }, + "latest": { + "desc": "Only messages before this Unix timestamp will be included in results. Default is the current time.", + "type": "string", + "subtype": "timestamp" + }, + "limit": { + "default": "100", + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the conversation history hasn't been reached. Maximum of 999.", + "example": "20", + "type": "number" + }, + "oldest": { + "default": "0", + "desc": "Only messages after this Unix timestamp will be included in results.", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": { + "type": "object", + "required": [ + "messages", + "has_more", + "channel_actions_ts", + "channel_actions_count" + ], + "properties": { + "messages": { + "type": "array", + "minItems": 0, + "items": { + "schema": "message" + } + }, + "has_more": { + "type": "boolean" + }, + "pin_count": { + "type": "integer" + }, + "channel_actions_ts": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "channel_actions_count": { + "type": "integer" + }, + "response_metadata": { + "required": [ + "next_cursor" + ], + "type": "object", + "properties": { + "next_cursor": { + "type": "string" + } + } + }, + "oldest": { + "type": "string" + }, + "is_limited": { + "type": "boolean" + }, + "latest": { + "type": "string" + }, + "unread_count_display": { + "type": "integer" + }, + "users": { + "type": "object" + }, + "deleted": { + "type": "array", + "items": { + "schema": "ts" + } + }, + "mutation_timestamps": { + "type": "object", + "required": [ + "latest", + "updated", + "history_invalid" + ], + "properties": { + "latest": { + "schema": "ts" + }, + "updated": { + "schema": "ts" + }, + "history_invalid": { + "schema": "ts" + } + } + }, + "deleted_overflow": { + "type": "boolean" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + }, + "next_ts": { + "type": "integer" + }, + "latest_updates": { + "type": "object" + }, + "unchanged_messages": { + "type": "array", + "items": { + "schema": "ts" + }, + "date_joined": { + "type": "integer", + "desc": "Unix timestamp of when the user joined the channel", + "example": "1562002086" + } + } + } + }, + "errors": { + "channel_is_limited_access": { + "desc": "The user has no access to the channel. This is only applicable to private Salesforce record channels." + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "invalid_metadata_filter_keys": { + "desc": "Value passed for `metadata_keys_to_include` was invalid. Must be valid json array of strings." + }, + "invalid_ts_latest": { + "desc": "Value passed for `latest` was invalid" + }, + "invalid_ts_oldest": { + "desc": "Value passed for `oldest` was invalid" + }, + "not_in_channel": { + "desc": "The token used does not have access to the proper channel. Only user tokens can access public channels they are not in." + } + }, + "examples": { + "success": { + "url": "/api/conversations.history?token=YOUR_TOKEN", + "description": "Typical success response containing a channel's messages", + "example": { + "ok": true, + "messages": [ + { + "type": "message", + "user": "U123ABC456", + "text": "I find you punny and would like to smell your nose letter", + "ts": "1512085950.000216" + }, + { + "type": "message", + "user": "U222BBB222", + "text": "What, you want to smell my shoes better?", + "ts": "1512104434.000490" + } + ], + "has_more": true, + "pin_count": 0, + "response_metadata": { + "next_cursor": "bmV4dF90czoxNTEyMDg1ODYxMDAwNTQz" + } + } + }, + "success_with_formatted_messages": { + "description": "Typical success response included formatted messages from bots and incoming webhooks", + "example": { + "ok": true, + "messages": [ + { + "type": "message", + "user": "U123ABC456", + "text": "I find you punny and would like to smell your nose letter", + "ts": "1512085950.000216" + }, + { + "type": "message", + "user": "U222BBB222", + "text": "Isn't this whether dreadful? ", + "attachments": [ + { + "service_name": "Leg end nary a laugh, Ink.", + "text": "This is likely a pun about the weather.", + "fallback": "We're withholding a pun from you", + "thumb_url": "https://badpuns.example.com/puns/123.png", + "thumb_width": 1920, + "thumb_height": 700, + "id": 1 + } + ], + "ts": "1512085950.218404" + } + ], + "has_more": true, + "pin_count": 0, + "response_metadata": { + "next_cursor": "bmV4dF90czoxNTEyMTU0NDA5MDAwMjU2" + } + } + }, + "success_with_timestamp_inclusive": { + "description": "Typical success response with `latest` timestamp and `inclusive` parameters specified", + "example": { + "ok": true, + "latest": "1512085950.000216", + "messages": [ + { + "type": "message", + "user": "U123ABC456", + "text": "I find you punny and would like to smell your nose letter", + "ts": "1512085950.000216" + } + ], + "has_more": true, + "pin_count": 0, + "response_metadata": { + "next_cursor": "bmV4dF90czoxNTEyMzU2NTI2MDAwMTMw" + } + } + }, + "error": { + "url": "/api/conversations.history?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.info.json b/docs.slack.dev/methods/conversations.info.json new file mode 100644 index 00000000..ba8b013f --- /dev/null +++ b/docs.slack.dev/methods/conversations.info.json @@ -0,0 +1,200 @@ +{ + "desc": "Retrieve information about a conversation.", + "http_method": "GET", + "scope": "conversations:read", + "scope_by_token_type": { + "app": "conversations:read" + }, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Conversation ID to learn more about", + "type": "string", + "subtype": "channel" + }, + "include_locale": { + "desc": "Set this to `true` to receive the locale for this conversation. Defaults to `false`", + "type": "boolean" + }, + "include_num_members": { + "default": "false", + "desc": "Set to `true` to include the member count for the specified conversation. Defaults to `false`", + "example": "true", + "type": "boolean" + } + } + }, + "output": { + "type": "object", + "required": [ + "channel" + ], + "properties": { + "app_home": { + "schema": "home" + }, + "channel": { + "schema": "conversation" + }, + "home_view": { + "anyOf": [ + { + "type": "null" + }, + { + "schema": "view" + } + ] + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + } + }, + "examples": { + "success": { + "url": "/api/conversations.info?token=YOUR_TOKEN", + "description": "Typical success response for a public channel. A response from a private channel and a multi-party IM is very similar to this example. Note that if the `properties.tabs` parameter is an empty set, it will not be included in the channel object.", + "example": { + "ok": true, + "channel": { + "id": "C012AB3CD", + "name": "general", + "is_channel": true, + "is_group": false, + "is_im": false, + "is_mpim": false, + "is_private": false, + "created": 1654868334, + "is_archived": false, + "is_general": true, + "unlinked": 0, + "name_normalized": "general", + "is_shared": false, + "is_frozen": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "pending_shared": [], + "context_team_id": "T123ABC456", + "updated": 1723130875818, + "parent_conversation": null, + "creator": "U123ABC456", + "is_ext_shared": false, + "shared_team_ids": [ + "T123ABC456" + ], + "pending_connected_team_ids": [], + "topic": { + "value": "For public discussion of generalities", + "creator": "W012A3BCD", + "last_set": 1449709364 + }, + "purpose": { + "value": "This part of the workspace is for fun. Make fun here.", + "creator": "W012A3BCD", + "last_set": 1449709364 + }, + "properties": { + "tabs": [ + { + "id": "workflows", + "label": "", + "type": "workflows" + }, + { + "id": "files", + "label": "", + "type": "files" + }, + { + "id": "bookmarks", + "label": "", + "type": "bookmarks" + } + ] + }, + "previous_names": [] + } + } + }, + "success_im": { + "url": "/api/conversations.info?token=YOUR_TOKEN", + "description": "Typical success response for a 1:1 direct message", + "example": { + "ok": true, + "channel": { + "id": "C012AB3CD", + "created": 1507235627, + "is_im": true, + "is_org_shared": false, + "user": "U27FFLNF4", + "last_read": "1513718191.000038", + "latest": { + "type": "message", + "user": "U5R3PALPN", + "text": "Psssst!", + "ts": "1513718191.000038" + }, + "unread_count": 0, + "unread_count_display": 0, + "is_open": true, + "locale": "en-US", + "priority": 0.043016851216706 + } + } + }, + "success_im_num_members": { + "url": "/api/conversations.info?token=YOUR_TOKEN", + "description": "When using the method with the `include_num_members` parameter, we return a `num_members` field", + "example": { + "ok": true, + "channel": { + "id": "C012AB3CD", + "created": 1507235627, + "is_im": true, + "is_org_shared": false, + "user": "U27FFLNF4", + "last_read": "1513718191.000038", + "latest": { + "type": "message", + "user": "U5R3PALPN", + "text": "Psssst!", + "ts": "1513718191.000038" + }, + "unread_count": 0, + "unread_count_display": 0, + "is_open": true, + "locale": "en-US", + "priority": 0.043016851216706, + "num_members": 2 + } + } + }, + "error": { + "url": "/api/conversations.info?token=INVALID_TOKEN", + "description": "Typical error response when a channel cannot be found", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.invite.json b/docs.slack.dev/methods/conversations.invite.json new file mode 100644 index 00000000..11bd59b3 --- /dev/null +++ b/docs.slack.dev/methods/conversations.invite.json @@ -0,0 +1,179 @@ +{ + "desc": "Invites users to a channel.", + "http_method": "POST", + "scope": "conversations:write", + "scope_by_token_type": { + "oauth": "conversations:write.invites", + "granular_bot": "conversations:write.invites", + "workflow": "conversations:write.invites" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "users" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "The ID of the public or private channel to invite user(s) to.", + "type": "string", + "subtype": "channel" + }, + "force": { + "desc": "When set to `true` and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to `false`.", + "example": "true", + "default": "false", + "type": "boolean" + }, + "users": { + "desc": "A comma separated list of user IDs. Up to 100 users may be listed.", + "type": "string", + "subtype": "users" + } + } + }, + "output": { + "type": "object", + "properties": { + "channel": { + "schema": "conversation" + }, + "group": { + "schema": "conversation" + }, + "errors": { + "type": "array" + } + } + }, + "errors": { + "already_in_channel": { + "desc": "Invited user is already in the channel." + }, + "cant_invite": { + "desc": "User cannot be invited to this channel." + }, + "cant_invite_self": { + "desc": "Authenticated user cannot invite themselves to a channel." + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "invitee_cant_see_channel": { + "desc": "The Enterprise org multi-workspace channel you are inviting a user to is not shared with any workspaces the user is currently a member of." + }, + "is_archived": { + "desc": "Channel has been archived." + }, + "org_user_not_in_team": { + "desc": "One or more members invited are part of the Enterprise organization but not the specific workspace you're interfacing with." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "no_permission": { + "desc": "User does not have permission to invite that specific user to the channel" + }, + "no_external_invite_permission": { + "desc": "User does not have permission to invite that external user to the channel" + }, + "no_user": { + "desc": "No value was passed for `users`." + }, + "not_in_channel": { + "desc": "Authenticated user is not in the channel." + }, + "ura_max_channels": { + "desc": "An invited user is a single-channel guest user ('ultra restricted access') that is already in the maximum number of conversations." + }, + "user_is_restricted": { + "desc": "An invited user is a guest user that is restricted from accessing this conversation." + }, + "user_not_found": { + "desc": "Value passed for `users` was invalid." + }, + "external_channel_migrating": { + "desc": "External channel migrating." + } + }, + "examples": { + "success": { + "url": "/api/conversations.invite?token=YOUR_TOKEN", + "description": "Typical success response when an invitation is extended", + "example": { + "ok": true, + "channel": { + "id": "C012AB3CD", + "name": "general", + "is_channel": true, + "is_group": false, + "is_im": false, + "created": 1449252889, + "creator": "W012A3BCD", + "is_archived": false, + "is_general": true, + "unlinked": 0, + "name_normalized": "general", + "is_read_only": false, + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_member": true, + "is_private": false, + "is_mpim": false, + "last_read": "1502126650.228446", + "topic": { + "value": "For public discussion of generalities", + "creator": "W012A3BCD", + "last_set": 1449709364 + }, + "purpose": { + "value": "This part of the workspace is for fun. Make fun here.", + "creator": "W012A3BCD", + "last_set": 1449709364 + }, + "previous_names": [ + "specifics", + "abstractions", + "etc" + ] + } + } + }, + "error": { + "url": "/api/conversations.invite?token=INVALID_TOKEN", + "description": "Error response when users cannot be invited for differing reasons: one for not being associated with a valid user ID, and one for being the user sending the invite.", + "example": { + "ok": false, + "error": "user_not_found", + "errors": [ + { + "user": "U111111", + "ok": false, + "error": "user_not_found" + }, + { + "user": "U222222", + "ok": false, + "error": "cant_invite_self" + } + ] + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.inviteShared.json b/docs.slack.dev/methods/conversations.inviteShared.json new file mode 100644 index 00000000..39f62a86 --- /dev/null +++ b/docs.slack.dev/methods/conversations.inviteShared.json @@ -0,0 +1,166 @@ +{ + "desc": "Sends an invitation to a Slack Connect channel", + "http_method": "GET", + "scope": "post", + "scope_by_token_type": { + "granular_bot": "conversations.connect:write" + }, + "rate_limits": "t2", + "json_input_supported": true, + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "type": "string", + "desc": "ID of the channel on your team that you'd like to share", + "subtype": "channel" + }, + "emails": { + "type": "array", + "desc": "Optional email to receive this invite. Either `emails` or `user_ids` must be provided. Only one email or one user ID may be invited at a time.", + "items": { + "type": "string", + "example": "foo@example.com" + } + }, + "user_ids": { + "type": "array", + "desc": "Optional user_id to receive this invite. Either `emails` or `user_ids` must be provided. Only one email or one user ID may be invited at a time.", + "items": { + "schema": "user_id" + } + }, + "external_limited": { + "type": "boolean", + "desc": "Optional boolean on whether invite is to an external limited member. Defaults to `true`." + } + } + }, + "output": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "invite_id": { + "schema": "invite_id" + }, + "conf_code": { + "type": "string" + }, + "is_legacy_shared_channel": { + "type": "boolean" + } + } + }, + "errors": { + "already_in_channel": { + "desc": "User is already in the channel." + }, + "cannot_share_cross_workspace_channel": { + "desc": "You cannot share a cross-workspace or org-wide channel." + }, + "cannot_share_mandatory_channel": { + "desc": "You cannot share #general or mandatory channels." + }, + "channel_archived": { + "desc": "You cannot share an archived channel." + }, + "channel_not_found": { + "desc": "The channel provided was not found." + }, + "connection_limit_exceeded": { + "desc": "This channel has hit the limit of external connections." + }, + "connection_limit_exceeded_pending": { + "desc": "This channel already has a pending invite." + }, + "invalid_channel_type": { + "desc": "You cannot share MPDMs or DMs." + }, + "invalid_email": { + "desc": "At least one email address provided is invalid." + }, + "invite_lookup_error": { + "desc": "An error occurred while attempting to look for existing invites." + }, + "invite_not_found": { + "desc": "An error occurred while inviting users." + }, + "legacy_connection_limit_exceeded": { + "desc": "You cannot share a legacy ESC channel with a third team" + }, + "member_limit_exceeded": { + "desc": "This channel that has hit the limit of members" + }, + "message_too_long": { + "desc": "The provided message was longer than 560 characters." + }, + "not_allowed_for_grid_workspace": { + "desc": "This workspace does not have Slack Connect enabled." + }, + "not_in_channel": { + "desc": "The app is not a member of the channel to invite." + }, + "not_owner": { + "desc": "Only the host organization for a channel can request to share it." + }, + "not_paid": { + "desc": "This feature is only available to paid teams." + }, + "not_supported": { + "desc": "This channel cannot be shared." + }, + "ratelimit": { + "desc": "The rate-limit for this method has been reached. The ratelimit is applied on a per-user basis when you pass the `emails` parameter." + }, + "recipients_not_specified": { + "desc": "Bots are required to specify which users to invite." + }, + "restricted_action": { + "desc": "A team preference does not allow this authorization to send invites." + }, + "too_many_emails": { + "desc": "Too many email recipients were passed in the `emails` parameter." + }, + "url_in_message": { + "desc": "The message contained a URL." + }, + "user_not_found": { + "desc": "User lookup failed." + }, + "no_external_invite_permission": { + "desc": "User does not have permission to invite an external user." + } + }, + "examples": { + "success": { + "url": "/api/conversations.inviteShared?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "invite_id": "I02UKAJ6RJA", + "is_legacy_shared_channel": false + } + }, + "error": { + "url": "/api/conversations.inviteShared?token=INVALID_TOKEN", + "description": "Typical error response when no email address or user ID is provided", + "example": { + "ok": false, + "error": "restricted_action" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.join.json b/docs.slack.dev/methods/conversations.join.json new file mode 100644 index 00000000..d314b4ab --- /dev/null +++ b/docs.slack.dev/methods/conversations.join.json @@ -0,0 +1,130 @@ +{ + "desc": "Joins an existing conversation.", + "http_method": "POST", + "scope": "channels:write", + "scope_by_token_type": { + "granular_bot": "channels:join" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "ID of conversation to join", + "type": "string", + "subtype": "channel" + } + } + }, + "output": { + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "schema": "conversation" + }, + "response_metadata": { + "type": "object", + "title": "Response metadata", + "properties": { + "warnings": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "errors": { + "channel_is_limited_access": { + "desc": "The user has no access to the channel. This is only applicable to private Salesforce record channels." + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "is_archived": { + "desc": "Channel has been archived." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "too_many_members": { + "desc": "The membership in the channel has exceeded our maximum member limit. No more users can join the channel." + } + }, + "examples": { + "success": { + "url": "/api/conversations.join?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "channel": { + "id": "C061EG9SL", + "name": "general", + "is_channel": true, + "is_group": false, + "is_im": false, + "created": 1449252889, + "creator": "U061F7AUR", + "is_archived": false, + "is_general": true, + "unlinked": 0, + "name_normalized": "general", + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_member": true, + "is_private": false, + "is_mpim": false, + "topic": { + "value": "Which widget do you worry about?", + "creator": "", + "last_set": 0 + }, + "purpose": { + "value": "For widget discussion", + "creator": "", + "last_set": 0 + }, + "previous_names": [] + }, + "warning": "already_in_channel", + "response_metadata": { + "warnings": [ + "already_in_channel" + ] + } + } + }, + "error": { + "url": "/api/conversations.join?token=INVALID_TOKEN", + "description": "Typical error response if the conversation is archived and cannot be joined", + "example": { + "ok": false, + "error": "is_archived" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.kick.json b/docs.slack.dev/methods/conversations.kick.json new file mode 100644 index 00000000..d1053ef7 --- /dev/null +++ b/docs.slack.dev/methods/conversations.kick.json @@ -0,0 +1,81 @@ +{ + "desc": "Removes a user from a conversation.", + "http_method": "POST", + "scope": "conversations:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "ID of conversation to remove user from.", + "subtype": "channel", + "schema": "channel" + }, + "user": { + "desc": "User ID to be removed.", + "subtype": "user", + "schema": "user_id" + } + } + }, + "output": null, + "errors": { + "cant_kick_from_general": { + "desc": "User cannot be removed from #general." + }, + "cant_kick_self": { + "desc": "Authenticated user can't kick themselves from a channel." + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "not_in_channel": { + "desc": "User was not in the channel." + }, + "not_supported": { + "desc": "This is not supported for this channel and user combination." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from kicking." + }, + "user_not_found": { + "desc": "Value passed for `user` was invalid." + } + }, + "examples": { + "success": { + "url": "/api/conversations.kick?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "errors": {} + } + }, + "error": { + "url": "/api/conversations.kick?token=INVALID_TOKEN", + "description": "Typical error response when you attempt to kick yourself from a channel", + "example": { + "ok": false, + "error": "cant_kick_self" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.leave.json b/docs.slack.dev/methods/conversations.leave.json new file mode 100644 index 00000000..233305ba --- /dev/null +++ b/docs.slack.dev/methods/conversations.leave.json @@ -0,0 +1,83 @@ +{ + "desc": "Leaves a conversation.", + "http_method": "POST", + "scope": "conversations:write", + "json_input_supported": true, + "rate_limits": "t3", + "slack_connect_workspaces_allowed": true, + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Conversation to leave", + "subtype": "channel", + "schema": "channel" + } + } + }, + "output": { + "type": "object", + "properties": { + "not_in_channel": { + "type": "boolean" + } + } + }, + "errors": { + "cant_leave_general": { + "desc": "Authenticated user cannot leave the general channel" + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "is_archived": { + "desc": "Channel has been archived." + }, + "last_member": { + "desc": "The last member party to a channel cannot leave the channel. Someone else must join the channel before this user is permitted to exit." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "user_is_restricted": { + "desc": "Restricted and guest users cannot leave channel" + } + }, + "examples": { + "success": { + "url": "/api/conversations.leave?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "success_with_warning": { + "description": "This method will not return an error if the user was not in the conversation before it was called. Instead the response will include a `not_in_channel` property:", + "example": { + "ok": false, + "not_in_channel": true + } + }, + "error": { + "url": "/api/conversations.leave?token=INVALID_TOKEN", + "description": "Typical error response when attempting to leave a workspace's \"general\" channel", + "example": { + "ok": false, + "error": "cant_leave_general" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.list.json b/docs.slack.dev/methods/conversations.list.json new file mode 100644 index 00000000..15ee5528 --- /dev/null +++ b/docs.slack.dev/methods/conversations.list.json @@ -0,0 +1,239 @@ +{ + "desc": "Lists all channels in a Slack team.", + "http_method": "GET", + "scope": "conversations:read", + "scope_by_token_type": { + "app": "conversations:read" + }, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "exclude_archived": { + "default": "false", + "desc": "Set to `true` to exclude archived channels from the list.", + "example": "true", + "type": "boolean" + }, + "limit": { + "default": 100, + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer under 1000.", + "example": "20", + "type": "number" + }, + "team_id": { + "desc": "encoded team id to list channels in, required if token belongs to org-wide app", + "type": "string", + "subtype": "team" + }, + "types": { + "default": "public_channel", + "desc": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", + "example": "public_channel,private_channel", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "channels" + ], + "properties": { + "channels": { + "type": "array", + "items": { + "schema": "conversation" + } + } + } + }, + "errors": { + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "invalid_limit": { + "desc": "Value passed for `limit` is not understood." + }, + "invalid_types": { + "desc": "Value passed for `type` could not be used based on the method's capabilities or the permission scopes granted to the used token." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_argument": { + "desc": "A required argument is missing." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + } + }, + "examples": { + "success": { + "url": "/api/conversations.list?token=YOUR_TOKEN", + "description": "Typical success response with only public channels", + "example": { + "ok": true, + "channels": [ + { + "id": "C012AB3CD", + "name": "general", + "is_channel": true, + "is_group": false, + "is_im": false, + "created": 1449252889, + "creator": "U012A3CDE", + "is_archived": false, + "is_general": true, + "unlinked": 0, + "name_normalized": "general", + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_member": true, + "is_private": false, + "is_mpim": false, + "updated": 1678229664302, + "topic": { + "value": "Company-wide announcements and work-based matters", + "creator": "", + "last_set": 0 + }, + "purpose": { + "value": "This channel is for team-wide communication and announcements. All team members are in this channel.", + "creator": "", + "last_set": 0 + }, + "previous_names": [], + "num_members": 4 + }, + { + "id": "C061EG9T2", + "name": "random", + "is_channel": true, + "is_group": false, + "is_im": false, + "created": 1449252889, + "creator": "U061F7AUR", + "is_archived": false, + "is_general": false, + "unlinked": 0, + "name_normalized": "random", + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_member": true, + "is_private": false, + "is_mpim": false, + "updated": 1678229664302, + "topic": { + "value": "Non-work banter and water cooler conversation", + "creator": "", + "last_set": 0 + }, + "purpose": { + "value": "A place for non-work-related flimflam, faffing, hodge-podge or jibber-jabber you'd prefer to keep out of more focused work-related channels.", + "creator": "", + "last_set": 0 + }, + "previous_names": [], + "num_members": 4 + } + ], + "response_metadata": { + "next_cursor": "dGVhbTpDMDYxRkE1UEI=" + } + } + }, + "success_with_mixed_results": { + "description": "Example response when mixing different conversation types together, like `im` and `mpim`", + "example": { + "ok": true, + "channels": [ + { + "id": "G0AKFJBEU", + "name": "mpdm-mr.banks--slactions-jackson--beforebot-1", + "is_channel": false, + "is_group": true, + "is_im": false, + "created": 1493657761, + "creator": "U061F7AUR", + "is_archived": false, + "is_general": false, + "unlinked": 0, + "name_normalized": "mpdm-mr.banks--slactions-jackson--beforebot-1", + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_member": true, + "is_private": true, + "is_mpim": true, + "is_open": true, + "updated": 1678229664302, + "topic": { + "value": "Group messaging", + "creator": "U061F7AUR", + "last_set": 1493657761 + }, + "purpose": { + "value": "Group messaging with: @mr.banks @slactions-jackson @beforebot", + "creator": "U061F7AUR", + "last_set": 1493657761 + }, + "priority": 0 + }, + { + "id": "D0C0F7S8Y", + "created": 1498500348, + "is_im": true, + "is_org_shared": false, + "user": "U0BS9U4SV", + "is_user_deleted": false, + "priority": 0 + }, + { + "id": "D0BSHH4AD", + "created": 1498511030, + "is_im": true, + "is_org_shared": false, + "user": "U0C0NS9HN", + "is_user_deleted": false, + "priority": 0 + } + ], + "response_metadata": { + "next_cursor": "aW1faWQ6RDBCSDk1RExI" + } + } + }, + "error": { + "url": "/api/conversations.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.listConnectInvites.json b/docs.slack.dev/methods/conversations.listConnectInvites.json new file mode 100644 index 00000000..df9c5360 --- /dev/null +++ b/docs.slack.dev/methods/conversations.listConnectInvites.json @@ -0,0 +1,65 @@ +{ + "desc": "Lists shared channel invites that have been generated or received but have not been approved by all parties", + "http_method": "POST", + "scope": "conversations.connect:manage", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "Encoded team id for the workspace to retrieve invites for, required if org token is used" + }, + "count": { + "default": 100, + "type": "integer", + "minimum": 1, + "maximum": 500, + "desc": "Maximum number of invites to return" + }, + "cursor": { + "type": "string", + "desc": "Set to `next_cursor` returned by previous call to list items in subsequent page", + "example": "5c3e53d5" + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "An invalid argument was supplied to the method." + }, + "restricted_action": { + "desc": "A team preference prevents the authenticated user from viewing shared channel invites." + } + }, + "output": { + "type": "object", + "required": [ + "invites" + ], + "properties": { + "invites": { + "type": "array", + "minItems": 0, + "items": { + "schema": "connect-invite" + } + }, + "response_metadata": { + "schema": "response_metadata" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.mark.json b/docs.slack.dev/methods/conversations.mark.json new file mode 100644 index 00000000..e03c2e00 --- /dev/null +++ b/docs.slack.dev/methods/conversations.mark.json @@ -0,0 +1,68 @@ +{ + "desc": "Sets the read cursor in a channel.", + "http_method": "POST", + "scope": "conversations:write", + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "ts" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel or conversation to set the read cursor for.", + "type": "string", + "subtype": "channel", + "example": "C012345678" + }, + "ts": { + "desc": "Unique identifier of message you want marked as most recently seen in this conversation.", + "type": "string", + "subtype": "timestamp", + "example": "1593473566.000200" + } + } + }, + "output": { + "type": "object", + "properties": {} + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "invalid_timestamp": { + "desc": "Value passed for `timestamp` was invalid." + }, + "not_in_channel": { + "desc": "Caller is not a member of the channel." + } + }, + "examples": { + "success": { + "url": "/api/channels.mark?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/channels.mark?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.members.json b/docs.slack.dev/methods/conversations.members.json new file mode 100644 index 00000000..c31e9e87 --- /dev/null +++ b/docs.slack.dev/methods/conversations.members.json @@ -0,0 +1,100 @@ +{ + "desc": "Retrieve members of a conversation.", + "http_method": "GET", + "scope": "conversations:read", + "scope_by_token_type": { + "app": "conversations:read" + }, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "ID of the conversation to retrieve members for", + "type": "string", + "subtype": "channel" + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "limit": { + "default": 100, + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.", + "example": "20", + "type": "number" + } + } + }, + "output": { + "type": "object", + "required": [ + "members" + ], + "properties": { + "members": { + "type": "array", + "items": { + "schema": "user_id" + } + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "fetch_members_failed": { + "desc": "Failed to fetch members for the conversation." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was invalid." + }, + "invalid_limit": { + "desc": "Value passed for `limit` was invalid." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + } + }, + "examples": { + "success": { + "url": "/api/conversations.members?token=YOUR_TOKEN", + "description": "Typical paginated success response", + "example": { + "ok": true, + "members": [ + "U023BECGF", + "U061F7AUR", + "W012A3CDE" + ], + "response_metadata": { + "next_cursor": "e3VzZXJfaWQ6IFcxMjM0NTY3fQ==" + } + } + }, + "error": { + "url": "/api/conversations.members?token=INVALID_TOKEN", + "description": "Typical error response when an invalid cursor is provided", + "example": { + "ok": false, + "error": "invalid_cursor" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.open.json b/docs.slack.dev/methods/conversations.open.json new file mode 100644 index 00000000..de7689b9 --- /dev/null +++ b/docs.slack.dev/methods/conversations.open.json @@ -0,0 +1,173 @@ +{ + "desc": "Opens or resumes a direct message or multi-person direct message.", + "http_method": "POST", + "scope": "conversations:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.", + "subtype": "channel_group", + "anyOf": [ + { + "type": "string", + "subtype": "channel_group" + }, + { + "type": "null" + } + ] + }, + "return_im": { + "desc": "Boolean, indicates you want the full IM channel definition in the response.", + "type": "boolean" + }, + "users": { + "desc": "Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`.", + "type": "string", + "subtype": "users" + }, + "prevent_creation": { + "desc": "Do not create a direct message or multi-person direct message. This is used to see if there is an existing dm or mpdm.", + "default": false, + "type": "boolean" + } + } + }, + "output": { + "type": "object", + "properties": { + "already_open": { + "type": "boolean" + }, + "no_op": { + "type": "boolean" + }, + "channel": { + "disableShapeUnification": true, + "oneOf": [ + { + "schema": "conversation" + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "schema": "channel" + } + } + } + ] + }, + "app_home": { + "schema": "home" + }, + "home_view": { + "anyOf": [ + { + "type": "null" + }, + { + "schema": "view" + } + ] + } + } + }, + "warnings": { + "no_op": { + "desc": "Slack did nothing when serving this request but it did not fail." + }, + "already_open": { + "desc": "The conversation was already open so Slack did nothing." + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "invalid_user_combination": { + "desc": "All external people must already be in at least one channel together to send a message." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "not_enough_users": { + "desc": "Needs at least 2 users to open" + }, + "too_many_users": { + "desc": "Needs at most 8 users to open" + }, + "user_disabled": { + "desc": "A specified `user` has been disabled." + }, + "user_not_found": { + "desc": "Value(s) passed for `users` was invalid." + }, + "user_not_visible": { + "desc": "The calling user is restricted from seeing the requested user." + }, + "users_list_not_supplied": { + "desc": "Missing `users` in request" + } + }, + "examples": { + "success": { + "url": "/api/conversations.open?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "channel": { + "id": "D069C7QFK" + } + } + }, + "success_with_return_im": { + "description": "Passing `return_im` will expand the response to include more info about a conversation", + "example": { + "ok": true, + "no_op": true, + "already_open": true, + "channel": { + "id": "D069C7QFK", + "created": 1460147748, + "is_im": true, + "is_org_shared": false, + "user": "U069C7QF3", + "last_read": "0000000000.000000", + "latest": null, + "unread_count": 0, + "unread_count_display": 0, + "is_open": true, + "priority": 0 + } + } + }, + "error": { + "url": "/api/conversations.open?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.rename.json b/docs.slack.dev/methods/conversations.rename.json new file mode 100644 index 00000000..14d13570 --- /dev/null +++ b/docs.slack.dev/methods/conversations.rename.json @@ -0,0 +1,142 @@ +{ + "desc": "Renames a conversation.", + "http_method": "POST", + "scope": "conversations:write", + "scope_by_token_type": { + "app": "conversations:write" + }, + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "ID of conversation to rename", + "type": "string", + "subtype": "channel" + }, + "name": { + "desc": "New name for conversation.", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "schema": "conversation" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "invalid_name": { + "desc": "Value passed for `name` was invalid." + }, + "invalid_name_maxlength": { + "desc": "Value passed for `name` exceeded max length." + }, + "invalid_name_punctuation": { + "desc": "Value passed for `name` contained only punctuation." + }, + "invalid_name_required": { + "desc": "Value passed for `name` was empty." + }, + "invalid_name_specials": { + "desc": "Value passed for `name` contained unallowed special characters or upper case characters." + }, + "is_archived": { + "desc": "Cannot rename archived channel." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "name_taken": { + "desc": "New channel name is taken." + }, + "not_authorized": { + "desc": "Caller cannot rename this channel." + }, + "not_in_channel": { + "desc": "Caller is not a member of the channel." + } + }, + "examples": { + "success": { + "url": "/api/conversations.rename?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "channel": { + "id": "C012AB3CD", + "name": "general", + "is_channel": true, + "is_group": false, + "is_im": false, + "created": 1449252889, + "creator": "W012A3BCD", + "is_archived": false, + "is_general": true, + "unlinked": 0, + "name_normalized": "general", + "is_read_only": false, + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_member": true, + "is_private": false, + "is_mpim": false, + "last_read": "1502126650.228446", + "topic": { + "value": "For public discussion of generalities", + "creator": "W012A3BCD", + "last_set": 1449709364 + }, + "purpose": { + "value": "This part of the workspace is for fun. Make fun here.", + "creator": "W012A3BCD", + "last_set": 1449709364 + }, + "previous_names": [ + "specifics", + "abstractions", + "etc" + ], + "num_members": 23, + "locale": "en-US" + } + } + }, + "error": { + "url": "/api/conversations.rename?token=INVALID_TOKEN", + "description": "Typical error response when the calling user is not a member of the conversation", + "example": { + "ok": false, + "error": "not_in_channel" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.replies.json b/docs.slack.dev/methods/conversations.replies.json new file mode 100644 index 00000000..7eac0d5e --- /dev/null +++ b/docs.slack.dev/methods/conversations.replies.json @@ -0,0 +1,186 @@ +{ + "desc": "Retrieve a thread of messages posted to a conversation", + "http_method": "GET", + "scope": "conversations:history", + "scope_by_token_type": { + "app": "conversations:history" + }, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "ts" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Conversation ID to fetch thread from.", + "type": "string", + "subtype": "channel" + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "include_all_metadata": { + "default": 0, + "desc": "Return all metadata associated with this message.", + "type": "boolean", + "example": "true" + }, + "inclusive": { + "default": 0, + "desc": "Include messages with `oldest` or `latest` timestamps in results. Ignored unless either timestamp is specified.", + "example": "true", + "type": "boolean" + }, + "latest": { + "default": "now", + "desc": "Only messages before this Unix timestamp will be included in results.", + "type": "string", + "subtype": "timestamp" + }, + "limit": { + "default": 1000, + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.", + "example": "20", + "type": "number", + "minimum": 1, + "maximum": 1000 + }, + "oldest": { + "default": "0", + "desc": "Only messages after this Unix timestamp will be included in results.", + "type": "string", + "subtype": "timestamp" + }, + "ts": { + "desc": "Unique identifier of either a thread’s parent message or a message in the thread. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": { + "type": "object", + "required": [ + "messages" + ], + "properties": { + "has_more": { + "type": "boolean" + }, + "messages": { + "type": "array", + "items": { + "schema": "message" + } + }, + "latest_updates": { + "type": "object" + }, + "unchanged_messages": { + "type": "array", + "items": { + "schema": "ts" + } + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value for `channel` was missing or invalid." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "invalid_metadata_filter_keys": { + "desc": "Value passed for `metadata_keys_to_include` was invalid. Must be valid json array of strings." + }, + "invalid_ts_latest": { + "desc": "Value passed for `latest` was invalid" + }, + "invalid_ts_oldest": { + "desc": "Value passed for `oldest` was invalid" + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "thread_not_found": { + "desc": "Value for `ts` was missing or invalid." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "list_record_comment_fetch_failed": { + "desc": "Failed to fetch list record comments." + } + }, + "examples": { + "success": { + "url": "/api/conversations.replies?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "messages": [ + { + "type": "message", + "user": "U061F7AUR", + "text": "island", + "thread_ts": "1482960137.003543", + "reply_count": 3, + "subscribed": true, + "last_read": "1484678597.521003", + "unread_count": 0, + "ts": "1482960137.003543" + }, + { + "type": "message", + "user": "U061F7AUR", + "text": "one island", + "thread_ts": "1482960137.003543", + "parent_user_id": "U061F7AUR", + "ts": "1483037603.017503" + }, + { + "type": "message", + "user": "U061F7AUR", + "text": "two island", + "thread_ts": "1482960137.003543", + "parent_user_id": "U061F7AUR", + "ts": "1483051909.018632" + }, + { + "type": "message", + "user": "U061F7AUR", + "text": "three for the land", + "thread_ts": "1482960137.003543", + "parent_user_id": "U061F7AUR", + "ts": "1483125339.020269" + } + ], + "has_more": true, + "ok": true, + "response_metadata": { + "next_cursor": "bmV4dF90czoxNDg0Njc4MjkwNTE3MDkx" + } + } + }, + "error": { + "url": "/api/conversations.replies?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "thread_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.requestSharedInvite.approve.json b/docs.slack.dev/methods/conversations.requestSharedInvite.approve.json new file mode 100644 index 00000000..2591a1d1 --- /dev/null +++ b/docs.slack.dev/methods/conversations.requestSharedInvite.approve.json @@ -0,0 +1,128 @@ +{ + "desc": "Approves a request to add an external user to a channel and sends them a Slack Connect invite", + "http_method": "POST", + "scope": "post", + "scope_by_token_type": { + "granular_bot": "conversations.connect:manage" + }, + "rate_limits": "t2", + "json_input_supported": true, + "args": { + "type": "object", + "required": [ + "token", + "invite_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "invite_id": { + "desc": "ID of the requested shared channel invite to approve.", + "schema": "invite_id" + }, + "is_external_limited": { + "type": "boolean", + "desc": "Optional boolean on whether the invited team will have post-only permissions in the channel. Will override the value on the requested invite." + }, + "channel_id": { + "type": "string", + "subtype": "channel", + "desc": "Optional channel_id to which external user will be invited to. Will override the value on the requested invite." + }, + "message": { + "type": "object", + "required": [ + "text", + "is_override" + ], + "desc": "Object describing the text to send along with the invite. If this object is specified, both `text` and `is_override` are required properties. If `is_override` is set to `true`, `text` will override the original invitation message. Otherwise, `text` will be appended to the original invitation message. The total length of the message cannot exceed 560 characters. If `is_override` is set to `false`, the length of `text` and the user specified message on the invite request in total must be less than 560 characters.", + "example": "{\"text\": \"hello\", \"is_override\": true}", + "properties": { + "text": { + "type": "string", + "desc": "text to include along with email invite" + }, + "is_override": { + "type": "boolean", + "desc": "When true will override the user specified message. Otherwise text will be appended to the user specified message on the invite request." + } + } + } + } + }, + "output": { + "type": "object", + "required": [ + "invite_id" + ], + "properties": { + "invite_id": { + "schema": "invite_id" + }, + "confirmation_code": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + } + }, + "errors": { + "invite_not_found": { + "desc": "We couldn't find a Slack Connect channel invite with the ID provided." + }, + "invite_already_approved": { + "desc": "This invite was already approved." + }, + "invite_already_denied": { + "desc": "This invite was already denied." + }, + "invite_expired": { + "desc": "This invite is expired." + }, + "channel_not_found": { + "desc": "The provided channel was not found or the channel is no longer visible to the user who requested the invite." + }, + "user_not_found": { + "desc": "Can not find the user who requested the invite." + }, + "team_not_found": { + "desc": "Can not find the team who requested the invite." + }, + "restricted_action": { + "desc": "A team preference prevents the invite from being approved." + }, + "no_external_invite_permission": { + "desc": "Channel manager has restricted external invites for a given channel." + }, + "internal_error": { + "desc": "Something unexpected went wrong." + }, + "message_too_long": { + "desc": "If the passed in approve message is greater than 560 characters." + } + }, + "examples": { + "success": { + "url": "/api/conversations.requestSharedInvite.approve?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "invite_id": "I012345ABCD" + } + }, + "error": { + "url": "/api/conversations.requestSharedInvite.approve?token=INVALID_TOKEN", + "description": "Typical error response when invite request can not be approved", + "example": { + "ok": false, + "error": "restricted_action" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.requestSharedInvite.deny.json b/docs.slack.dev/methods/conversations.requestSharedInvite.deny.json new file mode 100644 index 00000000..56f0eebf --- /dev/null +++ b/docs.slack.dev/methods/conversations.requestSharedInvite.deny.json @@ -0,0 +1,94 @@ +{ + "desc": "Denies a request to invite an external user to a channel", + "http_method": "POST", + "scope": "post", + "scope_by_token_type": { + "granular_bot": "conversations.connect:manage" + }, + "rate_limits": "t2", + "json_input_supported": true, + "args": { + "type": "object", + "required": [ + "token", + "invite_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "invite_id": { + "desc": "ID of the requested shared channel invite to deny.", + "schema": "invite_id" + }, + "message": { + "type": "string", + "desc": "Optional message explaining why the request to invite was denied." + } + } + }, + "output": { + "type": "object", + "required": [ + "ok" + ], + "properties": { + "ok": { + "type": "boolean" + } + } + }, + "errors": { + "invite_not_found": { + "desc": "We couldn't find a Slack Connect channel invite with the ID provided." + }, + "user_not_found": { + "desc": "We could not find the user who made the invite request." + }, + "team_not_found": { + "desc": "We could not find the team which made the invite request." + }, + "channel_not_found": { + "desc": "We could not find the channel where the request was made." + }, + "invite_already_approved": { + "desc": "This invite was already approved." + }, + "invite_already_denied": { + "desc": "This invite was already denied." + }, + "invite_expired": { + "desc": "This invite is expired." + }, + "restricted_action": { + "desc": "A team preference prevents the invite from being denied." + }, + "internal_error": { + "desc": "Something unexpected went wrong." + }, + "message_too_long": { + "desc": "If the passed in deny message is greater than 560 characters." + } + }, + "examples": { + "success": { + "url": "/api/conversations.requestSharedInvite.deny?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "invite_id": "I012345ABCD" + } + }, + "error": { + "url": "/api/conversations.requestSharedInvite.deny?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "restricted_action" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.requestSharedInvite.list.json b/docs.slack.dev/methods/conversations.requestSharedInvite.list.json new file mode 100644 index 00000000..5b1c9c19 --- /dev/null +++ b/docs.slack.dev/methods/conversations.requestSharedInvite.list.json @@ -0,0 +1,278 @@ +{ + "desc": "Lists requests to add external users to channels with ability to filter.", + "http_method": "POST", + "scope": "post", + "scope_by_token_type": { + "granular_bot": "conversations.connect:manage" + }, + "rate_limits": "t2", + "json_input_supported": true, + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user_id": { + "desc": "Optional filter to return invitation requests for the inviting user.", + "schema": "enterprise_user_id" + }, + "include_expired": { + "type": "boolean", + "default": false, + "desc": "When true expired invitation requests will be returned, otherwise they will be excluded" + }, + "include_approved": { + "type": "boolean", + "default": false, + "desc": "When true approved invitation requests will be returned, otherwise they will be excluded" + }, + "include_denied": { + "type": "boolean", + "default": false, + "desc": "When true denied invitation requests will be returned, otherwise they will be excluded" + }, + "invite_ids": { + "type": "array", + "desc": "An optional list of invitation ids to look up", + "minItems": 1, + "maxItems": 1000, + "items": { + "schema": "invite_id" + } + }, + "limit": { + "type": "integer", + "desc": "The number of items to return. Must be between 1 - 1000 (inclusive).", + "default": 200, + "minimum": 1, + "maximum": 1000 + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "bG9nX2lkOjc5NjQ1NA==", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "invite_requests" + ], + "properties": { + "invite_requests": { + "type": "array", + "items": { + "schema": "requested-shared-invite" + } + }, + "response_metadata": { + "desc": "Contains cursor to next page. Present only when next page exists.", + "schema": "response_metadata_new" + } + } + }, + "errors": { + "restricted_action": { + "desc": "A team preference prevents the user from listing invitation requests." + }, + "invalid_cursor": { + "desc": "The provided cursor is not valid." + }, + "internal_error": { + "desc": "Something unexpected went wrong." + }, + "not_implemented": { + "desc": "its not implemented! TODO: remove me" + } + }, + "examples": { + "success": { + "url": "/api/conversations.requestSharedInvite.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "invite_requests": [ + { + "date_last_updated": 1722372331, + "id": "I12345", + "date_created": 1722372331, + "expires_at": 1723581931, + "inviting_team": { + "id": "E12345", + "name": "Acme corp", + "icon": { + "image_34": "https://.../avatar/avatars-teams/ava_0011-34.png", + "image_44": "https://.../avatar/avatars-teams/ava_0011-44.png", + "image_68": "https://.../avatar/avatars-teams/ava_0011-68.png", + "image_88": "https://.../avatar/avatars-teams/ava_0011-88.png", + "image_102": "https://.../avatar/avatars-teams/ava_0011-102.png", + "image_132": "https://.../avatar/avatars-teams/ava_0011-132.png", + "image_230": "https://.../avatar/avatars-teams/ava_0011-230.png", + "image_default": true + }, + "avatar_base_url": "https://dev.slack.com/avatarsource/", + "is_verified": false, + "domain": "acme-corp", + "date_created": 1637947110, + "requires_sponsorship": false + }, + "inviting_user": { + "id": "U12345", + "team_id": "E12345", + "name": "acme-corp-user", + "updated": 1721741979, + "who_can_share_contact_card": "EVERYONE", + "profile": { + "real_name": "acme-corp-user", + "display_name": "acme-corp-user", + "real_name_normalized": "acme-corp-user", + "display_name_normalized": "acme-corp-user", + "team": "E12345", + "avatar_hash": "hash", + "email": "acme-corp-user@acme-corp.com", + "image_24": "https://secure.gravatar.com/avatar/...0001-24.png", + "image_32": "https://secure.gravatar.com/avatar/...0001-32.png", + "image_48": "https://secure.gravatar.com/avatar/...0001-48.png", + "image_72": "https://secure.gravatar.com/avatar/...0001-72.png", + "image_192": "https://secure.gravatar.com/avatar/...0001-192.png", + "image_512": "https://secure.gravatar.com/avatar/...0001-512.png" + } + }, + "is_external_limited": false, + "is_sponsored": true, + "recipient_email": "external-user@other-corp.com", + "target_user": { + "recipient_email": "external-user1@other-corp.com", + "recipient_user_id": "U123456" + } + }, + { + "id": "I12345", + "date_created": 1722372331, + "expires_at": 1723581931, + "date_denied": 1723581901, + "inviting_team": { + "id": "E12345", + "name": "Acme Corp.", + "icon": { + "image_34": "https://.../avatars-teams/ava_0011-34.png", + "image_44": "https://.../avatars-teams/ava_0011-44.png", + "image_68": "https://.../avatars-teams/ava_0011-68.png", + "image_88": "https://.../avatars-teams/ava_0011-88.png", + "image_102": "https://.../avatars-teams/ava_0011-102.png", + "image_132": "https://.../avatars-teams/ava_0011-132.png", + "image_230": "https://.../avatars-teams/ava_0011-230.png", + "image_default": true + }, + "avatar_base_url": "https://dev.slack.com/avatarsource/", + "is_verified": false, + "domain": "acme-corp", + "date_created": 1637947110, + "requires_sponsorship": false + }, + "inviting_user": { + "id": "U12345", + "team_id": "E12345", + "name": "acme-corp-user", + "updated": 1721741979, + "who_can_share_contact_card": "EVERYONE", + "profile": { + "real_name": "acme-corp-user", + "display_name": "acme-corp-user", + "real_name_normalized": "acme-corp-user", + "display_name_normalized": "acme-corp-user", + "team": "E12345", + "avatar_hash": "hash", + "email": "acme-corp-user@acme-corp.com", + "image_24": "https://secure.gravatar.com/avatar/...0001-24.png", + "image_32": "https://secure.gravatar.com/avatar/...0001-32.png", + "image_48": "https://secure.gravatar.com/avatar/...0001-48.png", + "image_72": "https://secure.gravatar.com/avatar/...0001-72.png", + "image_192": "https://secure.gravatar.com/avatar/...0001-192.png", + "image_512": "https://secure.gravatar.com/avatar/...0001-512.png" + } + }, + "is_external_limited": false, + "channel": { + "id": "C12345", + "is_im": false, + "is_private": true, + "date_created": 1721764754, + "name": "channel-name", + "connections": [ + { + "team": { + "id": "E12345", + "name": "Acme Corp.", + "icon": { + "image_34": "https://.../ava_0011-34.png", + "image_44": "https://.../ava_0011-44.png", + "image_68": "https://.../ava_0011-68.png", + "image_88": "https://.../ava_0011-88.png", + "image_102": "https://.../ava_0011-102.png", + "image_132": "https://.../ava_0011-132.png", + "image_230": "https://.../ava_0011-230.png", + "image_default": true + }, + "avatar_base_url": "https://dev.slack.com/avatarsource/", + "is_verified": false, + "domain": "acme-corp", + "date_created": 1637947110, + "requires_sponsorship": false + }, + "is_private": true + } + ], + "pending_connections": [], + "previous_connections": [] + }, + "target_user": { + "recipient_email": "external-user@other-corp.com" + }, + "reviewing_user": { + "id": "U12345", + "team_id": "E12345", + "name": "acme-corp-user", + "updated": 1721741979, + "who_can_share_contact_card": "EVERYONE", + "profile": { + "real_name": "acme-corp-user", + "display_name": "acme-corp-user", + "real_name_normalized": "acme-corp-user", + "display_name_normalized": "acme-corp-user", + "team": "E12345", + "avatar_hash": "hash", + "email": "acme-corp-user@acme-corp.com", + "image_24": "https://secure.gravatar.com/avatar/...0001-24.png", + "image_32": "https://secure.gravatar.com/avatar/...0001-32.png", + "image_48": "https://secure.gravatar.com/avatar/...0001-48.png", + "image_72": "https://secure.gravatar.com/avatar/...0001-72.png", + "image_192": "https://secure.gravatar.com/avatar/...0001-192.png", + "image_512": "https://secure.gravatar.com/avatar/...0001-512.png" + } + } + } + ], + "response_metadata": { + "next_cursor": "aWQ6STAxNkszN0FBQUU=" + } + } + }, + "error": { + "url": "/api/conversations.requestSharedInvite.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_cursor" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.setPurpose.json b/docs.slack.dev/methods/conversations.setPurpose.json new file mode 100644 index 00000000..699226bd --- /dev/null +++ b/docs.slack.dev/methods/conversations.setPurpose.json @@ -0,0 +1,91 @@ +{ + "desc": "Sets the channel description.", + "http_method": "POST", + "scope": "conversations:write", + "scope_by_token_type": { + "app": "conversations:write", + "oauth": "conversations:write.topic", + "granular_bot": "conversations:write.topic", + "workflow": "conversations:write.topic" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "purpose" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel to set the description of", + "type": "string", + "subtype": "channel" + }, + "purpose": { + "desc": "The description", + "example": "This is the random channel, anything goes!", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "schema": "conversation" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "is_archived": { + "desc": "Channel has been archived." + }, + "method_not_supported_for_channel_type": { + "desc": "This conversation type cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token has not been granted the necessary scopes to complete this operation." + }, + "not_in_channel": { + "desc": "Authenticated user is not in the channel." + }, + "too_long": { + "desc": "Description was longer than 250 characters." + }, + "user_is_restricted": { + "desc": "Setting the channel description is a restricted action." + } + }, + "examples": { + "success": { + "url": "/api/conversations.setPurpose?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/conversations.setPurpose?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.setTopic.json b/docs.slack.dev/methods/conversations.setTopic.json new file mode 100644 index 00000000..0006262f --- /dev/null +++ b/docs.slack.dev/methods/conversations.setTopic.json @@ -0,0 +1,144 @@ +{ + "desc": "Sets the topic for a conversation.", + "http_method": "POST", + "scope": "conversations:write", + "scope_by_token_type": { + "oauth": "conversations:write.topic", + "granular_bot": "conversations:write.topic", + "workflow": "conversations:write.topic" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel", + "topic" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Conversation to set the topic of", + "type": "string", + "subtype": "channel" + }, + "topic": { + "desc": "The new topic string. Does not support formatting or linkification.", + "example": "Apply topically for best effects", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "channel" + ], + "properties": { + "channel": { + "schema": "conversation" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "is_archived": { + "desc": "Channel has been archived." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "not_in_channel": { + "desc": "Authenticated user is not in the channel." + }, + "too_long": { + "desc": "Topic was longer than 250 characters." + }, + "user_is_restricted": { + "desc": "Setting the topic is a restricted action." + } + }, + "examples": { + "success": { + "url": "/api/conversations.setTopic?token=YOUR_TOKEN", + "description": "A [conversation object](/reference/objects/conversation-object) is returned:", + "example": { + "ok": true, + "channel": { + "id": "C12345678", + "name": "tips-and-tricks", + "is_channel": true, + "is_group": false, + "is_im": false, + "is_mpim": false, + "is_private": false, + "created": 1649195947, + "is_archived": false, + "is_general": false, + "unlinked": 0, + "name_normalized": "tips-and-tricks", + "is_shared": false, + "is_frozen": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "pending_shared": [], + "parent_conversation": null, + "creator": "U12345678", + "is_ext_shared": false, + "shared_team_ids": [ + "T12345678" + ], + "pending_connected_team_ids": [], + "is_member": true, + "last_read": "1649869848.627809", + "latest": { + "type": "message", + "subtype": "channel_topic", + "ts": "1649952691.429799", + "user": "U12345678", + "text": "set the channel topic: Apply topically for best effects", + "topic": "Apply topically for best effects" + }, + "unread_count": 1, + "unread_count_display": 0, + "topic": { + "value": "Apply topically for best effects", + "creator": "U12345678", + "last_set": 1649952691 + }, + "purpose": { + "value": "", + "creator": "", + "last_set": 0 + }, + "previous_names": [] + } + } + }, + "error": { + "url": "/api/conversations.setTopic?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_arguments", + "response_metadata": { + "messages": [ + "[ERROR] missing required field: topic" + ] + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/conversations.unarchive.json b/docs.slack.dev/methods/conversations.unarchive.json new file mode 100644 index 00000000..38340110 --- /dev/null +++ b/docs.slack.dev/methods/conversations.unarchive.json @@ -0,0 +1,63 @@ +{ + "desc": "Reverses conversation archival.", + "http_method": "POST", + "scope": "conversations:write", + "scope_by_token_type": { + "app": "conversations:write" + }, + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "ID of conversation to unarchive", + "type": "string", + "subtype": "channel" + } + } + }, + "output": null, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + }, + "not_archived": { + "desc": "Channel is not archived." + } + }, + "examples": { + "success": { + "url": "/api/conversations.unarchive?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/conversations.unarchive?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/dialog.open.json b/docs.slack.dev/methods/dialog.open.json new file mode 100644 index 00000000..fb7854e1 --- /dev/null +++ b/docs.slack.dev/methods/dialog.open.json @@ -0,0 +1,129 @@ +{ + "desc": "Open a dialog with a user", + "http_method": "POST", + "scope": "none", + "json_input_supported": true, + "no_scope_required": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "trigger_id", + "dialog" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "dialog": { + "desc": "The dialog definition. This must be a JSON-encoded string.", + "type": "string" + }, + "trigger_id": { + "desc": "Exchange a trigger to post to the user.", + "example": "12345.98765.abcd2358fdea", + "type": "string", + "subtype": "app_trigger_id" + } + } + }, + "output": null, + "errors": { + "app_missing_action_url": { + "desc": "The app associated with the used token doesn't have a Action URL configured in its interactive components settings." + }, + "cannot_create_dialog": { + "desc": "Something exceptional occurred and the dialog could not be created." + }, + "failed_sending_dialog": { + "desc": "Something exceptional occurred and the dialog could not be sent." + }, + "invalid_trigger": { + "desc": "The provided `trigger_id` is invalid or cannot be used by this token." + }, + "missing_dialog": { + "desc": "No `dialog` argument was presented." + }, + "missing_trigger": { + "desc": "No `trigger_id` argument was presented." + }, + "trigger_exchanged": { + "desc": "The provided `trigger_id` has already been exchanged." + }, + "trigger_expired": { + "desc": "The provided `trigger_id` was presented after the 3 second limit." + }, + "validation_errors": { + "desc": "The provided `dialog` could not be validated." + } + }, + "examples": { + "success": { + "url": "/api/dialog.open?token=YOUR_TOKEN", + "description": "Typical success response is quite minimal.", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/dialog.open?token=INVALID_TOKEN", + "description": "Typical error response, before getting to any possible validation errors.", + "example": { + "ok": false, + "error": "missing_trigger" + } + }, + "all_possible_errors": { + "description": "The impossibility of all possible errors expressed in a single response:", + "example": { + "ok": false, + "error": "validation_errors", + "response_metadata": { + "messages": [ + "The field `title` is required", + "The field `callback_id` is required", + "The field `elements` is required", + "The field `title` cannot be longer than 24 characters", + "The field `submit_button` cannot be longer than 24 characters", + "The field `submit_button` can only be one word", + "The field `callback_id` cannot be longer than 255 characters", + "The field `state` cannot be longer than 3000 characters", + "The field `elements` must be a list", + "The field `elements` has to include at least one element", + "The field `elements` cannot include more than ten elements", + "Element 0 must be an object", + "Element 1 is missing required field `type`", + "Element 2 has an invalid `type`", + "Element 3 is missing required field `name`", + "Element 4 is missing required field `label`", + "Element 5 has a repeated name", + "Element 6 field `name` cannot be longer than 300 characters", + "Element 7 field `hint` cannot be longer than 150 characters", + "Element 8 field `label` cannot be longer than 48 characters", + "Element 9 has an invalid `subtype`", + "Element 10 field `min_length` must be between 0 and 150 (inclusive)", + "Element 11 field `max_length` must be between 1 and 150 (inclusive)", + "Element 12 field `value` cannot be longer than 150 characters", + "Element 13 field `placeholder` cannot be longer than 150 characters", + "Element 14 field `min_length` must be between 0 and 500 (inclusive)", + "Element 14 field `max_length` must be between 1 and 500 (inclusive)", + "Element 15 field `value` cannot be longer than 500 characters", + "Element 16 field `placeholder` cannot be longer than 150 characters", + "Element 17 field `placeholder` cannot be longer than 150 characters", + "Element 18 field `options` must be a list", + "Element 19 field `options` must have at least one option", + "Element 20 field `options` must have fewer than 100 options", + "Element 21 `options` item is missing required field `label`", + "Element 22 `options` item is missing required field `value`", + "Element 23 `options` item `label` field cannot exceed 75 characters", + "Element 24 `options` item `value` field cannot exceed 75 characters" + ] + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/dnd.endDnd.json b/docs.slack.dev/methods/dnd.endDnd.json new file mode 100644 index 00000000..2bcb12d2 --- /dev/null +++ b/docs.slack.dev/methods/dnd.endDnd.json @@ -0,0 +1,45 @@ +{ + "desc": "Ends the current user's Do Not Disturb session immediately.", + "http_method": "POST", + "scope": "dnd:write", + "json_input_supported": true, + "user_scope_only": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": null, + "errors": { + "not_in_dnd": { + "desc": "The auth'd user isn't in DND mode." + } + }, + "examples": { + "success": { + "url": "/api/dnd.endDnd?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/dnd.endDnd?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/dnd.endSnooze.json b/docs.slack.dev/methods/dnd.endSnooze.json new file mode 100644 index 00000000..07a7c561 --- /dev/null +++ b/docs.slack.dev/methods/dnd.endSnooze.json @@ -0,0 +1,73 @@ +{ + "desc": "Ends the current user's snooze mode immediately.", + "http_method": "POST", + "scope": "dnd:write", + "json_input_supported": true, + "user_scope_only": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": { + "required": [ + "dnd_enabled", + "next_dnd_start_ts", + "next_dnd_end_ts", + "snooze_enabled" + ], + "type": "object", + "properties": { + "snooze_enabled": { + "type": "boolean" + }, + "dnd_enabled": { + "type": "boolean" + }, + "next_dnd_end_ts": { + "type": "integer" + }, + "next_dnd_start_ts": { + "type": "integer" + }, + "snooze_endtime": { + "type": "integer" + }, + "snooze_remaining": { + "type": "integer" + } + } + }, + "errors": { + "snooze_end_failed": { + "desc": "There was a problem setting the user's Do Not Disturb status" + } + }, + "examples": { + "success": { + "url": "/api/dnd.endSnooze?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/dnd.endSnooze?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/dnd.info.json b/docs.slack.dev/methods/dnd.info.json new file mode 100644 index 00000000..dc29889e --- /dev/null +++ b/docs.slack.dev/methods/dnd.info.json @@ -0,0 +1,88 @@ +{ + "desc": "Retrieves a user's current Do Not Disturb status.", + "http_method": "GET", + "scope": "dnd:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user": { + "desc": "User to fetch status for (defaults to current user)", + "example": "U1234", + "type": "string", + "subtype": "user" + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "Encoded team id where passed in user param belongs, required if org token is used. If no user param is passed, then a team which has access to the app should be passed" + } + } + }, + "output": { + "type": "object", + "required": [ + "dnd_enabled", + "next_dnd_start_ts", + "next_dnd_end_ts" + ], + "properties": { + "dnd_enabled": { + "type": "boolean" + }, + "next_dnd_start_ts": { + "type": "integer" + }, + "next_dnd_end_ts": { + "type": "integer" + }, + "snooze_enabled": { + "type": "boolean" + }, + "snooze_endtime": { + "type": "integer" + }, + "snooze_remaining": { + "type": "integer" + }, + "snooze_is_indefinite": { + "type": "boolean" + } + } + }, + "errors": { + "user_not_found": { + "desc": "Value passed for `user` was invalid." + }, + "user_not_visible": { + "desc": "User is not visible for this request." + } + }, + "examples": { + "success": { + "url": "/api/dnd.info?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/dnd.info?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/dnd.setSnooze.json b/docs.slack.dev/methods/dnd.setSnooze.json new file mode 100644 index 00000000..2128c85a --- /dev/null +++ b/docs.slack.dev/methods/dnd.setSnooze.json @@ -0,0 +1,80 @@ +{ + "desc": "Turns on Do Not Disturb mode for the current user, or changes its duration.", + "http_method": "GET", + "scope": "dnd:write", + "json_input_supported": true, + "user_scope_only": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "num_minutes" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "num_minutes": { + "desc": "This argument is required. Number of minutes, from now, to snooze until.", + "example": "60", + "type": "string" + } + } + }, + "output": { + "required": [ + "snooze_enabled" + ], + "type": "object", + "properties": { + "snooze_endtime": { + "type": "integer" + }, + "snooze_enabled": { + "type": "boolean" + }, + "snooze_remaining": { + "type": "integer" + }, + "snooze_is_indefinite": { + "type": "boolean" + } + } + }, + "errors": { + "missing_duration": { + "desc": "No value provided for `num_minutes`" + }, + "snooze_failed": { + "desc": "There was a problem setting the user's Do Not Disturb status" + }, + "too_long": { + "desc": "The value for `num_minutes` was too large" + } + }, + "examples": { + "success": { + "url": "/api/dnd.setSnooze?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "snooze_enabled": true, + "snooze_endtime": 1450373897, + "snooze_remaining": 60, + "snooze_is_indefinite": false + } + }, + "error": { + "url": "/api/dnd.setSnooze?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/dnd.teamInfo.json b/docs.slack.dev/methods/dnd.teamInfo.json new file mode 100644 index 00000000..fcb8189b --- /dev/null +++ b/docs.slack.dev/methods/dnd.teamInfo.json @@ -0,0 +1,110 @@ +{ + "desc": "Retrieves the Do Not Disturb status for up to 50 users on a team.", + "http_method": "GET", + "scope": "dnd:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "users" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "users": { + "desc": "Comma-separated list of users to fetch Do Not Disturb status for", + "example": "U1234,W4567", + "type": "string" + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "Encoded team id where passed in users belong, required if org token is used" + } + } + }, + "output": { + "type": "object", + "required": [ + "users" + ], + "properties": { + "users": { + "type": "object", + "patternProperties": { + "^[UW][A-Z0-9]{8,}$": { + "type": "object", + "required": [ + "dnd_enabled", + "next_dnd_start_ts", + "next_dnd_end_ts" + ], + "properties": { + "dnd_enabled": { + "type": "boolean" + }, + "next_dnd_start_ts": { + "type": "integer" + }, + "next_dnd_end_ts": { + "type": "integer" + }, + "snooze_enabled": { + "type": "boolean" + }, + "snooze_endtime": { + "type": "integer" + }, + "snooze_remaining": { + "type": "integer" + } + } + } + } + } + } + }, + "errors": { + "no_users_provided": { + "desc": "Must provide more than one user." + }, + "user_not_visible": { + "desc": "User is not visible for this request." + } + }, + "examples": { + "success": { + "url": "/api/dnd.teamInfo?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "users": { + "U023BECGF": { + "dnd_enabled": true, + "next_dnd_start_ts": 1450387800, + "next_dnd_end_ts": 1450423800 + }, + "W058CJVAA": { + "dnd_enabled": false, + "next_dnd_start_ts": 1, + "next_dnd_end_ts": 1 + } + } + } + }, + "error": { + "url": "/api/dnd.teamInfo?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/emoji.list.json b/docs.slack.dev/methods/emoji.list.json new file mode 100644 index 00000000..039bc899 --- /dev/null +++ b/docs.slack.dev/methods/emoji.list.json @@ -0,0 +1,106 @@ +{ + "desc": "Lists custom emoji for a team.", + "http_method": "GET", + "scope": "emoji:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "include_categories": { + "desc": "Include a list of categories for Unicode emoji and the emoji in each category", + "type": "boolean" + } + } + }, + "output": { + "type": "object", + "required": [ + "emoji" + ], + "properties": { + "cache_ts": { + "type": "string" + }, + "emoji": { + "type": "object", + "patternProperties": { + "^.*": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "object", + "properties": { + "apple": { + "type": "string" + }, + "google": { + "type": "string" + } + } + } + ] + } + } + }, + "categories_version": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "emoji_names": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "Invalid API arguments provided" + }, + "unable_to_fetch_custom_emojis": { + "desc": "Unable to fetch custom emojis for team." + } + }, + "examples": { + "success": { + "url": "/api/emoji.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/emoji.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.comments.delete.json b/docs.slack.dev/methods/files.comments.delete.json new file mode 100644 index 00000000..fa2dd44e --- /dev/null +++ b/docs.slack.dev/methods/files.comments.delete.json @@ -0,0 +1,67 @@ +{ + "desc": "Deletes an existing comment on a file.", + "http_method": "POST", + "scope": "files:write:user", + "scope_by_token_type": { + "app": "files:write", + "granular_bot": "files:write" + }, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "file", + "id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "file": { + "desc": "File to delete a comment from.", + "example": "F1234567890", + "type": "string", + "subtype": "file" + }, + "id": { + "desc": "The comment to delete.", + "example": "Fc1234567890", + "type": "string", + "subtype": "file_comment" + } + } + }, + "output": null, + "errors": { + "cant_delete": { + "desc": "The requested comment could not be deleted." + }, + "file_deleted": { + "desc": "The requested file was previously deleted." + }, + "file_not_found": { + "desc": "The requested file could not be found." + } + }, + "examples": { + "success": { + "description": "Standard success response is very simple", + "example": { + "ok": true + } + }, + "error": { + "description": "Standard failure response when used with an invalid token", + "url": "/api/auth.test?token=INVALID_TOKEN", + "example": { + "ok": false, + "error": "file_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.completeUploadExternal.json b/docs.slack.dev/methods/files.completeUploadExternal.json new file mode 100644 index 00000000..0e02cfac --- /dev/null +++ b/docs.slack.dev/methods/files.completeUploadExternal.json @@ -0,0 +1,170 @@ +{ + "desc": "Finishes an upload started with files.getUploadURLExternal", + "http_method": "POST", + "scope": "files:write:user", + "scope_by_token_type": { + "app": "files:write", + "granular_bot": "files:write" + }, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t4", + "json_input_supported": true, + "args": { + "type": "object", + "required": [ + "token", + "files" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "files": { + "type": "array", + "desc": "Array of file ids and their corresponding (optional) titles.", + "example": "[{\"id\":\"F044GKUHN9Z\", \"title\":\"slack-test\"}]", + "items": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "desc": "File ID returned from files.getUploadURL.", + "example": "F0R8KA909", + "schema": "file_id" + }, + "title": { + "desc": "Title of file.", + "type": "string" + } + } + } + }, + "channel_id": { + "desc": "Channel ID where the file will be shared. If not specified the file will be private.", + "example": "C0NF841BK", + "default": null, + "subtype": "channel", + "schema": "channel" + }, + "thread_ts": { + "desc": "Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts'", + "type": "string", + "example": "1524523204.000192" + }, + "channels": { + "desc": "Comma-separated string of channel IDs where the file will be shared.", + "type": "string", + "subtype": "channels", + "example": "C0NF841BK,C2AW648GH" + }, + "initial_comment": { + "desc": "The message text introducing the file in specified channels.", + "default": null, + "type": "string" + }, + "blocks": { + "desc": "A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the `initial_comment` field is provided, the `blocks` field is ignored", + "type": "string", + "example": "[{\"type\": \"section\", \"text\": {\"type\": \"plain_text\", \"text\": \"Hello world\"}}]" + } + } + }, + "output": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { + "type": "array", + "desc": "Array of files uploaded.", + "items": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "desc": "File ID returned from files.getUploadURLExternal.", + "example": "F0R8KA909", + "schema": "file_id" + }, + "title": { + "desc": "Title of file.", + "type": [ + "null", + "string" + ], + "default": null + }, + "created": { + "desc": "file created timestamp", + "type": "integer" + }, + "user": { + "desc": "file owner", + "type": "string" + } + } + } + } + } + }, + "errors": { + "access_denied": { + "desc": "User is not the owner of the file." + }, + "channel_not_found": { + "desc": "Value passed for `channel_id` was invalid." + }, + "file_not_found": { + "desc": "Could not find the file from the upload ticket." + }, + "file_update_failed": { + "desc": "Failure occurred when attempting to update the file." + }, + "invalid_blocks": { + "desc": "Provided blocks are in the incorrect format." + }, + "invalid_channel": { + "desc": "Channel could not be found or channel specified is invalid." + }, + "not_in_channel": { + "desc": "User/bot membership is required for the specified channel." + }, + "posting_to_channel_denied": { + "desc": "User is not authorized to post to channel." + }, + "channels_limit_exceeded": { + "desc": "Exceeded the channel limit. A maximum of 100 channels is allowed per request." + } + }, + "examples": { + "success": { + "url": "/api/files.completeUploadExternal?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "files": [ + { + "id": "F123ABC456", + "title": "slack-test" + } + ] + } + }, + "error": { + "url": "/api/files.completeUploadExternal?token=INVALID_TOKEN", + "description": "Typical error response for an invalid token", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.delete.json b/docs.slack.dev/methods/files.delete.json new file mode 100644 index 00000000..c06f5d95 --- /dev/null +++ b/docs.slack.dev/methods/files.delete.json @@ -0,0 +1,66 @@ +{ + "desc": "Deletes a file.", + "http_method": "POST", + "scope": "files:write:user", + "scope_by_token_type": { + "app": "files:write", + "granular_bot": "files:write" + }, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "file" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "file": { + "desc": "ID of file to delete.", + "type": "string", + "subtype": "file" + } + } + }, + "output": null, + "errors": { + "cant_delete_file": { + "desc": "Authenticated user does not have permission to delete this file." + }, + "delete_not_allowed": { + "desc": "Error returned when the requested file does not support deletion; for example, when attempting to delete a canvas template." + }, + "file_deleted": { + "desc": "The file has already been deleted." + }, + "file_deleting_disabled": { + "desc": "This functionality is disabled." + }, + "file_not_found": { + "desc": "The file does not exist, or is not visible to the calling user." + } + }, + "examples": { + "success": { + "url": "/api/files.delete?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/files.delete?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.getUploadURLExternal.json b/docs.slack.dev/methods/files.getUploadURLExternal.json new file mode 100644 index 00000000..fb6b37e0 --- /dev/null +++ b/docs.slack.dev/methods/files.getUploadURLExternal.json @@ -0,0 +1,109 @@ +{ + "desc": "Gets a URL for an edge external file upload", + "http_method": "POST", + "scope": "files:write:user", + "scope_by_token_type": { + "app": "files:write", + "granular_bot": "files:write" + }, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "length", + "filename" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "length": { + "desc": "Size in bytes of the file being uploaded.", + "example": "53072", + "type": "integer", + "minimum": 1 + }, + "filename": { + "desc": "Name of the file being uploaded.", + "example": "laughingoutloudcat.jpg", + "type": "string" + }, + "snippet_type": { + "desc": "Syntax type of the snippet being uploaded.", + "example": "python", + "type": "string", + "default": null + }, + "alt_txt": { + "desc": "Description of image for screen-reader.", + "example": "Aerial view of the Bixby Bridge and coastline of the Big Sur area in California", + "default": null, + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "file_id", + "upload_url" + ], + "properties": { + "file_id": { + "schema": "file_id" + }, + "upload_url": { + "type": "string" + } + } + }, + "errors": { + "alt_txt_too_large": { + "desc": "Description for the image is longer than the limit of 1000 character" + }, + "file_upload_size_restricted": { + "desc": "The size of provided file is too large, as the team has restricted uploads of large files." + }, + "file_uploads_disabled": { + "desc": "Team has disabled all file uploads." + }, + "missing_argument": { + "desc": "A required argument was not provided. Typically only occurs when the `length` provided is 0." + }, + "snippet_too_large": { + "desc": "The provided `length` is too large to create a snippet, which are limited to 1MB." + }, + "storage_limit_reached": { + "desc": "File storage limit has been reached. This occurs when free teams have uploaded 5GB of files." + }, + "unknown_snippet_type": { + "desc": "The provided `snippet_type` is not a supported type." + }, + "unknown_subtype": { + "desc": "The provided `subtype` is not a supported type." + } + }, + "examples": { + "success": { + "url": "/api/files.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "upload_url": "https://files.slack.com/upload/v1/ABC123...", + "file_id": "F123ABC456" + } + }, + "error": { + "url": "/api/files.upload?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.info.json b/docs.slack.dev/methods/files.info.json new file mode 100644 index 00000000..a3917a55 --- /dev/null +++ b/docs.slack.dev/methods/files.info.json @@ -0,0 +1,240 @@ +{ + "desc": "Gets information about a file.", + "http_method": "GET", + "scope": "files:read", + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "file" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "count": { + "default": 100, + "type": "integer", + "subtype": "paging" + }, + "cursor": { + "desc": "Parameter for pagination. File comments are paginated for a single file. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first \"page\" of the collection of comments. See [pagination](/apis/web-api/pagination) for more details.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "file": { + "desc": "Specify a file by providing its ID.", + "example": "F2147483862", + "type": "string", + "subtype": "file" + }, + "limit": { + "default": 0, + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached.", + "example": "20", + "type": "integer" + }, + "page": { + "default": 1, + "type": "integer", + "subtype": "paging" + } + } + }, + "output": { + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + } + }, + "comments": { + "type": "array", + "items": { + "type": "object", + "required": [ + "comment", + "created", + "id", + "is_intro", + "timestamp", + "user" + ], + "properties": { + "comment": { + "type": "string" + }, + "created": { + "type": "number" + }, + "id": { + "type": "string" + }, + "is_intro": { + "type": "boolean" + }, + "timestamp": { + "type": "number" + }, + "user": { + "type": "string" + } + } + } + }, + "content": { + "type": "string" + }, + "content_html": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "content_highlight_html": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + } + }, + "errors": { + "access_denied": { + "desc": "Unable to access the file (slack connect)" + }, + "file_deleted": { + "desc": "The requested file has been deleted" + }, + "channel_canvas_deleted": { + "desc": "The requested file is a channel canvas that has been deleted" + }, + "file_not_found": { + "desc": "Value passed for `file` was invalid" + }, + "canvas_globally_disabled": { + "desc": "Canvas is disabled for this team" + }, + "canvas_disabled_user_team": { + "desc": "Canvas is disabled on user's team for connected Channels" + }, + "canvas_disabled_file_team": { + "desc": "Canvas is disabled on file's team" + }, + "not_visible": { + "desc": "Do not have permission to view the file" + }, + "template_not_visible": { + "desc": "Do not have permissions to view this template" + }, + "slack_connect_canvas_sharing_blocked": { + "desc": "Admin has disabled sharing of Canvas links in all Slack Connect communications" + } + }, + "examples": { + "success": { + "url": "/api/files.info?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "file": { + "id": "F0S43PZDF", + "created": 1531763342, + "timestamp": 1531763342, + "name": "tedair.gif", + "title": "tedair.gif", + "mimetype": "image/gif", + "filetype": "gif", + "pretty_type": "GIF", + "user": "U061F7AUR", + "editable": false, + "size": 137531, + "mode": "hosted", + "is_external": false, + "external_type": "", + "is_public": true, + "public_url_shared": false, + "display_as_bot": false, + "username": "", + "url_private": "https://.../tedair.gif", + "url_private_download": "https://.../tedair.gif", + "thumb_64": "https://.../tedair_64.png", + "thumb_80": "https://.../tedair_80.png", + "thumb_360": "https://.../tedair_360.png", + "thumb_360_w": 176, + "thumb_360_h": 226, + "thumb_160": "https://.../tedair_=_160.png", + "thumb_360_gif": "https://.../tedair_360.gif", + "image_exif_rotation": 1, + "original_w": 176, + "original_h": 226, + "deanimate_gif": "https://.../tedair_deanimate_gif.png", + "pjpeg": "https://.../tedair_pjpeg.jpg", + "permalink": "https://.../tedair.gif", + "permalink_public": "https://.../...", + "comments_count": 0, + "is_starred": false, + "shares": { + "public": { + "C0T8SE4AU": [ + { + "reply_users": [ + "U061F7AUR" + ], + "reply_users_count": 1, + "reply_count": 1, + "ts": "1531763348.000001", + "thread_ts": "1531763273.000015", + "latest_reply": "1531763348.000001", + "channel_name": "file-under", + "team_id": "T061EG9R6" + } + ] + } + }, + "channels": [ + "C0T8SE4AU" + ], + "groups": [], + "ims": [], + "has_rich_preview": false, + "alt_txt": "tedair.gif" + }, + "comments": [], + "response_metadata": { + "next_cursor": "dGVhbTpDMUg5UkVTR0w=" + } + } + }, + "error": { + "url": "/api/files.info?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.list.json b/docs.slack.dev/methods/files.list.json new file mode 100644 index 00000000..bfcb2c8d --- /dev/null +++ b/docs.slack.dev/methods/files.list.json @@ -0,0 +1,255 @@ +{ + "desc": "List for a team, in a channel, or from a user with applied filters.", + "http_method": "GET", + "scope": "files:read", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Filter files appearing in a specific channel, indicated by its ID.", + "type": "string", + "subtype": "channel" + }, + "count": { + "default": 100, + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "subtype": "paging" + }, + "page": { + "default": 1, + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "subtype": "paging" + }, + "show_files_hidden_by_limit": { + "desc": "Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.", + "example": "true", + "type": "boolean" + }, + "team_id": { + "desc": "encoded team id to list files in, required if org token is used", + "type": "string", + "subtype": "team" + }, + "ts_from": { + "desc": "Filter files created after this timestamp (inclusive).", + "example": "123456789", + "type": "string", + "subtype": "timestamp" + }, + "ts_to": { + "desc": "Filter files created before this timestamp (inclusive).", + "example": "123456789", + "type": "string", + "subtype": "timestamp" + }, + "types": { + "default": "all", + "desc": "Filter files by type ([see below](#file_types)). You can pass multiple values in the types argument, like `types=spaces,snippets`.The default value is `all`, which does not filter the list.", + "example": "images", + "type": "string" + }, + "user": { + "desc": "Filter files created by a single user.", + "type": "string", + "subtype": "user" + } + } + }, + "output": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "user": { + "type": "string" + } + } + } + }, + "paging": { + "type": "object", + "required": [ + "pages", + "page", + "total" + ], + "properties": { + "count": { + "type": "integer" + }, + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pages": { + "type": "integer" + } + } + } + } + }, + "errors": { + "missing_argument": { + "desc": "A required argument is missing." + }, + "slack_connect_canvas_sharing_blocked": { + "desc": "Admin has disabled sharing of Canvas links in all Slack Connect communications" + }, + "user_not_found": { + "desc": "Value passed for `user` was invalid" + }, + "unknown_type": { + "desc": "Value passed for `types` was invalid" + } + }, + "examples": { + "success": { + "url": "/api/files.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "files": [ + { + "id": "F0S43P1CZ", + "created": 1531763254, + "timestamp": 1531763254, + "name": "billair.gif", + "title": "billair.gif", + "mimetype": "image/gif", + "filetype": "gif", + "pretty_type": "GIF", + "user": "U061F7AUR", + "editable": false, + "size": 144538, + "mode": "hosted", + "is_external": false, + "external_type": "", + "is_public": true, + "public_url_shared": false, + "display_as_bot": false, + "username": "", + "url_private": "https://.../billair.gif", + "url_private_download": "https://.../billair.gif", + "thumb_64": "https://.../billair_64.png", + "thumb_80": "https://.../billair_80.png", + "thumb_360": "https://.../billair_360.png", + "thumb_360_w": 176, + "thumb_360_h": 226, + "thumb_160": "https://.../billair_=_160.png", + "thumb_360_gif": "https://.../billair_360.gif", + "image_exif_rotation": 1, + "original_w": 176, + "original_h": 226, + "deanimate_gif": "https://.../billair_deanimate_gif.png", + "pjpeg": "https://.../billair_pjpeg.jpg", + "permalink": "https://.../billair.gif", + "permalink_public": "https://.../...", + "channels": [ + "C0T8SE4AU" + ], + "groups": [], + "ims": [], + "comments_count": 0 + }, + { + "id": "F0S43PZDF", + "created": 1531763342, + "timestamp": 1531763342, + "name": "tedair.gif", + "title": "tedair.gif", + "mimetype": "image/gif", + "filetype": "gif", + "pretty_type": "GIF", + "user": "U061F7AUR", + "editable": false, + "size": 137531, + "mode": "hosted", + "is_external": false, + "external_type": "", + "is_public": true, + "public_url_shared": false, + "display_as_bot": false, + "username": "", + "url_private": "https://.../tedair.gif", + "url_private_download": "https://.../tedair.gif", + "thumb_64": "https://.../tedair_64.png", + "thumb_80": "https://.../tedair_80.png", + "thumb_360": "https://.../tedair_360.png", + "thumb_360_w": 176, + "thumb_360_h": 226, + "thumb_160": "https://.../tedair_=_160.png", + "thumb_360_gif": "https://.../tedair_360.gif", + "image_exif_rotation": 1, + "original_w": 176, + "original_h": 226, + "deanimate_gif": "https://.../tedair_deanimate_gif.png", + "pjpeg": "https://.../tedair_pjpeg.jpg", + "permalink": "https://.../tedair.gif", + "permalink_public": "https://.../...", + "channels": [ + "C0T8SE4AU" + ], + "groups": [], + "ims": [], + "comments_count": 0 + } + ], + "paging": { + "count": 100, + "total": 2, + "page": 1, + "pages": 1 + } + } + }, + "error": { + "url": "/api/files.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.remote.add.json b/docs.slack.dev/methods/files.remote.add.json new file mode 100644 index 00000000..3b1e5e81 --- /dev/null +++ b/docs.slack.dev/methods/files.remote.add.json @@ -0,0 +1,179 @@ +{ + "desc": "Adds a file from a remote service", + "http_method": "POST", + "scope": "remote_files:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "external_id", + "title", + "external_url" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "external_id": { + "desc": "Creator defined GUID for the file.", + "example": "123456", + "type": "string" + }, + "external_url": { + "desc": "URL of the remote file.", + "example": "http://example.com/my_cloud_service_file/abc123", + "type": "string" + }, + "filetype": { + "desc": "type of file", + "example": "doc", + "type": "string" + }, + "indexable_file_contents": { + "desc": "A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.", + "example": "...", + "schema": "post_file" + }, + "preview_image": { + "desc": "Preview of the document via `multipart/form-data`.", + "example": "...", + "schema": "post_file" + }, + "title": { + "desc": "Title of the file being shared.", + "example": "Danger, High Voltage!", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "timestamp": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "title": { + "type": "string" + }, + "mimetype": { + "type": "string" + }, + "filetype": { + "type": "string" + }, + "pretty_type": { + "type": "string" + }, + "user": { + "type": "string" + }, + "editable": { + "type": "boolean" + }, + "size": { + "type": "integer" + }, + "mode": { + "type": "string" + }, + "is_external": { + "type": "boolean" + }, + "external_type": { + "type": "string" + }, + "is_public": { + "type": "boolean" + }, + "public_url_shared": { + "type": "boolean" + }, + "display_as_bot": { + "type": "boolean" + }, + "username": { + "type": "string" + }, + "url_private": { + "type": "string" + }, + "permalink": { + "type": "string" + }, + "comments_count": { + "type": "integer" + }, + "is_starred": { + "type": "boolean" + }, + "shares": { + "type": "object" + }, + "channels": { + "type": "array", + "items": { + "type": "string" + } + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "ims": { + "type": "array", + "items": { + "type": "string" + } + }, + "external_id": { + "type": "string" + }, + "external_url": { + "type": "string" + }, + "has_rich_preview": { + "type": "boolean" + } + } + } + } + }, + "errors": { + "bad_image": { + "desc": "The uploaded image could not be processed - try passing a JPG or PNG" + }, + "bad_title": { + "desc": "The title provided is too long." + }, + "bot_user_required": { + "desc": "bot user token is required" + }, + "invalid_external_id": { + "desc": "The external_id provided is too long." + }, + "too_large": { + "desc": "The uploaded image had excessive dimensions" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.remote.info.json b/docs.slack.dev/methods/files.remote.info.json new file mode 100644 index 00000000..15e9bafd --- /dev/null +++ b/docs.slack.dev/methods/files.remote.info.json @@ -0,0 +1,70 @@ +{ + "desc": "Retrieve information about a remote file added to Slack", + "http_method": "GET", + "scope": "remote_files:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "external_id": { + "desc": "Creator defined GUID for the file.", + "example": "123456", + "type": "string" + }, + "file": { + "desc": "Specify a file by providing its ID.", + "example": "F2147483862", + "type": "string", + "subtype": "file" + } + } + }, + "output": { + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "user": { + "type": "string" + } + } + } + } + }, + "errors": { + "file_not_found": { + "desc": "Value passed for `file` or `external_id` was invalid" + }, + "invalid_args": { + "desc": "Invalid arguments passed to endpoint" + }, + "no_bot_user_for_app": { + "desc": "Cannot call the Remote Files endpoints unless app has associated bot user" + }, + "too_many_ids": { + "desc": "The request specified both an external_id and a file, only one may be specified" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.remote.list.json b/docs.slack.dev/methods/files.remote.list.json new file mode 100644 index 00000000..51390527 --- /dev/null +++ b/docs.slack.dev/methods/files.remote.list.json @@ -0,0 +1,84 @@ +{ + "desc": "Retrieve information about a remote file added to Slack", + "http_method": "GET", + "scope": "remote_files:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Filter files appearing in a specific channel, indicated by its ID.", + "type": "string", + "subtype": "channel" + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "limit": { + "desc": "The maximum number of items to return.", + "example": "20", + "type": "integer" + }, + "ts_from": { + "default": "0", + "desc": "Filter files created after this timestamp (inclusive).", + "example": "123456789", + "type": "string", + "subtype": "timestamp" + }, + "ts_to": { + "default": "now", + "desc": "Filter files created before this timestamp (inclusive).", + "example": "123456789", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "no_bot_user_for_app": { + "desc": "Cannot call the Remote Files endpoints unless app has associated bot user" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.remote.remove.json b/docs.slack.dev/methods/files.remote.remove.json new file mode 100644 index 00000000..d77ba4f9 --- /dev/null +++ b/docs.slack.dev/methods/files.remote.remove.json @@ -0,0 +1,49 @@ +{ + "desc": "Remove a remote file.", + "http_method": "POST", + "scope": "remote_files:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "external_id": { + "desc": "Creator defined GUID for the file.", + "example": "123456", + "type": "string" + }, + "file": { + "desc": "Specify a file by providing its ID.", + "example": "F2147483862", + "type": "string", + "subtype": "file" + } + } + }, + "output": null, + "errors": { + "bot_user_required": { + "desc": "bot user token is required" + }, + "file_not_found": { + "desc": "Value passed for `file` or `external_id` was invalid" + }, + "file_under_review": { + "desc": "File passed is tombstoned for DLP review" + }, + "invalid_args": { + "desc": "Invalid arguments passed to endpoint" + }, + "too_many_ids": { + "desc": "The request specified both an external_id and a file, only one may be specified" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.remote.share.json b/docs.slack.dev/methods/files.remote.share.json new file mode 100644 index 00000000..4f91f0b0 --- /dev/null +++ b/docs.slack.dev/methods/files.remote.share.json @@ -0,0 +1,67 @@ +{ + "desc": "Share a remote file into a channel.", + "http_method": "GET", + "scope": "remote_files:share", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channels" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channels": { + "desc": "Comma-separated list of channel IDs where the file will be shared.", + "type": "string", + "subtype": "channels" + }, + "external_id": { + "desc": "The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack. Either this field or `file` or both are required.", + "example": "123456", + "type": "string" + }, + "file": { + "desc": "Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.", + "example": "F2147483862", + "type": "string", + "subtype": "file" + } + } + }, + "output": { + "type": "object", + "properties": { + "file": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + } + } + }, + "errors": { + "channel_not_found": { + "desc": "At least one of the values passed for `channels` was invalid." + }, + "file_not_found": { + "desc": "No file with the requested ID found." + }, + "invalid_args": { + "desc": "Invalid arguments passed to endpoint" + }, + "no_bot_user_for_app": { + "desc": "Cannot call the Remote Files endpoints unless app has associated bot user" + }, + "not_in_channel": { + "desc": "Authenticated user is not in at least one of the the provided channels." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.remote.update.json b/docs.slack.dev/methods/files.remote.update.json new file mode 100644 index 00000000..81a79b4a --- /dev/null +++ b/docs.slack.dev/methods/files.remote.update.json @@ -0,0 +1,95 @@ +{ + "desc": "Updates an existing remote file.", + "http_method": "POST", + "scope": "remote_files:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "external_id": { + "desc": "Creator defined GUID for the file.", + "example": "123456", + "type": "string" + }, + "external_url": { + "desc": "URL of the remote file.", + "example": "http://example.com/my_cloud_service_file/abc123", + "type": "string" + }, + "file": { + "desc": "Specify a file by providing its ID.", + "example": "F2147483862", + "type": "string", + "subtype": "file" + }, + "filetype": { + "desc": "type of file", + "example": "doc", + "type": "string" + }, + "indexable_file_contents": { + "desc": "File containing contents that can be used to improve searchability for the remote file.", + "example": "...", + "schema": "post_file" + }, + "preview_image": { + "desc": "Preview of the document via `multipart/form-data`.", + "example": "...", + "schema": "post_file" + }, + "title": { + "desc": "Title of the file being shared.", + "example": "Danger, High Voltage!", + "type": "string" + } + } + }, + "output": { + "type": "object", + "properties": { + "file": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + } + } + }, + "errors": { + "bad_image": { + "desc": "The uploaded image could not be processed - try passing a JPG or PNG" + }, + "bot_user_required": { + "desc": "bot user token is required" + }, + "failed_to_unshare": { + "desc": "The file was either not found or it has been unshared already." + }, + "file_not_found": { + "desc": "Could not find the file to update." + }, + "invalid_title": { + "desc": "invalid title provided" + }, + "invalid_type": { + "desc": "invalid type provided" + }, + "invalid_url": { + "desc": "invalid url provided" + }, + "too_large": { + "desc": "The uploaded image had excessive dimensions" + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.revokePublicURL.json b/docs.slack.dev/methods/files.revokePublicURL.json new file mode 100644 index 00000000..12cc1121 --- /dev/null +++ b/docs.slack.dev/methods/files.revokePublicURL.json @@ -0,0 +1,75 @@ +{ + "desc": "Revokes public/external sharing access for a file", + "http_method": "POST", + "scope": "files:write:user", + "scope_by_token_type": { + "app": "files:write", + "granular_bot": "files:write" + }, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "file" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "file": { + "desc": "File to revoke", + "type": "string", + "subtype": "file" + } + } + }, + "output": { + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "user": { + "type": "string" + } + } + } + } + }, + "errors": { + "file_not_found": { + "desc": "Value passed for `file` was invalid" + } + }, + "examples": { + "success": { + "url": "/api/files.revokePublicURL?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/files.revokePublicURL?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.sharedPublicURL.json b/docs.slack.dev/methods/files.sharedPublicURL.json new file mode 100644 index 00000000..acccd30c --- /dev/null +++ b/docs.slack.dev/methods/files.sharedPublicURL.json @@ -0,0 +1,93 @@ +{ + "desc": "Enables a file for public/external sharing.", + "http_method": "POST", + "scope": "files:write:user", + "scope_by_token_type": { + "app": "files:write", + "granular_bot": "files:write" + }, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "file" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "file": { + "desc": "File to share", + "type": "string", + "subtype": "file" + } + } + }, + "output": { + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "user": { + "type": "string" + } + } + }, + "comment": { + "type": "array", + "items": { + "type": "object" + } + }, + "paging": { + "type": "object" + } + } + }, + "errors": { + "file_not_found": { + "desc": "Value passed for `file` was invalid" + }, + "not_allowed": { + "desc": "Public sharing has been disabled for this team. You may see this error if you are creating an external link from a free or trial workspace. You can either upgrade to a [Paid Plan](https://app.slack.com/plans) or use `file.list` to get a `url_private_download` link, download the file with an application, and re-upload it somewhere it can be shared with users who are not members of your workspace. Be sure to pass the Slack [Bot token](/authentication/tokens#bot) to the request on the headers file when calling `url_private_download`." + }, + "public_video_not_allowed": { + "desc": "Public sharing of videos is not available. A `Free` instance of Slack may encounter this error because free teams don't have the ability to share video files publicly." + }, + "public_file_type_not_allowed": { + "desc": "Public sharing has been restricted for this file type." + } + }, + "examples": { + "success": { + "url": "/api/files.sharedPublicURL?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/files.sharedPublicURL?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/files.upload.json b/docs.slack.dev/methods/files.upload.json new file mode 100644 index 00000000..5d608d17 --- /dev/null +++ b/docs.slack.dev/methods/files.upload.json @@ -0,0 +1,256 @@ +{ + "desc": "Uploads or creates a file.", + "http_method": "POST", + "scope": "files:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channels": { + "desc": "Comma-separated list of channel names or IDs where the file will be shared.", + "type": "string", + "subtype": "channels" + }, + "content": { + "desc": "File contents via a POST variable. If omitting this parameter, you must provide a `file`.", + "example": "...", + "type": "string" + }, + "file": { + "desc": "File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`.", + "example": "...", + "schema": "post_file" + }, + "filename": { + "desc": "Filename of file.", + "example": "foo.txt", + "type": "string" + }, + "filetype": { + "desc": "A [file type](/reference/objects/file-object#file_types) identifier.", + "example": "php", + "type": "string" + }, + "initial_comment": { + "desc": "The message text introducing the file in specified `channels`.", + "example": "Best!", + "type": "string" + }, + "thread_ts": { + "desc": "Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead.", + "type": "string", + "subtype": "timestamp" + }, + "title": { + "desc": "Title of file.", + "example": "My File", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created": { + "type": "integer" + }, + "user": { + "type": "string" + } + } + } + } + }, + "warnings": { + "method_deprecated": { + "desc": "`files.upload` is deprecated. Please use modern upload methods. Read https://docs.slack.dev/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay for more info." + } + }, + "errors": { + "blocked_file_type": { + "desc": "Admin has disabled uploading this type of file" + }, + "channel_not_found": { + "desc": "At least one of the values passed for `channels` was invalid." + }, + "invalid_channel": { + "desc": "One or more channels supplied are invalid" + }, + "malware_detected": { + "desc": "This file may contain a virus or other malware and can't be uploaded to Slack" + }, + "not_in_channel": { + "desc": "Authenticated user is not in the channel." + }, + "post_contents_too_large": { + "desc": "File content is larger than 130kb." + }, + "posting_to_general_channel_denied": { + "desc": "An admin has restricted posting to the #general channel." + }, + "slack_connect_blocked_file_type": { + "desc": "File uploads with certain types are blocked in all Slack Connect communications" + }, + "slack_connect_clip_sharing_blocked": { + "desc": "Admin has disabled Clip sharing in Slack Connect channels" + }, + "slack_connect_file_upload_sharing_blocked": { + "desc": "Admin has disabled File uploads in all Slack Connect communications" + }, + "invalid_thread_ts": { + "desc": "Value passed to thread_ts was invalid" + }, + "method_deprecated": { + "desc": "This API is deprecated. Please refer to https://docs.slack.dev/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay" + } + }, + "examples": { + "success": { + "url": "/api/files.upload?token=YOUR_TOKEN", + "description": "Success response after uploading a file to a channel with an initial message", + "example": { + "ok": true, + "file": { + "id": "F0TD00400", + "created": 1532293501, + "timestamp": 1532293501, + "name": "dramacat.gif", + "title": "dramacat", + "mimetype": "image/jpeg", + "filetype": "gif", + "pretty_type": "JPEG", + "user": "U0L4B9NSU", + "editable": false, + "size": 43518, + "mode": "hosted", + "is_external": false, + "external_type": "", + "is_public": false, + "public_url_shared": false, + "display_as_bot": false, + "username": "", + "url_private": "https://.../dramacat.gif", + "url_private_download": "https://.../dramacat.gif", + "thumb_64": "https://.../dramacat_64.gif", + "thumb_80": "https://.../dramacat_80.gif", + "thumb_360": "https://.../dramacat_360.gif", + "thumb_360_w": 360, + "thumb_360_h": 250, + "thumb_480": "https://.../dramacat_480.gif", + "thumb_480_w": 480, + "thumb_480_h": 334, + "thumb_160": "https://.../dramacat_160.gif", + "image_exif_rotation": 1, + "original_w": 526, + "original_h": 366, + "permalink": "https://.../dramacat.gif", + "permalink_public": "https://.../More-Path-Components", + "comments_count": 0, + "is_starred": false, + "shares": { + "private": { + "D0L4B9P0Q": [ + { + "reply_users": [], + "reply_users_count": 0, + "reply_count": 0, + "ts": "1532293503.000001" + } + ] + } + }, + "channels": [], + "groups": [], + "ims": [ + "D0L4B9P0Q" + ], + "has_rich_preview": false + } + } + }, + "success_with_content": { + "description": "Uploading a file with the `content` parameter creates an editable `text/plain` file by default", + "example": { + "ok": true, + "file": { + "id": "F0TD0GUTS", + "created": 1532294750, + "timestamp": 1532294750, + "name": "-.txt", + "title": "Untitled", + "mimetype": "text/plain", + "filetype": "text", + "pretty_type": "Plain Text", + "user": "U0L4B9NSU", + "editable": true, + "size": 11, + "mode": "snippet", + "is_external": false, + "external_type": "", + "is_public": true, + "public_url_shared": false, + "display_as_bot": false, + "username": "", + "url_private": "https://.../.txt", + "url_private_download": "https://...download/-.txt", + "permalink": "https://.../.txt", + "permalink_public": "https://.../.txt", + "edit_link": "https://.../.txt/edit", + "preview": "launch plan", + "preview_highlight": "
\n
\n
launch plan
\n
\n
\n", + "lines": 1, + "lines_more": 0, + "preview_is_truncated": false, + "comments_count": 0, + "is_starred": false, + "shares": { + "public": { + "C061EG9SL": [ + { + "reply_users": [], + "reply_users_count": 0, + "reply_count": 0, + "ts": "1532294750.000001", + "channel_name": "general", + "team_id": "T061EG9R6" + } + ] + } + }, + "channels": [ + "C061EG9SL" + ], + "groups": [], + "ims": [], + "has_rich_preview": false + } + } + }, + "error": { + "url": "/api/files.upload?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/functions.completeError.json b/docs.slack.dev/methods/functions.completeError.json new file mode 100644 index 00000000..c3175484 --- /dev/null +++ b/docs.slack.dev/methods/functions.completeError.json @@ -0,0 +1,65 @@ +{ + "desc": "Signal that a function failed to complete", + "http_method": "POST", + "scope": "none", + "no_scope_required": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "function_execution_id", + "error" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "function_execution_id": { + "type": "string", + "desc": "Context identifier that maps to the executed function", + "example": "Fx12345ABCDE" + }, + "error": { + "type": "string", + "desc": "A human-readable error message that contains information about why the function failed to complete" + } + } + }, + "output": null, + "errors": { + "unknown_method": { + "desc": "This method does not exist." + }, + "function_execution_not_found": { + "desc": "The specified function execution cannot be found." + }, + "access_denied": { + "desc": "This actor does not have access to this function execution." + }, + "execution_not_in_running_state": { + "desc": "The function execution is no longer in a state to be completed." + } + }, + "examples": { + "success": { + "url": "/api/functions.completeError", + "description": "Typical, minimal success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/functions.completeError", + "description": "Typical error response when the function has been completed and cannot be found", + "example": { + "ok": false, + "error": "function_execution_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/functions.completeSuccess.json b/docs.slack.dev/methods/functions.completeSuccess.json new file mode 100644 index 00000000..f7392ce4 --- /dev/null +++ b/docs.slack.dev/methods/functions.completeSuccess.json @@ -0,0 +1,69 @@ +{ + "desc": "Signal the successful completion of a function", + "http_method": "POST", + "scope": "none", + "no_scope_required": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "function_execution_id", + "outputs" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "function_execution_id": { + "type": "string", + "desc": "Context identifier that maps to the executed function", + "example": "Fx12345ABCDE" + }, + "outputs": { + "type": "object", + "desc": "A JSON-based object that conforms to the [output parameters](https://docs.slack.dev/deno-slack-sdk/guides/creating-custom-functions#input-output) schema for the custom function defined in the manifest", + "example": "{\"customer_id\": \"U0BPQUNTA\"}" + } + } + }, + "output": null, + "errors": { + "unknown_method": { + "desc": "This method does not exist." + }, + "function_execution_not_found": { + "desc": "The specified function execution cannot be found." + }, + "access_denied": { + "desc": "This actor does not have access to this function execution." + }, + "execution_not_in_running_state": { + "desc": "The function execution is no longer in a state to be completed." + }, + "parameter_validation_failed": { + "desc": "There were problems when validating the outputs against the Function parameters. See API response for more details." + } + }, + "examples": { + "success": { + "url": "/api/functions.completeSuccess", + "description": "Typical, minimal success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/functions.completeSuccess", + "description": "Typical error response when the function has been completed and cannot be found", + "example": { + "ok": false, + "error": "function_execution_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/functions.distributions.permissions.add.json b/docs.slack.dev/methods/functions.distributions.permissions.add.json new file mode 100644 index 00000000..e827d9d2 --- /dev/null +++ b/docs.slack.dev/methods/functions.distributions.permissions.add.json @@ -0,0 +1,126 @@ +{ + "desc": "Grant users access to a custom slack function if its permission_type is set to named_entities", + "http_method": "POST", + "scope": "app_configurations:write", + "no_scope_required": false, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "function_id": { + "type": "string", + "desc": "The encoded ID of the function", + "example": "Fn12345", + "schema": "function_id" + }, + "function_callback_id": { + "type": "string", + "desc": "The callback ID defined in the function's definition file", + "example": "my_function" + }, + "function_app_id": { + "type": "string", + "desc": "The encoded ID of the app", + "example": "A12345", + "schema": "app_id" + }, + "user_ids": { + "type": "array", + "desc": "List of encoded user IDs", + "items": { + "schema": "user_id" + }, + "example": "U1234,U2345,U3456" + } + } + }, + "output": { + "type": "object", + "required": [ + "permission_type" + ], + "properties": { + "permission_type": { + "type": "string", + "enum": [ + "everyone", + "app_collaborators", + "named_entities", + "system" + ] + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + } + } + } + } + } + }, + "errors": { + "unknown_method": { + "desc": "This method does not exist." + }, + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "function_not_found": { + "desc": "This function does not exist." + }, + "invalid_permission_type": { + "desc": "This function requires permission_type to be set as named_entities before adding users." + }, + "user_not_found": { + "desc": "One or more of the named entities was not found." + }, + "app_not_found": { + "desc": "This app does not exist." + } + }, + "examples": { + "success": { + "url": "/api/functions.distributions.permissions.add?token=YOUR_TOKEN", + "description": "If successful, the command returns the permission type and if applicable, the list of users with access", + "example": { + "ok": true, + "permission_type": "named_entities", + "users": [ + { + "user_id": "U01565LTEBD", + "username": "joe_smith", + "email": "joesmith@salesforce.com" + } + ] + } + }, + "error": { + "url": "/api/functions.distributions.permissions.add?token=INVALID_TOKEN", + "description": "Typical error response when the permission type is not 'named_entities'", + "example": { + "ok": false, + "error": "invalid_permission_type" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/functions.distributions.permissions.list.json b/docs.slack.dev/methods/functions.distributions.permissions.list.json new file mode 100644 index 00000000..72b48926 --- /dev/null +++ b/docs.slack.dev/methods/functions.distributions.permissions.list.json @@ -0,0 +1,131 @@ +{ + "desc": "List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities", + "http_method": "POST", + "scope": "app_configurations:read", + "no_scope_required": false, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "function_id": { + "type": "string", + "desc": "The encoded ID of the function", + "example": "Fn12345", + "schema": "function_id" + }, + "function_callback_id": { + "type": "string", + "desc": "The callback ID defined in the function's definition file", + "example": "my_function" + }, + "function_app_id": { + "type": "string", + "desc": "The encoded ID of the app", + "example": "A12345", + "schema": "app_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "permission_type" + ], + "properties": { + "permission_type": { + "type": "string", + "enum": [ + "everyone", + "app_collaborators", + "named_entities", + "system" + ] + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + } + } + } + }, + "team_ids": { + "type": "array", + "desc": "List of team IDs allowed with named_entities permission.", + "example": "['T00000001', 'T00000002', 'T00000003']", + "items": { + "schema": "workspace_id" + } + }, + "org_ids": { + "type": "array", + "desc": "List of org IDs allowed with named_entities permission.", + "example": "['E00000001', 'E00000002', 'E00000003']", + "items": { + "schema": "enterprise_id" + } + } + } + }, + "errors": { + "unknown_method": { + "desc": "This method does not exist." + }, + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "function_not_found": { + "desc": "This function does not exist." + }, + "user_not_found": { + "desc": "One or more of the named entities was not found." + }, + "app_not_found": { + "desc": "This app does not exist." + } + }, + "examples": { + "success": { + "url": "/api/functions.distributions.permissions.list?token=YOUR_TOKEN", + "description": "If successful, the command returns the permission type and if applicable, the list of users with access", + "example": { + "ok": true, + "permission_type": "app_collaborators", + "users": [ + { + "user_id": "U01565LTEBD", + "username": "joe_smith", + "email": "joesmith@salesforce.com" + } + ] + } + }, + "error": { + "url": "/api/functions.distributions.permissions.list?token=INVALID_TOKEN", + "description": "Typical error response when identifying the function by callback ID but app ID is not included", + "example": { + "ok": false, + "error": "function_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/functions.distributions.permissions.remove.json b/docs.slack.dev/methods/functions.distributions.permissions.remove.json new file mode 100644 index 00000000..029c86f3 --- /dev/null +++ b/docs.slack.dev/methods/functions.distributions.permissions.remove.json @@ -0,0 +1,126 @@ +{ + "desc": "Revoke user access to a custom slack function if permission_type set to named_entities", + "http_method": "POST", + "scope": "app_configurations:write", + "no_scope_required": false, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "function_id": { + "type": "string", + "desc": "The encoded ID of the function", + "example": "Fn12345", + "schema": "function_id" + }, + "function_callback_id": { + "type": "string", + "desc": "The callback ID defined in the function's definition file", + "example": "my_function" + }, + "function_app_id": { + "type": "string", + "desc": "The encoded ID of the app.", + "example": "A12345", + "schema": "app_id" + }, + "user_ids": { + "type": "array", + "desc": "List of encoded user IDs", + "items": { + "schema": "user_id" + }, + "example": "U1234,U2345,U3456" + } + } + }, + "output": { + "type": "object", + "required": [ + "permission_type" + ], + "properties": { + "permission_type": { + "type": "string", + "enum": [ + "everyone", + "app_collaborators", + "named_entities", + "system" + ] + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + } + } + } + } + } + }, + "errors": { + "unknown_method": { + "desc": "This method does not exist." + }, + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "function_not_found": { + "desc": "This function does not exist." + }, + "user_not_found": { + "desc": "One or more of the named entities was not found." + }, + "invalid_permission_type": { + "desc": "This function requires permission_type to be set as named_entities before adding users." + }, + "app_not_found": { + "desc": "This app does not exist." + } + }, + "examples": { + "success": { + "url": "/api/functions.distributions.permissions.remove?token=YOUR_TOKEN", + "description": "If successful, the command returns the permission type and if applicable, the list of users with access", + "example": { + "ok": true, + "permission_type": "named_entities", + "users": [ + { + "user_id": "U01565LTEBD", + "username": "joe_smith", + "email": "joesmith@salesforce.com" + } + ] + } + }, + "error": { + "url": "/api/functions.distributions.permissions.remove?token=INVALID_TOKEN", + "description": "Typical error response when the permission type is not 'named_entities'", + "example": { + "ok": false, + "error": "invalid_permission_type" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/functions.distributions.permissions.set.json b/docs.slack.dev/methods/functions.distributions.permissions.set.json new file mode 100644 index 00000000..aca8f9b2 --- /dev/null +++ b/docs.slack.dev/methods/functions.distributions.permissions.set.json @@ -0,0 +1,176 @@ +{ + "desc": "Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities", + "http_method": "POST", + "scope": "app_configurations:write", + "no_scope_required": false, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "function_id": { + "type": "string", + "desc": "The encoded ID of the function", + "example": "Fn12345", + "schema": "function_id" + }, + "function_callback_id": { + "type": "string", + "desc": "The callback ID defined in the function's definition file", + "example": "my_function" + }, + "function_app_id": { + "type": "string", + "desc": "The encoded ID of the app", + "example": "A12345", + "schema": "app_id" + }, + "permission_type": { + "desc": "The type of permission that defines how the function can be distributed", + "type": "string", + "enum": [ + "everyone", + "app_collaborators", + "named_entities", + "system" + ] + }, + "user_ids": { + "type": "array", + "desc": "List of encoded user IDs", + "items": { + "schema": "user_id" + }, + "example": "U1234,U2345,U3456" + }, + "team_ids": { + "type": "array", + "desc": "List of team IDs to allow for named_entities permission", + "example": "T00000001,T00000002,T00000003", + "items": { + "schema": "workspace_id" + }, + "maxItems": 50 + }, + "org_ids": { + "type": "array", + "desc": "List of org IDs to allow for named_entities permission", + "example": "E00000001,E00000002,E00000003", + "items": { + "schema": "enterprise_id" + }, + "maxItems": 50 + } + } + }, + "output": { + "type": "object", + "required": [ + "permission_type" + ], + "properties": { + "permission_type": { + "type": "string", + "enum": [ + "everyone", + "app_collaborators", + "named_entities", + "system" + ] + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + } + } + } + }, + "team_ids": { + "type": "array", + "desc": "List of team IDs allowed with named_entities permission.", + "example": "['T00000001', 'T00000002', 'T00000003']", + "items": { + "schema": "workspace_id" + } + }, + "org_ids": { + "type": "array", + "desc": "List of org IDs allowed with named_entities permission.", + "example": "['E00000001', 'E00000002', 'E00000003']", + "items": { + "schema": "enterprise_id" + } + } + } + }, + "errors": { + "unknown_method": { + "desc": "This method does not exist." + }, + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "function_not_found": { + "desc": "This function does not exist." + }, + "invalid_named_entities": { + "desc": "One or more of the named entities was not found" + }, + "invalid_permission_type": { + "desc": "This function requires permission_type to be set as named_entities before adding users." + }, + "user_not_found": { + "desc": "One or more of the named entities was not found." + }, + "app_not_found": { + "desc": "This app does not exist." + }, + "permission_type_required": { + "desc": "`permission_type` is a required input." + } + }, + "examples": { + "success": { + "url": "/api/functions.distributions.permissions.set?token=YOUR_TOKEN", + "description": "If successful, the command returns the permission type and if applicable, the list of users with access", + "example": { + "ok": true, + "permission_type": "app_collaborators", + "users": [ + { + "user_id": "U01565LTEBD", + "username": "joe_smith", + "email": "joesmith@salesforce.com" + } + ] + } + }, + "error": { + "url": "/api/functions.distributions.permissions.set?token=INVALID_TOKEN", + "description": "Typical error response when an invalid user ID is supplied in `user_ids`", + "example": { + "ok": false, + "error": "user_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/functions.workflows.steps.list.json b/docs.slack.dev/methods/functions.workflows.steps.list.json new file mode 100644 index 00000000..f463fe16 --- /dev/null +++ b/docs.slack.dev/methods/functions.workflows.steps.list.json @@ -0,0 +1,106 @@ +{ + "desc": "List the steps of a specific function of a workflow's versions", + "http_method": "POST", + "scope": "none", + "no_scope_required": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "function_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "workflow_id": { + "desc": "The workflow ID, starts with Wf*", + "type": "string" + }, + "workflow": { + "type": "string", + "desc": "The workflow encoded ID or workflow reference", + "example": "#/workflows/my-workflow" + }, + "workflow_app_id": { + "type": "string", + "desc": "The app tied to the workflow reference." + }, + "function_id": { + "type": "string", + "desc": "The ID of the function to query" + } + } + }, + "output": { + "type": "object", + "required": [ + "steps_versions" + ], + "properties": { + "steps_versions": { + "type": "array", + "items": { + "schema": "step_version" + } + } + } + }, + "errors": { + "unknown_method": { + "desc": "This method does not exist." + }, + "access_denied": { + "desc": "This actor does not have access to the functions on this team." + }, + "unknown_workflow_id": { + "desc": "The passed in workflow_id is invalid." + }, + "unknown_function_id": { + "desc": "The passed in function_id is invalid." + }, + "invalid_arguments": { + "desc": "The arguments passed in are invalid." + }, + "unknown_app_id": { + "desc": "The passed in workflow_app_id is invalid." + }, + "missing_step_ids": { + "desc": "The passed in workflow is missing step IDs" + }, + "cannot_fetch_versions": { + "desc": "Encountered unexpected error while trying to fetch versions" + } + }, + "examples": { + "success": { + "url": "/api/functions.workflows.steps.list", + "description": "Typical success response", + "example": { + "ok": true, + "steps_versions": [ + { + "title": "Send a greeting", + "workflow_id": "Wf014H7FCWG2", + "step_id": "0", + "is_deleted": false, + "workflow_version_created": "1677282339978193" + } + ] + } + }, + "error": { + "url": "/api/functions.workflows.steps.list", + "description": "Error response for an unknown workflow", + "example": { + "ok": false, + "error": "unknown_workflow_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/functions.workflows.steps.responses.export.json b/docs.slack.dev/methods/functions.workflows.steps.responses.export.json new file mode 100644 index 00000000..3b1f279b --- /dev/null +++ b/docs.slack.dev/methods/functions.workflows.steps.responses.export.json @@ -0,0 +1,81 @@ +{ + "desc": "Download form responses of a workflow", + "http_method": "POST", + "scope": "none", + "no_scope_required": true, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "step_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "workflow_id": { + "desc": "The workflow ID, starts with Wf*", + "type": "string" + }, + "workflow": { + "type": "string", + "desc": "The workflow encoded ID or workflow reference", + "example": "#/workflows/my-workflow" + }, + "workflow_app_id": { + "type": "string", + "desc": "The app tied to the workflow reference." + }, + "step_id": { + "type": "string", + "desc": "The ID of the OpenForm step to export." + } + } + }, + "output": null, + "errors": { + "unknown_method": { + "desc": "This method does not exist." + }, + "access_denied": { + "desc": "This actor does not have access to the functions on this team." + }, + "workflows_export_csv_not_enabled": { + "desc": "Downloading form responses is not allowed. Admin pref needs to be enabled." + }, + "unknown_workflow_id": { + "desc": "The passed in workflow_id is invalid." + }, + "unknown_step_id": { + "desc": "The passed in step_id is invalid." + }, + "invalid_arguments": { + "desc": "The arguments passed in are invalid." + }, + "unknown_app_id": { + "desc": "The passed in workflow_app_id is invalid." + } + }, + "examples": { + "success": { + "url": "/api/functions.workflows.steps.responses.export", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/functions.workflows.steps.responses.export", + "description": "Error response for an unknown workflow", + "example": { + "ok": false, + "error": "unknown_workflow_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/methods.json b/docs.slack.dev/methods/methods.json new file mode 100644 index 00000000..02c0449c --- /dev/null +++ b/docs.slack.dev/methods/methods.json @@ -0,0 +1,2074 @@ +[ + { + "name": "admin.analytics.getFile", + "description": "Retrieve analytics data for a given date, presented as a compressed JSON file", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.activities.list", + "description": "Get logs for a specified team/org", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.approve", + "description": "Approve an app for installation on a workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.approved.list", + "description": "List approved apps for an org or workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.clearResolution", + "description": "Clear an app resolution", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.config.lookup", + "description": "Look up the app config for connectors by their IDs", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.config.set", + "description": "Set the app config for a connector", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.requests.cancel", + "description": "Cancel app request for team", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.requests.list", + "description": "List app requests for a team/workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.restrict", + "description": "Restrict an app for installation on a workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.restricted.list", + "description": "List restricted apps for an org or workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.apps.uninstall", + "description": "Uninstall an app from one or many workspaces, or an entire enterprise organization.", + "family": [ + "admin" + ] + }, + { + "name": "admin.audit.anomaly.allow.getItem", + "description": "API to allow Enterprise org admins to read the allow list of IP blocks and ASNs from the enterprise configuration.", + "family": [ + "admin" + ] + }, + { + "name": "admin.audit.anomaly.allow.updateItem", + "description": "API to allow Enterprise org admins to write/overwrite the allow list of IP blocks and ASNs from the enterprise configuration.", + "family": [ + "admin" + ] + }, + { + "name": "admin.auth.policy.assignEntities", + "description": "Assign entities to a particular authentication policy.", + "family": [ + "admin" + ] + }, + { + "name": "admin.auth.policy.getEntities", + "description": "Fetch all the entities assigned to a particular authentication policy by name.", + "family": [ + "admin" + ] + }, + { + "name": "admin.auth.policy.removeEntities", + "description": "Remove specified entities from a specified authentication policy.", + "family": [ + "admin" + ] + }, + { + "name": "admin.barriers.create", + "description": "Create an Information Barrier", + "family": [ + "admin" + ] + }, + { + "name": "admin.barriers.delete", + "description": "Delete an existing Information Barrier", + "family": [ + "admin" + ] + }, + { + "name": "admin.barriers.list", + "description": "Get all Information Barriers for your organization", + "family": [ + "admin" + ] + }, + { + "name": "admin.barriers.update", + "description": "Update an existing Information Barrier", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.archive", + "description": "Archive a public or private channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.bulkArchive", + "description": "Archive public or private channels in bulk.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.bulkDelete", + "description": "Delete public or private channels in bulk", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.bulkMove", + "description": "Move public or private channels in bulk.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.convertToPrivate", + "description": "Convert a public channel to a private channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.convertToPublic", + "description": "Convert a private channel to a public channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.create", + "description": "Create a public or private channel-based conversation.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.createForObjects", + "description": "Create a Salesforce channel for the corresponding object provided.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.delete", + "description": "Delete a public or private channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.disconnectShared", + "description": "Disconnect a connected channel from one or more workspaces.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.ekm.listOriginalConnectedChannelInfo", + "description": "List all disconnected channels—i.e., channels that were once connected to other workspaces and then disconnected—and the corresponding original channel IDs for key revocation with EKM.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.getConversationPrefs", + "description": "Get conversation preferences for a public or private channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.getCustomRetention", + "description": "This API endpoint can be used by any admin to get a conversation's retention policy.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.getTeams", + "description": "Get all the workspaces a given public or private channel is connected to within this Enterprise org.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.invite", + "description": "Invite a user to a public or private channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.linkObjects", + "description": "Link a Salesforce record to a channel", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.lookup", + "description": "Returns channels on the given team using the filters.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.removeCustomRetention", + "description": "This API endpoint can be used by any admin to remove a conversation's retention policy.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.rename", + "description": "Rename a public or private channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.restrictAccess.addGroup", + "description": "Add an allowlist of IDP groups for accessing a channel", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.restrictAccess.listGroups", + "description": "List all IDP Groups linked to a channel", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.restrictAccess.removeGroup", + "description": "Remove a linked IDP group linked from a private channel", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.search", + "description": "Search for public or private channels in an Enterprise organization.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.setConversationPrefs", + "description": "Set the posting permissions for a public or private channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.setCustomRetention", + "description": "This API endpoint can be used by any admin to set a conversation's retention policy.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.setTeams", + "description": "Set the workspaces in an Enterprise org that connect to a public or private channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.unarchive", + "description": "Unarchive a public or private channel.", + "family": [ + "admin" + ] + }, + { + "name": "admin.conversations.unlinkObjects", + "description": "Unlink a Salesforce record from a channel", + "family": [ + "admin" + ] + }, + { + "name": "admin.emoji.add", + "description": "Add an emoji.", + "family": [ + "admin" + ] + }, + { + "name": "admin.emoji.addAlias", + "description": "Add an emoji alias.", + "family": [ + "admin" + ] + }, + { + "name": "admin.emoji.list", + "description": "List emoji for an Enterprise organization.", + "family": [ + "admin" + ] + }, + { + "name": "admin.emoji.remove", + "description": "Remove an emoji across an Enterprise organization", + "family": [ + "admin" + ] + }, + { + "name": "admin.emoji.rename", + "description": "Rename an emoji.", + "family": [ + "admin" + ] + }, + { + "name": "admin.functions.list", + "description": "Look up functions by a set of apps", + "family": [ + "admin" + ] + }, + { + "name": "admin.functions.permissions.lookup", + "description": "Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities.", + "family": [ + "admin" + ] + }, + { + "name": "admin.functions.permissions.set", + "description": "Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities", + "family": [ + "admin" + ] + }, + { + "name": "admin.inviteRequests.approve", + "description": "Approve a workspace invite request.", + "family": [ + "admin" + ] + }, + { + "name": "admin.inviteRequests.approved.list", + "description": "List all approved workspace invite requests.", + "family": [ + "admin" + ] + }, + { + "name": "admin.inviteRequests.denied.list", + "description": "List all denied workspace invite requests.", + "family": [ + "admin" + ] + }, + { + "name": "admin.inviteRequests.deny", + "description": "Deny a workspace invite request.", + "family": [ + "admin" + ] + }, + { + "name": "admin.inviteRequests.list", + "description": "List all pending workspace invite requests.", + "family": [ + "admin" + ] + }, + { + "name": "admin.roles.addAssignments", + "description": "Adds members to the specified role with the specified scopes", + "family": [ + "admin" + ] + }, + { + "name": "admin.roles.listAssignments", + "description": "Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities", + "family": [ + "admin" + ] + }, + { + "name": "admin.roles.removeAssignments", + "description": "Removes a set of users from a role for the given scopes and entities", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.admins.list", + "description": "List all of the admins on a given workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.create", + "description": "Create an Enterprise team.", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.list", + "description": "List all teams in an Enterprise organization", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.owners.list", + "description": "List all of the owners on a given workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.settings.info", + "description": "Fetch information about settings in a workspace", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.settings.setDefaultChannels", + "description": "Set the default channels of a workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.settings.setDescription", + "description": "Set the description of a given workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.settings.setDiscoverability", + "description": "An API method that allows admins to set the discoverability of a given workspace", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.settings.setIcon", + "description": "Sets the icon of a workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.teams.settings.setName", + "description": "Set the name of a given workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.usergroups.addChannels", + "description": "Add up to one hundred default channels to an IDP group.", + "family": [ + "admin" + ] + }, + { + "name": "admin.usergroups.addTeams", + "description": "Associate one or more default workspaces with an organization-wide IDP group.", + "family": [ + "admin" + ] + }, + { + "name": "admin.usergroups.listChannels", + "description": "List the channels linked to an org-level IDP group (user group).", + "family": [ + "admin" + ] + }, + { + "name": "admin.usergroups.removeChannels", + "description": "Remove one or more default channels from an org-level IDP group (user group).", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.assign", + "description": "Add an Enterprise user to a workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.invite", + "description": "Invite a user to a workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.list", + "description": "List users on a workspace", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.remove", + "description": "Remove a user from a workspace.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.session.clearSettings", + "description": "Clear user-specific session settings—the session duration and what happens when the client closes—for a list of users.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.session.getSettings", + "description": "Get user-specific session settings—the session duration and what happens when the client closes—given a list of users.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.session.invalidate", + "description": "Revoke a single session for a user. The user will be forced to login to Slack.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.session.list", + "description": "List active user sessions for an organization", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.session.reset", + "description": "Wipes all valid sessions on all devices for a given user", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.session.resetBulk", + "description": "Enqueues an asynchronous job to wipe all valid sessions on all devices for a given list of users", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.session.setSettings", + "description": "Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.setAdmin", + "description": "Set an existing regular user or owner to be a workspace admin.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.setExpiration", + "description": "Set an expiration for a guest user", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.setOwner", + "description": "Set an existing regular user or admin to be a workspace owner.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.setRegular", + "description": "Set an existing guest user, admin user, or owner to be a regular user.", + "family": [ + "admin" + ] + }, + { + "name": "admin.users.unsupportedVersions.export", + "description": "Ask Slackbot to send you an export listing all workspace members using unsupported software, presented as a zipped CSV file.", + "family": [ + "admin" + ] + }, + { + "name": "admin.workflows.collaborators.add", + "description": "Add collaborators to workflows within the team or enterprise", + "family": [ + "admin" + ] + }, + { + "name": "admin.workflows.collaborators.remove", + "description": "Remove collaborators from workflows within the team or enterprise", + "family": [ + "admin" + ] + }, + { + "name": "admin.workflows.permissions.lookup", + "description": "Look up the permissions for a set of workflows", + "family": [ + "admin" + ] + }, + { + "name": "admin.workflows.search", + "description": "Search workflows within the team or enterprise", + "family": [ + "admin" + ] + }, + { + "name": "admin.workflows.triggers.types.permissions.lookup", + "description": "list the permissions for using each trigger type", + "family": [ + "admin" + ] + }, + { + "name": "admin.workflows.triggers.types.permissions.set", + "description": "Set the permissions for using a trigger type", + "family": [ + "admin" + ] + }, + { + "name": "admin.workflows.unpublish", + "description": "Unpublish workflows within the team or enterprise", + "family": [ + "admin" + ] + }, + { + "name": "api.test", + "description": "Checks API calling code.", + "family": [ + "api" + ] + }, + { + "name": "apps.activities.list", + "description": "Get logs for a specified app", + "family": [ + "apps" + ] + }, + { + "name": "apps.auth.external.delete", + "description": "Delete external auth tokens only on the Slack side", + "family": [ + "apps" + ] + }, + { + "name": "apps.auth.external.get", + "description": "Get the access token for the provided token ID", + "family": [ + "apps" + ] + }, + { + "name": "apps.connections.open", + "description": "Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over.", + "family": [ + "apps" + ] + }, + { + "name": "apps.datastore.bulkDelete", + "description": "Delete items from a datastore in bulk", + "family": [ + "apps" + ] + }, + { + "name": "apps.datastore.bulkGet", + "description": "Get items from a datastore in bulk", + "family": [ + "apps" + ] + }, + { + "name": "apps.datastore.bulkPut", + "description": "Creates or replaces existing items in bulk", + "family": [ + "apps" + ] + }, + { + "name": "apps.datastore.count", + "description": "Count the number of items in a datastore that match a query", + "family": [ + "apps" + ] + }, + { + "name": "apps.datastore.delete", + "description": "Delete an item from a datastore", + "family": [ + "apps" + ] + }, + { + "name": "apps.datastore.get", + "description": "Get an item from a datastore", + "family": [ + "apps" + ] + }, + { + "name": "apps.datastore.put", + "description": "Creates a new item, or replaces an old item with a new item.", + "family": [ + "apps" + ] + }, + { + "name": "apps.datastore.query", + "description": "Query a datastore for items", + "family": [ + "apps" + ] + }, + { + "name": "apps.datastore.update", + "description": "Edits an existing item's attributes, or adds a new item if it does not already exist.", + "family": [ + "apps" + ] + }, + { + "name": "apps.event.authorizations.list", + "description": "Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.", + "family": [ + "apps" + ] + }, + { + "name": "apps.manifest.create", + "description": "Create an app from an app manifest.", + "family": [ + "apps" + ] + }, + { + "name": "apps.manifest.delete", + "description": "Permanently deletes an app created through app manifests", + "family": [ + "apps" + ] + }, + { + "name": "apps.manifest.export", + "description": "Export an app manifest from an existing app", + "family": [ + "apps" + ] + }, + { + "name": "apps.manifest.update", + "description": "Update an app from an app manifest", + "family": [ + "apps" + ] + }, + { + "name": "apps.manifest.validate", + "description": "Validate an app manifest", + "family": [ + "apps" + ] + }, + { + "name": "apps.uninstall", + "description": "Uninstalls your app from a workspace.", + "family": [ + "apps" + ] + }, + { + "name": "assistant.search.context", + "description": "Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval.", + "family": [ + "assistant" + ] + }, + { + "name": "assistant.search.info", + "description": "Returns search capabilities on a given team.", + "family": [ + "assistant" + ] + }, + { + "name": "assistant.threads.setStatus", + "description": "Set the status for an AI assistant thread.", + "family": [ + "assistant" + ] + }, + { + "name": "assistant.threads.setSuggestedPrompts", + "description": "Set suggested prompts for the given assistant thread", + "family": [ + "assistant" + ] + }, + { + "name": "assistant.threads.setTitle", + "description": "Set the title for the given assistant thread", + "family": [ + "assistant" + ] + }, + { + "name": "auth.revoke", + "description": "Revokes a token.", + "family": [ + "auth" + ] + }, + { + "name": "auth.teams.list", + "description": "Obtain a full list of workspaces your org-wide app has been approved for.", + "family": [ + "auth" + ] + }, + { + "name": "auth.test", + "description": "Checks authentication & identity.", + "family": [ + "auth" + ] + }, + { + "name": "bookmarks.add", + "description": "Add bookmark to a channel.", + "family": [ + "bookmarks" + ] + }, + { + "name": "bookmarks.edit", + "description": "Edit bookmark.", + "family": [ + "bookmarks" + ] + }, + { + "name": "bookmarks.list", + "description": "List bookmark for the channel.", + "family": [ + "bookmarks" + ] + }, + { + "name": "bookmarks.remove", + "description": "Remove bookmark from the channel.", + "family": [ + "bookmarks" + ] + }, + { + "name": "bots.info", + "description": "Gets information about a bot user.", + "family": [ + "bots" + ] + }, + { + "name": "calls.add", + "description": "Registers a new Call.", + "family": [ + "calls" + ] + }, + { + "name": "calls.end", + "description": "Ends a Call.", + "family": [ + "calls" + ] + }, + { + "name": "calls.info", + "description": "Returns information about a Call.", + "family": [ + "calls" + ] + }, + { + "name": "calls.participants.add", + "description": "Registers new participants added to a Call.", + "family": [ + "calls" + ] + }, + { + "name": "calls.participants.remove", + "description": "Registers participants removed from a Call.", + "family": [ + "calls" + ] + }, + { + "name": "calls.update", + "description": "Updates information about a Call.", + "family": [ + "calls" + ] + }, + { + "name": "canvases.access.delete", + "description": "Remove access to a canvas for specified entities", + "family": [ + "canvases" + ] + }, + { + "name": "canvases.access.set", + "description": "Sets the access level to a canvas for specified entities", + "family": [ + "canvases" + ] + }, + { + "name": "canvases.create", + "description": "Create canvas for a user", + "family": [ + "canvases" + ] + }, + { + "name": "canvases.delete", + "description": "Deletes a canvas", + "family": [ + "canvases" + ] + }, + { + "name": "canvases.edit", + "description": "Update an existing canvas", + "family": [ + "canvases" + ] + }, + { + "name": "canvases.sections.lookup", + "description": "Find sections matching the provided criteria", + "family": [ + "canvases" + ] + }, + { + "name": "chat.delete", + "description": "Deletes a message.", + "family": [ + "chat" + ] + }, + { + "name": "chat.deleteScheduledMessage", + "description": "Deletes a pending scheduled message from the queue.", + "family": [ + "chat" + ] + }, + { + "name": "chat.getPermalink", + "description": "Retrieve a permalink URL for a specific extant message", + "family": [ + "chat" + ] + }, + { + "name": "chat.meMessage", + "description": "Share a me message into a channel.", + "family": [ + "chat" + ] + }, + { + "name": "chat.postEphemeral", + "description": "Sends an ephemeral message to a user in a channel.", + "family": [ + "chat" + ] + }, + { + "name": "chat.postMessage", + "description": "Sends a message to a channel.", + "family": [ + "chat" + ] + }, + { + "name": "chat.scheduledMessages.list", + "description": "Returns a list of scheduled messages.", + "family": [ + "chat" + ] + }, + { + "name": "chat.scheduleMessage", + "description": "Schedules a message to be sent to a channel.", + "family": [ + "chat" + ] + }, + { + "name": "chat.unfurl", + "description": "Provide custom unfurl behavior for user-posted URLs", + "family": [ + "chat" + ] + }, + { + "name": "chat.update", + "description": "Updates a message.", + "family": [ + "chat" + ] + }, + { + "name": "conversations.acceptSharedInvite", + "description": "Accepts an invitation to a Slack Connect channel.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.approveSharedInvite", + "description": "Approves an invitation to a Slack Connect channel", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.archive", + "description": "Archives a conversation.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.canvases.create", + "description": "Create a channel canvas for a channel", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.close", + "description": "Closes a direct message or multi-person direct message.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.create", + "description": "Initiates a public or private channel-based conversation", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.declineSharedInvite", + "description": "Declines a Slack Connect channel invite.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.externalInvitePermissions.set", + "description": "Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.history", + "description": "Fetches a conversation's history of messages and events.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.info", + "description": "Retrieve information about a conversation.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.invite", + "description": "Invites users to a channel.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.inviteShared", + "description": "Sends an invitation to a Slack Connect channel", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.join", + "description": "Joins an existing conversation.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.kick", + "description": "Removes a user from a conversation.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.leave", + "description": "Leaves a conversation.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.list", + "description": "Lists all channels in a Slack team.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.listConnectInvites", + "description": "Lists shared channel invites that have been generated or received but have not been approved by all parties", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.mark", + "description": "Sets the read cursor in a channel.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.members", + "description": "Retrieve members of a conversation.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.open", + "description": "Opens or resumes a direct message or multi-person direct message.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.rename", + "description": "Renames a conversation.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.replies", + "description": "Retrieve a thread of messages posted to a conversation", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.requestSharedInvite.approve", + "description": "Approves a request to add an external user to a channel and sends them a Slack Connect invite", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.requestSharedInvite.deny", + "description": "Denies a request to invite an external user to a channel", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.requestSharedInvite.list", + "description": "Lists requests to add external users to channels with ability to filter.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.setPurpose", + "description": "Sets the channel description.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.setTopic", + "description": "Sets the topic for a conversation.", + "family": [ + "conversations" + ] + }, + { + "name": "conversations.unarchive", + "description": "Reverses conversation archival.", + "family": [ + "conversations" + ] + }, + { + "name": "dialog.open", + "description": "Open a dialog with a user", + "family": [ + "dialog" + ] + }, + { + "name": "dnd.endDnd", + "description": "Ends the current user's Do Not Disturb session immediately.", + "family": [ + "dnd" + ] + }, + { + "name": "dnd.endSnooze", + "description": "Ends the current user's snooze mode immediately.", + "family": [ + "dnd" + ] + }, + { + "name": "dnd.info", + "description": "Retrieves a user's current Do Not Disturb status.", + "family": [ + "dnd" + ] + }, + { + "name": "dnd.setSnooze", + "description": "Turns on Do Not Disturb mode for the current user, or changes its duration.", + "family": [ + "dnd" + ] + }, + { + "name": "dnd.teamInfo", + "description": "Retrieves the Do Not Disturb status for up to 50 users on a team.", + "family": [ + "dnd" + ] + }, + { + "name": "emoji.list", + "description": "Lists custom emoji for a team.", + "family": [ + "emoji" + ] + }, + { + "name": "files.comments.delete", + "description": "Deletes an existing comment on a file.", + "family": [ + "files" + ] + }, + { + "name": "files.completeUploadExternal", + "description": "Finishes an upload started with files.getUploadURLExternal", + "family": [ + "files" + ] + }, + { + "name": "files.delete", + "description": "Deletes a file.", + "family": [ + "files" + ] + }, + { + "name": "files.getUploadURLExternal", + "description": "Gets a URL for an edge external file upload", + "family": [ + "files" + ] + }, + { + "name": "files.info", + "description": "Gets information about a file.", + "family": [ + "files" + ] + }, + { + "name": "files.list", + "description": "List for a team, in a channel, or from a user with applied filters.", + "family": [ + "files" + ] + }, + { + "name": "files.remote.add", + "description": "Adds a file from a remote service", + "family": [ + "files" + ] + }, + { + "name": "files.remote.info", + "description": "Retrieve information about a remote file added to Slack", + "family": [ + "files" + ] + }, + { + "name": "files.remote.list", + "description": "Retrieve information about a remote file added to Slack", + "family": [ + "files" + ] + }, + { + "name": "files.remote.remove", + "description": "Remove a remote file.", + "family": [ + "files" + ] + }, + { + "name": "files.remote.share", + "description": "Share a remote file into a channel.", + "family": [ + "files" + ] + }, + { + "name": "files.remote.update", + "description": "Updates an existing remote file.", + "family": [ + "files" + ] + }, + { + "name": "files.revokePublicURL", + "description": "Revokes public/external sharing access for a file", + "family": [ + "files" + ] + }, + { + "name": "files.sharedPublicURL", + "description": "Enables a file for public/external sharing.", + "family": [ + "files" + ] + }, + { + "name": "files.upload", + "description": "Uploads or creates a file.", + "family": [ + "files" + ] + }, + { + "name": "functions.completeError", + "description": "Signal that a function failed to complete", + "family": [ + "functions" + ] + }, + { + "name": "functions.completeSuccess", + "description": "Signal the successful completion of a function", + "family": [ + "functions" + ] + }, + { + "name": "functions.distributions.permissions.add", + "description": "Grant users access to a custom slack function if its permission_type is set to named_entities", + "family": [ + "functions" + ] + }, + { + "name": "functions.distributions.permissions.list", + "description": "List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities", + "family": [ + "functions" + ] + }, + { + "name": "functions.distributions.permissions.remove", + "description": "Revoke user access to a custom slack function if permission_type set to named_entities", + "family": [ + "functions" + ] + }, + { + "name": "functions.distributions.permissions.set", + "description": "Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities", + "family": [ + "functions" + ] + }, + { + "name": "functions.workflows.steps.list", + "description": "List the steps of a specific function of a workflow's versions", + "family": [ + "functions" + ] + }, + { + "name": "functions.workflows.steps.responses.export", + "description": "Download form responses of a workflow", + "family": [ + "functions" + ] + }, + { + "name": "slackLists.access.delete", + "description": "Revoke access to a List for specified entities.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.access.set", + "description": "Set the access level to a List for specified entities.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.create", + "description": "Create a List.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.download.get", + "description": "Retrieve List download URL from an export job to download List contents.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.download.start", + "description": "Initiate a job to export List contents.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.items.create", + "description": "Add a new item to an existing List.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.items.delete", + "description": "Deletes an item from an existing List.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.items.deleteMultiple", + "description": "Deletes multiple items from an existing List.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.items.info", + "description": "Get a row from a List.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.items.list", + "description": "Get records from a List.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.items.update", + "description": "Updates cells in a List.", + "family": [ + "lists" + ] + }, + { + "name": "slackLists.update", + "description": "Update a List.", + "family": [ + "lists" + ] + }, + { + "name": "migration.exchange", + "description": "For Enterprise organization workspaces, map local user IDs to global user IDs", + "family": [ + "migration" + ] + }, + { + "name": "oauth.access", + "description": "Exchanges a temporary OAuth verifier code for an access token.", + "family": [ + "oauth" + ] + }, + { + "name": "oauth.v2.access", + "description": "Exchanges a temporary OAuth verifier code for an access token.", + "family": [ + "oauth" + ] + }, + { + "name": "oauth.v2.exchange", + "description": "Exchanges a legacy access token for a new expiring access token and refresh token", + "family": [ + "oauth" + ] + }, + { + "name": "openid.connect.token", + "description": "Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack.", + "family": [ + "openid" + ] + }, + { + "name": "openid.connect.userInfo", + "description": "Get the identity of a user who has authorized Sign in with Slack.", + "family": [ + "openid" + ] + }, + { + "name": "pins.add", + "description": "Pins an item to a channel.", + "family": [ + "pins" + ] + }, + { + "name": "pins.list", + "description": "Lists items pinned to a channel.", + "family": [ + "pins" + ] + }, + { + "name": "pins.remove", + "description": "Un-pins an item from a channel.", + "family": [ + "pins" + ] + }, + { + "name": "reactions.add", + "description": "Adds a reaction to an item.", + "family": [ + "reactions" + ] + }, + { + "name": "reactions.get", + "description": "Gets reactions for an item.", + "family": [ + "reactions" + ] + }, + { + "name": "reactions.list", + "description": "Lists reactions made by a user.", + "family": [ + "reactions" + ] + }, + { + "name": "reactions.remove", + "description": "Removes a reaction from an item.", + "family": [ + "reactions" + ] + }, + { + "name": "reminders.add", + "description": "Creates a reminder.", + "family": [ + "reminders" + ] + }, + { + "name": "reminders.complete", + "description": "Marks a reminder as complete.", + "family": [ + "reminders" + ] + }, + { + "name": "reminders.delete", + "description": "Deletes a reminder.", + "family": [ + "reminders" + ] + }, + { + "name": "reminders.info", + "description": "Gets information about a reminder.", + "family": [ + "reminders" + ] + }, + { + "name": "reminders.list", + "description": "Lists all reminders created by or for a given user.", + "family": [ + "reminders" + ] + }, + { + "name": "rtm.connect", + "description": "Starts a Real Time Messaging session.", + "family": [ + "rtm" + ] + }, + { + "name": "rtm.start", + "description": "Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead.", + "family": [ + "rtm" + ] + }, + { + "name": "search.all", + "description": "Searches for messages and files matching a query.", + "family": [ + "search" + ] + }, + { + "name": "search.files", + "description": "Searches for files matching a query.", + "family": [ + "search" + ] + }, + { + "name": "search.messages", + "description": "Searches for messages matching a query.", + "family": [ + "search" + ] + }, + { + "name": "stars.add", + "description": "Save an item for later. Formerly known as adding a star.", + "family": [ + "stars" + ] + }, + { + "name": "stars.list", + "description": "Listed a user's saved items, formerly known as stars.", + "family": [ + "stars" + ] + }, + { + "name": "stars.remove", + "description": "Removes a saved item (star) from an item.", + "family": [ + "stars" + ] + }, + { + "name": "team.accessLogs", + "description": "Gets the access logs for the current team.", + "family": [ + "team" + ] + }, + { + "name": "team.billableInfo", + "description": "Gets billable users information for the current team.", + "family": [ + "team" + ] + }, + { + "name": "team.billing.info", + "description": "Reads a workspace's billing plan information.", + "family": [ + "team" + ] + }, + { + "name": "team.externalTeams.disconnect", + "description": "Disconnect an external organization.", + "family": [ + "team" + ] + }, + { + "name": "team.externalTeams.list", + "description": "Returns a list of all the external teams connected and details about the connection.", + "family": [ + "team" + ] + }, + { + "name": "team.info", + "description": "Gets information about the current team.", + "family": [ + "team" + ] + }, + { + "name": "team.integrationLogs", + "description": "Gets the integration logs for the current team.", + "family": [ + "team" + ] + }, + { + "name": "team.preferences.list", + "description": "Retrieve a list of a workspace's team preferences.", + "family": [ + "team" + ] + }, + { + "name": "team.profile.get", + "description": "Retrieve a team's profile.", + "family": [ + "team" + ] + }, + { + "name": "tooling.tokens.rotate", + "description": "Exchanges a refresh token for a new app configuration token.", + "family": [ + "tooling" + ] + }, + { + "name": "usergroups.create", + "description": "Create a User Group.", + "family": [ + "usergroups" + ] + }, + { + "name": "usergroups.disable", + "description": "Disable an existing User Group.", + "family": [ + "usergroups" + ] + }, + { + "name": "usergroups.enable", + "description": "Enable a User Group.", + "family": [ + "usergroups" + ] + }, + { + "name": "usergroups.list", + "description": "List all User Groups for a team.", + "family": [ + "usergroups" + ] + }, + { + "name": "usergroups.update", + "description": "Update an existing User Group.", + "family": [ + "usergroups" + ] + }, + { + "name": "usergroups.users.list", + "description": "List all users in a User Group.", + "family": [ + "usergroups" + ] + }, + { + "name": "usergroups.users.update", + "description": "Update the list of users for a user group.", + "family": [ + "usergroups" + ] + }, + { + "name": "users.conversations", + "description": "List conversations the calling user may access.", + "family": [ + "users" + ] + }, + { + "name": "users.deletePhoto", + "description": "Delete the user profile photo", + "family": [ + "users" + ] + }, + { + "name": "users.discoverableContacts.lookup", + "description": "Look up an email address to see if someone is discoverable on Slack", + "family": [ + "users" + ] + }, + { + "name": "users.getPresence", + "description": "Gets user presence information.", + "family": [ + "users" + ] + }, + { + "name": "users.identity", + "description": "Get a user's identity.", + "family": [ + "users" + ] + }, + { + "name": "users.info", + "description": "Gets information about a user.", + "family": [ + "users" + ] + }, + { + "name": "users.list", + "description": "Lists all users in a Slack team.", + "family": [ + "users" + ] + }, + { + "name": "users.lookupByEmail", + "description": "Find a user with an email address.", + "family": [ + "users" + ] + }, + { + "name": "users.profile.get", + "description": "Retrieve a user's profile information, including their custom status.", + "family": [ + "users" + ] + }, + { + "name": "users.profile.set", + "description": "Set a user's profile information, including custom status.", + "family": [ + "users" + ] + }, + { + "name": "users.setActive", + "description": "Marked a user as active. Deprecated and non-functional.", + "family": [ + "users" + ] + }, + { + "name": "users.setPhoto", + "description": "Set the user profile photo", + "family": [ + "users" + ] + }, + { + "name": "users.setPresence", + "description": "Manually sets user presence.", + "family": [ + "users" + ] + }, + { + "name": "views.open", + "description": "Open a view for a user.", + "family": [ + "views" + ] + }, + { + "name": "views.publish", + "description": "Publish a static view for a User.", + "family": [ + "views" + ] + }, + { + "name": "views.push", + "description": "Push a view onto the stack of a root view.", + "family": [ + "views" + ] + }, + { + "name": "views.update", + "description": "Update an existing view.", + "family": [ + "views" + ] + }, + { + "name": "workflows.featured.add", + "description": "Add featured workflows to a channel.", + "family": [ + "workflows" + ] + }, + { + "name": "workflows.featured.list", + "description": "List the featured workflows for specified channels.", + "family": [ + "workflows" + ] + }, + { + "name": "workflows.featured.remove", + "description": "Remove featured workflows from a channel.", + "family": [ + "workflows" + ] + }, + { + "name": "workflows.featured.set", + "description": "Set featured workflows for a channel.", + "family": [ + "workflows" + ] + }, + { + "name": "workflows.triggers.permissions.add", + "description": "Allows users to run a trigger that has its permission type set to named_entities", + "family": [ + "workflows" + ] + }, + { + "name": "workflows.triggers.permissions.list", + "description": "Returns the permission type of a trigger and if applicable, includes the entities that have been granted access", + "family": [ + "workflows" + ] + }, + { + "name": "workflows.triggers.permissions.remove", + "description": "Revoke an entity's access to a trigger that has its permission type set to named_entities", + "family": [ + "workflows" + ] + }, + { + "name": "workflows.triggers.permissions.set", + "description": "Set the permission type for who can run a trigger", + "family": [ + "workflows" + ] + } +] \ No newline at end of file diff --git a/docs.slack.dev/methods/migration.exchange.json b/docs.slack.dev/methods/migration.exchange.json new file mode 100644 index 00000000..6531e712 --- /dev/null +++ b/docs.slack.dev/methods/migration.exchange.json @@ -0,0 +1,101 @@ +{ + "desc": "For Enterprise organization workspaces, map local user IDs to global user IDs", + "http_method": "GET", + "scope": "tokens.basic", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "users" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "users": { + "desc": "A comma-separated list of user ids, up to 400 per request", + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 400 + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "Specify team_id starts with `T` in case of Org Token" + }, + "to_old": { + "desc": "Specify `true` to convert `W` global user IDs to workspace-specific `U` IDs. Defaults to `false`.", + "type": "boolean", + "default": false + } + } + }, + "output": { + "type": "object", + "required": [ + "team_id", + "enterprise_id", + "user_id_map" + ], + "properties": { + "team_id": { + "type": "string" + }, + "enterprise_id": { + "type": "string" + }, + "user_id_map": { + "type": "object", + "title": "A mapping of provided user IDs with mapped user IDs" + }, + "invalid_user_ids": { + "type": "array", + "title": "A list of User IDs that cannot be mapped or found", + "items": { + "type": "string" + } + } + } + }, + "errors": { + "not_enterprise_team": { + "desc": "The workspace associated with the token is not part of an Enterprise organization. User IDs have not changed and there is nothing to map." + }, + "too_many_users": { + "desc": "Too many user IDs provided in `users`. Up to 400 user IDs are allowed per request." + } + }, + "examples": { + "success": { + "description": "Typical success response when mappings exist for the specified user IDs", + "example": { + "ok": true, + "team_id": "T1KR7PE1W", + "enterprise_id": "E1KQTNXE1", + "user_id_map": { + "U06UBSUN5": "W06M56XJM", + "U06UEB62U": "W06PTT6GH", + "U06UBSVB3": "W06PUUDLY", + "U06UBSVDX": "W06PUUDMW", + "W06UAZ65Q": "W06UAZ65Q" + }, + "invalid_user_ids": [ + "U21ABZZXX" + ] + } + }, + "error": { + "description": "Typical error response when there are no mappings to provide", + "example": { + "ok": false, + "error": "not_enterprise_team" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/oauth.access.json b/docs.slack.dev/methods/oauth.access.json new file mode 100644 index 00000000..676c5986 --- /dev/null +++ b/docs.slack.dev/methods/oauth.access.json @@ -0,0 +1,398 @@ +{ + "desc": "Exchanges a temporary OAuth verifier code for an access token.", + "http_method": "POST", + "scope": "none", + "rate_limits": "t4", + "args": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "desc": "Issued when you created your application. If possible, avoid sending `client_id` and `client_secret` as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.", + "example": "2141029472.691202649728" + }, + "client_secret": { + "type": "string", + "subtype": "password", + "desc": "Issued when you created your application. If possible, avoid sending `client_id` and `client_secret` as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.", + "example": "e1b9e11dfcd19c1982d5de12921e17e8c" + }, + "code": { + "type": "string", + "desc": "The `code` param returned via the OAuth callback.", + "example": "4724469134.4644010092847.232b4e6d82c333b475fc30f5f5a341d294feb1a94392c2fd791f7ab7731a443d1a" + }, + "redirect_uri": { + "type": "string", + "desc": "This must match the originally submitted URI (if one was sent).", + "example": "http://example.com" + }, + "single_channel": { + "type": "boolean", + "default": "false", + "desc": "Request the user to add your app only to a single channel. Only valid with a [legacy workspace app](https://docs.slack.dev/changelog/2021-03-workspace-apps-to-retire-in-august-2021).", + "example": "true" + } + } + }, + "output": { + "required": [ + "access_token", + "team_id" + ], + "properties": { + "token_type": { + "type": "string" + }, + "app_id": { + "type": "string" + }, + "app_user_id": { + "type": "string" + }, + "team_name": { + "type": "string" + }, + "team_id": { + "type": "string" + }, + "access_token": { + "type": "string" + }, + "authorizing_user": { + "type": "object", + "properties": { + "user_id": { + "type": "string" + }, + "app_home": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + } + }, + "installer_user": { + "type": "object", + "properties": { + "user_id": { + "type": "string" + }, + "app_home": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + } + }, + "scopes": { + "type": "object", + "properties": { + "app_home": { + "type": "array", + "items": { + "type": "string" + } + }, + "team": { + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "type": "array", + "items": { + "type": "string" + } + }, + "group": { + "type": "array", + "items": { + "type": "string" + } + }, + "mpim": { + "type": "array", + "items": { + "type": "string" + } + }, + "im": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "scope": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "bot": { + "type": "object", + "properties": { + "bot_user_id": { + "type": "string" + }, + "bot_access_token": { + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "refresh_token": { + "type": "string" + }, + "expires_in": { + "type": "integer" + }, + "user": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "image_24": { + "type": "string" + }, + "image_32": { + "type": "string" + }, + "image_48": { + "type": "string" + }, + "image_72": { + "type": "string" + }, + "image_192": { + "type": "string" + }, + "image_512": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "access_token": { + "type": "string" + }, + "token_type": { + "type": "string" + } + } + }, + "team": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "image_34": { + "type": "string" + }, + "image_44": { + "type": "string" + }, + "image_68": { + "type": "string" + }, + "image_88": { + "type": "string" + }, + "image_102": { + "type": "string" + }, + "image_132": { + "type": "string" + }, + "image_230": { + "type": "string" + }, + "image_default": { + "type": "boolean" + }, + "image_original": { + "type": "string" + } + } + }, + "enterprise_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "incoming_webhook": { + "type": "object", + "properties": { + "channel": { + "type": "string" + }, + "channel_id": { + "type": "string" + }, + "configuration_url": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "single_channel_id": { + "type": "string" + } + }, + "type": "object" + }, + "errors": { + "bad_client_secret": { + "desc": "Value passed for `client_secret` was invalid." + }, + "bad_redirect_uri": { + "desc": "Value passed for `redirect_uri` did not match the `redirect_uri` in the original request." + }, + "code_already_used": { + "desc": "Value passed for `code` was already exchanged." + }, + "internal_error": { + "desc": "Something went wrong during app installation." + }, + "invalid_client_id": { + "desc": "Value passed for `client_id` was invalid." + }, + "invalid_code": { + "desc": "Value passed for `code` was invalid." + }, + "invalid_token": { + "desc": "Invalid refresh token." + }, + "missing_resource": { + "desc": "Missing permission resource." + }, + "ratelimited": { + "desc": "Too many requests made in succession." + }, + "oauth_authorization_url_mismatch": { + "desc": "The OAuth flow was initiated on an incorrect version of the authorization url. The flow must be initiated via /oauth/authorize." + }, + "user_email_unverified": { + "desc": "The users email is unverified" + } + }, + "examples": { + "success": { + "description": "Successful user token negotiation for a single scope", + "example": { + "access_token": "xoxp-XXXXXXXX-XXXXXXXX-XXXXX", + "scope": "groups:write", + "team_name": "Wyld Stallyns LLC", + "team_id": "TXXXXXXXXX", + "enterprise_id": null + } + }, + "success_with_bot": { + "description": "Success example when asking for multiple scopes, a bot user token, and an incoming webhook", + "example": { + "access_token": "xoxp-XXXXXXXX-XXXXXXXX-XXXXX", + "scope": "incoming-webhook,commands,bot", + "team_name": "Team Installing Your Hook", + "team_id": "TXXXXXXXXX", + "enterprise_id": null, + "incoming_webhook": { + "url": "https://hooks.slack.com/TXXXXX/BXXXXX/XXXXXXXXXX", + "channel": "#channel-it-will-post-to", + "configuration_url": "https://teamname.slack.com/services/BXXXXX" + }, + "bot": { + "bot_user_id": "UTTTTTTTTTTR", + "bot_access_token": "xoxb-XXXXXXXXXXXX-TTTTTTTTTTTTTT" + } + } + }, + "success_with_workspace_token": { + "description": "Success example using a workspace app produces a very different kind of response", + "example": { + "ok": true, + "access_token": "xoxa-access-token-string", + "token_type": "app", + "app_id": "A012345678", + "app_user_id": "U0NKHRW57", + "team_name": "Subarachnoid Workspace", + "team_id": "T061EG9R6", + "enterprise_id": null, + "authorizing_user": { + "user_id": "U061F7AUR", + "app_home": "D0PNCRP9N" + }, + "installer_user": { + "user_id": "U061F7AUR", + "app_home": "D0PNCRP9N" + }, + "scopes": { + "app_home": [ + "chat:write", + "im:history", + "im:read" + ], + "team": [], + "channel": [ + "channels:history", + "channels:read", + "chat:write" + ], + "group": [ + "chat:write" + ], + "mpim": [ + "chat:write" + ], + "im": [ + "chat:write" + ], + "user": [] + } + } + }, + "error": { + "url": "/api/oauth.access?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_client_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/oauth.v2.access.json b/docs.slack.dev/methods/oauth.v2.access.json new file mode 100644 index 00000000..428b7505 --- /dev/null +++ b/docs.slack.dev/methods/oauth.v2.access.json @@ -0,0 +1,330 @@ +{ + "desc": "Exchanges a temporary OAuth verifier code for an access token.", + "http_method": "POST", + "scope": "none", + "rate_limits": "t5", + "args": { + "type": "object", + "properties": { + "client_id": { + "desc": "Issued when you created your application. If possible, avoid sending `client_id` and `client_secret` as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.", + "example": "2141029472.691202649728", + "type": "string" + }, + "client_secret": { + "desc": "Issued when you created your application. If possible, avoid sending `client_id` and `client_secret` as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.", + "example": "e1b9e11dfcd19c1982d5de12921e17e8c", + "type": "string" + }, + "code": { + "desc": "The `code` param returned via the OAuth callback.", + "example": "4724469134.4644010092847.232b4e6d82c333b475fc30f5f5a341d294feb1a94392c2fd791f7ab7731a443d1a", + "type": "string" + }, + "redirect_uri": { + "desc": "This must match the originally submitted URI (if one was sent).", + "example": "http://example.com", + "type": "string" + }, + "grant_type": { + "desc": "The `grant_type` param as described in the OAuth spec.", + "example": "authorization_code", + "type": "string" + }, + "refresh_token": { + "desc": "The `refresh_token` param as described in the OAuth spec.", + "example": "xoxe-1-abcdefg", + "type": "string" + } + } + }, + "output": { + "desc": "Credentials and other app installation information", + "type": "object", + "required": [ + "app_id", + "team", + "enterprise" + ], + "properties": { + "access_token": { + "type": "string", + "desc": "A bot access token. Only present if requested at the start of the auth flow." + }, + "token_type": { + "type": "string", + "desc": "The type of access token. Only present if a bot token was requested at the start of the auth flow.", + "enum": [ + "granular_bot" + ] + }, + "scope": { + "type": "string", + "desc": "Comma-separated list of scopes granted to the token. Only present if a bot token was requested at the start of the auth flow." + }, + "bot_user_id": { + "type": "string", + "subtype": "user", + "desc": "The user ID of the bot user corresponding to the token. Only present if a bot token was requested at the start of the auth flow." + }, + "user_id": { + "type": "string", + "subtype": "user", + "desc": "The user ID of the bot user corresponding to the token. Only present during a refresh_token grant_type for a user access token." + }, + "app_id": { + "type": "string", + "subtype": "app", + "desc": "ID of the app being installed or re-installed." + }, + "is_enterprise_install": { + "type": "boolean", + "desc": "Boolean flag indicating whether the generated token is enterprise level token or not" + }, + "expires_in": { + "type": "integer", + "desc": "Time until this credential expires, if it expires at all" + }, + "refresh_token": { + "type": "string", + "desc": "Refresh token for this credential" + }, + "team": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "desc": "Details about the installing user, and the user token if one was requested at the start of the auth flow.", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "subtype": "team", + "desc": "ID of the team into which the app is being installed or re-installed." + }, + "name": { + "desc": "Name of the team into which the app is being installed or re-installed.", + "type": "string" + } + } + } + ] + }, + "enterprise": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "desc": "Details about the installing team, and the user token if one was requested at the start of the auth flow.", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "subtype": "team", + "desc": "ID of the enterprise into which the app is being installed or re-installed." + }, + "name": { + "desc": "Name of the enterprise into which the app is being installed or re-installed.", + "type": "string" + } + } + } + ] + }, + "authed_user": { + "type": "object", + "desc": "Details about the installing user, and the user token if one was requested at the start of the auth flow.", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "subtype": "user", + "desc": "ID of the installing user. If a user token was requested, this is also the ID of the user to which the user token authenticates." + }, + "access_token": { + "type": "string", + "desc": "A user token. Only presented if requested at the start of the auth flow." + }, + "token_type": { + "type": "string", + "desc": "The type of the access token. Only present if a user token was requested at the start of the auth flow.", + "enum": [ + "user" + ] + }, + "scope": { + "type": "string", + "desc": "Comma-separated list of scopes granted to the user token. Only present if a user token was requested at the start of the auth flow." + }, + "expires_in": { + "type": "integer", + "desc": "Time until this credential expires, if it expires at all" + }, + "refresh_token": { + "type": "string", + "desc": "Refresh token for this credential" + } + } + }, + "incoming_webhook": { + "type": "object", + "desc": "Details about a newly-created incoming webhook. Only present if an incoming webhook was requested at the start of the auth flow.", + "required": [ + "channel", + "channel_id", + "configuration_url", + "url" + ], + "properties": { + "channel": { + "type": "string", + "desc": "Name of channel" + }, + "channel_id": { + "type": "string", + "subtype": "channel", + "desc": "Encoded ID of channel" + }, + "configuration_url": { + "type": "string", + "desc": "URL for managing the webhook" + }, + "url": { + "type": "string", + "desc": "Endpoint for triggering the wehbook" + } + } + } + } + }, + "errors": { + "bad_client_secret": { + "desc": "Value passed for `client_secret` was invalid." + }, + "bad_redirect_uri": { + "desc": "Value passed for `redirect_uri` did not match the `redirect_uri` in the original request." + }, + "cannot_install_an_org_installed_app": { + "desc": "Returned when the the org-installed app cannot be installed on a workspace." + }, + "invalid_client_id": { + "desc": "Value passed for `client_id` was invalid." + }, + "invalid_code": { + "desc": "Value passed for `code` was invalid." + }, + "invalid_grant_type": { + "desc": "Value passed for `grant_type` was invalid." + }, + "invalid_refresh_token": { + "desc": "The given refresh token is invalid." + }, + "no_scopes": { + "desc": "Missing `scope` in the request." + }, + "oauth_authorization_url_mismatch": { + "desc": "The OAuth flow was initiated on an incorrect version of the authorization url. The flow must be initiated via /oauth/v2/authorize ." + }, + "preview_feature_not_available": { + "desc": "Returned when the API method is not yet available on the team in context." + }, + "user_email_unverified": { + "desc": "The users email is unverified" + } + }, + "examples": { + "success": { + "url": "/api/oauth.v2.access", + "description": "Successful token request with scopes for both a bot user and a user token", + "example": { + "ok": true, + "access_token": "xoxb-17653672481-19874698323-pdFZKVeTuE8sk7oOcBrzbqgy", + "token_type": "bot", + "scope": "commands,incoming-webhook", + "bot_user_id": "U0KRQLJ9H", + "app_id": "A0KRD7HC3", + "team": { + "name": "Slack Softball Team", + "id": "T9TK3CUKW" + }, + "enterprise": { + "name": "slack-sports", + "id": "E12345678" + }, + "authed_user": { + "id": "U1234", + "scope": "chat:write", + "access_token": "xoxp-1234", + "token_type": "user" + } + } + }, + "success_with_token_rotation": { + "url": "/api/oauth.v2.access", + "description": "Successful token request with scopes for both a bot user and a user token, and token rotation enabled", + "example": { + "ok": true, + "access_token": "xoxe.xoxb-1-..", + "token_type": "bot", + "scope": "commands,incoming-webhook", + "bot_user_id": "U0KRQLJ9H", + "app_id": "A0KRD7HC3", + "expires_in": 43200, + "refresh_token": "xoxe-1-...", + "team": { + "name": "Slack Softball Team", + "id": "T9TK3CUKW" + }, + "enterprise": { + "name": "slack-sports", + "id": "E12345678" + }, + "authed_user": { + "id": "U1234", + "scope": "chat:write", + "access_token": "xoxe.xoxp-1234", + "expires_in": 43200, + "refresh_token": "xoxe-1-...", + "token_type": "user" + } + } + }, + "success_with_sign_in_with_slack": { + "url": "/api/oauth.v2.access", + "description": "Successful Sign in with Slack response", + "example": { + "ok": true, + "app_id": "A0118NQPZZC", + "authed_user": { + "id": "U065VRX1T0", + "scope": "identity.basic,identity.email,identity.avatar,identity.team", + "access_token": "xoxp-yoda-yoda-yoda", + "token_type": "user" + }, + "team": { + "id": "T024BE7LD" + }, + "enterprise": null, + "is_enterprise_install": false + } + }, + "error": { + "url": "/api/oauth.v2.access", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_client_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/oauth.v2.exchange.json b/docs.slack.dev/methods/oauth.v2.exchange.json new file mode 100644 index 00000000..8e939e22 --- /dev/null +++ b/docs.slack.dev/methods/oauth.v2.exchange.json @@ -0,0 +1,128 @@ +{ + "desc": "Exchanges a legacy access token for a new expiring access token and refresh token", + "http_method": "POST", + "scope": "none", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "client_id", + "client_secret", + "token" + ], + "properties": { + "client_id": { + "desc": "Issued when you created your application.", + "example": "4123121235.9872358710", + "type": "string" + }, + "client_secret": { + "desc": "Issued when you created your application.", + "example": "e1b9e11dfcd19c1982d5de12921e17e8c", + "type": "string" + }, + "token": { + "desc": "The legacy xoxb or xoxp token being migrated to use token rotation.", + "example": "xoxp-12345-67890-1928471-abcdefg", + "type": "string" + } + } + }, + "output": { + "desc": "Credentials and other app installation information", + "type": "object", + "required": [ + "app_id", + "scope", + "token_type", + "access_token", + "expires_in", + "refresh_token" + ], + "properties": { + "app_id": { + "schema": "app_id" + }, + "token_type": { + "type": "string", + "desc": "The type of access token.", + "enum": [ + "bot", + "user" + ] + }, + "scope": { + "type": "string", + "desc": "Comma-separated list of scopes granted to the token." + }, + "bot_user_id": { + "title": "Bot User ID", + "subtype": "user", + "desc": "The user ID of the bot user corresponding to the token. Only present if a legacy bot access token is being exchanged.", + "schema": "user_id" + }, + "user_id": { + "subtype": "user", + "desc": "The user ID of the user corresponding to the token. Only present if a legacy user access token is being exchanged.", + "schema": "user_id" + }, + "access_token": { + "desc": "A new xoxe.xox(b|p) expiring access token to replace the legacy token.", + "schema": "xoxe_access_token" + }, + "expires_in": { + "type": "integer", + "desc": "Duration (in seconds) until the new access token expires." + }, + "refresh_token": { + "desc": "The xoxe refresh token to obtain a new access token after the one returned expires.", + "schema": "xoxe_refresh_token" + }, + "team": { + "anyOf": [ + { + "type": "null" + }, + { + "desc": "Details about the team attached to the legacy token being exchanged.", + "schema": "team_lean" + } + ] + }, + "enterprise": { + "anyOf": [ + { + "type": "null" + }, + { + "desc": "Details about the enterprise attached to the token being exchanged.", + "schema": "enterprise_lean" + } + ] + } + } + }, + "errors": { + "authorization_not_found": { + "desc": "The underlying authorization for this token was revoked or is invalid." + }, + "bad_client_secret": { + "desc": "Value passed for `client_secret` was invalid." + }, + "internal_error": { + "desc": "A server-side error occurred." + }, + "invalid_client_id": { + "desc": "Value passed for `client_id` was invalid." + }, + "invalid_token": { + "desc": "The legacy token provided cannot be exchanged for a new pair of token credentials." + }, + "token_already_exchanged": { + "desc": "This token has already been exchanged for a pair of token credentials." + }, + "token_rotation_not_enabled": { + "desc": "The app does not have token rotation enabled." + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/openid.connect.token.json b/docs.slack.dev/methods/openid.connect.token.json new file mode 100644 index 00000000..ce8f4994 --- /dev/null +++ b/docs.slack.dev/methods/openid.connect.token.json @@ -0,0 +1,123 @@ +{ + "desc": "Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack.", + "http_method": "POST", + "scope": "none", + "rate_limits": "t4", + "args": { + "type": "object", + "properties": { + "client_id": { + "desc": "Issued when you created your application.", + "example": "2141029472.691202649728", + "type": "string" + }, + "client_secret": { + "desc": "Issued when you created your application.", + "example": "e1b9e11dfcd19c1982d5de12921e17e8c", + "type": "string" + }, + "code": { + "desc": "The `code` param returned via the OAuth callback.", + "example": "4724469134.4644010092847.232b4e6d82c333b475fc30f5f5a341d294feb1a94392c2fd791f7ab7731a443d1a", + "type": "string" + }, + "redirect_uri": { + "desc": "This must match the originally submitted URI (if one was sent).", + "example": "http://example.com", + "type": "string" + }, + "grant_type": { + "desc": "The `grant_type` param as described in the OAuth spec.", + "example": "authorization_code", + "type": "string", + "enum": [ + "authorization_code", + "refresh_token" + ] + }, + "refresh_token": { + "desc": "The `refresh_token` param as described in the OAuth spec.", + "example": "xoxe-1-abcdefg", + "type": "string" + } + } + }, + "output": { + "desc": "OpenID Connect Response", + "type": "object", + "required": [ + "access_token", + "token_type" + ], + "properties": { + "access_token": { + "type": "string", + "desc": "" + }, + "token_type": { + "type": "string", + "desc": "", + "enum": [ + "Bearer" + ] + }, + "id_token": { + "type": "string", + "desc": "" + }, + "state": { + "type": "string", + "desc": "" + }, + "expires_in": { + "type": "integer", + "desc": "Time until this credential expires, if it expires at all" + }, + "refresh_token": { + "type": "string", + "desc": "Refresh token for this credential" + } + } + }, + "errors": { + "bad_client_secret": { + "desc": "The value passed for `client_secret` was invalid." + }, + "bad_redirect_uri": { + "desc": "The value passed for `redirect_uri` did not match the `redirect_uri` in the original request." + }, + "cannot_install_an_org_installed_app": { + "desc": "An org-installed app cannot be installed on a workspace." + }, + "invalid_grant_type": { + "desc": "The value passed for `grant_type` was invalid." + }, + "invalid_client_id": { + "desc": "The value passed for `client_id` was invalid." + }, + "invalid_code": { + "desc": "The value passed for `code` was invalid." + }, + "invalid_refresh_token": { + "desc": "The given refresh token is invalid." + }, + "oauth_authorization_url_mismatch": { + "desc": "The OAuth flow was initiated on an incorrect version of the authorization URL. The flow must be initiated via /openid/connect/authorize ." + }, + "preview_feature_not_available": { + "desc": "The API method is not yet available on the team." + } + }, + "examples": { + "success": { + "url": "/api/openid.connect.token", + "description": "Successful token request during the Sign in with Slack flow", + "example": { + "ok": true, + "access_token": "xoxp-1234", + "token_type": "Bearer", + "id_token": "eyJhbGcMjY5OTA2MzcWNrLmNvbVwvdGVhbV9p..." + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/openid.connect.userInfo.json b/docs.slack.dev/methods/openid.connect.userInfo.json new file mode 100644 index 00000000..0bc7684c --- /dev/null +++ b/docs.slack.dev/methods/openid.connect.userInfo.json @@ -0,0 +1,162 @@ +{ + "desc": "Get the identity of a user who has authorized Sign in with Slack.", + "http_method": "POST", + "scope": "openid", + "user_scope_only": true, + "scope_by_token_type": { + "oauth": "openid" + }, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": { + "required": [ + "sub", + "https://slack.com/user_id" + ], + "type": "object", + "properties": { + "sub": { + "type": "string" + }, + "https://slack.com/user_id": { + "type": "string" + }, + "https://slack.com/team_id": { + "type": "string" + }, + "https://slack.com/enterprise_id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "email_verified": { + "type": "boolean" + }, + "date_email_verified": { + "type": "integer" + }, + "locale": { + "type": "string" + }, + "name": { + "type": "string" + }, + "given_name": { + "type": "string" + }, + "family_name": { + "type": "string" + }, + "picture": { + "type": "string" + }, + "https://slack.com/user_image_24": { + "type": "string" + }, + "https://slack.com/user_image_32": { + "type": "string" + }, + "https://slack.com/user_image_48": { + "type": "string" + }, + "https://slack.com/user_image_72": { + "type": "string" + }, + "https://slack.com/user_image_192": { + "type": "string" + }, + "https://slack.com/user_image_512": { + "type": "string" + }, + "https://slack.com/user_image_1024": { + "type": "string" + }, + "https://slack.com/team_name": { + "type": "string" + }, + "https://slack.com/team_domain": { + "type": "string" + }, + "https://slack.com/enterprise_name": { + "type": "string" + }, + "https://slack.com/enterprise_domain": { + "type": "string" + }, + "https://slack.com/team_image_34": { + "type": "string" + }, + "https://slack.com/team_image_44": { + "type": "string" + }, + "https://slack.com/team_image_68": { + "type": "string" + }, + "https://slack.com/team_image_88": { + "type": "string" + }, + "https://slack.com/team_image_102": { + "type": "string" + }, + "https://slack.com/team_image_132": { + "type": "string" + }, + "https://slack.com/team_image_230": { + "type": "string" + }, + "https://slack.com/team_image_default": { + "type": "boolean" + } + } + }, + "examples": { + "success": { + "url": "/api/openid.connect.userInfo", + "description": "Successful user info request during the Sign in with Slack flow", + "example": { + "ok": true, + "sub": "U0R7JM", + "https://slack.com/user_id": "U0R7JM", + "https://slack.com/team_id": "T0R7GR", + "email": "krane@slack-corp.com", + "email_verified": true, + "date_email_verified": 1622128723, + "name": "krane", + "picture": "https://secure.gravatar.com/....png", + "given_name": "Bront", + "family_name": "Labradoodle", + "locale": "en-US", + "https://slack.com/team_name": "kraneflannel", + "https://slack.com/team_domain": "kraneflannel", + "https://slack.com/user_image_24": "...", + "https://slack.com/user_image_32": "...", + "https://slack.com/user_image_48": "...", + "https://slack.com/user_image_72": "...", + "https://slack.com/user_image_192": "...", + "https://slack.com/user_image_512": "...", + "https://slack.com/team_image_34": "...", + "https://slack.com/team_image_44": "...", + "https://slack.com/team_image_68": "...", + "https://slack.com/team_image_88": "...", + "https://slack.com/team_image_102": "...", + "https://slack.com/team_image_132": "...", + "https://slack.com/team_image_230": "...", + "https://slack.com/team_image_default": true + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/pins.add.json b/docs.slack.dev/methods/pins.add.json new file mode 100644 index 00000000..1236e7e9 --- /dev/null +++ b/docs.slack.dev/methods/pins.add.json @@ -0,0 +1,89 @@ +{ + "desc": "Pins an item to a channel.", + "http_method": "POST", + "scope": "pins:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel to pin the messsage to. You must also include a `timestamp` when pinning messages.", + "type": "string", + "subtype": "channel" + }, + "timestamp": { + "desc": "Timestamp of the message to pin. You must also include the `channel`.", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": null, + "errors": { + "already_pinned": { + "desc": "The specified item is already pinned to the channel." + }, + "bad_timestamp": { + "desc": "Value passed for `timestamp` was invalid." + }, + "channel_not_found": { + "desc": "The `channel` argument was not specified or was invalid" + }, + "external_channel_migrating": { + "desc": "Channel is undergoing an active migration." + }, + "file_not_found": { + "desc": "File not found." + }, + "file_not_shared": { + "desc": "File specified by `file` is not public nor shared to the channel." + }, + "message_not_found": { + "desc": "Message specified by `channel` and `timestamp` does not exist." + }, + "no_item_specified": { + "desc": "One of `file`, `file_comment`, or `timestamp` was not specified." + }, + "not_in_channel": { + "desc": "Item is not in channel." + }, + "not_pinnable": { + "desc": "This message type is not pinnable." + }, + "restricted_action": { + "desc": "The user does not have permission to add pins to the channel." + }, + "too_many_pins": { + "desc": "Too many pins in channel." + } + }, + "examples": { + "success": { + "url": "/api/pins.add?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/pins.add?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "error": "channel_not_found", + "ok": false + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/pins.list.json b/docs.slack.dev/methods/pins.list.json new file mode 100644 index 00000000..a302b0fd --- /dev/null +++ b/docs.slack.dev/methods/pins.list.json @@ -0,0 +1,133 @@ +{ + "desc": "Lists items pinned to a channel.", + "http_method": "GET", + "scope": "pins:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel to get pinned items for.", + "type": "string", + "subtype": "channel" + } + } + }, + "output": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "type", + "created", + "created_by" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file", + "message", + "file_comment" + ] + }, + "created": { + "type": "integer" + }, + "created_by": { + "schema": "user_id" + }, + "channel": { + "schema": "channel" + }, + "message": { + "schema": "message" + }, + "file": { + "schema": "file" + }, + "comment": { + "type": "string" + } + } + } + }, + "count": { + "type": "integer" + } + } + }, + "errors": { + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "restricted_action": { + "desc": "The user does not have permission to view the channel." + } + }, + "examples": { + "success": { + "url": "/api/pins.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "items": [ + { + "channel": "C123ABC456", + "created": 1508881078, + "created_by": "U123ABC456", + "message": { + "permalink": "https://hitchhikers.slack.com/archives/C2U86NC6H/p1508197641000151", + "pinned_to": [ + "C2U86NC6H" + ], + "text": "What is the meaning of life?", + "ts": "1508197641.000151", + "type": "message", + "user": "U123ABC456" + }, + "type": "message" + }, + { + "channel": "C123ABC456", + "created": 1508880991, + "created_by": "U123ABC456", + "message": { + "permalink": "https://hitchhikers.slack.com/archives/C2U86NC6H/p1508284197000015", + "pinned_to": [ + "C123ABC456" + ], + "text": "The meaning of life, the universe, and everything is 42.", + "ts": "1503289197.000015", + "type": "message", + "user": "U123ABC456" + }, + "type": "message" + } + ], + "ok": true + } + }, + "error": { + "url": "/api/pins.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/pins.remove.json b/docs.slack.dev/methods/pins.remove.json new file mode 100644 index 00000000..cb7972b7 --- /dev/null +++ b/docs.slack.dev/methods/pins.remove.json @@ -0,0 +1,83 @@ +{ + "desc": "Un-pins an item from a channel.", + "http_method": "POST", + "scope": "pins:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel where the item is pinned to.", + "type": "string", + "subtype": "channel" + }, + "timestamp": { + "desc": "Timestamp of the message to un-pin.", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": null, + "errors": { + "bad_timestamp": { + "desc": "Value passed for `timestamp` was invalid." + }, + "channel_not_found": { + "desc": "The `channel` argument was not specified or was invalid" + }, + "external_channel_migrating": { + "desc": "Channel is undergoing an active migration." + }, + "file_comment_not_found": { + "desc": "File comment specified by `file_comment` does not exist." + }, + "file_not_found": { + "desc": "File specified by `file` does not exist." + }, + "message_not_found": { + "desc": "Message specified by `channel` and `timestamp` does not exist." + }, + "no_item_specified": { + "desc": "One of `file`, `file_comment`, or `timestamp` was not specified." + }, + "no_pin": { + "desc": "The pin could not be found." + }, + "not_pinned": { + "desc": "The specified item is not pinned to the channel." + }, + "restricted_action": { + "desc": "The user does not have permission to remove pins from the channel." + } + }, + "examples": { + "success": { + "url": "/api/pins.remove?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/pins.remove?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "error": "no_pin", + "ok": false + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/reactions.add.json b/docs.slack.dev/methods/reactions.add.json new file mode 100644 index 00000000..73f4f941 --- /dev/null +++ b/docs.slack.dev/methods/reactions.add.json @@ -0,0 +1,99 @@ +{ + "desc": "Adds a reaction to an item.", + "http_method": "POST", + "scope": "reactions:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "name", + "timestamp", + "channel" + ], + "properties": { + "channel": { + "desc": "Channel where the message to add reaction to was posted.", + "type": "string", + "subtype": "channel" + }, + "name": { + "desc": "Reaction (emoji) name", + "example": "thumbsup", + "type": "string" + }, + "timestamp": { + "desc": "Timestamp of the message to add reaction to.", + "type": "string", + "subtype": "timestamp" + }, + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": null, + "errors": { + "already_reacted": { + "desc": "The specified item already has the user/reaction combination." + }, + "bad_timestamp": { + "desc": "Value passed for `timestamp` was invalid." + }, + "channel_not_found": { + "desc": "Value passed for `channel` is invalid." + }, + "external_channel_migrating": { + "desc": "The channel is in the process of being migrated." + }, + "invalid_name": { + "desc": "Value passed for `name` was invalid." + }, + "is_archived": { + "desc": "Channel specified has been archived." + }, + "message_not_found": { + "desc": "Message specified by `channel` and `timestamp` does not exist." + }, + "no_item_specified": { + "desc": "combination of `channel` and `timestamp` was not specified." + }, + "not_reactable": { + "desc": "Whatever you passed in, like a `file` or `file_comment`, can't be reacted to anymore. Your app can react to messages though." + }, + "thread_locked": { + "desc": "Reactions are disabled as the specified message is part of a locked thread." + }, + "too_many_emoji": { + "desc": "The limit for distinct reactions (i.e emoji) on the item has been reached." + }, + "too_many_reactions": { + "desc": "The limit for reactions a person may add to the item has been reached." + }, + "no_access": { + "desc": "User does not have access to react to this canvas." + } + }, + "examples": { + "success": { + "url": "/api/reactions.add?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/reactions.add?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "error": "already_reacted", + "ok": false + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/reactions.get.json b/docs.slack.dev/methods/reactions.get.json new file mode 100644 index 00000000..51342464 --- /dev/null +++ b/docs.slack.dev/methods/reactions.get.json @@ -0,0 +1,135 @@ +{ + "desc": "Gets reactions for an item.", + "http_method": "GET", + "scope": "reactions:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel where the message to get reactions for was posted.", + "example": "C0NF841BK", + "type": "string", + "subtype": "channel" + }, + "file": { + "desc": "File to get reactions for.", + "example": "F1234567890", + "type": "string", + "subtype": "file" + }, + "file_comment": { + "desc": "File comment to get reactions for.", + "type": "string", + "subtype": "file_comment" + }, + "full": { + "desc": "If true always return the complete reaction list.", + "type": "boolean" + }, + "timestamp": { + "desc": "Timestamp of the message to get reactions for.", + "example": "1524523204.000192", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "comment": { + "schema": "comment" + }, + "message": { + "schema": "message" + }, + "type": { + "type": "string" + }, + "channel": { + "type": "string", + "example": "C0NF841BK" + }, + "file": { + "schema": "file" + } + } + }, + "errors": { + "bad_timestamp": { + "desc": "Value passed for `timestamp` was invalid." + }, + "channel_not_found": { + "desc": "Value passed for `channel` was invalid." + }, + "file_comment_not_found": { + "desc": "File comment specified by `file_comment` does not exist." + }, + "file_not_found": { + "desc": "File specified by `file` does not exist." + }, + "message_not_found": { + "desc": "Message specified by `channel` and `timestamp` does not exist." + }, + "no_item_specified": { + "desc": "`file`, `file_comment`, or combination of `channel` and `timestamp` was not specified." + } + }, + "examples": { + "success": { + "url": "/api/reactions.get?token=YOUR_TOKEN", + "description": "The response contains the item with reactions.", + "example": { + "ok": true, + "type": "message", + "message": { + "type": "message", + "text": "Hi there!", + "user": "W123456", + "ts": "1648602352.215969", + "team": "T123456", + "reactions": [ + { + "name": "grinning", + "users": [ + "W222222" + ], + "count": 1 + }, + { + "name": "question", + "users": [ + "W333333" + ], + "count": 1 + } + ], + "permalink": "https://xxx.slack.com/archives/C123456/p1648602352215969" + }, + "channel": "C123ABC456" + } + }, + "error": { + "url": "/api/reactions.get?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/reactions.list.json b/docs.slack.dev/methods/reactions.list.json new file mode 100644 index 00000000..8ebea53c --- /dev/null +++ b/docs.slack.dev/methods/reactions.list.json @@ -0,0 +1,183 @@ +{ + "desc": "Lists reactions made by a user.", + "http_method": "GET", + "scope": "reactions:read", + "rate_limits": "t2", + "slack_connect_workspaces_allowed": true, + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user": { + "desc": "Show reactions made by this user. Defaults to the authed user.", + "type": "string", + "subtype": "user" + }, + "full": { + "desc": "If true always return the complete reaction list.", + "type": "boolean" + }, + "count": { + "default": 100, + "type": "integer", + "subtype": "paging" + }, + "page": { + "default": 1, + "type": "integer", + "subtype": "paging" + }, + "cursor": { + "desc": "Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more details.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "limit": { + "default": 0, + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached.", + "example": "20", + "type": "integer" + }, + "team_id": { + "desc": "encoded team id to list reactions in, required if org token is used", + "type": "string", + "subtype": "team" + } + } + }, + "output": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "object" + } + }, + "paging": { + "schema": "paging" + } + } + }, + "errors": { + "user_not_found": { + "desc": "Value passed for `user` was invalid." + } + }, + "examples": { + "success": { + "url": "/api/reactions.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "items": [ + { + "type": "message", + "channel": "C123ABC456", + "message": { + "bot_id": "B123ABC456", + "reactions": [ + { + "count": 1, + "name": "robot_face", + "users": [ + "U123ABC456" + ] + } + ], + "subtype": "bot_message", + "text": "Hello from Python! :tada:", + "ts": "1507849573.000090", + "username": "Shipit Notifications" + } + }, + { + "comment": { + "type": "file_comment", + "comment": "This is a file comment", + "created": 1508286096, + "id": "Fc123ABC456", + "reactions": [ + { + "count": 1, + "name": "white_check_mark", + "users": [ + "U123ABC456" + ] + } + ], + "timestamp": 1508286096, + "user": "U123ABC456" + }, + "file": { + "channels": [ + "C123ABC456" + ], + "comments_count": 1, + "created": 1507850315, + "reactions": [ + { + "count": 1, + "name": "stuck_out_tongue_winking_eye", + "users": [ + "U123ABC456" + ] + } + ], + "title": "computer.gif", + "user": "U123ABC456", + "username": "" + } + }, + { + "file": { + "channels": [ + "C123ABC456" + ], + "comments_count": 1, + "created": 1507850315, + "id": "F123ABC456", + "name": "computer.gif", + "reactions": [ + { + "count": 1, + "name": "stuck_out_tongue_winking_eye", + "users": [ + "U123ABC456" + ] + } + ], + "size": 1639034, + "title": "computer.gif", + "user": "U123ABC456", + "username": "" + }, + "type": "file" + } + ], + "ok": true, + "response_metadata": { + "next_cursor": "dGVhbTpDMUg5UkVTR0w=" + } + } + }, + "error": { + "url": "/api/reactions.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/reactions.remove.json b/docs.slack.dev/methods/reactions.remove.json new file mode 100644 index 00000000..a2e1c066 --- /dev/null +++ b/docs.slack.dev/methods/reactions.remove.json @@ -0,0 +1,98 @@ +{ + "desc": "Removes a reaction from an item.", + "http_method": "POST", + "scope": "reactions:write", + "json_input_supported": true, + "rate_limits": "t2", + "slack_connect_workspaces_allowed": true, + "args": { + "type": "object", + "required": [ + "token", + "name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "name": { + "desc": "Reaction (emoji) name.", + "example": "thumbsup", + "type": "string" + }, + "file": { + "desc": "File to remove reaction from.", + "type": "string", + "subtype": "file" + }, + "file_comment": { + "desc": "File comment to remove reaction from.", + "type": "string", + "subtype": "file_comment" + }, + "channel": { + "desc": "Channel where the message to remove reaction from was posted.", + "type": "string", + "subtype": "channel" + }, + "timestamp": { + "desc": "Timestamp of the message to remove reaction from.", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": null, + "errors": { + "bad_timestamp": { + "desc": "Value passed for `timestamp` was invalid." + }, + "channel_not_found": { + "desc": "The specified channel was not found." + }, + "external_channel_migrating": { + "desc": "The reaction is in a channel that is being migrated" + }, + "file_not_found": { + "desc": "File specified by `file` does not exist." + }, + "file_comment_not_found": { + "desc": "File comment specified by `file_comment` does not exist." + }, + "invalid_name": { + "desc": "Value passed for `name` was invalid." + }, + "message_not_found": { + "desc": "Message specified by `channel` and `timestamp` does not exist." + }, + "no_item_specified": { + "desc": "`file`, `file_comment`, or combination of `channel` and `timestamp` was not specified." + }, + "no_reaction": { + "desc": "The specified reaction does not exist, or the requestor is not the original reaction author." + }, + "thread_locked": { + "desc": "Reactions are disabled as the specified message is part of a locked thread." + } + }, + "examples": { + "success": { + "url": "/api/reactions.remove?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/reactions.remove?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "error": "no_reaction", + "ok": false + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/reminders.add.json b/docs.slack.dev/methods/reminders.add.json new file mode 100644 index 00000000..29bf1267 --- /dev/null +++ b/docs.slack.dev/methods/reminders.add.json @@ -0,0 +1,117 @@ +{ + "desc": "Creates a reminder.", + "http_method": "POST", + "scope": "reminders:write", + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "user_scope_only": true, + "rate_limits": "t2", + "args": { + "type": "object", + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "text": { + "type": "string", + "desc": "The content of the reminder", + "example": "eat a banana", + "minLength": 1 + }, + "time": { + "type": "string", + "desc": "Can also take a type of integer. When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. \"in 15 minutes,\" or \"every Thursday\")", + "example": "1602288000", + "minLength": 1 + }, + "user": { + "type": "string", + "subtype": "user", + "desc": "No longer supported - reminders cannot be set for other users. Previously, was the user who would receive the reminder.", + "example": "U18888888" + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "Encoded team id, required if org token is used" + }, + "recurrence": { + "type": "object", + "desc": "Specify the repeating behavior of a reminder. Available options: `daily`, `weekly`, `monthly`, or `yearly`. If `weekly`, may further specify the days of the week.", + "example": "{ \"frequency\": \"weekly\", \"weekdays\": [\"monday\", \"wednesday\", \"friday\"] }", + "schema": "recurrence" + } + }, + "required": [ + "token", + "text", + "time" + ] + }, + "output": { + "type": "object", + "required": [ + "reminder" + ], + "properties": { + "reminder": { + "schema": "reminder" + } + } + }, + "errors": { + "cannot_add_bot": { + "desc": "Reminders can't be sent to bots." + }, + "cannot_add_others": { + "desc": "Guests can't set reminders for other team members." + }, + "cannot_add_others_recurring": { + "desc": "Recurring reminders can't be set for other team members." + }, + "cannot_add_profile_only_user": { + "desc": "Reminders can't be sent to profile only users." + }, + "cannot_add_slackbot": { + "desc": "Reminders can't be sent to Slackbot." + }, + "cannot_parse": { + "desc": "The phrasing of the timing for this reminder is unclear. You must include a complete time description. Some examples that work: `1458678068`, `20`, `in 5 minutes`, `tomorrow`, `at 3:30pm`, `on Tuesday`, or `next week`." + }, + "missing_argument": { + "desc": "An argument is missing." + }, + "user_not_found": { + "desc": "That user can't be found." + } + }, + "examples": { + "success": { + "url": "/api/reminders.add?token=YOUR_TOKEN", + "description": "Only non-recurring reminders will have `time` and `complete_ts` fields.", + "example": { + "ok": true, + "reminder": { + "id": "Rm12345678", + "creator": "U123ABC456", + "user": "U123ABC456", + "text": "eat a banana", + "recurring": false, + "time": 1602288000, + "complete_ts": 0 + } + } + }, + "error": { + "url": "/api/reminders.add?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/reminders.complete.json b/docs.slack.dev/methods/reminders.complete.json new file mode 100644 index 00000000..671f0ea3 --- /dev/null +++ b/docs.slack.dev/methods/reminders.complete.json @@ -0,0 +1,67 @@ +{ + "desc": "Marks a reminder as complete.", + "http_method": "POST", + "scope": "reminders:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "user_scope_only": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "reminder" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "reminder": { + "desc": "The ID of the reminder to be marked as complete", + "example": "Rm12345678", + "type": "string", + "subtype": "reminder" + }, + "team_id": { + "desc": "Encoded team id, required if org token is used", + "type": "string", + "subtype": "team" + } + } + }, + "output": null, + "errors": { + "cannot_complete_others": { + "desc": "Reminders for other team members can't be marked complete." + }, + "cannot_complete_recurring": { + "desc": "Recurring reminders can't be marked complete." + }, + "missing_argument": { + "desc": "An argument is missing." + }, + "not_found": { + "desc": "That reminder can't be found." + } + }, + "examples": { + "success": { + "url": "/api/reminders.complete?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/reminders.complete?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/reminders.delete.json b/docs.slack.dev/methods/reminders.delete.json new file mode 100644 index 00000000..38044d1f --- /dev/null +++ b/docs.slack.dev/methods/reminders.delete.json @@ -0,0 +1,61 @@ +{ + "desc": "Deletes a reminder.", + "http_method": "POST", + "scope": "reminders:write", + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "user_scope_only": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "reminder" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "reminder": { + "desc": "The ID of the reminder", + "example": "Rm12345678", + "type": "string", + "subtype": "reminder" + }, + "team_id": { + "desc": "Encoded team id, required if org token is used", + "type": "string", + "subtype": "team" + } + } + }, + "output": null, + "errors": { + "missing_argument": { + "desc": "An argument is missing." + }, + "not_found": { + "desc": "That reminder can't be found." + } + }, + "examples": { + "success": { + "url": "/api/reminders.delete?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/reminders.delete?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/reminders.info.json b/docs.slack.dev/methods/reminders.info.json new file mode 100644 index 00000000..f335ba35 --- /dev/null +++ b/docs.slack.dev/methods/reminders.info.json @@ -0,0 +1,70 @@ +{ + "desc": "Gets information about a reminder.", + "http_method": "GET", + "scope": "reminders:read", + "slack_connect_workspaces_allowed": true, + "user_scope_only": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "reminder" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "reminder": { + "desc": "The ID of the reminder", + "example": "Rm23456789", + "type": "string", + "subtype": "reminder" + }, + "team_id": { + "desc": "Encoded team id, required if org token is passed", + "type": "string", + "subtype": "team" + } + } + }, + "output": { + "type": "object", + "required": [ + "reminder" + ], + "properties": { + "reminder": { + "schema": "reminder" + } + } + }, + "errors": { + "missing_argument": { + "desc": "An argument is missing." + }, + "not_found": { + "desc": "That reminder can't be found." + } + }, + "examples": { + "success": { + "url": "/api/reminders.info?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/reminders.info?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/reminders.list.json b/docs.slack.dev/methods/reminders.list.json new file mode 100644 index 00000000..afdf4dab --- /dev/null +++ b/docs.slack.dev/methods/reminders.list.json @@ -0,0 +1,60 @@ +{ + "desc": "Lists all reminders created by or for a given user.", + "http_method": "GET", + "scope": "reminders:read", + "slack_connect_workspaces_allowed": true, + "user_scope_only": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "team_id": { + "desc": "Encoded team id, required if org token is passed", + "type": "string", + "subtype": "team" + } + } + }, + "output": { + "properties": { + "reminders": { + "type": "array", + "items": { + "schema": "reminder" + } + } + }, + "type": "object" + }, + "errors": { + "missing_argument": { + "desc": "An argument is missing." + } + }, + "examples": { + "success": { + "url": "/api/reminders.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/reminders.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/rtm.connect.json b/docs.slack.dev/methods/rtm.connect.json new file mode 100644 index 00000000..e87e1b0e --- /dev/null +++ b/docs.slack.dev/methods/rtm.connect.json @@ -0,0 +1,117 @@ +{ + "desc": "Starts a Real Time Messaging session.", + "http_method": "GET", + "scope": "rtm:stream", + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "batch_presence_aware": { + "default": false, + "desc": "Batch presence deliveries via subscription. Enabling changes the shape of `presence_change` events. See [batch presence](/apis/web-api/user-presence-and-status#batching).", + "example": "1", + "type": "boolean" + }, + "presence_sub": { + "default": true, + "desc": "Only deliver presence events when requested by subscription. See [presence subscriptions](/apis/web-api/user-presence-and-status#subscriptions).", + "type": "boolean" + } + } + }, + "output": { + "required": [ + "url", + "team", + "self" + ], + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "self": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "schema": "user_id" + }, + "name": { + "type": "string" + } + } + }, + "team": { + "required": [ + "id", + "name", + "domain" + ], + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "id": { + "schema": "workspace_id" + }, + "name": { + "type": "string" + }, + "enterprise_id": { + "schema": "enterprise_id" + }, + "enterprise_name": { + "schema": "enterprise_name" + } + } + } + } + }, + "errors": { + "migration_in_progress": { + "desc": "Team is being migrated between servers. See [the `team_migration_started` event documentation](/reference/events/team_migration_started) for details." + } + }, + "examples": { + "success": { + "url": "/api/rtm.connect?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "self": { + "id": "U4X318ZMZ", + "name": "robotoverlord" + }, + "team": { + "domain": "slackdemo", + "id": "T2U81E2FP", + "name": "SlackDemo" + }, + "url": "wss://..." + } + }, + "error": { + "url": "/api/rtm.connect?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/rtm.start.json b/docs.slack.dev/methods/rtm.start.json new file mode 100644 index 00000000..f2fe0603 --- /dev/null +++ b/docs.slack.dev/methods/rtm.start.json @@ -0,0 +1,143 @@ +{ + "desc": "Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead.", + "http_method": "GET", + "scope": "rtm:stream", + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "simple_latest": { + "desc": "Return timestamp only for latest message object of each channel (improves performance).", + "type": "boolean" + }, + "no_unreads": { + "desc": "Skip unread counts for each channel (improves performance).", + "type": "boolean" + }, + "mpim_aware": { + "desc": "Returns MPIMs to the client in the API response.", + "type": "boolean" + }, + "presence_sub": { + "desc": "Only deliver presence events when requested by subscription. See [presence subscriptions](/apis/web-api/user-presence-and-status#subscriptions).", + "type": "boolean", + "default": "true" + }, + "batch_presence_aware": { + "desc": "Batch presence deliveries via subscription. Enabling changes the shape of `presence_change` events. See [batch presence](/apis/web-api/user-presence-and-status#batching).", + "example": "1", + "type": "boolean", + "default": "false" + }, + "no_latest": { + "desc": "Exclude latest timestamps for channels, groups, mpims, and ims. Automatically sets `no_unreads` to `1`", + "type": "boolean", + "default": "0", + "example": "1" + }, + "include_locale": { + "desc": "Set this to `true` to receive the locale for users and channels. Defaults to `false`", + "type": "boolean" + } + } + }, + "output": { + "required": [ + "url", + "team", + "self" + ], + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "self": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "schema": "user_id" + }, + "name": { + "type": "string" + } + } + }, + "team": { + "required": [ + "id", + "name", + "domain" + ], + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "id": { + "schema": "workspace_id" + }, + "name": { + "type": "string" + }, + "enterprise_id": { + "schema": "enterprise_id" + }, + "enterprise_name": { + "schema": "enterprise_name" + } + } + } + } + }, + "errors": { + "method_deprecated": { + "desc": "`rtm.start` is deprecated. Please use `rtm.connect` instead of `rtm.start`. Read https://docs.slack.dev/changelog/2021-10-rtm-start-to-stop for more info." + }, + "migration_in_progress": { + "desc": "Workspace is being migrated between servers. See [the `team_migration_started` event documentation](/reference/events/team_migration_started) for details." + }, + "rtm_connect_required": { + "desc": "`rtm.start` is deprecated. Please use `rtm.connect` instead of `rtm.start`. Read https://docs.slack.dev/changelog/2021-10-rtm-start-to-stop for more info." + } + }, + "warnings": { + "member_list_truncated": { + "desc": "A `members` array included in a channel object was truncated at 1500 results. Use `conversations.members` to retrieve all results." + }, + "method_deprecated": { + "desc": "`rtm.start` is deprecated. Please use `rtm.connect` instead of `rtm.start`. Read https://docs.slack.dev/changelog/2021-10-rtm-start-to-stop for more info." + } + }, + "examples": { + "success": { + "url": "/api/rtm.start?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/rtm.start?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/search.all.json b/docs.slack.dev/methods/search.all.json new file mode 100644 index 00000000..070be110 --- /dev/null +++ b/docs.slack.dev/methods/search.all.json @@ -0,0 +1,378 @@ +{ + "desc": "Searches for messages and files matching a query.", + "http_method": "GET", + "scope": "search:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "query" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "count": { + "default": 20, + "type": "integer", + "subtype": "paging" + }, + "highlight": { + "desc": "Pass a value of `true` to enable query highlight markers (see below).", + "example": "true", + "type": "boolean" + }, + "page": { + "default": 1, + "type": "integer", + "subtype": "paging" + }, + "query": { + "desc": "Search query. May contains booleans, etc.", + "example": "pickleface", + "type": "string" + }, + "sort": { + "default": "score", + "desc": "Return matches sorted by either `score` or `timestamp`.", + "example": "timestamp", + "type": "string" + }, + "sort_dir": { + "default": "desc", + "desc": "Change sort direction to ascending (`asc`) or descending (`desc`).", + "example": "asc", + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "encoded team id to search in, required if org token is used" + } + } + }, + "output": { + "type": "object", + "properties": { + "files": { + "matches": { + "minItems": 0, + "type": "array" + }, + "pagination": { + "type": "object", + "properties": { + "last": { + "type": "integer", + "example": 2, + "desc": "Last result id" + }, + "total_count": { + "type": "integer", + "example": 2, + "desc": "Total count of results" + }, + "page_count": { + "type": "integer", + "example": 1, + "desc": "Number of pages" + }, + "per_page": { + "type": "integer", + "example": 20, + "desc": "Number of results per page" + }, + "page": { + "type": "integer", + "example": 1, + "desc": "Current page" + }, + "first": { + "type": "integer", + "example": 1, + "desc": "First result id" + } + } + }, + "total": { + "type": "integer", + "example": 351, + "desc": "Total number of file search results." + }, + "paging": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "example": 20, + "desc": "Number of results per page" + }, + "total": { + "type": "integer", + "example": 2, + "desc": "Number of results" + }, + "page": { + "type": "integer", + "example": 1, + "desc": "Current page" + }, + "pages": { + "type": "integer", + "example": 1, + "desc": "Number of pages" + } + } + } + }, + "callstack": { + "type": "string", + "optional": true + }, + "messages": { + "matches": { + "minItems": 0, + "type": "array" + }, + "pagination": { + "type": "object", + "properties": { + "last": { + "type": "integer", + "example": 2, + "desc": "Last result id" + }, + "total_count": { + "type": "integer", + "example": 2, + "desc": "Total count of results" + }, + "page_count": { + "type": "integer", + "example": 1, + "desc": "Number of pages" + }, + "per_page": { + "type": "integer", + "example": 20, + "desc": "Number of results per page" + }, + "page": { + "type": "integer", + "example": 1, + "desc": "Current page" + }, + "first": { + "type": "integer", + "example": 1, + "desc": "First result id" + } + } + }, + "total": { + "type": "integer", + "example": 351, + "desc": "Total number of message search results." + }, + "paging": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "example": 20, + "desc": "Number of results per page" + }, + "total": { + "type": "integer", + "example": 2, + "desc": "Number of results" + }, + "page": { + "type": "integer", + "example": 1, + "desc": "Current page" + }, + "pages": { + "type": "integer", + "example": 1, + "desc": "Number of pages" + } + } + } + }, + "posts": { + "matches": { + "minItems": 0, + "type": "array" + }, + "total": { + "type": "integer", + "example": 351, + "desc": "Total number of matching posts." + } + }, + "query": { + "type": "string", + "optional": false, + "example": "pickleface", + "desc": "Search query." + } + } + }, + "examples": { + "success": { + "url": "/api/search.all?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "files": { + "matches": [ + { + "channels": [], + "comments_count": 1, + "created": 1508804330, + "display_as_bot": false, + "editable": false, + "external_type": "", + "filetype": "png", + "groups": [], + "id": "F7PKF1NR7", + "image_exif_rotation": 1, + "ims": [], + "initial_comment": { + "comment": "Sure! Here's the workflow diagram!", + "created": 1508804330, + "id": "Fc7NLL52E7", + "is_intro": true, + "timestamp": 1508804330, + "user": "U2U85N1RZ" + }, + "is_external": false, + "is_public": true, + "mimetype": "image/png", + "mode": "hosted", + "name": "slack workflow diagram.png", + "original_h": 117, + "original_w": 128, + "permalink": "https://example.slack.com/files/U2U85N1RZ/F7PKF1NR7/slack_workflow_diagram.png", + "permalink_public": "https://slack-files.com/T2U81E2FZ-F7PKF1NR7-bea9143f18", + "pretty_type": "PNG", + "preview": null, + "public_url_shared": false, + "score": "0.99982661240974", + "size": 35705, + "thumb_160": "https://files.slack.com/files-tmb/T2U81E2FZ-F7PKF1NR7-19f33fc256/slack_workflow_diagram_160.png", + "thumb_360": "https://files.slack.com/files-tmb/T2U81E2FZ-F7PKF1NR7-19f33fc256/slack_workflow_diagram_360.png", + "thumb_360_h": 117, + "thumb_360_w": 128, + "thumb_64": "https://files.slack.com/files-tmb/T2U81E2FZ-F7PKF1NR7-19f33fc256/slack_workflow_diagram_64.png", + "thumb_80": "https://files.slack.com/files-tmb/T2U81E2FZ-F7PKF1NR7-19f33fc256/slack_workflow_diagram_80.png", + "timestamp": 1508804330, + "title": "slack workflow diagram", + "top_file": false, + "url_private": "https://files.slack.com/files-pri/T2U81E2FZ-F7PKF1NR7/slack_workflow_diagram.png", + "url_private_download": "https://files.slack.com/files-pri/T2U81E2FZ-F7PKF1NR7/download/slack_workflow_diagram.png", + "user": "U2U85N1RZ", + "username": "amy" + } + ], + "pagination": { + "first": 1, + "last": 1, + "page": 1, + "page_count": 1, + "per_page": 20, + "total_count": 1 + }, + "paging": { + "count": 20, + "page": 1, + "pages": 1, + "total": 1 + }, + "total": 1 + }, + "messages": { + "matches": [ + { + "channel": { + "id": "C2U86NC6M", + "is_ext_shared": false, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "name": "general", + "pending_shared": [] + }, + "iid": "35692677-e60e-43d9-ac45-1987cea88975", + "next": { + "iid": "6f510ea1-e1d3-4f3f-bdb9-f9c6f6e9d609", + "text": "Thanks!", + "ts": "1508804378.000219", + "type": "message", + "user": "U2U85HJ7R", + "username": "john" + }, + "permalink": "https://example.slack.com/archives/C2U86NC6M/p1508804330000296", + "previous": { + "iid": "aba8603c-0543-4fb2-9118-a5ac85f3d138", + "text": "Can you send me the Slack workflow diagram?", + "ts": "1508804301.000026", + "type": "message", + "user": "U2U85HJ7R", + "username": "john" + }, + "team": "T2U81E2FZ", + "text": "uploaded a file: and commented: Sure! Here's the workflow diagram!", + "ts": "1508804330.000296", + "type": "message", + "user": "U2U85N1RZ", + "username": "amy" + } + ], + "pagination": { + "first": 1, + "last": 1, + "page": 1, + "page_count": 1, + "per_page": 20, + "total_count": 1 + }, + "paging": { + "count": 20, + "page": 1, + "pages": 1, + "total": 1 + }, + "total": 1 + }, + "ok": true, + "posts": { + "matches": [], + "total": 0 + }, + "query": "diagram" + } + }, + "error": { + "url": "/api/search.all?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "error": "missing_scope", + "needed": "search:read", + "ok": false, + "provided": "identify,bot:basic" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/search.files.json b/docs.slack.dev/methods/search.files.json new file mode 100644 index 00000000..5e327cb3 --- /dev/null +++ b/docs.slack.dev/methods/search.files.json @@ -0,0 +1,290 @@ +{ + "desc": "Searches for files matching a query.", + "http_method": "GET", + "scope": "search:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "query" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "count": { + "default": 20, + "type": "integer", + "subtype": "paging" + }, + "highlight": { + "desc": "Pass a value of `true` to enable query highlight markers (see below).", + "example": "true", + "type": "boolean" + }, + "page": { + "default": 1, + "type": "integer", + "subtype": "paging" + }, + "query": { + "desc": "Search query.", + "example": "pickleface", + "type": "string" + }, + "sort": { + "default": "score", + "desc": "Return matches sorted by either `score` or `timestamp`.", + "example": "timestamp", + "type": "string" + }, + "sort_dir": { + "default": "desc", + "desc": "Change sort direction to ascending (`asc`) or descending (`desc`).", + "example": "asc", + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "encoded team id to search in, required if org token is used" + } + } + }, + "output": { + "type": "object", + "properties": { + "files": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "last": { + "type": "integer", + "example": 2, + "desc": "Last result id" + }, + "warnings": { + "type": "array", + "optional": true, + "items": { + "type": "string" + } + }, + "total_count": { + "type": "integer", + "example": 2, + "desc": "Total count of results" + }, + "page_count": { + "type": "integer", + "example": 1, + "desc": "Number of pages" + }, + "per_page": { + "type": "integer", + "example": 20, + "desc": "Number of results per page" + }, + "page": { + "type": "integer", + "example": 1, + "desc": "Current page" + }, + "first": { + "type": "integer", + "example": 1, + "desc": "First result id" + } + } + }, + "matches": { + "minItems": 0, + "type": "array" + }, + "paging": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "example": 20, + "desc": "Number of results per page" + }, + "pages": { + "type": "integer", + "example": 1, + "desc": "Number of pages" + }, + "total": { + "type": "integer", + "example": 2, + "desc": "Number of results" + }, + "page": { + "type": "integer", + "example": 1, + "desc": "Current page" + }, + "warnings": { + "type": "array", + "optional": true, + "items": { + "type": "string" + } + } + } + }, + "all_stop_words": { + "optional": true, + "type": "boolean" + }, + "total": { + "type": "integer", + "example": 351, + "desc": "Total number of file search results." + }, + "query_too_long": { + "optional": true, + "type": "boolean" + } + } + }, + "callstack": { + "type": "string", + "optional": true + }, + "users": { + "type": "object", + "optional": true + }, + "teams": { + "type": "object", + "optional": true + }, + "channels": { + "type": "object", + "optional": true + }, + "ims": { + "type": "object", + "optional": true + }, + "groups": { + "type": "object", + "optional": true + }, + "query": { + "optional": false, + "type": "string", + "example": "pickleface", + "desc": "Search query." + }, + "ignored_exclude_bots_pref": { + "type": "boolean", + "optional": true + } + } + }, + "examples": { + "success": { + "url": "/api/search.files?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "files": { + "matches": [ + { + "channels": [], + "comments_count": 1, + "created": 1507850315, + "deanimate_gif": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_deanimate_gif.png", + "display_as_bot": false, + "editable": false, + "external_type": "", + "filetype": "gif", + "groups": [], + "id": "F7H0D7ZBB", + "image_exif_rotation": 1, + "ims": [], + "is_external": false, + "is_public": true, + "mimetype": "image/gif", + "mode": "hosted", + "name": "computer.gif", + "original_h": 313, + "original_w": 500, + "permalink": "https://eventsdemo.slack.com/files/U2U85N1RZ/F7H0D7ZBB/computer.gif", + "permalink_public": "https://slack-files.com/T2U81E2BB-F7H0D7ZBB-85b7f5557e", + "pretty_type": "GIF", + "preview": null, + "public_url_shared": false, + "reactions": [ + { + "count": 1, + "name": "stuck_out_tongue_winking_eye", + "users": [ + "U2U85N1RZ" + ] + } + ], + "score": "0.38899223746309", + "size": 1639034, + "thumb_160": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_160.png", + "thumb_360": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_360.png", + "thumb_360_gif": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_360.gif", + "thumb_360_h": 225, + "thumb_360_w": 360, + "thumb_480": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_480.png", + "thumb_480_gif": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_480.gif", + "thumb_480_h": 300, + "thumb_480_w": 480, + "thumb_64": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_64.png", + "thumb_80": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_80.png", + "timestamp": 1507850315, + "title": "computer.gif", + "top_file": false, + "url_private": "https://files.slack.com/files-pri/T2U81E2BB-F7H0D7ZBB/computer.gif", + "url_private_download": "https://files.slack.com/files-pri/T2U81E2BB-F7H0D7ZBB/download/computer.gif", + "user": "U2U85N1RZ", + "username": "" + } + ], + "pagination": { + "first": 1, + "last": 3, + "page": 1, + "page_count": 1, + "per_page": 20, + "total_count": 3 + }, + "paging": { + "count": 20, + "page": 1, + "pages": 1, + "total": 3 + }, + "total": 3 + }, + "ok": true, + "query": "computer.gif" + } + }, + "error": { + "url": "/api/search.files?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "error": "No query passed", + "ok": false + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/search.messages.json b/docs.slack.dev/methods/search.messages.json new file mode 100644 index 00000000..baf6740b --- /dev/null +++ b/docs.slack.dev/methods/search.messages.json @@ -0,0 +1,280 @@ +{ + "desc": "Searches for messages matching a query.", + "http_method": "GET", + "scope": "search:read", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "query" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "count": { + "default": 20, + "desc": "Pass the number of results you want per \"page\". Maximum of `100`.", + "type": "integer", + "subtype": "paging" + }, + "highlight": { + "desc": "Pass a value of `true` to enable query highlight markers (see below).", + "example": "true", + "type": "boolean" + }, + "page": { + "default": 1, + "type": "integer", + "subtype": "paging" + }, + "cursor": { + "desc": "Use this when getting results with cursormark pagination. For first call send `*` for subsequent calls, send the value of `next_cursor` returned in the previous call's results", + "type": "string" + }, + "query": { + "desc": "Search query.", + "example": "pickleface", + "type": "string" + }, + "sort": { + "default": "score", + "desc": "Return matches sorted by either `score` or `timestamp`.", + "example": "timestamp", + "type": "string" + }, + "sort_dir": { + "default": "desc", + "desc": "Change sort direction to ascending (`asc`) or descending (`desc`).", + "example": "asc", + "type": "string", + "enum": [ + "asc", + "desc", + "" + ] + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "encoded team id to search in, required if org token is used" + } + } + }, + "output": { + "type": "object", + "properties": { + "callstack": { + "optional": true, + "type": "string" + }, + "users": { + "optional": true, + "type": "object" + }, + "messages": { + "type": "object", + "properties": { + "matches": { + "minItems": 0, + "type": "array" + }, + "pagination": { + "type": "object", + "properties": { + "last": { + "type": "integer", + "example": 2, + "desc": "Last result id" + }, + "warnings": { + "items": { + "type": "string" + }, + "type": "array" + }, + "total_count": { + "type": "integer", + "example": 2, + "desc": "Total count of results" + }, + "page_count": { + "type": "integer", + "example": 1, + "desc": "Number of pages" + }, + "per_page": { + "type": "integer", + "example": 20, + "desc": "Number of results per page" + }, + "page": { + "type": "integer", + "example": 1, + "desc": "Current page" + }, + "first": { + "type": "integer", + "example": 1, + "desc": "First result id" + }, + "next_cursor": { + "type": "string", + "desc": "value of next cursor to be passed when using cursormark pagination" + } + } + }, + "total": { + "type": "integer", + "example": 351, + "desc": "Total number of message search results." + }, + "all_stop_words": { + "optional": true, + "type": "boolean" + }, + "paging": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "example": 20, + "desc": "Number of results per page" + }, + "total": { + "type": "integer", + "example": 2, + "desc": "Number of results" + }, + "pages": { + "type": "integer", + "example": 1, + "desc": "Number of pages" + }, + "page": { + "type": "integer", + "example": 1, + "desc": "Current page" + }, + "warnings": { + "items": { + "type": "string" + }, + "type": "array" + }, + "next_cursor": { + "type": "string", + "desc": "next cursor to be passed to the method for next set of results using cursor pagination" + } + } + } + } + }, + "show_feedback": { + "optional": true, + "type": "boolean" + }, + "teams": { + "optional": true, + "type": "object" + }, + "query": { + "optional": false, + "type": "string", + "example": "pickleface", + "desc": "Search query." + }, + "bots": { + "optional": true, + "type": "object" + }, + "ignored_exclude_bots_pref": { + "optional": true, + "type": "boolean" + } + } + }, + "examples": { + "success": { + "url": "/api/search.messages?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "messages": { + "matches": [ + { + "channel": { + "id": "C12345678", + "is_ext_shared": false, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "name": "general", + "pending_shared": [] + }, + "iid": "cb64bdaa-c1e8-4631-8a91-0f78080113e9", + "permalink": "https://hitchhikers.slack.com/archives/C12345678/p1508284197000015", + "team": "T12345678", + "text": "The meaning of life the universe and everything is 42.", + "ts": "1508284197.000015", + "type": "message", + "user": "U2U85N1RV", + "username": "roach" + }, + { + "channel": { + "id": "C12345678", + "is_ext_shared": false, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "name": "random", + "pending_shared": [] + }, + "iid": "9a00d3c9-bd2d-45b0-988b-6cff99ae2a90", + "permalink": "https://hitchhikers.slack.com/archives/C12345678/p1508795665000236", + "team": "T12345678", + "text": "The meaning of life the universe and everything is 101010", + "ts": "1508795665.000236", + "type": "message", + "user": "", + "username": "robot overlord" + } + ], + "pagination": { + "first": 1, + "last": 2, + "page": 1, + "page_count": 1, + "per_page": 20, + "total_count": 2 + }, + "paging": { + "count": 20, + "page": 1, + "pages": 1, + "total": 2 + }, + "total": 2 + }, + "ok": true, + "query": "The meaning of life the universe and everything" + } + }, + "error": { + "url": "/api/search.messages?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "error": "No query passed", + "ok": false + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.access.delete.json b/docs.slack.dev/methods/slackLists.access.delete.json new file mode 100644 index 00000000..3d9f8460 --- /dev/null +++ b/docs.slack.dev/methods/slackLists.access.delete.json @@ -0,0 +1,105 @@ +{ + "desc": "Revoke access to a List for specified entities.", + "http_method": "POST", + "scope": "lists:write", + "familyName": "lists", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "list_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "Encoded ID of the List.", + "example": "F1234ABCD", + "subtype": "list", + "schema": "file_id" + }, + "channel_ids": { + "desc": "List of channels you wish to update access for. Can only be used if `user_ids` is not provided.", + "example": "[\"C1234ABCD\"]", + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "schema": "channel_id" + } + }, + "user_ids": { + "desc": "List of users you wish to update access for. Can only be used if `channel_ids` is not provided.", + "example": "[\"U1234ABCD\"]", + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "schema": "user_id" + } + } + } + }, + "output": { + "type": "object", + "properties": { + "failed_to_update_channel_ids": { + "desc": "The channel IDs that could not be updated.", + "type": "array", + "items": { + "schema": "channel" + } + }, + "failed_to_update_user_ids": { + "desc": "The user IDs that could not be updated.", + "type": "array", + "items": { + "schema": "user_id" + } + } + } + }, + "errors": { + "lists_disabled_user_team": { + "desc": "Lists is disabled on user's team." + }, + "list_not_found": { + "desc": "The List you wish to update permissions for is not available." + }, + "channel_not_found": { + "desc": "A channel could not be found." + }, + "failed_to_update_user_ids": { + "desc": "Failed to update the specified user IDs." + }, + "invalid_parameters": { + "desc": "One of `user_ids` or `channel_ids` must be defined, but not both." + }, + "restricted_action": { + "desc": "User does not have permission to perform this action." + }, + "user_not_found": { + "desc": "A user could not be found." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.access.delete?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/slackLists.access.delete?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "restricted_action" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.access.set.json b/docs.slack.dev/methods/slackLists.access.set.json new file mode 100644 index 00000000..228d1773 --- /dev/null +++ b/docs.slack.dev/methods/slackLists.access.set.json @@ -0,0 +1,110 @@ +{ + "desc": "Set the access level to a List for specified entities.", + "http_method": "POST", + "scope": "lists:write", + "familyName": "lists", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "list_id", + "access_level" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "Encoded ID of the List.", + "example": "F1234ABCD", + "subtype": "list", + "schema": "file_id" + }, + "access_level": { + "desc": "Desired level of access.", + "schema": "file_access_level" + }, + "channel_ids": { + "desc": "List of channels you wish to update access for. Can only be used if `user_ids` is not provided.", + "example": "[\"C1234ABCD\"]", + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "schema": "channel_id" + } + }, + "user_ids": { + "desc": "List of users you wish to update access for. Can only be used if `channel_ids` is not provided.", + "example": "[\"U1234ABCD\"]", + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "schema": "user_id" + } + } + } + }, + "output": { + "type": "object", + "properties": { + "failed_to_update_channel_ids": { + "desc": "The channel IDs that could not be updated.", + "type": "array", + "items": { + "schema": "channel" + } + }, + "failed_to_update_user_ids": { + "desc": "The user IDs that could not be updated.", + "type": "array", + "items": { + "schema": "user_id" + } + } + } + }, + "errors": { + "lists_disabled_user_team": { + "desc": "Lists is disabled on user's team." + }, + "list_not_found": { + "desc": "The List you wish to update permissions for is not available." + }, + "channel_not_found": { + "desc": "A channel could not be found." + }, + "failed_to_update_user_ids": { + "desc": "Failed to update the specified user IDs." + }, + "invalid_parameters": { + "desc": "One of `user_ids` or `channel_ids` must be defined, but not both." + }, + "restricted_action": { + "desc": "User does not have permission to perform this action." + }, + "user_not_found": { + "desc": "A user could not be found." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.access.set?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/slackLists.access.set?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "restricted_action" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.create.json b/docs.slack.dev/methods/slackLists.create.json new file mode 100644 index 00000000..a6bfe0bd --- /dev/null +++ b/docs.slack.dev/methods/slackLists.create.json @@ -0,0 +1,125 @@ +{ + "desc": "Create a List.", + "http_method": "POST", + "scope": "lists:write", + "familyName": "lists", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "name": { + "desc": "Name of the List.", + "example": "My List", + "type": "string" + }, + "description_blocks": { + "desc": "A rich text description of the List.", + "example": "[{\"type\":\"rich_text\",\"elements\":[{\"type\":\"rich_text_section\",\"elements\":[{\"type\":\"text\",\"text\":\"List to keep track of tasks!\"}]}]}]", + "type": "array", + "items": { + "schema": "rich_text" + } + }, + "schema": { + "desc": "Column definition for the List.", + "example": "[{ \"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\" }]", + "type": "array", + "items": { + "schema": "list_column" + } + }, + "copy_from_list_id": { + "desc": "ID of the List to copy.", + "example": "F1234567", + "type": "string", + "subtype": "list", + "schema": "file_id" + }, + "include_copied_list_records": { + "desc": "Boolean indicating whether to include records when a List is copied.", + "example": "false", + "type": "boolean" + }, + "todo_mode": { + "type": "boolean", + "desc": "Boolean indicating whether the List should be used to track todo tasks.", + "example": "true", + "default": false + } + } + }, + "output": { + "type": "object", + "required": [ + "list_id" + ], + "properties": { + "list_id": { + "desc": "The ID of the created List.", + "example": "F12345678", + "schema": "file_id" + } + } + }, + "errors": { + "permission_denied": { + "desc": "The user does not have permission to perform this action." + }, + "invalid_schema": { + "desc": "The schema was invalid." + }, + "invalid_primary_column": { + "desc": "Missing or more than one primary column." + }, + "team_not_found": { + "desc": "The team cannot be found." + }, + "user_not_found": { + "desc": "The user cannot be found." + }, + "over_list_file_maximum": { + "desc": "Cannot create any more List files." + }, + "over_title_length_maximum": { + "desc": "Title can not exceed defined length." + }, + "invalid_column_type": { + "desc": "Column type not allowed." + }, + "missing_arg_copy_from_list_id": { + "desc": "Missing argument `copy_from_list_id`." + }, + "invalid_copy_and_schema_args": { + "desc": "Cannot provide both `copy_from_list_id` and `schema`." + }, + "over_column_maximum": { + "desc": "Cannot create List with more than allowed column count." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.create?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "list_id": "F1234ABCD" + } + }, + "error": { + "url": "/api/slackLists.create?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_schema" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.download.get.json b/docs.slack.dev/methods/slackLists.download.get.json new file mode 100644 index 00000000..c775a91a --- /dev/null +++ b/docs.slack.dev/methods/slackLists.download.get.json @@ -0,0 +1,83 @@ +{ + "desc": "Retrieve List download URL from an export job to download List contents.", + "http_method": "POST", + "scope": "lists:read", + "familyName": "lists", + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "job_id", + "list_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "ID of the List to export.", + "example": "F1234567", + "type": "string", + "subtype": "list", + "schema": "file_id" + }, + "job_id": { + "type": "string", + "example": "Le48SKT566", + "desc": "The ID of the recently started job to export the List." + } + } + }, + "output": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "desc": "Current status of the export job.", + "schema": "list_export_status" + }, + "download_url": { + "type": "string", + "desc": "The URL at which to download the CSV." + } + } + }, + "errors": { + "list_not_found": { + "desc": "The List was not found." + }, + "permission_denied": { + "desc": "The bot does not have permission to perform this action." + }, + "unknown_method": { + "desc": "Feature not enabled for this team." + }, + "job_not_found": { + "desc": "Could not find an export job matching that ID." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.download.get?token=YOUR_TOKEN&job_id=LeF1234567", + "description": "Typical success response", + "example": { + "ok": true, + "status": "COMPLETED", + "download_url": "https://files.example.com/files-pri/1234567890-F12345678/csv/list?origin_team=T1234567890" + } + }, + "error": { + "url": "/api/slackLists.download.get?token=YOUR_TOKEN&job_id=LeF1234567", + "description": "Typical error response", + "example": { + "ok": false, + "error": "list_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.download.start.json b/docs.slack.dev/methods/slackLists.download.start.json new file mode 100644 index 00000000..51f86db2 --- /dev/null +++ b/docs.slack.dev/methods/slackLists.download.start.json @@ -0,0 +1,73 @@ +{ + "desc": "Initiate a job to export List contents.", + "http_method": "POST", + "scope": "lists:read", + "familyName": "lists", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "list_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "ID of the List to export.", + "example": "F1234567", + "type": "string", + "subtype": "list", + "schema": "file_id" + }, + "include_archived": { + "type": "boolean", + "default": false + } + } + }, + "output": { + "type": "object", + "required": [ + "job_id" + ], + "properties": { + "job_id": { + "type": "integer", + "example": "1205208491474", + "desc": "The ID of the recently started job to export the List." + } + } + }, + "errors": { + "list_not_found": { + "desc": "The List was not found." + }, + "permission_denied": { + "desc": "The bot does not have permission to perform this action." + }, + "unknown_method": { + "desc": "Feature not enabled for this team." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.download.start?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "job_id": "LeF1234567" + } + }, + "error": { + "url": "/api/slackLists.download.start?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "list_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.items.create.json b/docs.slack.dev/methods/slackLists.items.create.json new file mode 100644 index 00000000..4b7371a7 --- /dev/null +++ b/docs.slack.dev/methods/slackLists.items.create.json @@ -0,0 +1,151 @@ +{ + "desc": "Add a new item to an existing List.", + "http_method": "POST", + "scope": "lists:write", + "familyName": "lists", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "list_id" + ], + "properties": { + "token": { + "desc": "Token with which to authenticate the session.", + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "ID of the List to add the item to.", + "subtype": "list", + "schema": "file_id" + }, + "duplicated_item_id": { + "desc": "ID of the record to make a copy of.", + "schema": "list_record_id" + }, + "parent_item_id": { + "desc": "ID of the parent record for this subtask.", + "schema": "list_record_id" + }, + "initial_fields": { + "desc": "Initial item data.", + "type": "array", + "items": { + "schema": "list_field" + } + } + } + }, + "output": { + "required": [ + "item" + ], + "type": "object", + "properties": { + "item": { + "schema": "list_item" + } + } + }, + "errors": { + "list_not_found": { + "desc": "The List was not found." + }, + "over_row_maximum": { + "desc": "Cannot create more items over the maximum." + }, + "team_not_found": { + "desc": "The team cannot be found." + }, + "user_not_found": { + "desc": "The user cannot be found." + }, + "duplicated_item_not_found": { + "desc": "The item to duplicate cannot be found." + }, + "invalid_option_id": { + "desc": "Option ID provided does not match column definition." + }, + "invalid_args": { + "desc": "The provided arguments are invalid." + }, + "uneditable_column": { + "desc": "Initial values provided for an uneditable column." + }, + "invalid_input_type": { + "desc": "The field value type does not match the column type." + }, + "invalid_column_id": { + "desc": "The column ID provided does not exist in the List." + }, + "over_cell_fields_limit": { + "desc": "Too many values provided for a single field." + }, + "file_not_found": { + "desc": "The attachment file could not be found." + }, + "invalid_vote_value": { + "desc": "Invalid value provided for a vote column." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.items.create?token=YOUR_TOKEN", + "description": "Create a task item with text and date fields.", + "example": { + "ok": true, + "item": { + "id": "Rec12345678", + "list_id": "F1234ABCD", + "date_created": 1704067200, + "created_by": "U1234567", + "updated_by": "U1234567", + "updated_timestamp": "1704067200", + "fields": [ + { + "key": "title", + "column_id": "Col10000000", + "value": "[{\"type\":\"rich_text\",\"block_id\":\"abc123\",\"elements\":[{\"type\":\"rich_text_section\",\"elements\":[{\"type\":\"text\",\"text\":\"Complete project documentation\"}]}]}]", + "text": "Complete project documentation", + "rich_text": [ + { + "type": "rich_text", + "block_id": "abc123", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "Complete project documentation" + } + ] + } + ] + } + ] + }, + { + "key": "due_date", + "column_id": "Col10000001", + "value": "2024-03-20", + "date": [ + "2024-03-20" + ] + } + ] + } + } + }, + "error": { + "url": "/api/slackLists.items.create", + "description": "Error when the specified List doesn't exist", + "example": { + "ok": false, + "error": "list_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.items.delete.json b/docs.slack.dev/methods/slackLists.items.delete.json new file mode 100644 index 00000000..bc13287d --- /dev/null +++ b/docs.slack.dev/methods/slackLists.items.delete.json @@ -0,0 +1,78 @@ +{ + "desc": "Deletes an item from an existing List.", + "http_method": "POST", + "scope": "lists:write", + "familyName": "lists", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "list_id", + "id" + ], + "properties": { + "token": { + "desc": "Token with which to authenticate the session.", + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "ID of the List containing the item.", + "example": "F12345678", + "type": "string", + "subtype": "list" + }, + "id": { + "desc": "ID of item to delete.", + "example": "Rec1234567", + "type": "string" + } + } + }, + "output": { + "required": [ + "ok" + ], + "type": "object", + "properties": { + "ok": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "errors": { + "list_not_found": { + "desc": "The List was not found." + }, + "record_not_found": { + "desc": "The record was not found in the List." + }, + "team_not_found": { + "desc": "The team cannot be found." + }, + "user_not_found": { + "desc": "The user cannot be found." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.items.delete?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/slackLists.items.delete?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.items.deleteMultiple.json b/docs.slack.dev/methods/slackLists.items.deleteMultiple.json new file mode 100644 index 00000000..7053233b --- /dev/null +++ b/docs.slack.dev/methods/slackLists.items.deleteMultiple.json @@ -0,0 +1,77 @@ +{ + "desc": "Deletes multiple items from an existing List.", + "http_method": "POST", + "scope": "lists:write", + "familyName": "lists", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "list_id", + "ids" + ], + "properties": { + "token": { + "desc": "Token with which to authenticate the session.", + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "ID of the List containing the items.", + "example": "F12345678", + "type": "string", + "subtype": "list" + }, + "ids": { + "desc": "IDs of items to delete.", + "type": "array", + "items": { + "schema": "list_record_id" + } + } + } + }, + "output": { + "required": [ + "ok" + ], + "type": "object", + "properties": { + "ok": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "errors": { + "list_not_found": { + "desc": "The List was not found." + }, + "team_not_found": { + "desc": "The team cannot be found." + }, + "user_not_found": { + "desc": "The user cannot be found." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.items.deleteMultiple?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/slackLists.items.deleteMultiple?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.items.info.json b/docs.slack.dev/methods/slackLists.items.info.json new file mode 100644 index 00000000..6bc0c955 --- /dev/null +++ b/docs.slack.dev/methods/slackLists.items.info.json @@ -0,0 +1,445 @@ +{ + "desc": "Get a row from a List.", + "http_method": "POST", + "scope": "lists:read", + "familyName": "lists", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "list_id", + "id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "ID of the List.", + "example": "F1234567", + "type": "string", + "subtype": "list", + "schema": "file_id" + }, + "id": { + "desc": "ID of the row to get.", + "example": "Rec014K005UQJ", + "type": "string", + "schema": "list_record_id" + }, + "include_is_subscribed": { + "default": "false", + "desc": "Set to `true` to include `is_subscribed` data for the returned List row.", + "type": "boolean" + } + } + }, + "output": { + "type": "object", + "required": [ + "list", + "record" + ], + "properties": { + "list": { + "schema": "file" + }, + "record": { + "schema": "list_item" + }, + "parent_task": { + "schema": "list_item" + }, + "subtasks": { + "type": "array", + "items": { + "schema": "list_item" + } + } + } + }, + "errors": { + "list_not_found": { + "desc": "The List was not found." + }, + "record_not_found": { + "desc": "The record was not found in the List." + }, + "record_deleted": { + "desc": "The record has been deleted." + }, + "team_not_found": { + "desc": "The team cannot be found." + }, + "user_not_found": { + "desc": "The user cannot be found." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.items.info?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "list": { + "id": "F0182EML399", + "created": 1753896412, + "timestamp": 1753896412, + "name": "list", + "title": "Ultimate list", + "mimetype": "application/vnd.slack-list", + "filetype": "list", + "pretty_type": "List", + "user": "U0157R3CXR8", + "user_team": "E0158RMBA0K", + "editable": true, + "size": 0, + "mode": "list", + "is_external": false, + "external_type": "", + "is_public": false, + "public_url_shared": false, + "display_as_bot": false, + "username": "", + "list_metadata": { + "schema": [ + { + "id": "Col0182EML39R", + "name": "Name", + "key": "name", + "type": "text", + "is_primary_column": true + }, + { + "id": "Col00", + "name": "Completed", + "key": "todo_completed", + "type": "todo_completed", + "is_primary_column": false + }, + { + "id": "Col01", + "name": "Assignee", + "key": "todo_assignee", + "type": "todo_assignee", + "is_primary_column": false, + "options": { + "format": "multi_entity", + "default_value": null, + "show_member_name": true + } + }, + { + "id": "Col02", + "name": "Due Date", + "key": "todo_due_date", + "type": "todo_due_date", + "is_primary_column": false + } + ], + "views": [ + { + "id": "View0182EML3A7", + "name": "Record", + "type": "record", + "is_locked": false, + "position": "1753896412", + "columns": [ + { + "visible": true, + "key": "name", + "id": "Col0182EML39R", + "position": "5000000000" + }, + { + "visible": true, + "key": "todo_completed", + "id": "Col00", + "position": "5000000001" + }, + { + "visible": true, + "key": "todo_assignee", + "id": "Col01", + "position": "5000000002" + }, + { + "visible": true, + "key": "todo_due_date", + "id": "Col02", + "position": "5000000003" + } + ], + "date_created": 1753896412, + "created_by": "U0157R3CXR8", + "stick_column_left": false + }, + { + "id": "View0182EML3AP", + "name": "All items", + "type": "table", + "is_locked": false, + "position": "1753896413", + "columns": [ + { + "visible": true, + "key": "name", + "id": "Col0182EML39R", + "position": "5000000000" + }, + { + "visible": true, + "key": "todo_completed", + "id": "Col00", + "position": "5000000001" + }, + { + "visible": true, + "key": "todo_assignee", + "id": "Col01", + "position": "5000000002" + }, + { + "visible": true, + "key": "todo_due_date", + "id": "Col02", + "position": "5000000003" + } + ], + "date_created": 1753896413, + "created_by": "U0157R3CXR8", + "stick_column_left": false, + "is_all_items_view": true, + "default_view_key": "all_items", + "show_completed_items": true + }, + { + "id": "View0182EML3B5", + "name": "Incomplete items", + "type": "table", + "is_locked": false, + "position": "1753896414", + "columns": [ + { + "visible": true, + "key": "name", + "id": "Col0182EML39R", + "position": "5000000000" + }, + { + "visible": true, + "key": "todo_completed", + "id": "Col00", + "position": "5000000001" + }, + { + "visible": true, + "key": "todo_assignee", + "id": "Col01", + "position": "5000000002" + }, + { + "visible": true, + "key": "todo_due_date", + "id": "Col02", + "position": "5000000003" + } + ], + "date_created": 1753896414, + "created_by": "U0157R3CXR8", + "stick_column_left": false, + "default_view_key": "incomplete_items", + "show_completed_items": false + }, + { + "id": "View0182EML3C3", + "name": "Completed items", + "type": "table", + "is_locked": false, + "position": "1753896415", + "columns": [ + { + "visible": true, + "key": "name", + "id": "Col0182EML39R", + "position": "5000000000" + }, + { + "visible": true, + "key": "todo_completed", + "id": "Col00", + "position": "5000000001" + }, + { + "visible": true, + "key": "todo_assignee", + "id": "Col01", + "position": "5000000002" + }, + { + "visible": true, + "key": "todo_due_date", + "id": "Col02", + "position": "5000000003" + } + ], + "date_created": 1753896415, + "created_by": "U0157R3CXR8", + "stick_column_left": false, + "default_view_key": "completed_items", + "show_completed_items": true + } + ], + "integrations": [], + "icon": "", + "description": "", + "description_blocks": [], + "is_trial": false, + "subtask_schema": [ + { + "id": "Col0182EML39R", + "name": "Name", + "key": "name", + "type": "text", + "is_primary_column": true + }, + { + "id": "Col00", + "name": "Completed", + "key": "todo_completed", + "type": "todo_completed", + "is_primary_column": false + }, + { + "id": "Col01", + "name": "Assignee", + "key": "todo_assignee", + "type": "todo_assignee", + "is_primary_column": false, + "options": { + "format": "multi_entity", + "default_value": null, + "show_member_name": true + } + }, + { + "id": "Col02", + "name": "Due Date", + "key": "todo_due_date", + "type": "todo_due_date", + "is_primary_column": false + } + ], + "creation_source": { + "type": "blank" + }, + "todo_mode": true, + "default_view": "" + }, + "list_limits": { + "over_row_maximum": false, + "row_count_limit": 5000, + "row_count": 0, + "archived_row_count": 0, + "over_column_maximum": false, + "column_count": 1, + "column_count_limit": 30, + "over_view_maximum": false, + "view_count": 4, + "view_count_limit": 50, + "max_attachments_per_cell": 10 + }, + "url_private": "https://files.dev.slack.com/files-pri/T0158RMBA0K-F0182EML399/list", + "url_private_download": "https://files.dev.slack.com/files-pri/T0158RMBA0K-F0182EML399/download/list", + "permalink": "https://chev-sub.enterprise.dev.slack.com/lists/T013UFG3M5G/F0182EML399", + "permalink_public": "https://dev.slack-files.com/T0158RMBA0K-F0182EML399-a06892f186", + "last_editor": "U0157R3CXR8", + "list_csv_download_url": "https://files.dev.slack.com/files-pri/T0158RMBA0K-F0182EML399/csv/list", + "updated": 1753896412, + "is_starred": false, + "shares": { + "private": { + "D013V9WPZ99": [ + { + "reply_users": [], + "reply_users_count": 0, + "reply_count": 0, + "ts": "1753896412.387799", + "share_user_id": "U0157R3CXR8", + "source": "FILE_OWNER", + "is_silent_share": true + } + ] + } + }, + "channels": [], + "groups": [], + "ims": [ + "D013V9WPZ99" + ], + "has_more_shares": false, + "access": "owner", + "private_channels_with_file_access_count": 0, + "dm_mpdm_users_with_file_access": [ + { + "user_id": "U0157R3CXR8", + "access": "write" + } + ], + "teams_shared_with": [ + "E0158RMBA0K" + ], + "is_restricted_sharing_enabled": false, + "has_rich_preview": false, + "file_access": "visible", + "org_or_workspace_access": "none" + }, + "record": { + "id": "Rec0182EVHCAF", + "list_id": "F0182EML399", + "date_created": 1753896730, + "created_by": "U0157R3CXR8", + "updated_by": "U0157R3CXR8", + "fields": [ + { + "key": "todo_completed", + "value": false, + "checkbox": false, + "column_id": "Col00" + } + ], + "updated_timestamp": "1753896730" + }, + "subtasks": [ + { + "id": "Rec0182EKH8QK", + "list_id": "F0182EML399", + "date_created": 1753896851, + "created_by": "U0157R3CXR8", + "updated_by": "U0157R3CXR8", + "fields": [ + { + "key": "todo_completed", + "value": false, + "checkbox": false, + "column_id": "Col00" + } + ], + "updated_timestamp": "1753896851", + "parent_record_id": "Rec0182EVHCAF" + } + ] + } + }, + "error": { + "url": "/api/slackLists.items.info?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "record_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.items.list.json b/docs.slack.dev/methods/slackLists.items.list.json new file mode 100644 index 00000000..54b5fd16 --- /dev/null +++ b/docs.slack.dev/methods/slackLists.items.list.json @@ -0,0 +1,237 @@ +{ + "desc": "Get records from a List.", + "http_method": "POST", + "scope": "lists:read", + "familyName": "lists", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "list_id" + ], + "properties": { + "token": { + "desc": "Token with which to authenticate the session.", + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "ID of the List.", + "example": "F12345678", + "type": "string", + "subtype": "list" + }, + "limit": { + "type": "integer", + "desc": "The maximum number of records to return.", + "minimum": 1, + "maximum": 1000, + "example": "100" + }, + "cursor": { + "type": "string", + "desc": "Next cursor for pagination.", + "example": "bGlzdF9pZDoxMjIxNzk3NzMyNDgzO2lkOjEyNzAxMjMxNTEzOTQ7ZGF0ZV9jcmVhdGVkOjE3NTE1NTkyMTU=" + }, + "archived": { + "desc": "Boolean indicating whether archived items or normal items should be returned.", + "type": "boolean", + "default": false, + "example": "true" + } + } + }, + "output": { + "required": [ + "items", + "next_cursor" + ], + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "schema": "list_item" + } + }, + "response_metadata": { + "schema": "response_metadata_new" + } + } + }, + "errors": { + "list_not_found": { + "desc": "The List was not found." + }, + "team_not_found": { + "desc": "The team cannot be found." + }, + "user_not_found": { + "desc": "The user cannot be found." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "archive_not_supported": { + "desc": "Archiving is not supported." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.items.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "items": [ + { + "id": "Rec12345678", + "list_id": "F1234ABCD", + "fields": [ + { + "key": "title", + "column_id": "Col10000000", + "value": "{\"rich_text\": [ { \"type\": \"rich_text_section\", \"elements\": [ { \"type\": \"text\", \"text\": \"Project Alpha\" }]}]}", + "text": "Project Alpha", + "rich_text": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "Project Alpha" + } + ] + } + ] + }, + { + "key": "due_date", + "column_id": "Col10000001", + "value": "2024-03-20", + "date": [ + "2024-03-20" + ] + }, + { + "key": "Col80000005", + "column_id": "Col10000002", + "value": "Opt123", + "select": [ + "Opt123" + ] + }, + { + "key": "assignee", + "column_id": "Col10000003", + "value": "U1234567", + "user": [ + "U1234567" + ] + }, + { + "key": "completed", + "column_id": "Col10000004", + "value": true, + "checkbox": true + }, + { + "key": "contact", + "column_id": "Col10000005", + "value": "john.doe@example.com", + "email": [ + "john.doe@example.com" + ] + }, + { + "key": "phone_number", + "column_id": "Col10000006", + "value": "+1-555-123-4567", + "phone": [ + "+1-555-123-4567" + ] + }, + { + "key": "project_channel", + "column_id": "Col10000007", + "value": "C1234567|C2345678", + "channel": [ + "C1234567", + "C2345678" + ] + }, + { + "key": "satisfaction", + "column_id": "Col10000008", + "value": 4, + "rating": [ + 4 + ] + }, + { + "key": "last_updated", + "column_id": "Col10000009", + "value": 1710892800, + "timestamp": [ + 1710892800 + ] + }, + { + "key": "documentation", + "column_id": "Col10000010", + "value": "https://example.com/docs", + "link": [ + { + "url": "https://example.com/docs", + "text": "Project Documentation" + } + ] + }, + { + "key": "related_item", + "column_id": "Col10000011", + "value": "{\"file\":{\"file_id\":\"F1234ABCE\"}}", + "reference": [ + { + "file": { + "file_id": "F1234ABCE" + } + } + ] + } + ], + "saved": { + "is_archived": false, + "state": "in_progress", + "date_due": 1710892800, + "date_completed": 0 + }, + "saved_fields": { + "Col10000000": { + "is_archived": true, + "state": "archived", + "date_due": 1710892800, + "date_completed": 1710880000 + }, + "Col10000001": { + "is_archived": false, + "state": "in_progress", + "date_due": 1710895000, + "date_completed": 0 + } + } + } + ], + "next_cursor": "dGVhbTpDMDExMzIyMzQ1Njc4" + }, + "error": { + "url": "/api/slackLists.items.list?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_cursor" + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.items.update.json b/docs.slack.dev/methods/slackLists.items.update.json new file mode 100644 index 00000000..c4831e75 --- /dev/null +++ b/docs.slack.dev/methods/slackLists.items.update.json @@ -0,0 +1,132 @@ +{ + "desc": "Updates cells in a List.", + "http_method": "POST", + "scope": "lists:write", + "familyName": "lists", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "list_id", + "cells" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "list_id": { + "desc": "ID of the List to add or update cells.", + "example": "F03PSRPN4CE", + "type": "string", + "subtype": "list" + }, + "cells": { + "type": "array", + "desc": "Cells to update.", + "minItems": 1, + "maxItems": 100, + "example": "[{\"row_id\":\"Rec014K005UQJ\",\"column_id\":\"Col014K005UQJ\",\"user\":[\"U01284PCR98\", \"U0137181B5H\"]}]", + "items": { + "schema": "list_cell_with_new_rows" + } + } + } + }, + "output": null, + "errors": { + "list_not_found": { + "desc": "The List was not found." + }, + "row_not_found": { + "desc": "The row was not found." + }, + "column_not_found": { + "desc": "The column was not found." + }, + "file_not_found": { + "desc": "Invalid file ID for this List." + }, + "invalid_input_type": { + "desc": "Supplied value key or value type is invalid for the given column type." + }, + "invalid_row_id": { + "desc": "Invalid row ID for this List." + }, + "invalid_column_id": { + "desc": "Invalid column ID for this List." + }, + "permission_denied": { + "desc": "The user does not have permission to perform this action." + }, + "team_not_found": { + "desc": "The team cannot be found." + }, + "user_not_found": { + "desc": "The user cannot be found." + }, + "channel_not_found": { + "desc": "The channel cannot be found." + }, + "uneditable_column": { + "desc": "The column cannot be updated." + }, + "invalid_blocks": { + "desc": "Rich text payload supplied is invalid." + }, + "invalid_text_block": { + "desc": "Rich text payload supplied is invalid." + }, + "invalid_email": { + "desc": "Email supplied is invalid." + }, + "invalid_link": { + "desc": "Message archive link supplied is invalid." + }, + "invalid_date": { + "desc": "Date supplied is invalid." + }, + "invalid_option_id": { + "desc": "Option supplied is invalid." + }, + "row_id_not_provided": { + "desc": "The `row_id` or `row_id_to_create` field must be provided." + }, + "column_id_not_provided": { + "desc": "The `column_id` or `column_id_to_create` field must be provided." + }, + "over_cell_fields_limit": { + "desc": "The supplied cell fields are over the cell field maximum." + }, + "invalid_message": { + "desc": "Invalid message provided." + }, + "invalid_attachment": { + "desc": "Invalid attachment provided." + }, + "invalid_phone_number": { + "desc": "Invalid phone number provided." + }, + "invalid_vote_value": { + "desc": "Invalid vote value is supplied." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.items.update?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/slackLists.items.update?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_row_id" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/slackLists.update.json b/docs.slack.dev/methods/slackLists.update.json new file mode 100644 index 00000000..dba1df42 --- /dev/null +++ b/docs.slack.dev/methods/slackLists.update.json @@ -0,0 +1,90 @@ +{ + "desc": "Update a List.", + "http_method": "POST", + "scope": "lists:write", + "familyName": "lists", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "id": { + "desc": "The ID of the List to update.", + "subtype": "list", + "schema": "file_id" + }, + "name": { + "desc": "The updated name of the List.", + "example": "My List", + "type": "string" + }, + "description_blocks": { + "desc": "A rich text description of the List.", + "example": "[{\"type\":\"rich_text\",\"elements\":[{\"type\":\"rich_text_section\",\"elements\":[{\"type\":\"text\",\"text\":\"My list description!\"}]}]}]", + "type": "array", + "items": { + "schema": "rich_text" + } + }, + "todo_mode": { + "type": "boolean", + "desc": "Boolean indicating whether the List should be in todo mode.", + "example": "true" + } + } + }, + "output": null, + "errors": { + "list_not_found": { + "desc": "The List was not found." + }, + "team_not_found": { + "desc": "The team cannot be found." + }, + "user_not_found": { + "desc": "The user cannot be found." + }, + "list_edits_update_error": { + "desc": "Failed to update List metadata." + }, + "list_editor_upsert_error": { + "desc": "Failed to upsert List editor." + }, + "over_title_length_maximum": { + "desc": "Title can not exceed defined length." + }, + "file_channel_rename_error": { + "desc": "Failed to rename file channel based on file title." + }, + "unexpected_description_blocks_arg": { + "desc": "Unexpected description blocks argument." + }, + "missing_arguments": { + "desc": "No arguments were provided to update the List." + } + }, + "examples": { + "success": { + "url": "/api/slackLists.update?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/slackLists.update?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "list_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/stars.add.json b/docs.slack.dev/methods/stars.add.json new file mode 100644 index 00000000..5af77c24 --- /dev/null +++ b/docs.slack.dev/methods/stars.add.json @@ -0,0 +1,86 @@ +{ + "desc": "Save an item for later. Formerly known as adding a star.", + "http_method": "POST", + "scope": "stars:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`).", + "type": "string", + "subtype": "channel" + }, + "file": { + "desc": "File to add star to.", + "type": "string", + "subtype": "file" + }, + "file_comment": { + "desc": "File comment to add star to.", + "type": "string", + "subtype": "file_comment" + }, + "timestamp": { + "desc": "Timestamp of the message to add star to.", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": null, + "errors": { + "already_starred": { + "desc": "The specified item has already been starred by the authenticated user." + }, + "bad_timestamp": { + "desc": "Value passed for `timestamp` was invalid." + }, + "channel_not_found": { + "desc": "Channel, private group, or DM specified by `channel` does not exist" + }, + "external_channel_migrating": { + "desc": "Channel is undergoing active migration" + }, + "file_comment_not_found": { + "desc": "File comment specified by `file_comment` does not exist." + }, + "file_not_found": { + "desc": "File specified by `file` does not exist." + }, + "message_not_found": { + "desc": "Message specified by `channel` and `timestamp` does not exist." + }, + "no_item_specified": { + "desc": "`file`, `file_comment`, `channel` and `timestamp` was not specified." + } + }, + "examples": { + "success": { + "url": "/api/stars.add?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/stars.add?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/stars.list.json b/docs.slack.dev/methods/stars.list.json new file mode 100644 index 00000000..055362af --- /dev/null +++ b/docs.slack.dev/methods/stars.list.json @@ -0,0 +1,288 @@ +{ + "desc": "Listed a user's saved items, formerly known as stars.", + "http_method": "GET", + "scope": "stars:read", + "rate_limits": "t3", + "deprecated": true, + "slack_connect_workspaces_allowed": true, + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "count": { + "type": "integer", + "subtype": "paging", + "default": 100 + }, + "cursor": { + "type": "string", + "desc": "Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more details.", + "example": "dXNlcjpVMDYxTkZUVDI=" + }, + "limit": { + "type": "integer", + "default": 0, + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached.", + "example": "20" + }, + "page": { + "type": "integer", + "subtype": "paging", + "default": 1 + }, + "team_id": { + "desc": "encoded team id to list stars in, required if org token is used", + "type": "string", + "subtype": "team" + } + } + }, + "output": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "title": "starred_items", + "items": { + "title": "starred_item", + "anyOf": [ + { + "type": "object", + "title": "starred_message", + "required": [ + "type", + "channel", + "message", + "date_create" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "message" + ] + }, + "channel": { + "schema": "channel" + }, + "message": { + "schema": "message" + }, + "date_create": { + "type": "integer" + } + } + }, + { + "type": "object", + "title": "starred_file", + "required": [ + "type", + "file", + "date_create" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "file": { + "schema": "file" + }, + "date_create": { + "type": "integer" + } + } + }, + { + "type": "object", + "title": "starred_file_comment", + "required": [ + "type", + "file", + "comment", + "date_create" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_comment" + ] + }, + "file": { + "schema": "file" + }, + "comment": { + "schema": "comment" + }, + "date_create": { + "type": "integer" + } + } + }, + { + "type": "object", + "title": "starred_channel", + "required": [ + "type", + "channel", + "date_create" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "channel" + ] + }, + "channel": { + "schema": "channel" + }, + "date_create": { + "type": "integer" + } + } + }, + { + "type": "object", + "title": "starred_im", + "required": [ + "type", + "channel", + "date_create" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "im" + ] + }, + "channel": { + "schema": "dm_id" + }, + "date_create": { + "type": "integer" + } + } + }, + { + "type": "object", + "title": "starred_group", + "required": [ + "type", + "channel", + "date_create" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "group" + ] + }, + "channel": { + "schema": "group_id" + }, + "date_create": { + "type": "integer" + } + } + } + ] + } + }, + "paging": { + "schema": "paging" + }, + "response_metadata": { + "type": "object", + "title": "response_metadata", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "missing_argument": { + "desc": "A required argument is missing." + } + }, + "examples": { + "success": { + "url": "/api/stars.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "items": [ + { + "type": "message", + "channel": "C123ABC456", + "message": { + "type": "message", + "subtype": "bot_message", + "text": "", + "ts": "1655762568.324229", + "username": "username", + "icons": { + "emoji": ":test:" + }, + "bot_id": "BSLACKBOT", + "attachments": [ + { + "color": "ecb438", + "ts": 1655762568, + "id": 1, + "fallback": "some text", + "text": "some text", + "pretext": "*chat.postMessage*", + "mrkdwn_in": [ + "pretext", + "text" + ] + } + ], + "permalink": "https://your-workspace.slack.com/archives/C123ABC456/p123456789" + }, + "date_create": 1656014995 + } + ], + "paging": { + "per_page": 100, + "spill": 0, + "page": 1, + "total": 1, + "pages": 1 + } + } + }, + "error": { + "url": "/api/stars.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/stars.remove.json b/docs.slack.dev/methods/stars.remove.json new file mode 100644 index 00000000..3c51b854 --- /dev/null +++ b/docs.slack.dev/methods/stars.remove.json @@ -0,0 +1,83 @@ +{ + "desc": "Removes a saved item (star) from an item.", + "http_method": "POST", + "scope": "stars:write", + "json_input_supported": true, + "rate_limits": "t2", + "slack_connect_workspaces_allowed": true, + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channel": { + "desc": "Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`).", + "type": "string", + "subtype": "channel" + }, + "file": { + "desc": "File to remove star from.", + "type": "string", + "subtype": "file" + }, + "file_comment": { + "desc": "File comment to remove star from.", + "type": "string", + "subtype": "file_comment" + }, + "timestamp": { + "desc": "Timestamp of the message to remove star from.", + "type": "string", + "subtype": "timestamp" + } + } + }, + "output": null, + "errors": { + "bad_timestamp": { + "desc": "Value passed for `timestamp` was invalid." + }, + "channel_not_found": { + "desc": "Channel, private group, or DM specified by `channel` does not exist" + }, + "file_comment_not_found": { + "desc": "File comment specified by `file_comment` does not exist." + }, + "file_not_found": { + "desc": "File specified by `file` does not exist." + }, + "message_not_found": { + "desc": "Message specified by `channel` and `timestamp` does not exist." + }, + "no_item_specified": { + "desc": "`file`, `file_comment`, `channel` and `timestamp` was not specified." + }, + "not_starred": { + "desc": "The specified item is not currently starred by the authenticated user." + } + }, + "examples": { + "success": { + "url": "/api/stars.remove?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/stars.remove?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/team.accessLogs.json b/docs.slack.dev/methods/team.accessLogs.json new file mode 100644 index 00000000..9c2a6343 --- /dev/null +++ b/docs.slack.dev/methods/team.accessLogs.json @@ -0,0 +1,252 @@ +{ + "desc": "Gets the access logs for the current team.", + "http_method": "GET", + "scope": "admin", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "before": { + "default": "now", + "desc": "End of time range of logs to include in results (inclusive).", + "example": "1457989166", + "anyOf": [ + { + "enum": [ + "now" + ], + "type": "string" + }, + { + "coerce": true, + "type": "string" + } + ] + }, + "count": { + "default": "100", + "type": "string", + "subtype": "paging" + }, + "page": { + "default": "1", + "type": "string", + "subtype": "paging" + }, + "cursor": { + "desc": "Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more details.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "limit": { + "default": 0, + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. If specified, result is returned using a cursor-based approach instead of a classic one.", + "example": "20", + "type": "integer" + }, + "team_id": { + "desc": "encoded team id to get logs from, required if org token is used", + "type": "string", + "subtype": "team" + } + } + }, + "output": { + "required": [ + "logins" + ], + "type": "object", + "properties": { + "logins": { + "items": { + "required": [ + "username", + "count", + "user_id", + "ip", + "region", + "isp", + "user_agent", + "country", + "date_first", + "date_last" + ], + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "count": { + "type": "integer" + }, + "user_id": { + "schema": "user_id" + }, + "ip": { + "type": "string" + }, + "region": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "isp": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "user_agent": { + "type": "string" + }, + "country": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "date_first": { + "type": "integer" + }, + "date_last": { + "type": "integer" + } + } + }, + "type": "array" + }, + "paging": { + "required": [ + "count", + "total", + "page", + "pages" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "pages": { + "type": "integer" + } + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "missing_argument": { + "desc": "A required argument is missing." + }, + "missing_scope": { + "desc": "The provided token hasn't obtained the necessary scopes to use this method." + }, + "not_allowed_token_type": { + "desc": "Method was called with an invalid token type" + }, + "over_pagination_limit": { + "desc": "It is not possible to request more than 1000 items per page or more than 100 pages." + }, + "paid_only": { + "desc": "This is only available to paid teams." + }, + "token_revoked": { + "desc": "token revoked (generated)" + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "invalid_limit": { + "desc": "The value passed for `limit` was not valid." + } + }, + "examples": { + "success": { + "url": "/api/team.accessLogs?token=YOUR_TOKEN", + "description": "This response demonstrates pagination and two access log entries.", + "example": { + "ok": true, + "logins": [ + { + "user_id": "U45678", + "username": "alice", + "date_first": 1422922864, + "date_last": 1422922864, + "count": 1, + "ip": "127.0.0.1", + "user_agent": "SlackWeb Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.35 Safari/537.36", + "isp": "BigCo ISP", + "country": "US", + "region": "CA" + }, + { + "user_id": "U12345", + "username": "white_rabbit", + "date_first": 1422922493, + "date_last": 1422922493, + "count": 1, + "ip": "127.0.0.1", + "user_agent": "SlackWeb Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B466 Safari/600.1.4", + "isp": "BigCo ISP", + "country": "US", + "region": "CA" + } + ], + "paging": { + "count": 100, + "total": 2, + "page": 1, + "pages": 1 + } + } + }, + "error": { + "url": "/api/team.accessLogs?token=INVALID_TOKEN", + "description": "A workspace must be on a paid plan to use this method, otherwise the `paid_only` error is thrown:", + "example": { + "ok": false, + "error": "paid_only" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/team.billableInfo.json b/docs.slack.dev/methods/team.billableInfo.json new file mode 100644 index 00000000..d4bb9650 --- /dev/null +++ b/docs.slack.dev/methods/team.billableInfo.json @@ -0,0 +1,117 @@ +{ + "desc": "Gets billable users information for the current team.", + "http_method": "GET", + "scope": "admin", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "cursor": { + "desc": "Set `cursor` to `next_cursor` returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "limit": { + "desc": "The maximum number of items to return.", + "example": "20", + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + "user": { + "desc": "A user to retrieve the billable information for. Defaults to all users.", + "type": "string", + "subtype": "user" + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "encoded team id to get the billable information from, required if org token is used" + } + } + }, + "output": { + "type": "object", + "required": [ + "billable_info" + ], + "properties": { + "response_metadata": { + "required": [ + "next_cursor" + ], + "type": "object", + "properties": { + "next_cursor": { + "type": "string" + } + } + }, + "billable_info": { + "type": "object", + "patternProperties": { + "^[UW][A-Z0-9]{8,}$": { + "required": [ + "billing_active" + ], + "type": "object", + "properties": { + "billing_active": { + "type": "boolean" + } + } + } + } + } + } + }, + "errors": { + "fatal_error": { + "desc": "The server could not complete your operation(s) without encountering a catastrophic error." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "user_not_found": { + "desc": "Unable to find the requested user." + } + }, + "examples": { + "success": { + "url": "/api/team.billableInfo?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "billable_info": { + "U0632EWRW": { + "billing_active": false + }, + "U02UCPE1R": { + "billing_active": true + }, + "U02UEBSD2": { + "billing_active": true + } + } + } + }, + "error": { + "url": "/api/team.billableInfo?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/team.billing.info.json b/docs.slack.dev/methods/team.billing.info.json new file mode 100644 index 00000000..a7e5ebaf --- /dev/null +++ b/docs.slack.dev/methods/team.billing.info.json @@ -0,0 +1,57 @@ +{ + "desc": "Reads a workspace's billing plan information.", + "http_method": "POST", + "scope": "team.billing:read", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": { + "type": "object", + "required": [ + "plan" + ], + "properties": { + "plan": { + "type": "string" + } + } + }, + "errors": { + "invalid_auth": { + "desc": "Invalid token provided." + }, + "invalid_team": { + "desc": "Cannot find a team associated with the authed token." + } + }, + "examples": { + "success": { + "url": "/api/team.preferences.list", + "description": "Typical success response", + "example": { + "ok": true, + "plan": "free" + } + }, + "error": { + "url": "/api/team.profile.get?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_team" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/team.externalTeams.disconnect.json b/docs.slack.dev/methods/team.externalTeams.disconnect.json new file mode 100644 index 00000000..bd14c8ef --- /dev/null +++ b/docs.slack.dev/methods/team.externalTeams.disconnect.json @@ -0,0 +1,68 @@ +{ + "desc": "Disconnect an external organization.", + "http_method": "POST", + "scope": "conversations:write", + "scope_by_token_type": { + "granular_bot": "conversations.connect:manage" + }, + "rate_limits": "t1", + "args": { + "type": "object", + "required": [ + "token", + "target_team" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "target_team": { + "desc": "The team ID of the target team.", + "example": "T726G27TT", + "schema": "team_id" + } + } + }, + "output": { + "type": "object", + "required": [ + "job_enqueued" + ], + "properties": { + "job_enqueued": { + "type": "boolean" + } + } + }, + "errors": { + "missing_argument": { + "desc": "A required argument is missing." + }, + "restricted_action": { + "desc": "The actor is restricted from archiving or disconnecting." + }, + "invalid_target_team": { + "desc": "target team is invalid" + } + }, + "examples": { + "success": { + "url": "/api/team.externalTeams.disconnect?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/team.externalTeams.disconnect?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/team.externalTeams.list.json b/docs.slack.dev/methods/team.externalTeams.list.json new file mode 100644 index 00000000..c15192f8 --- /dev/null +++ b/docs.slack.dev/methods/team.externalTeams.list.json @@ -0,0 +1,338 @@ +{ + "desc": "Returns a list of all the external teams connected and details about the connection.", + "http_method": "GET", + "scope": "team:read", + "scope_by_token_type": { + "granular_bot": "conversations.connect:manage" + }, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "limit": { + "desc": "The maximum number of items to return per page", + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 20 + }, + "cursor": { + "desc": "Paginate through collections of data by setting parameter to the `team_id` attribute returned by a previous request's `response_metadata`. If not provided, the first page of the collection is returned. See [pagination](/apis/web-api/pagination#cursors) for more detail.", + "type": "string", + "example": "T123ABC456" + }, + "sort_field": { + "desc": "Name of the parameter that we are sorting by", + "type": "string", + "enum": [ + "team_name", + "last_active_timestamp", + "connection_status" + ], + "default": "team_name" + }, + "sort_direction": { + "desc": "Direction to sort in asc or desc", + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + }, + "slack_connect_pref_filter": { + "desc": "Filters connected orgs by Slack Connect pref override(s). Value can be: `approved_orgs_only` `allow_sc_file_uploads` `profile_visibility` `away_team_sc_invite_permissions` `accept_sc_invites` `sc_mpdm_to_private` `require_sc_channel_for_sc_dm` `external_awareness_context_bar`", + "type": "array", + "items": { + "type": "string", + "enum": [ + "approved_orgs_only", + "allow_sc_file_uploads", + "profile_visibility", + "away_team_sc_invite_permissions", + "accept_sc_invites", + "sc_mpdm_to_private", + "require_sc_channel_for_sc_dm", + "external_awareness_context_bar", + "interact_with_externally_owned_workflows", + "external_teams_interact_with_locally_owned_workflows" + ] + } + }, + "workspace_filter": { + "desc": "Shows connected orgs which are connected on a specified encoded workspace ID", + "type": "array", + "items": { + "example": "T013LQM9GM9", + "schema": "workspace_id" + } + }, + "connection_status_filter": { + "type": "string", + "desc": "Status of the connected team.", + "enum": [ + "CONNECTED", + "DISCONNECTED", + "BLOCKED", + "IN_REVIEW" + ] + } + } + }, + "output": { + "type": "object", + "required": [ + "organizations", + "total_count" + ], + "properties": { + "organizations": { + "type": "array", + "items": { + "required": [ + "team_id", + "team_name", + "team_domain", + "public_channel_count", + "private_channel_count", + "im_channel_count", + "mpim_channel_count", + "connected_workspaces", + "slack_connect_prefs", + "connection_status", + "last_active_timestamp", + "is_sponsored" + ], + "type": "object", + "properties": { + "team_id": { + "schema": "workspace_id" + }, + "team_name": { + "type": "string", + "desc": "Name of the team that is connected" + }, + "team_domain": { + "type": "string", + "desc": "Domain of the team that is connected" + }, + "public_channel_count": { + "type": "integer", + "desc": "The number of public channels connected on this team" + }, + "private_channel_count": { + "type": "integer", + "desc": "The number of private channels connected on this team" + }, + "im_channel_count": { + "type": "integer", + "desc": "The number of direct messages connected on this team" + }, + "mpim_channel_count": { + "type": "integer", + "desc": "The number of multi person direct messages connected on this team" + }, + "connected_workspaces": { + "type": "array", + "items": { + "required": [ + "workspace_name", + "workspace_id" + ], + "type": "object", + "properties": { + "workspace_id": { + "schema": "workspace_id" + }, + "workspace_name": { + "type": "string", + "desc": "Name of the workspace." + } + } + } + }, + "slack_connect_prefs": { + "schema": "pref-details" + }, + "connection_status": { + "type": "string", + "desc": "Status of the connected team. (CONNECTED / DISCONNECTED / BLOCKED / IN_REVIEW / DISCONNECTiNG)", + "enum": [ + "CONNECTED", + "DISCONNECTED", + "BLOCKED", + "IN_REVIEW", + "DISCONNECTING" + ] + }, + "last_active_timestamp": { + "type": "integer", + "desc": "timestamp of the last time a connected team was active in SC channel" + }, + "is_sponsored": { + "type": "boolean", + "desc": "True when team is on a free plan. False otherwise." + }, + "canvas": { + "type": "object", + "required": [ + "total_count", + "ownership_details" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "ownership_details": { + "type": "array", + "items": { + "required": [ + "team_id", + "count" + ], + "type": "object", + "properties": { + "team_id": { + "type": "string" + }, + "count": { + "type": "integer" + } + } + } + } + } + }, + "lists": { + "type": "object", + "required": [ + "total_count", + "ownership_details" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "ownership_details": { + "type": "array", + "items": { + "required": [ + "team_id", + "count" + ], + "type": "object", + "properties": { + "team_id": { + "type": "string" + }, + "count": { + "type": "integer" + } + } + } + } + } + } + } + } + }, + "total_count": { + "type": "integer" + }, + "response_metadata": { + "schema": "response_metadata_new" + } + } + }, + "errors": { + "invalid_arguments": { + "desc": "One or more of the API arguments are invalid." + }, + "not_allowed": { + "desc": "The user is not allowed to perform the action." + }, + "restricted_action": { + "desc": "The user does not have permission to perform the action." + }, + "internal_error": { + "desc": "There was an internal error processing this request." + }, + "invalid_workspace_filter": { + "desc": "The specified workspace is not valid." + }, + "user_cannot_manage_workspace": { + "desc": "The calling user cannot manage the workspace passed in the workspace filter." + } + }, + "examples": { + "success": { + "url": "/api/mpim.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "organizations": [ + { + "team_id": "T123ABC456", + "team_name": "Sandra Inc.", + "team_domain": "sandra", + "public_channel_count": 1, + "private_channel_count": 1, + "im_channel_count": 1, + "mpim_channel_count": 1, + "connected_workspaces": { + "workspace_id": "Jesse Inc", + "workspace_name": "E123ABC456" + }, + "slack_connect_prefs": {}, + "connection_status": "CONNECTED", + "last_active_timestamp": 1718656058, + "is_sponsored": false, + "canvas": { + "total_count": 1, + "ownership_details": [ + { + "team_id": "T123ABC456" + }, + { + "count": 1 + } + ] + }, + "lists": { + "total_count": 1, + "ownership_details": [ + { + "team_id": "T123ABC456" + }, + { + "count": 1 + } + ] + } + } + ], + "total_count": 1, + "response_metadata": { + "next_cursor": "T123ABC999" + } + } + }, + "error": { + "url": "/api/mpim.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/team.info.json b/docs.slack.dev/methods/team.info.json new file mode 100644 index 00000000..6f55af18 --- /dev/null +++ b/docs.slack.dev/methods/team.info.json @@ -0,0 +1,131 @@ +{ + "desc": "Gets information about the current team.", + "http_method": "GET", + "scope": "team:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "domain": { + "desc": "Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself. This is the value set up for the 'Joining This Workspace' workspace setting. If it contains more than one domain, the field will contain multiple comma-separated domain values. If no domain is set, the field is empty.", + "type": "string" + }, + "team": { + "desc": "Team to get info about; if omitted, will return information about the current team.", + "type": "string", + "subtype": "team" + } + } + }, + "output": { + "disableShapeUnification": true, + "anyOf": [ + { + "required": [ + "team" + ], + "type": "object", + "properties": { + "team": { + "anyOf": [ + { + "schema": "team-summary" + }, + { + "schema": "team" + } + ] + } + } + }, + { + "required": [ + "teams" + ], + "type": "object", + "properties": { + "teams": { + "items": { + "anyOf": [ + { + "schema": "team-summary" + }, + { + "schema": "team" + } + ] + }, + "type": "array" + } + } + } + ] + }, + "errors": { + "enterprise_not_found": { + "desc": "The `enterprise` was not found." + }, + "fail_to_get_teams_for_restricted_user": { + "desc": "Failed to get teams for restricted user." + }, + "missing_user": { + "desc": "The `user` was not found." + }, + "org_not_found": { + "desc": "The `org` was not found." + }, + "team_not_found": { + "desc": "The `team` was not found." + }, + "team_not_on_enterprise": { + "desc": "Cannot query team by domain because team is not on an enterprise." + }, + "user_not_found": { + "desc": "The `user` was not found." + } + }, + "examples": { + "success": { + "url": "/api/team.info?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "team": { + "id": "T12345", + "name": "My Team", + "domain": "example", + "email_domain": "example.com", + "icon": { + "image_34": "https://...", + "image_44": "https://...", + "image_68": "https://...", + "image_88": "https://...", + "image_102": "https://...", + "image_132": "https://...", + "image_default": true + }, + "enterprise_id": "E1234A12AB", + "enterprise_name": "Umbrella Corporation" + } + } + }, + "error": { + "url": "/api/team.info?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/team.integrationLogs.json b/docs.slack.dev/methods/team.integrationLogs.json new file mode 100644 index 00000000..9cec137b --- /dev/null +++ b/docs.slack.dev/methods/team.integrationLogs.json @@ -0,0 +1,109 @@ +{ + "desc": "Gets the integration logs for the current team.", + "http_method": "GET", + "scope": "admin", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "app_id": { + "desc": "Filter logs to this Slack app. Defaults to all logs.", + "type": "string" + }, + "change_type": { + "desc": "Filter logs with this change type. Possible values are `added`, `removed`, `enabled`, `disabled`, and `updated`. Defaults to all logs.", + "example": "added", + "type": "string", + "enum": [ + "added", + "removed", + "enabled", + "disabled", + "updated" + ] + }, + "count": { + "default": "100", + "type": "string", + "subtype": "paging" + }, + "page": { + "default": "1", + "type": "string", + "subtype": "paging" + }, + "service_id": { + "desc": "Filter logs to this service. Defaults to all logs.", + "type": "string" + }, + "team_id": { + "desc": "encoded team id to get logs from, required if org token is used", + "type": "string", + "subtype": "team" + }, + "user": { + "desc": "Filter logs generated by this user’s actions. Defaults to all logs.", + "type": "string", + "subtype": "user" + } + } + }, + "output": { + "required": [ + "logs", + "paging" + ], + "type": "object", + "properties": { + "paging": { + "schema": "paging" + }, + "logs": { + "type": "array", + "items": { + "type": "object", + "patternProperties": { + "^.*": { + "type": "string" + } + } + } + } + } + }, + "errors": { + "internal_error": { + "desc": "Internal Error" + }, + "missing_argument": { + "desc": "A required argument is missing." + } + }, + "examples": { + "success": { + "url": "/api/team.integrationLogs?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/team.integrationLogs?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/team.preferences.list.json b/docs.slack.dev/methods/team.preferences.list.json new file mode 100644 index 00000000..39c15da7 --- /dev/null +++ b/docs.slack.dev/methods/team.preferences.list.json @@ -0,0 +1,72 @@ +{ + "desc": "Retrieve a list of a workspace's team preferences.", + "http_method": "POST", + "scope": "team.preferences:read", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": { + "type": "object", + "required": [ + "display_real_names", + "disable_file_uploads", + "msg_edit_window_mins", + "who_can_post_general" + ], + "properties": { + "display_real_names": { + "type": "boolean" + }, + "disable_file_uploads": { + "type": "string" + }, + "msg_edit_window_mins": { + "type": "integer" + }, + "who_can_post_general": { + "type": "string" + } + } + }, + "errors": { + "invalid_auth": { + "desc": "Invalid token provided." + }, + "invalid_team": { + "desc": "Cannot find a workspace associated with the presented token." + } + }, + "examples": { + "success": { + "url": "/api/team.preferences.list", + "description": "Typical success response", + "example": { + "ok": true, + "display_real_names": false, + "disable_file_uploads": "disable_all", + "msg_edit_window_mins": 25, + "who_can_post_general": "everyone" + } + }, + "error": { + "url": "/api/team.profile.get?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/team.profile.get.json b/docs.slack.dev/methods/team.profile.get.json new file mode 100644 index 00000000..3773c098 --- /dev/null +++ b/docs.slack.dev/methods/team.profile.get.json @@ -0,0 +1,143 @@ +{ + "desc": "Retrieve a team's profile.", + "http_method": "GET", + "scope": "users.profile:read", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "visibility": { + "desc": "Filter by visibility.", + "example": "all", + "type": "string", + "enum": [ + "all", + "visible", + "hidden" + ] + } + } + }, + "output": { + "required": [ + "profile" + ], + "type": "object", + "properties": { + "profile": { + "type": "object", + "properties": { + "fields": { + "minItems": 0, + "type": "array", + "items": { + "schema": "team_profile_field" + } + }, + "sections": { + "minItems": 0, + "type": "array", + "items": { + "schema": "section_metadata" + } + } + } + } + } + }, + "examples": { + "success": { + "url": "/api/team.profile.get?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "profile": { + "fields": [ + { + "id": "111111ABC", + "ordering": 0, + "label": "Phone extension", + "hint": "Enter the extension to reach your desk", + "type": "text", + "possible_values": null, + "options": { + "is_scim": true, + "is_protected": true + }, + "is_hidden": false, + "section_id": "123ABC" + }, + { + "id": "222222ABC", + "ordering": 1, + "label": "Date of birth", + "hint": "When you were born", + "type": "date", + "possible_values": null, + "options": { + "is_scim": true, + "is_protected": true + }, + "is_hidden": true, + "section_id": "123ABC" + }, + { + "id": "333333ABC", + "ordering": 2, + "label": "House", + "hint": "Put on the sorting hat", + "type": "options_list", + "possible_values": [ + "Gryffindor", + "Hufflepuff", + "Ravenclaw", + "Slytherin" + ], + "options": { + "is_scim": false, + "is_protected": false + }, + "is_hidden": false, + "section_id": "456DEF" + } + ], + "sections": [ + { + "id": "123ABC", + "team_id": "T123456", + "section_type": "contact", + "label": "Contact Information", + "order": 1, + "is_hidden": true + }, + { + "id": "456DEF", + "team_id": "T123456", + "section_type": "custom", + "label": "About Me", + "order": 2, + "is_hidden": true + } + ] + } + } + }, + "error": { + "url": "/api/team.profile.get?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/tooling.tokens.rotate.json b/docs.slack.dev/methods/tooling.tokens.rotate.json new file mode 100644 index 00000000..0444ad6e --- /dev/null +++ b/docs.slack.dev/methods/tooling.tokens.rotate.json @@ -0,0 +1,93 @@ +{ + "desc": "Exchanges a refresh token for a new app configuration token.", + "http_method": "POST", + "scope": "none", + "rate_limits": "t5", + "args": { + "type": "object", + "required": [ + "refresh_token" + ], + "properties": { + "refresh_token": { + "desc": "The `xoxe` refresh token that was issued along with the old app configuration token.", + "example": "xoxe-1-abcdefg", + "type": "string" + } + } + }, + "output": { + "desc": "Credentials information", + "type": "object", + "required": [ + "token", + "refresh_token", + "team_id", + "user_id", + "exp", + "iat" + ], + "properties": { + "token": { + "type": "string", + "desc": "The app configuration token used to access App Manifest APIs" + }, + "refresh_token": { + "type": "string", + "desc": "Refresh token for this credential" + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "ID of the team associated with the access token." + }, + "user_id": { + "type": "string", + "subtype": "user", + "desc": "The ID of the user associated with the token." + }, + "exp": { + "type": "integer", + "desc": "Expiration time (exp) identifies the expiration time on or after which the token must not be accepted for processing." + }, + "iat": { + "type": "integer", + "desc": "Issued at (iat) identifies the time at which the token was issued." + } + } + }, + "errors": { + "internal_error": { + "desc": "Internal error" + }, + "invalid_refresh_token": { + "desc": "The given refresh token is invalid." + }, + "unknown_error": { + "desc": "Temporary error for dev only restriction" + } + }, + "examples": { + "success": { + "url": "/api/tooling.tokens.rotate", + "description": "Typical success response", + "example": { + "ok": true, + "token": "xoxe.xoxp-...", + "refresh_token": "xoxe-...", + "team_id": "...", + "user_id": "...", + "iat": 1633095660, + "exp": 1633138860 + } + }, + "error": { + "url": "/api/tooling.tokens.rotate", + "description": "Typical error response if incorrect refresh token used", + "example": { + "ok": false, + "error": "invalid_refresh_token" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/usergroups.create.json b/docs.slack.dev/methods/usergroups.create.json new file mode 100644 index 00000000..33134252 --- /dev/null +++ b/docs.slack.dev/methods/usergroups.create.json @@ -0,0 +1,150 @@ +{ + "desc": "Create a User Group.", + "http_method": "POST", + "scope": "usergroups:write", + "slack_connect_workspaces_allowed": true, + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "name" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channels": { + "desc": "A comma separated string of encoded channel IDs for which the User Group uses as a default.", + "type": "array", + "items": { + "anyOf": [ + { + "schema": "channel" + }, + { + "type": "string", + "maxLength": 0 + } + ] + } + }, + "additional_channels": { + "desc": "A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.", + "type": "array", + "items": { + "schema": "channel" + } + }, + "description": { + "desc": "A short description of the User Group.", + "type": "string" + }, + "handle": { + "desc": "A mention handle. Must be unique among channels, users and User Groups.", + "type": "string", + "subtype": "user_group_name" + }, + "include_count": { + "desc": "Include the number of users in each User Group.", + "example": "true", + "type": "boolean" + }, + "name": { + "desc": "A name for the User Group. Must be unique among User Groups.", + "example": "My Test Team", + "type": "string" + }, + "team_id": { + "desc": "Encoded team id where the user group has to be created, required if org token is used.", + "type": "string", + "subtype": "team", + "schema": "workspace_id" + }, + "enable_section": { + "desc": "Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.", + "example": "true", + "type": "boolean" + } + } + }, + "output": { + "required": [ + "usergroup" + ], + "type": "object", + "properties": { + "usergroup": { + "schema": "subteam" + } + } + }, + "errors": { + "bad_handle": { + "desc": "Handle is invalid" + }, + "description_too_long": { + "desc": "Given usergroup description is too long" + }, + "forbidden_handle": { + "desc": "Handle is invalid" + }, + "handle_already_exists": { + "desc": "Handle is already in use on this workspace" + }, + "invalid_channel_provided": { + "desc": "An invalid channel ID was provided" + }, + "invalid_group_provided": { + "desc": "An invalid group ID was provided" + }, + "missing_argument": { + "desc": "A required argument is missing." + }, + "missing_subteam_name": { + "desc": "Subteam name is required" + }, + "name_already_exists": { + "desc": "Name is already in use on this workspace" + }, + "name_too_long": { + "desc": "Name too long." + }, + "paid_teams_only": { + "desc": "Usergroups can only be used on paid Slack teams" + }, + "permission_denied": { + "desc": "The user does not have permission to create a User Group." + }, + "plan_upgrade_required": { + "desc": "This workspace does not have access to User Groups, as that feature is only available on Standard and above plans." + }, + "target_team_not_on_org": { + "desc": "Target team specified is not on the org in context" + }, + "target_team_must_be_specified_in_org_context": { + "desc": "No target team was specified but the team in context is an org" + } + }, + "examples": { + "success": { + "url": "/api/usergroups.create?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/usergroups.create?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/usergroups.disable.json b/docs.slack.dev/methods/usergroups.disable.json new file mode 100644 index 00000000..79f898fa --- /dev/null +++ b/docs.slack.dev/methods/usergroups.disable.json @@ -0,0 +1,82 @@ +{ + "desc": "Disable an existing User Group.", + "http_method": "POST", + "scope": "usergroups:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "usergroup" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "include_count": { + "desc": "Include the number of users in the User Group.", + "example": "true", + "type": "boolean" + }, + "team_id": { + "desc": "Encoded target team id where the user group is, required if org token is used.", + "subtype": "team", + "schema": "workspace_id" + }, + "usergroup": { + "desc": "The encoded ID of the User Group to disable.", + "example": "S0604QSJC", + "schema": "subteam_id" + } + } + }, + "output": { + "required": [ + "usergroup" + ], + "type": "object", + "properties": { + "usergroup": { + "schema": "subteam" + } + } + }, + "errors": { + "missing_argument": { + "desc": "A required argument is missing." + }, + "permission_denied": { + "desc": "The user does not have permission to disable the User Group." + }, + "plan_upgrade_required": { + "desc": "This workspace does not have access to User Groups, as that feature is only available on Standard and above plans." + }, + "target_team_not_on_org": { + "desc": "Target team specified is not on the org in context" + }, + "target_team_must_be_specified_in_org_context": { + "desc": "No target team was specified but the team in context is an org" + } + }, + "examples": { + "success": { + "url": "/api/usergroups.disable?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/usergroups.disable?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/usergroups.enable.json b/docs.slack.dev/methods/usergroups.enable.json new file mode 100644 index 00000000..5ebfb2e7 --- /dev/null +++ b/docs.slack.dev/methods/usergroups.enable.json @@ -0,0 +1,78 @@ +{ + "desc": "Enable a User Group.", + "http_method": "POST", + "scope": "usergroups:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "usergroup" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "include_count": { + "desc": "Include the number of users in the User Group.", + "example": "true", + "type": "boolean" + }, + "team_id": { + "desc": "Encoded team id where the user group is, required if org token is used.", + "type": "string", + "subtype": "team" + }, + "usergroup": { + "desc": "The encoded ID of the User Group to enable.", + "example": "S0604QSJC", + "type": "string", + "subtype": "user_group" + } + } + }, + "output": { + "required": [ + "usergroup" + ], + "type": "object", + "properties": { + "usergroup": { + "schema": "subteam" + } + } + }, + "errors": { + "missing_argument": { + "desc": "A required argument is missing." + }, + "permission_denied": { + "desc": "The user does not have permission to enables the User Group." + }, + "plan_upgrade_required": { + "desc": "This workspace does not have access to User Groups, as that feature is only available on Standard and above plans." + } + }, + "examples": { + "success": { + "url": "/api/usergroups.enable?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/usergroups.enable?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/usergroups.list.json b/docs.slack.dev/methods/usergroups.list.json new file mode 100644 index 00000000..7b7532e8 --- /dev/null +++ b/docs.slack.dev/methods/usergroups.list.json @@ -0,0 +1,154 @@ +{ + "desc": "List all User Groups for a team.", + "http_method": "GET", + "scope": "usergroups:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "include_count": { + "desc": "Include the number of users in each User Group.", + "example": "true", + "type": "boolean" + }, + "include_disabled": { + "desc": "Include results for disabled User Groups.", + "example": "true", + "type": "boolean" + }, + "include_users": { + "desc": "Include the list of users for each User Group.", + "example": "true", + "type": "boolean" + }, + "team_id": { + "desc": "The user group's encoded team ID. Required if org token is used.", + "subtype": "team", + "anyOf": [ + { + "type": "string", + "maxLength": 0 + } + ] + } + } + }, + "output": { + "required": [ + "usergroups" + ], + "type": "object", + "properties": { + "usergroups": { + "type": "array" + } + } + }, + "errors": { + "missing_argument": { + "desc": "A required argument is missing." + }, + "plan_upgrade_required": { + "desc": "This workspace does not have access to User Groups, as that feature is only available on Standard and above plans." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "users_not_found": { + "desc": "Cannot find users on subteam." + }, + "invalid_team": { + "desc": "Cannot find subteam team." + } + }, + "examples": { + "success": { + "url": "/api/usergroups.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "usergroups": [ + { + "id": "S0614TZR7", + "team_id": "T060RNRCH", + "is_usergroup": true, + "name": "Team Admins", + "description": "A group of all Administrators on your team.", + "handle": "admins", + "is_external": false, + "date_create": 1446598059, + "date_update": 1446670362, + "date_delete": 0, + "auto_type": "admin", + "created_by": "USLACKBOT", + "updated_by": "U060RNRCZ", + "deleted_by": null, + "prefs": { + "channels": [], + "groups": [] + }, + "user_count": "2" + }, + { + "id": "S06158AV7", + "team_id": "T060RNRCH", + "is_usergroup": true, + "name": "Team Owners", + "description": "A group of all Owners on your team.", + "handle": "owners", + "is_external": false, + "date_create": 1446678371, + "date_update": 1446678371, + "date_delete": 0, + "auto_type": "owner", + "created_by": "USLACKBOT", + "updated_by": "USLACKBOT", + "deleted_by": null, + "prefs": { + "channels": [], + "groups": [] + }, + "user_count": "1" + }, + { + "id": "S0615G0KT", + "team_id": "T060RNRCH", + "is_usergroup": true, + "name": "Marketing Team", + "description": "Marketing gurus, PR experts and product advocates.", + "handle": "marketing-team", + "is_external": false, + "date_create": 1446746793, + "date_update": 1446747767, + "date_delete": 1446748865, + "auto_type": null, + "created_by": "U060RNRCZ", + "updated_by": "U060RNRCZ", + "deleted_by": null, + "prefs": { + "channels": [], + "groups": [] + }, + "user_count": "0" + } + ] + } + }, + "error": { + "url": "/api/usergroups.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/usergroups.update.json b/docs.slack.dev/methods/usergroups.update.json new file mode 100644 index 00000000..eae3a04c --- /dev/null +++ b/docs.slack.dev/methods/usergroups.update.json @@ -0,0 +1,146 @@ +{ + "desc": "Update an existing User Group.", + "http_method": "POST", + "scope": "usergroups:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "usergroup" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "channels": { + "desc": "A comma separated string of encoded channel IDs for which the User Group uses as a default.", + "type": "array", + "items": { + "anyOf": [ + { + "schema": "channel" + }, + { + "type": "string", + "maxLength": 0 + } + ] + } + }, + "additional_channels": { + "desc": "A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.", + "type": "array", + "items": { + "schema": "channel" + } + }, + "description": { + "desc": "A short description of the User Group.", + "type": "string" + }, + "handle": { + "desc": "A mention handle. Must be unique among channels, users and User Groups.", + "type": "string", + "subtype": "user_group_name" + }, + "include_count": { + "desc": "Include the number of users in the User Group.", + "example": "true", + "type": "boolean" + }, + "name": { + "desc": "A name for the User Group. Must be unique among User Groups.", + "example": "My Test Team", + "type": "string" + }, + "team_id": { + "desc": "encoded team id where the user group exists, required if org token is used", + "subtype": "team", + "schema": "workspace_id" + }, + "usergroup": { + "desc": "The encoded ID of the User Group to update.", + "example": "S0604QSJC", + "schema": "subteam_id" + }, + "enable_section": { + "desc": "Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.", + "example": "true", + "type": "boolean" + } + } + }, + "output": { + "required": [ + "usergroup" + ], + "type": "object", + "properties": { + "usergroup": { + "schema": "subteam" + } + } + }, + "errors": { + "missing_argument": { + "desc": "A required argument is missing." + }, + "paid_teams_only": { + "desc": "This workspace does not have access to User Groups, as that feature is only available on Standard and above plans." + }, + "permission_denied": { + "desc": "The user does not have permission to update the User Group." + }, + "too_many_linked_channels": { + "desc": "This request exceeds the number of channels we supporting linking to a single usergroup." + } + }, + "examples": { + "success": { + "url": "/api/usergroups.update?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "usergroup": { + "id": "S0616NG6M", + "team_id": "T060R4BHN", + "is_usergroup": true, + "name": "Marketing Team", + "description": "Marketing gurus, PR experts and product advocates.", + "handle": "marketing-team", + "is_external": false, + "date_create": 1447096577, + "date_update": 1447102109, + "date_delete": 0, + "auto_type": null, + "created_by": "U060R4BJ4", + "updated_by": "U060R4BJ4", + "deleted_by": null, + "prefs": { + "channels": [], + "groups": [] + }, + "users": [ + "U060R4BJ4", + "U060RNRCZ" + ], + "user_count": 1 + } + } + }, + "error": { + "url": "/api/usergroups.update?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/usergroups.users.list.json b/docs.slack.dev/methods/usergroups.users.list.json new file mode 100644 index 00000000..c44fd0d2 --- /dev/null +++ b/docs.slack.dev/methods/usergroups.users.list.json @@ -0,0 +1,79 @@ +{ + "desc": "List all users in a User Group.", + "http_method": "GET", + "scope": "usergroups:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "usergroup" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "include_disabled": { + "desc": "Include results for disabled User Groups.", + "example": "true", + "type": "boolean" + }, + "usergroup": { + "desc": "The encoded ID of the User Group.", + "example": "S0604QSJC", + "type": "string", + "subtype": "user_group" + }, + "team_id": { + "type": "string", + "subtype": "team", + "desc": "The user group's encoded team ID. Required if org token is used." + } + } + }, + "output": { + "required": [ + "users" + ], + "type": "object", + "properties": { + "users": { + "type": "array" + } + } + }, + "errors": { + "no_such_subteam": { + "desc": "No usergroup found with the given ID." + }, + "plan_upgrade_required": { + "desc": "This workspace does not have access to User Groups, as that feature is only available on Standard and above plans." + }, + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + } + }, + "examples": { + "success": { + "description": "Standard success response when used with a user token", + "url": "/api/auth.test?token=YOUR_TOKEN", + "example": { + "ok": true, + "users": [ + "U060R4BJ4", + "W123A4BC5" + ] + } + }, + "error": { + "description": "Standard failure response when used with an invalid token", + "url": "/api/auth.test?token=INVALID_TOKEN", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/usergroups.users.update.json b/docs.slack.dev/methods/usergroups.users.update.json new file mode 100644 index 00000000..61ceb59c --- /dev/null +++ b/docs.slack.dev/methods/usergroups.users.update.json @@ -0,0 +1,137 @@ +{ + "desc": "Update the list of users for a user group.", + "http_method": "POST", + "scope": "usergroups:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "usergroup", + "users" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "include_count": { + "desc": "Include the number of users in the user group.", + "example": "true", + "type": "boolean" + }, + "team_id": { + "desc": "encoded team id where the user group exists, required if org token is used", + "type": "string", + "subtype": "team", + "schema": "workspace_id" + }, + "usergroup": { + "desc": "The encoded ID of the user group to update.", + "example": "S0604QSJC", + "type": "string", + "subtype": "user_group", + "schema": "subteam_id" + }, + "users": { + "desc": "A comma separated string of encoded user IDs that represent the entire list of users for the user group.", + "example": "U060R4BJ4,U060RNRCZ", + "type": "array", + "items": { + "schema": "user_id" + } + }, + "additional_channels": { + "desc": "A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.", + "type": "array", + "items": { + "schema": "channel" + } + }, + "is_shared": { + "desc": "Boolean to identify if the API is getting called when a shared section is getting shared", + "type": "boolean" + } + } + }, + "output": { + "required": [ + "usergroup" + ], + "type": "object", + "properties": { + "usergroup": { + "schema": "subteam" + } + } + }, + "errors": { + "invalid_users": { + "desc": "Value passed for `users` was empty or invalid." + }, + "failed_for_some_users": { + "desc": "User(s) are not in the workspace where this usergroup exists" + }, + "missing_argument": { + "desc": "A required argument is missing." + }, + "no_users_provided": { + "desc": "Either the `users` field wasn't provided or an empty value was passed." + }, + "permission_denied": { + "desc": "The user does not have permission to update the list of users for a user group. Check workspace settings to confirm whether the calling user has permission." + }, + "plan_upgrade_required": { + "desc": "This workspace does not have access to user groups, as that feature is only available on Standard and above plans." + }, + "subteam_max_users_exceeded": { + "desc": "Exceeds maximum supported number of users per subteam." + } + }, + "examples": { + "success": { + "url": "/api/usergroups.users.update?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "usergroup": { + "id": "S0616NG6M", + "team_id": "T060R4BHN", + "is_usergroup": true, + "name": "Marketing Team", + "description": "Marketing gurus, PR experts and product advocates.", + "handle": "marketing-team", + "is_external": false, + "date_create": 1447096577, + "date_update": 1447102109, + "date_delete": 0, + "auto_type": null, + "created_by": "U060R4BJ4", + "updated_by": "U060R4BJ4", + "deleted_by": null, + "prefs": { + "channels": [], + "groups": [] + }, + "users": [ + "U060R4BJ4", + "U060RNRCZ" + ], + "user_count": 1 + } + } + }, + "error": { + "url": "/api/usergroups.users.update?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.conversations.json b/docs.slack.dev/methods/users.conversations.json new file mode 100644 index 00000000..6bcb932d --- /dev/null +++ b/docs.slack.dev/methods/users.conversations.json @@ -0,0 +1,244 @@ +{ + "desc": "List conversations the calling user may access.", + "http_method": "GET", + "scope": "conversations:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "exclude_archived": { + "default": "false", + "desc": "Set to `true` to exclude archived channels from the list", + "example": "true", + "type": "boolean" + }, + "limit": { + "default": 100, + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer with a max value of 999.", + "example": "20", + "type": "number" + }, + "team_id": { + "desc": "encoded team id to list conversations in, required if org token is used", + "type": "string", + "subtype": "team" + }, + "types": { + "default": "public_channel", + "desc": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", + "example": "im,mpim", + "type": "string" + }, + "user": { + "desc": "Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership.", + "example": "W0B2345D", + "type": "string", + "subtype": "user" + } + } + }, + "output": { + "type": "object", + "required": [ + "channels" + ], + "properties": { + "channels": { + "type": "array", + "items": { + "schema": "conversation" + } + }, + "response_metadata": { + "type": "object", + "required": [ + "next_cursor" + ], + "properties": { + "next_cursor": { + "type": "string" + } + } + } + } + }, + "errors": { + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "invalid_limit": { + "desc": "Value passed for `limit` is not understood." + }, + "invalid_types": { + "desc": "Value passed for `type` could not be used based on the method's capabilities or the permission scopes granted to the used token." + }, + "method_not_supported_for_channel_type": { + "desc": "This type of conversation cannot be used with this method." + }, + "missing_argument": { + "desc": "A required argument is missing." + }, + "missing_scope": { + "desc": "The calling token is not granted the necessary scopes to complete this operation." + } + }, + "examples": { + "success": { + "description": "Typical success response with only public channels. Note how `num_members` and `is_member` are not returned like typical `conversations` objects.", + "example": { + "ok": true, + "channels": [ + { + "id": "C012AB3CD", + "name": "general", + "is_channel": true, + "is_group": false, + "is_im": false, + "created": 1449252889, + "creator": "U012A3CDE", + "is_archived": false, + "is_general": true, + "unlinked": 0, + "name_normalized": "general", + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_private": false, + "is_mpim": false, + "topic": { + "value": "Company-wide announcements and work-based matters", + "creator": "", + "last_set": 0 + }, + "purpose": { + "value": "This channel is for team-wide communication and announcements. All team members are in this channel.", + "creator": "", + "last_set": 0 + }, + "previous_names": [] + }, + { + "id": "C061EG9T2", + "name": "random", + "is_channel": true, + "is_group": false, + "is_im": false, + "created": 1449252889, + "creator": "U061F7AUR", + "is_archived": false, + "is_general": false, + "unlinked": 0, + "name_normalized": "random", + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_private": false, + "is_mpim": false, + "topic": { + "value": "Non-work banter and water cooler conversation", + "creator": "", + "last_set": 0 + }, + "purpose": { + "value": "A place for non-work-related flimflam, faffing, hodge-podge or jibber-jabber you'd prefer to keep out of more focused work-related channels.", + "creator": "", + "last_set": 0 + }, + "previous_names": [] + } + ], + "response_metadata": { + "next_cursor": "dGVhbTpDMDYxRkE1UEI=" + } + } + }, + "success_with_mixed_results": { + "description": "Example response when mixing different conversation types together, like `im` and `mpim`", + "example": { + "ok": true, + "channels": [ + { + "id": "G0AKFJBEU", + "name": "mpdm-mr.banks--slactions-jackson--beforebot-1", + "is_channel": false, + "is_group": true, + "is_im": false, + "created": 1493657761, + "creator": "U061F7AUR", + "is_archived": false, + "is_general": false, + "unlinked": 0, + "name_normalized": "mpdm-mr.banks--slactions-jackson--beforebot-1", + "is_shared": false, + "is_ext_shared": false, + "is_org_shared": false, + "pending_shared": [], + "is_pending_ext_shared": false, + "is_private": true, + "is_mpim": true, + "is_open": true, + "topic": { + "value": "Group messaging", + "creator": "U061F7AUR", + "last_set": 1493657761 + }, + "purpose": { + "value": "Group messaging with: @mr.banks @slactions-jackson @beforebot", + "creator": "U061F7AUR", + "last_set": 1493657761 + }, + "priority": 0 + }, + { + "id": "D0C0F7S8Y", + "created": 1498500348, + "is_im": true, + "is_org_shared": false, + "user": "U0BS9U4SV", + "is_user_deleted": false, + "priority": 0 + }, + { + "id": "D0BSHH4AD", + "created": 1498511030, + "is_im": true, + "is_org_shared": false, + "user": "U0C0NS9HN", + "is_user_deleted": false, + "priority": 0 + } + ], + "response_metadata": { + "next_cursor": "aW1faWQ6RDBCSDk1RExI" + } + } + }, + "error": { + "url": "/api/conversations.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.deletePhoto.json b/docs.slack.dev/methods/users.deletePhoto.json new file mode 100644 index 00000000..f1610b00 --- /dev/null +++ b/docs.slack.dev/methods/users.deletePhoto.json @@ -0,0 +1,43 @@ +{ + "desc": "Delete the user profile photo", + "http_method": "GET", + "scope": "users.profile:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": null, + "errors": { + "internal_error": { + "desc": "An unexpected error occurred." + } + }, + "examples": { + "success": { + "url": "/api/users.deletePhoto?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/users.deletePhoto?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.discoverableContacts.lookup.json b/docs.slack.dev/methods/users.discoverableContacts.lookup.json new file mode 100644 index 00000000..dc44831b --- /dev/null +++ b/docs.slack.dev/methods/users.discoverableContacts.lookup.json @@ -0,0 +1,84 @@ +{ + "desc": "Look up an email address to see if someone is discoverable on Slack", + "http_method": "POST", + "scope": "team:read", + "scope_by_token_type": { + "granular_bot": "conversations.connect:manage" + }, + "rate_limits": "t2", + "json_input_supported": true, + "args": { + "type": "object", + "required": [ + "token", + "email" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "email": { + "type": "string", + "maxLength": 100, + "example": "scott.slacksalot@example.com" + } + } + }, + "output": { + "type": "object", + "required": [ + "is_discoverable" + ], + "properties": { + "is_discoverable": { + "type": "boolean" + } + } + }, + "errors": { + "not_allowed": { + "desc": "user is not allowed to call this API" + }, + "ratelimited": { + "desc": "too many attempts" + }, + "invalid_arguments": { + "desc": "Invalid arguments (including exceeding character count)" + }, + "restricted_action": { + "desc": "user is restricted from calling this API" + }, + "not_an_enterprise": { + "desc": "The token does not belong to an enterprise." + } + }, + "examples": { + "success": { + "url": "/api/mpim.list?token=YOUR_TOKEN", + "description": "Response when user is found.", + "example": { + "ok": true, + "is_discoverable": true + } + }, + "success1": { + "url": "/api/mpim.list?token=YOUR_TOKEN", + "description": "Response when user is not found.", + "example": { + "ok": true, + "is_discoverable": false + } + }, + "error": { + "url": "/api/mpim.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.getPresence.json b/docs.slack.dev/methods/users.getPresence.json new file mode 100644 index 00000000..46800ea0 --- /dev/null +++ b/docs.slack.dev/methods/users.getPresence.json @@ -0,0 +1,82 @@ +{ + "desc": "Gets user presence information.", + "http_method": "GET", + "scope": "users:read", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user": { + "desc": "User to get presence info on. Defaults to the authed user.", + "type": "string", + "subtype": "user" + } + } + }, + "output": { + "required": [ + "presence" + ], + "type": "object", + "properties": { + "last_activity": { + "type": "integer" + }, + "manual_away": { + "type": "boolean" + }, + "presence": { + "type": "string" + }, + "online": { + "type": "boolean" + }, + "connection_count": { + "type": "integer" + }, + "auto_away": { + "type": "boolean" + } + } + }, + "errors": {}, + "examples": { + "success": { + "url": "/api/users.getPresence?token=YOUR_TOKEN", + "description": "When requesting information for a different user, this method just returns the current presence (either `active` or `away`).", + "example": { + "ok": true, + "presence": "active" + } + }, + "success_for_token_holder": { + "description": "If you are requesting presence information for the authed user, this method returns the current presence, along with details on how it was calculated.", + "example": { + "ok": true, + "presence": "active", + "online": true, + "auto_away": false, + "manual_away": false, + "connection_count": 1, + "last_activity": 1419027078 + } + }, + "error": { + "url": "/api/users.getPresence?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.identity.json b/docs.slack.dev/methods/users.identity.json new file mode 100644 index 00000000..2981d66c --- /dev/null +++ b/docs.slack.dev/methods/users.identity.json @@ -0,0 +1,413 @@ +{ + "desc": "Get a user's identity.", + "http_method": "GET", + "scope": "identity.basic", + "scope_by_token_type": { + "app": "identity:read:user" + }, + "user_scope_only": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": { + "disableShapeUnification": true, + "anyOf": [ + { + "description": "Schema for 'identity.basic' scope", + "type": "object", + "required": [ + "user", + "team" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "name", + "id" + ], + "properties": { + "name": { + "type": "string" + }, + "id": { + "schema": "user_id" + } + } + }, + "team": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "schema": "workspace_id" + } + } + } + } + }, + { + "description": "Schema for 'identity.basic,identity.email' scopes", + "type": "object", + "required": [ + "user", + "team" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "name", + "id", + "email" + ], + "properties": { + "name": { + "type": "string" + }, + "id": { + "schema": "user_id" + }, + "email": { + "type": "string", + "format": "email" + } + } + }, + "team": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "schema": "workspace_id" + } + } + } + } + }, + { + "description": "Schema for 'identity.basic,identity.avatar' scopes", + "type": "object", + "required": [ + "user", + "team" + ], + "properties": { + "user": { + "type": "object", + "required": [ + "name", + "id", + "image_24", + "image_32", + "image_48", + "image_72", + "image_192", + "image_512" + ], + "properties": { + "name": { + "type": "string" + }, + "id": { + "schema": "user_id" + }, + "image_24": { + "type": "string", + "format": "url" + }, + "image_32": { + "type": "string", + "format": "url" + }, + "image_48": { + "type": "string", + "format": "url" + }, + "image_72": { + "type": "string", + "format": "url" + }, + "image_192": { + "type": "string", + "format": "url" + }, + "image_512": { + "type": "string", + "format": "url" + } + } + }, + "team": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "schema": "workspace_id" + } + } + } + } + }, + { + "description": "Schema for 'identity.basic,identity.team' scopes", + "type": "object", + "required": [ + "user", + "team" + ], + "properties": { + "user": { + "anyOf": [ + { + "type": "object", + "required": [ + "name", + "id", + "image_24", + "image_32", + "image_48", + "image_72", + "image_192", + "image_512" + ], + "properties": { + "name": { + "type": "string" + }, + "id": { + "schema": "user_id" + }, + "email": { + "type": "string" + }, + "image_24": { + "type": "string", + "format": "url" + }, + "image_32": { + "type": "string", + "format": "url" + }, + "image_48": { + "type": "string", + "format": "url" + }, + "image_72": { + "type": "string", + "format": "url" + }, + "image_192": { + "type": "string", + "format": "url" + }, + "image_512": { + "type": "string", + "format": "url" + }, + "image_1024": { + "type": "string", + "format": "url" + } + } + }, + { + "type": "object", + "required": [ + "name", + "id" + ], + "properties": { + "name": { + "type": "string" + }, + "id": { + "schema": "user_id" + }, + "email": { + "type": "string" + } + } + } + ] + }, + "team": { + "anyOf": [ + { + "type": "object", + "required": [ + "id", + "name", + "domain", + "image_34", + "image_44", + "image_68", + "image_88", + "image_102", + "image_132", + "image_230" + ], + "properties": { + "id": { + "schema": "workspace_id" + }, + "name": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "image_34": { + "type": "string", + "format": "url" + }, + "image_44": { + "type": "string", + "format": "url" + }, + "image_68": { + "type": "string", + "format": "url" + }, + "image_88": { + "type": "string", + "format": "url" + }, + "image_102": { + "type": "string", + "format": "url" + }, + "image_132": { + "type": "string", + "format": "url" + }, + "image_230": { + "type": "string", + "format": "url" + }, + "image_default": { + "type": "boolean" + }, + "image_original": { + "type": "string", + "format": "url" + } + } + }, + { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "schema": "workspace_id" + } + } + } + ] + } + } + } + ] + }, + "errors": { + "internal_error": { + "desc": "Internal error" + }, + "invalid_user_id": { + "desc": "Invalid user id provided" + }, + "email_not_verified": { + "desc": "user email has not been verified" + } + }, + "examples": { + "success": { + "url": "/api/users.identity?token=YOUR_TOKEN", + "description": "You will receive at a minimum the following information:", + "example": { + "ok": true, + "user": { + "name": "Sonny Whether", + "id": "U0G9QF9C6" + }, + "team": { + "id": "T0G9PQBBK" + } + } + }, + "success_with_email": { + "description": "The `identity.email` scope provides the member's email address, if available:", + "example": { + "ok": true, + "user": { + "name": "Sonny Whether", + "id": "U0G9QF9C6", + "email": "bobby@example.com" + }, + "team": { + "id": "T0G9PQBBK" + } + } + }, + "success_with_avatar": { + "description": "Using with the `identity.avatar` scope yields the member's avatar images. _Available sizes may vary in the future._", + "example": { + "ok": true, + "user": { + "name": "Sonny Whether", + "id": "U0G9QF9C6", + "image_24": "https://cdn.example.com/sonny_24.jpg", + "image_32": "https://cdn.example.com/sonny_32.jpg", + "image_48": "https://cdn.example.com/sonny_48.jpg", + "image_72": "https://cdn.example.com/sonny_72.jpg", + "image_192": "https://cdn.example.com/sonny_192.jpg" + }, + "team": { + "id": "T0G9PQBBK" + } + } + }, + "success_with_team": { + "description": "Use with the `identity.team` scope to retrieve the user's workspace name:", + "example": { + "ok": true, + "user": { + "name": "Sonny Whether", + "id": "U0G9QF9C6" + }, + "team": { + "name": "Captain Fabian's Naval Supply", + "id": "T0G9PQBBK" + } + } + }, + "error": { + "url": "/api/users.identity?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "account_inactive" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.info.json b/docs.slack.dev/methods/users.info.json new file mode 100644 index 00000000..cc70a09e --- /dev/null +++ b/docs.slack.dev/methods/users.info.json @@ -0,0 +1,111 @@ +{ + "desc": "Gets information about a user.", + "http_method": "GET", + "scope": "users:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "user" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "include_locale": { + "desc": "Set this to `true` to receive the locale for this user. Defaults to `false`", + "type": "boolean" + }, + "user": { + "desc": "User to get info on", + "type": "string", + "subtype": "user" + } + } + }, + "output": { + "type": "object", + "properties": { + "user": { + "schema": "user" + }, + "users": { + "items": { + "schema": "user" + }, + "type": "array" + } + } + }, + "errors": { + "too_many_users": { + "desc": "Too many users." + }, + "user_not_found": { + "desc": "Value passed for `user` was invalid." + }, + "user_not_visible": { + "desc": "The requested user is not visible to the calling user" + } + }, + "examples": { + "success": { + "url": "/api/users.info?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "user": { + "id": "W012A3CDE", + "team_id": "T012AB3C4", + "name": "spengler", + "deleted": false, + "color": "9f69e7", + "real_name": "Egon Spengler", + "tz": "America/Los_Angeles", + "tz_label": "Pacific Daylight Time", + "tz_offset": -25200, + "profile": { + "avatar_hash": "ge3b51ca72de", + "status_text": "Print is dead", + "status_emoji": ":books:", + "real_name": "Egon Spengler", + "display_name": "spengler", + "real_name_normalized": "Egon Spengler", + "display_name_normalized": "spengler", + "email": "spengler@ghostbusters.example.com", + "image_original": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "team": "T012AB3C4" + }, + "is_admin": true, + "is_owner": false, + "is_primary_owner": false, + "is_restricted": false, + "is_ultra_restricted": false, + "is_bot": false, + "updated": 1502138686, + "is_app_user": false, + "has_2fa": false + } + } + }, + "error": { + "url": "/api/users.info?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "user_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.list.json b/docs.slack.dev/methods/users.list.json new file mode 100644 index 00000000..02a5f336 --- /dev/null +++ b/docs.slack.dev/methods/users.list.json @@ -0,0 +1,177 @@ +{ + "desc": "Lists all users in a Slack team.", + "http_method": "GET", + "scope": "users:read", + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "cursor": { + "desc": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/apis/web-api/pagination) for more detail.", + "example": "dXNlcjpVMDYxTkZUVDI=", + "type": "string" + }, + "include_locale": { + "desc": "Set this to `true` to receive the locale for users. Defaults to `false`", + "type": "boolean" + }, + "limit": { + "default": 0, + "desc": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors.", + "example": "20", + "type": "number" + }, + "team_id": { + "desc": "encoded team id to list users in, required if org token is used", + "type": "string", + "subtype": "team" + } + } + }, + "output": { + "type": "object", + "required": [ + "members", + "cache_ts" + ], + "properties": { + "members": { + "type": "array", + "minItems": 1, + "items": { + "schema": "user" + } + }, + "cache_ts": { + "type": "integer" + }, + "response_metadata": { + "schema": "response_metadata" + }, + "offset": { + "type": "string" + } + } + }, + "errors": { + "invalid_cursor": { + "desc": "Value passed for `cursor` was not valid or is no longer valid." + }, + "limit_required": { + "desc": "For large teams a limit is required." + }, + "missing_argument": { + "desc": "A required argument is missing." + } + }, + "examples": { + "success": { + "url": "/api/users.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "members": [ + { + "id": "W012A3CDE", + "team_id": "T012AB3C4", + "name": "spengler", + "deleted": false, + "color": "9f69e7", + "real_name": "spengler", + "tz": "America/Los_Angeles", + "tz_label": "Pacific Daylight Time", + "tz_offset": -25200, + "profile": { + "avatar_hash": "ge3b51ca72de", + "status_text": "Print is dead", + "status_emoji": ":books:", + "real_name": "Egon Spengler", + "display_name": "spengler", + "real_name_normalized": "Egon Spengler", + "display_name_normalized": "spengler", + "email": "spengler@ghostbusters.example.com", + "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "team": "T012AB3C4" + }, + "is_admin": true, + "is_owner": false, + "is_primary_owner": false, + "is_restricted": false, + "is_ultra_restricted": false, + "is_bot": false, + "updated": 1502138686, + "is_app_user": false, + "has_2fa": false + }, + { + "id": "W07QCRPA4", + "team_id": "T0G9PQBBK", + "name": "glinda", + "deleted": false, + "color": "9f69e7", + "real_name": "Glinda Southgood", + "tz": "America/Los_Angeles", + "tz_label": "Pacific Daylight Time", + "tz_offset": -25200, + "profile": { + "avatar_hash": "8fbdd10b41c6", + "image_24": "https://a.slack-edge.com...png", + "image_32": "https://a.slack-edge.com...png", + "image_48": "https://a.slack-edge.com...png", + "image_72": "https://a.slack-edge.com...png", + "image_192": "https://a.slack-edge.com...png", + "image_512": "https://a.slack-edge.com...png", + "image_1024": "https://a.slack-edge.com...png", + "image_original": "https://a.slack-edge.com...png", + "first_name": "Glinda", + "last_name": "Southgood", + "title": "Glinda the Good", + "phone": "", + "skype": "", + "real_name": "Glinda Southgood", + "real_name_normalized": "Glinda Southgood", + "display_name": "Glinda the Fairly Good", + "display_name_normalized": "Glinda the Fairly Good", + "email": "glenda@south.oz.coven" + }, + "is_admin": true, + "is_owner": false, + "is_primary_owner": false, + "is_restricted": false, + "is_ultra_restricted": false, + "is_bot": false, + "updated": 1480527098, + "has_2fa": false + } + ], + "cache_ts": 1498777272, + "response_metadata": { + "next_cursor": "dXNlcjpVMEc5V0ZYTlo=" + } + } + }, + "error": { + "url": "/api/users.list?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_cursor" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.lookupByEmail.json b/docs.slack.dev/methods/users.lookupByEmail.json new file mode 100644 index 00000000..0186326c --- /dev/null +++ b/docs.slack.dev/methods/users.lookupByEmail.json @@ -0,0 +1,99 @@ +{ + "desc": "Find a user with an email address.", + "http_method": "GET", + "scope": "users:read.email", + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "email" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "email": { + "desc": "An email address belonging to a user in the workspace", + "example": "spengler@ghostbusters.example.com", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "user" + ], + "properties": { + "user": { + "schema": "user" + } + } + }, + "errors": { + "enterprise_is_restricted": { + "desc": "This method was called with an inappropriate enterprise-level token." + }, + "users_not_found": { + "desc": "Value passed for `user` was invalid." + } + }, + "examples": { + "success": { + "url": "/api/users.lookupByEmail", + "description": "Typical success response", + "example": { + "ok": true, + "user": { + "id": "W012A3CDE", + "team_id": "T012AB3C4", + "name": "spengler", + "deleted": false, + "color": "9f69e7", + "real_name": "Egon Spengler", + "tz": "America/Los_Angeles", + "tz_label": "Pacific Daylight Time", + "tz_offset": -25200, + "profile": { + "avatar_hash": "ge3b51ca72de", + "status_text": "Print is dead", + "status_emoji": ":books:", + "real_name": "Egon Spengler", + "display_name": "spengler", + "real_name_normalized": "Egon Spengler", + "display_name_normalized": "spengler", + "email": "spengler@ghostbusters.example.com", + "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "team": "T012AB3C4" + }, + "is_admin": true, + "is_owner": false, + "is_primary_owner": false, + "is_restricted": false, + "is_ultra_restricted": false, + "is_bot": false, + "updated": 1502138686, + "is_app_user": false, + "has_2fa": false + } + } + }, + "error": { + "url": "/api/users.lookupByEmail", + "description": "Typical error response", + "example": { + "ok": false, + "error": "users_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.profile.get.json b/docs.slack.dev/methods/users.profile.get.json new file mode 100644 index 00000000..8b697896 --- /dev/null +++ b/docs.slack.dev/methods/users.profile.get.json @@ -0,0 +1,111 @@ +{ + "desc": "Retrieve a user's profile information, including their custom status.", + "http_method": "GET", + "scope": "users.profile:read", + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "include_labels": { + "default": "false", + "desc": "Include labels for each ID in custom profile fields. Using this parameter will heavily rate-limit your requests and is not recommended.", + "example": "true", + "type": "boolean" + }, + "user": { + "desc": "User to retrieve profile info for", + "type": "string", + "subtype": "user" + } + } + }, + "output": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "schema": "user_profile" + } + } + }, + "errors": { + "user_not_found": { + "desc": "Value passed for `user` was invalid." + }, + "token_revoked": { + "desc": "The token being used is not valid." + }, + "ratelimited": { + "desc": "You are attempting to call this method too frequently." + } + }, + "examples": { + "success": { + "url": "/api/users.profile.get?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "profile": { + "title": "Head of Coffee Production", + "phone": "", + "skype": "", + "real_name": "John Smith", + "real_name_normalized": "John Smith", + "display_name": "john", + "display_name_normalized": "john", + "fields": { + "Xf0111111": { + "value": "Barista", + "alt": "" + }, + "Xf0222222": { + "value": "2022-04-11", + "alt": "" + }, + "Xf0333333": { + "value": "https://example.com", + "alt": "" + } + }, + "status_text": "Watching cold brew steep", + "status_emoji": ":coffee:", + "status_emoji_display_info": [], + "status_expiration": 0, + "avatar_hash": "123xyz", + "start_date": "2022-03-21", + "email": "johnsmith@example.com", + "pronouns": "they/them/theirs", + "huddle_state": "default_unset", + "huddle_state_expiration_ts": 0, + "first_name": "john", + "last_name": "smith", + "image_24": "https://.../...-24.png", + "image_32": "https://.../...-32.png", + "image_48": "https://.../...-48.png", + "image_72": "https://.../...-72.png", + "image_192": "https://.../....-192png", + "image_512": "https://.../...-512.png" + } + } + }, + "error": { + "url": "/api/users.profile.get?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "user_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.profile.set.json b/docs.slack.dev/methods/users.profile.set.json new file mode 100644 index 00000000..6a4b07d5 --- /dev/null +++ b/docs.slack.dev/methods/users.profile.set.json @@ -0,0 +1,173 @@ +{ + "desc": "Set a user's profile information, including custom status.", + "http_method": "POST", + "scope": "users.profile:write", + "json_input_supported": true, + "user_scope_only": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "name": { + "desc": "Name of a single key to set. Usable only if `profile` is not passed.", + "example": "first_name", + "type": "string" + }, + "profile": { + "desc": "Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.", + "example": "{ first_name: \"John\", ... }", + "type": "string", + "subtype": "user_profile" + }, + "user": { + "desc": "ID of user to change. This argument may only be specified by admins on paid teams.", + "type": "string", + "subtype": "user" + }, + "value": { + "desc": "Value to set a single key to. Usable only if `profile` is not passed.", + "example": "John", + "type": "string" + } + } + }, + "output": { + "type": "object", + "required": [ + "username", + "profile" + ], + "properties": { + "username": { + "type": "string" + }, + "profile": { + "schema": "user_profile" + }, + "email_pending": { + "type": "string", + "format": "email" + } + } + }, + "errors": { + "cannot_update_admin_user": { + "desc": "Only a primary owner can update the profile of an admin." + }, + "email_taken": { + "desc": "email taken" + }, + "invalid_profile": { + "desc": "Profile object passed in is not valid JSON (make sure it is URL encoded!)." + }, + "must_clear_both_status_text_and_status_emoji": { + "desc": "Clearing the status requires setting both `status_text` and `status_emoji` to ''." + }, + "name_not_allowed": { + "desc": "name cannot contain URL." + }, + "not_admin": { + "desc": "Only admins can update the profile of another user. Some fields, like `email` may only be updated by an admin." + }, + "not_app_admin": { + "desc": "Only team owners and selected members can update the profile of a bot user." + }, + "partial_profile_set_failed": { + "desc": "Failed to set user profile." + }, + "profile_set_failed": { + "desc": "Failed to set user profile." + }, + "reserved_name": { + "desc": "First or last name are reserved." + }, + "sudo_required": { + "desc": "Request requires sudo session." + }, + "too_long": { + "desc": "You attempted to set a custom status but it was longer than the maximum allowed, 100." + }, + "permission_denied": { + "desc": "Permission denied." + }, + "username_same": { + "desc": "Username is the same as the current username." + }, + "invalid_emoji_not_allowed": { + "desc": "Invalid emoji not allowed." + }, + "invalid_ooo_message": { + "desc": "Invalid Out of Office message." + }, + "invalid_starts_with_at": { + "desc": "Name cannot start with @." + } + }, + "examples": { + "success": { + "url": "/api/users.profile.set?token=YOUR_TOKEN", + "description": "The complete user's profile will be returned.", + "example": { + "ok": true, + "profile": { + "title": "Head of Coffee Production", + "phone": "", + "skype": "", + "real_name": "John Smith", + "real_name_normalized": "John Smith", + "display_name": "john", + "display_name_normalized": "john", + "fields": { + "Xf0111111": { + "value": "Barista", + "alt": "" + }, + "Xf0222222": { + "value": "2022-04-11", + "alt": "" + }, + "Xf0333333": { + "value": "https://example.com", + "alt": "" + } + }, + "status_text": "Watching cold brew steep", + "status_emoji": ":coffee:", + "status_emoji_display_info": [], + "status_expiration": 0, + "avatar_hash": "123xyz", + "start_date": "2022-03-21", + "email": "johnsmith@example.com", + "pronouns": "they/them/theirs", + "huddle_state": "default_unset", + "huddle_state_expiration_ts": 0, + "first_name": "john", + "last_name": "smith", + "image_24": "https://.../...-24.png", + "image_32": "https://.../...-32.png", + "image_48": "https://.../...-48.png", + "image_72": "https://.../...-72.png", + "image_192": "https://.../....-192png", + "image_512": "https://.../...-512.png" + } + } + }, + "error": { + "url": "/api/users.profile.set?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_profile" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.setActive.json b/docs.slack.dev/methods/users.setActive.json new file mode 100644 index 00000000..64efb808 --- /dev/null +++ b/docs.slack.dev/methods/users.setActive.json @@ -0,0 +1,40 @@ +{ + "desc": "Marked a user as active. Deprecated and non-functional.", + "http_method": "POST", + "scope": "users:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + } + } + }, + "output": null, + "errors": {}, + "examples": { + "success": { + "url": "/api/users.setActive?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/users.setActive?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.setPhoto.json b/docs.slack.dev/methods/users.setPhoto.json new file mode 100644 index 00000000..059e753a --- /dev/null +++ b/docs.slack.dev/methods/users.setPhoto.json @@ -0,0 +1,87 @@ +{ + "desc": "Set the user profile photo", + "http_method": "POST", + "scope": "users.profile:write", + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "crop_w": { + "desc": "Width/height of crop box (always square)", + "example": "100", + "type": "string" + }, + "crop_x": { + "desc": "X coordinate of top-left corner of crop box", + "example": "10", + "type": "string" + }, + "crop_y": { + "desc": "Y coordinate of top-left corner of crop box", + "example": "15", + "type": "string" + }, + "image": { + "desc": "File contents via `multipart/form-data`.", + "example": "...", + "schema": "post_file" + } + } + }, + "output": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "object", + "patternProperties": { + "^.*": { + "type": "string" + } + } + } + } + }, + "errors": { + "bad_image": { + "desc": "The uploaded image could not be processed - try passing a JPEG, GIF or PNG" + }, + "internal_error": { + "desc": "An unexpected error occurred." + }, + "too_large": { + "desc": "The uploaded image had excessive dimensions" + }, + "too_many_frames": { + "desc": "An animated GIF with too many frames was uploaded" + } + }, + "examples": { + "success": { + "url": "/api/users.setPhoto?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/users.setPhoto?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/users.setPresence.json b/docs.slack.dev/methods/users.setPresence.json new file mode 100644 index 00000000..82e19953 --- /dev/null +++ b/docs.slack.dev/methods/users.setPresence.json @@ -0,0 +1,54 @@ +{ + "desc": "Manually sets user presence.", + "http_method": "POST", + "scope": "users:write", + "json_input_supported": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "presence" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "presence": { + "desc": "Either `auto` or `away`", + "example": "away", + "type": "string", + "enum": [ + "auto", + "away" + ] + } + } + }, + "output": null, + "errors": { + "invalid_presence": { + "desc": "Value passed for `presence` was invalid." + } + }, + "examples": { + "success": { + "url": "/api/users.setPresence?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/users.setPresence?token=INVALID_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "invalid_auth" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/views.open.json b/docs.slack.dev/methods/views.open.json new file mode 100644 index 00000000..e5c67ed6 --- /dev/null +++ b/docs.slack.dev/methods/views.open.json @@ -0,0 +1,173 @@ +{ + "desc": "Open a view for a user.", + "http_method": "POST", + "scope": "none", + "json_input_supported": true, + "no_scope_required": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "view" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "trigger_id": { + "subtype": "app_trigger_id", + "desc": "Exchange a trigger to post to the user.", + "example": "12345.98765.abcd2358fdea", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "interactivity_pointer": { + "subtype": "app_trigger_id", + "desc": "Exchange an interactivity pointer to post to the user.", + "example": "12345.98765.abcd2358fdea", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "view": { + "desc": "A [view payload](/reference/views). This must be a JSON-encoded string.", + "allOf": [ + { + "type": "object", + "coerce": true + }, + { + "anyOf": [ + { + "schema": "modal" + }, + { + "schema": "workflow-step" + }, + { + "schema": "app-notification-subscription-configuration" + } + ] + } + ] + } + } + }, + "output": { + "type": "object", + "required": [ + "view" + ], + "properties": { + "view": { + "disableShapeUnification": true, + "anyOf": [ + { + "schema": "modal" + }, + { + "schema": "workflow-step" + }, + { + "schema": "app-notification-subscription-configuration" + } + ] + } + } + }, + "errors": { + "duplicate_external_id": { + "desc": "Error returned when the given `external_id` has already be used." + }, + "exchanged_trigger_id": { + "desc": "The trigger_id was already exchanged in a previous call." + }, + "expired_trigger_id": { + "desc": "The trigger_id is expired." + }, + "invalid_trigger_id": { + "desc": "The trigger_id is invalid. The expected format for the trigger_id argument is \"132456.7890123.abcdef\"." + }, + "view_too_large": { + "desc": "Error returned if the provided view is greater than 250kb." + } + }, + "examples": { + "success": { + "url": "/api/views.open?token=YOUR_TOKEN", + "description": "Typical success response includes the opened view payload.", + "example": { + "ok": true, + "view": { + "id": "VMHU10V25", + "team_id": "T8N4K1JN", + "type": "modal", + "title": { + "type": "plain_text", + "text": "Quite a plain modal" + }, + "submit": { + "type": "plain_text", + "text": "Create" + }, + "blocks": [ + { + "type": "input", + "block_id": "a_block_id", + "label": { + "type": "plain_text", + "text": "A simple label", + "emoji": true + }, + "optional": false, + "element": { + "type": "plain_text_input", + "action_id": "an_action_id" + } + } + ], + "private_metadata": "Shh it is a secret", + "callback_id": "identify_your_modals", + "external_id": "", + "state": { + "values": {} + }, + "hash": "156772938.1827394", + "clear_on_close": false, + "notify_on_close": false, + "root_view_id": "VMHU10V25", + "app_id": "AA4928AQ", + "bot_id": "BA13894H" + } + } + }, + "error": { + "url": "/api/dialog.open?token=VALID_TOKEN", + "description": "Typical error response, before getting to any possible validation errors.", + "example": { + "ok": false, + "error": "invalid_arguments", + "response_metadata": { + "messages": [ + "invalid `trigger_id`" + ] + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/views.publish.json b/docs.slack.dev/methods/views.publish.json new file mode 100644 index 00000000..b9cfade4 --- /dev/null +++ b/docs.slack.dev/methods/views.publish.json @@ -0,0 +1,125 @@ +{ + "desc": "Publish a static view for a User.", + "http_method": "POST", + "scope": "none", + "json_input_supported": true, + "no_scope_required": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "user_id", + "view" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "user_id": { + "type": "string", + "example": "U0BPQUNTA", + "desc": "`id` of the user you want publish a view to." + }, + "view": { + "desc": "A [view payload](/reference/views). This must be a JSON-encoded string.", + "schema": "publishable-view" + }, + "hash": { + "type": "string", + "desc": "A string that represents view state to protect against possible race conditions.", + "example": "156772938.1827394" + } + } + }, + "output": { + "type": "object", + "required": [ + "view" + ], + "properties": { + "view": { + "schema": "publishable-view" + } + } + }, + "errors": { + "duplicate_external_id": { + "desc": "Error returned when the given `external_id` has already be used." + }, + "hash_conflict": { + "desc": "Error returned when the provided `hash` doesn't match the current stored value." + }, + "missing_profile_id": { + "desc": "A profile id was not provided when trying to publish a view of type profile." + }, + "not_allowed_token_type": { + "desc": "The type of token your app used when requesting this method is not allowed." + }, + "not_enabled": { + "desc": "Error returned if a `home` view is published but the Home tab isn't enabled for the app." + }, + "not_implemented": { + "desc": "The profile view experiment is not enabled for this user." + }, + "view_too_large": { + "desc": "Error returned if the provided view is greater than 250kb." + } + }, + "examples": { + "success": { + "url": "/api/views.publish?token=YOUR_TOKEN", + "description": "Typical success response includes the published view payload.", + "example": { + "ok": true, + "view": { + "id": "VMHU10V25", + "team_id": "T8N4K1JN", + "type": "home", + "close": null, + "submit": null, + "blocks": [ + { + "type": "section", + "block_id": "2WGp9", + "text": { + "type": "mrkdwn", + "text": "A simple section with some sample sentence.", + "verbatim": false + } + } + ], + "private_metadata": "Shh it is a secret", + "callback_id": "identify_your_home_tab", + "state": { + "values": {} + }, + "hash": "156772938.1827394", + "clear_on_close": false, + "notify_on_close": false, + "root_view_id": "VMHU10V25", + "previous_view_id": null, + "app_id": "AA4928AQ", + "external_id": "", + "bot_id": "BA13894H" + } + } + }, + "error": { + "url": "/api/views.publish?token=VALID_TOKEN", + "description": "Typical error response, before getting to any possible validation errors.", + "example": { + "ok": false, + "error": "invalid_arguments", + "response_metadata": { + "messages": [ + "invalid `user_id`" + ] + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/views.push.json b/docs.slack.dev/methods/views.push.json new file mode 100644 index 00000000..6f651f8c --- /dev/null +++ b/docs.slack.dev/methods/views.push.json @@ -0,0 +1,156 @@ +{ + "desc": "Push a view onto the stack of a root view.", + "http_method": "POST", + "scope": "none", + "json_input_supported": true, + "no_scope_required": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "view" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "trigger_id": { + "subtype": "app_trigger_id", + "desc": "Exchange a trigger to post to the user.", + "example": "12345.98765.abcd2358fdea", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "interactivity_pointer": { + "subtype": "app_trigger_id", + "desc": "Exchange an interactivity pointer to post to the user.", + "example": "12345.98765.abcd2358fdea", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "view": { + "desc": "A [view payload](/reference/views). This must be a JSON-encoded string.", + "schema": "modal" + } + } + }, + "output": { + "type": "object", + "required": [ + "view" + ], + "properties": { + "view": { + "schema": "modal" + } + } + }, + "errors": { + "duplicate_external_id": { + "desc": "Error returned when the given `external_id` has already be used." + }, + "exchanged_trigger_id": { + "desc": "The trigger_id was already exchanged in a previous call." + }, + "expired_trigger_id": { + "desc": "The trigger_id is expired." + }, + "invalid_trigger_id": { + "desc": "The trigger_id is invalid. The expected format for the trigger_id argument is \"132456.7890123.abcdef\"." + }, + "not_found": { + "desc": "Error returned when the requested view can't be found." + }, + "push_limit_reached": { + "desc": "Error returned when the max push limit has been reached for views. Currently the limit is 3." + }, + "view_too_large": { + "desc": "Error returned if the provided view is greater than 250kb." + } + }, + "examples": { + "success": { + "url": "/api/views.push?token=YOUR_TOKEN", + "description": "Typical success response includes the pushed view payload.", + "example": { + "ok": true, + "view": { + "id": "VNM522E2U", + "team_id": "T9M4RL1JM", + "type": "modal", + "title": { + "type": "plain_text", + "text": "Pushed Modal", + "emoji": true + }, + "close": { + "type": "plain_text", + "text": "Back", + "emoji": true + }, + "submit": { + "type": "plain_text", + "text": "Save", + "emoji": true + }, + "blocks": [ + { + "type": "input", + "block_id": "edit_details", + "element": { + "type": "plain_text_input", + "action_id": "detail_input" + }, + "label": { + "type": "plain_text", + "text": "Edit details" + } + } + ], + "private_metadata": "", + "callback_id": "view_4", + "external_id": "", + "state": { + "values": {} + }, + "hash": "1569362015.55b5e41b", + "clear_on_close": true, + "notify_on_close": false, + "root_view_id": "VNN729E3U", + "previous_view_id": null, + "app_id": "AAD3351BQ", + "bot_id": "BADF7A34H" + } + } + }, + "error": { + "url": "/api/views.update?token=YOUR_TOKEN", + "description": "Typical error response.", + "example": { + "ok": false, + "error": "invalid_arguments", + "response_metadata": { + "messages": [ + "missing required field: title" + ] + } + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/views.update.json b/docs.slack.dev/methods/views.update.json new file mode 100644 index 00000000..28528bb8 --- /dev/null +++ b/docs.slack.dev/methods/views.update.json @@ -0,0 +1,132 @@ +{ + "desc": "Update an existing view.", + "http_method": "POST", + "scope": "none", + "json_input_supported": true, + "no_scope_required": true, + "rate_limits": "t4", + "args": { + "type": "object", + "required": [ + "token", + "view" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "view_id": { + "type": "string", + "desc": "A unique identifier of the view to be updated. Either `view_id` or `external_id` is required.", + "example": "VMM512F2U" + }, + "external_id": { + "type": "string", + "desc": "A unique identifier of the view set by the developer. Must be unique for all views on a team. Max length of 255 characters. Either `view_id` or `external_id` is required.", + "example": "bmarley_view2" + }, + "view": { + "desc": "A [view object](/reference/views). This must be a JSON-encoded string.", + "schema": "view" + }, + "hash": { + "type": "string", + "desc": "A string that represents view state to protect against possible race conditions.", + "example": "156772938.1827394" + } + } + }, + "output": { + "type": "object", + "required": [ + "view" + ], + "properties": { + "view": { + "schema": "view" + } + } + }, + "errors": { + "duplicate_external_id": { + "desc": "Error returned when the given `external_id` has already be used." + }, + "hash_conflict": { + "desc": "Error returned when the provided `hash` doesn't match the current stored value." + }, + "not_found": { + "desc": "Error returned when the given `view_id` or `external_id` doesn't exist." + }, + "view_too_large": { + "desc": "Error returned if the provided view is greater than 250kb." + } + }, + "examples": { + "success": { + "url": "/api/views.update?token=YOUR_TOKEN", + "description": "Typical success response includes the updated view payload.", + "example": { + "ok": true, + "view": { + "id": "VNM522E2U", + "team_id": "T9M4RL1JM", + "type": "modal", + "title": { + "type": "plain_text", + "text": "Updated Modal", + "emoji": true + }, + "close": { + "type": "plain_text", + "text": "Close", + "emoji": true + }, + "submit": null, + "blocks": [ + { + "type": "section", + "block_id": "s_block", + "text": { + "type": "plain_text", + "text": "I am but an updated modal", + "emoji": true + }, + "accessory": { + "type": "button", + "action_id": "button_4", + "text": { + "type": "plain_text", + "text": "Click me" + } + } + } + ], + "private_metadata": "", + "callback_id": "view_2", + "external_id": "", + "state": { + "values": {} + }, + "hash": "1569262015.55b5e41b", + "clear_on_close": true, + "notify_on_close": false, + "root_view_id": "VNN729E3U", + "previous_view_id": null, + "app_id": "AAD3351BQ", + "bot_id": "BADF7A34H" + } + } + }, + "error": { + "url": "/api/views.update?token=YOUR_TOKEN", + "description": "Typical error response.", + "example": { + "ok": false, + "error": "not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/workflows.featured.add.json b/docs.slack.dev/methods/workflows.featured.add.json new file mode 100644 index 00000000..cde69ea3 --- /dev/null +++ b/docs.slack.dev/methods/workflows.featured.add.json @@ -0,0 +1,66 @@ +{ + "desc": "Add featured workflows to a channel.", + "http_method": "POST", + "scope": "bookmarks:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "trigger_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "channel_id": { + "desc": "Channel to add featured workflow in.", + "type": "string", + "subtype": "channel" + }, + "trigger_ids": { + "type": "array", + "desc": "Comma-separated array of trigger IDs to add; max 15", + "example": "[\"Ft012345\", \"Ft012346\"]", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 15 + } + } + }, + "output": null, + "errors": { + "method_not_supported": { + "desc": "Method not yet supported" + }, + "restricted_action": { + "desc": "User does not have access to this method." + }, + "error_modifying_workflows": { + "desc": "Error modifying workflows" + } + }, + "examples": { + "success": { + "url": "/api/workflows.featured.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/workflows.featured.list?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/workflows.featured.list.json b/docs.slack.dev/methods/workflows.featured.list.json new file mode 100644 index 00000000..8187d9f4 --- /dev/null +++ b/docs.slack.dev/methods/workflows.featured.list.json @@ -0,0 +1,135 @@ +{ + "desc": "List the featured workflows for specified channels.", + "http_method": "POST", + "scope": "bookmarks:read", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "channel_ids": { + "desc": "Comma-separated array of channel IDs to list featured workflows for.", + "type": "array", + "example": "[\"C012345678\", \"C987654321\"]", + "items": { + "type": "string", + "subtype": "channel" + }, + "minItems": 1, + "maxItems": 100 + } + } + }, + "output": { + "type": "object", + "required": [ + "featured_workflows" + ], + "properties": { + "featured_workflows": { + "type": "array", + "items": { + "type": "object", + "required": [ + "channel_id", + "triggers" + ], + "properties": { + "channel_id": { + "desc": "Channel where workflows are featured", + "type": "string", + "subtype": "channel" + }, + "triggers": { + "desc": "Array of triggers associated with channel", + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "title" + ], + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "errors": { + "method_not_supported": { + "desc": "Method not yet supported" + }, + "restricted_action": { + "desc": "User does not have access to this method." + }, + "channel_not_found": { + "desc": "Channel not found." + }, + "error_invalid_channels": { + "desc": "Invalid channels provided." + } + }, + "examples": { + "success": { + "url": "/api/workflows.featured.list?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true, + "featured_workflows": [ + { + "channel_id": "C012345678", + "triggers": [ + { + "id": "Ft1234", + "title": "Tabby workflow" + }, + { + "id": "Ft5678", + "title": "Tortoise workflow" + } + ] + }, + { + "channel_id": "C987654321", + "triggers": [ + { + "id": "Ft1234", + "title": "Ragdoll workflow" + }, + { + "id": "Ft5678", + "title": "Calico workflow" + } + ] + } + ] + } + }, + "error": { + "url": "/api/workflows.featured.list?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "channel_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/workflows.featured.remove.json b/docs.slack.dev/methods/workflows.featured.remove.json new file mode 100644 index 00000000..bd478913 --- /dev/null +++ b/docs.slack.dev/methods/workflows.featured.remove.json @@ -0,0 +1,66 @@ +{ + "desc": "Remove featured workflows from a channel.", + "http_method": "POST", + "scope": "bookmarks:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "trigger_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "channel_id": { + "desc": "Channel to remove featured workflow from.", + "type": "string", + "subtype": "channel" + }, + "trigger_ids": { + "type": "array", + "desc": "Comma-separated array of trigger IDs to remove; max 15", + "example": "[\"Ft012345\", \"Ft012346\"]", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 15 + } + } + }, + "output": null, + "errors": { + "method_not_supported": { + "desc": "Method not yet supported" + }, + "restricted_action": { + "desc": "User does not have access to this method." + }, + "error_modifying_workflows": { + "desc": "Error modifying workflows" + } + }, + "examples": { + "success": { + "url": "/api/workflows.featured.remove?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/workflows.featured.remove?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "error_modifying_workflows" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/workflows.featured.set.json b/docs.slack.dev/methods/workflows.featured.set.json new file mode 100644 index 00000000..277e553b --- /dev/null +++ b/docs.slack.dev/methods/workflows.featured.set.json @@ -0,0 +1,66 @@ +{ + "desc": "Set featured workflows for a channel.", + "http_method": "POST", + "scope": "bookmarks:write", + "json_input_supported": true, + "slack_connect_workspaces_allowed": true, + "rate_limits": "t2", + "args": { + "type": "object", + "required": [ + "token", + "channel_id", + "trigger_ids" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth" + }, + "channel_id": { + "desc": "Channel to set featured workflows in.", + "type": "string", + "subtype": "channel" + }, + "trigger_ids": { + "type": "array", + "desc": "Comma-separated array of trigger IDs that will replace any existing featured workflows in the channel; max 15", + "example": "[\"Ft012345\", \"Ft012346\"]", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 15 + } + } + }, + "output": null, + "errors": { + "method_not_supported": { + "desc": "Method not yet supported" + }, + "restricted_action": { + "desc": "User does not have access to this method." + }, + "error_modifying_workflows": { + "desc": "Error modifying workflows" + } + }, + "examples": { + "success": { + "url": "/api/workflows.featured.set?token=YOUR_TOKEN", + "description": "Typical success response", + "example": { + "ok": true + } + }, + "error": { + "url": "/api/workflows.featured.set?token=YOUR_TOKEN", + "description": "Typical error response", + "example": { + "ok": false, + "error": "error_modifying_workflows" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/workflows.triggers.permissions.add.json b/docs.slack.dev/methods/workflows.triggers.permissions.add.json new file mode 100644 index 00000000..0d6b7c28 --- /dev/null +++ b/docs.slack.dev/methods/workflows.triggers.permissions.add.json @@ -0,0 +1,138 @@ +{ + "desc": "Allows users to run a trigger that has its permission type set to named_entities", + "http_method": "POST", + "scope": "triggers:write", + "no_scope_required": false, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "trigger_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "trigger_id": { + "type": "string", + "desc": "Encoded ID of the trigger", + "example": "Ft0000000001" + }, + "user_ids": { + "type": "array", + "desc": "List of encoded user IDs", + "items": { + "schema": "user_id" + }, + "example": "U0000000001,U0000000002" + }, + "channel_ids": { + "type": "array", + "desc": "List of encoded channel IDs", + "items": { + "schema": "channel" + }, + "example": "C0000000001,C0000000002" + }, + "team_ids": { + "type": "array", + "desc": "List of encoded workspace IDs", + "items": { + "schema": "workspace_id" + }, + "example": "T0000000001,T0000000002" + }, + "org_ids": { + "type": "array", + "desc": "List of encoded organization IDs", + "example": "E00000001,E00000002", + "items": { + "schema": "enterprise_id" + } + } + } + }, + "output": { + "schema": "trigger-run-acl" + }, + "errors": { + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "channel_not_found": { + "desc": "One or more of the listed channels could not be found." + }, + "connected_org_denied": { + "desc": "The workspace admin does not allow connected organizations to be named_entities." + }, + "connected_team_denied": { + "desc": "The workspace admin does not allow connected teams to be named_entities." + }, + "connected_user_denied": { + "desc": "The workspace admin does not allow connected users to be named_entities." + }, + "invalid_permission_type": { + "desc": "This trigger requires permission_type to be set as named_entities before adding users." + }, + "no_valid_named_entities": { + "desc": "None of the provided named entities were valid" + }, + "org_not_connected": { + "desc": "One of more of the listed organizations were not connected." + }, + "org_not_found": { + "desc": "One or more of the listed organizations could not be found." + }, + "shared_channel_denied": { + "desc": "The workspace admin does not allow shared channels to be named_entities." + }, + "team_not_connected": { + "desc": "One of more of the listed teams were not connected by org." + }, + "team_not_found": { + "desc": "One or more of the listed teams could not be found." + }, + "too_many_named_entities": { + "desc": "Too many named entities passed into the trigger permissions setting." + }, + "trigger_not_found": { + "desc": "This trigger does not exist." + }, + "unknown_method": { + "desc": "This method does not exist." + }, + "user_not_found": { + "desc": "One or more of the listed users could not be found." + } + }, + "examples": { + "success": { + "url": "/api/workflows.triggers.permissions.add?token=YOUR_TOKEN", + "description": "If successful, the command returns the trigger's permission type and if applicable, the list of entities with access", + "example": { + "ok": true, + "permission_type": "named_entities", + "user_ids": [ + "U014KLZE350", + "U01565LTEBD" + ], + "channel_ids": [ + "C014LMDP71R" + ] + } + }, + "error": { + "url": "/api/workflows.triggers.permissions.list?token=INVALID_TOKEN", + "description": "Typical error response when the trigger's permission type is not `named_entities`", + "example": { + "ok": false, + "error": "invalid_permission_type" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/workflows.triggers.permissions.list.json b/docs.slack.dev/methods/workflows.triggers.permissions.list.json new file mode 100644 index 00000000..15dbc9bd --- /dev/null +++ b/docs.slack.dev/methods/workflows.triggers.permissions.list.json @@ -0,0 +1,63 @@ +{ + "desc": "Returns the permission type of a trigger and if applicable, includes the entities that have been granted access", + "http_method": "POST", + "scope": "triggers:read", + "no_scope_required": false, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "trigger_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "trigger_id": { + "type": "string", + "desc": "Encoded ID of the trigger", + "example": "Ft0000000001" + } + } + }, + "output": { + "schema": "trigger-run-acl" + }, + "errors": { + "unknown_method": { + "desc": "This method does not exist." + }, + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "trigger_not_found": { + "desc": "This trigger does not exist." + } + }, + "examples": { + "success": { + "url": "/api/workflows.triggers.permissions.list?token=YOUR_TOKEN", + "description": "If successful, the command returns the trigger's permission type and if applicable, the list of entities with access", + "example": { + "ok": true, + "permission_type": "app_collaborators", + "user_ids": [ + "U01565LTEBD" + ] + } + }, + "error": { + "url": "/api/workflows.triggers.permissions.list?token=INVALID_TOKEN", + "description": "Typical error response when the trigger ID is invalid", + "example": { + "ok": false, + "error": "trigger_not_found" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/workflows.triggers.permissions.remove.json b/docs.slack.dev/methods/workflows.triggers.permissions.remove.json new file mode 100644 index 00000000..cb6aac9c --- /dev/null +++ b/docs.slack.dev/methods/workflows.triggers.permissions.remove.json @@ -0,0 +1,167 @@ +{ + "desc": "Revoke an entity's access to a trigger that has its permission type set to named_entities", + "http_method": "POST", + "scope": "triggers:write", + "no_scope_required": false, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "trigger_id" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "trigger_id": { + "type": "string", + "desc": "Encoded ID of the trigger", + "example": "Ft0000000001" + }, + "user_ids": { + "type": "array", + "desc": "List of encoded user IDs", + "items": { + "schema": "user_id" + }, + "example": "U0000000001,U0000000002" + }, + "channel_ids": { + "type": "array", + "desc": "List of encoded channel IDs", + "items": { + "schema": "channel" + }, + "example": "C0000000001,C0000000002" + }, + "team_ids": { + "type": "array", + "desc": "List of encoded workspace IDs", + "items": { + "schema": "workspace_id" + }, + "example": "T0000000001,T0000000002" + }, + "org_ids": { + "type": "array", + "desc": "List of encoded organization IDs", + "example": "E00000001,E00000002", + "items": { + "schema": "enterprise_id" + } + } + } + }, + "output": { + "type": "object", + "required": [ + "permission_type" + ], + "properties": { + "permission_type": { + "type": "string", + "enum": [ + "everyone", + "app_collaborators", + "named_entities" + ] + }, + "user_ids": { + "type": "array", + "desc": "A list of encoded user IDs.", + "items": { + "schema": "user_id" + }, + "example": "U1234,U2345,U3456" + }, + "channel_ids": { + "type": "array", + "desc": "A list of encoded channel IDs.", + "items": { + "schema": "channel" + } + }, + "team_ids": { + "type": "array", + "desc": "Encoded workspace IDs.", + "items": { + "schema": "workspace_id" + } + }, + "org_ids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "errors": { + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "connected_org_denied": { + "desc": "The workspace admin does not allow connected organizations to be named_entities." + }, + "connected_team_denied": { + "desc": "The workspace admin does not allow connected teams to be named_entities." + }, + "connected_user_denied": { + "desc": "The workspace admin does not allow connected users to be named_entities." + }, + "named_entities_cannot_be_empty": { + "desc": "There must be at least one valid named entity" + }, + "org_not_connected": { + "desc": "One of more of the listed organizations were not connected." + }, + "org_not_found": { + "desc": "One or more of the listed organizations could not be found." + }, + "shared_channel_denied": { + "desc": "The workspace admin does not allow shared channels to be named_entities." + }, + "trigger_not_found": { + "desc": "This trigger does not exist." + }, + "invalid_permission_type": { + "desc": "This trigger requires permission_type to be set as named_entities before adding users." + }, + "too_many_named_entities": { + "desc": "Too many named entities passed into the trigger permissions setting." + }, + "unknown_method": { + "desc": "This method does not exist." + } + }, + "examples": { + "success": { + "url": "/api/workflows.triggers.permissions.remove?token=YOUR_TOKEN", + "description": "If successful, the command returns the trigger's permission type and if applicable, the list of entities with access", + "example": { + "ok": true, + "permission_type": "named_entities", + "user_ids": [ + "U014KLZE350", + "U01565LTEBD" + ], + "channel_ids": [ + "C014LMDP71R" + ] + } + }, + "error": { + "url": "/api/workflows.triggers.permissions.remove?token=INVALID_TOKEN", + "description": "Typical error response when the trigger's permission type is not `named_entities`", + "example": { + "ok": false, + "error": "invalid_permission_type" + } + } + } +} \ No newline at end of file diff --git a/docs.slack.dev/methods/workflows.triggers.permissions.set.json b/docs.slack.dev/methods/workflows.triggers.permissions.set.json new file mode 100644 index 00000000..31af6138 --- /dev/null +++ b/docs.slack.dev/methods/workflows.triggers.permissions.set.json @@ -0,0 +1,150 @@ +{ + "desc": "Set the permission type for who can run a trigger", + "http_method": "POST", + "scope": "triggers:write", + "no_scope_required": false, + "json_input_supported": true, + "rate_limits": "t3", + "args": { + "type": "object", + "required": [ + "token", + "trigger_id", + "permission_type" + ], + "properties": { + "token": { + "type": "string", + "subtype": "auth", + "desc": "Authentication token bearing required scopes. Tokens should be passed as an HTTP Authorization header or alternatively, as a POST parameter.", + "example": "xxxx-xxxxxxxxx-xxxx" + }, + "trigger_id": { + "type": "string", + "desc": "Encoded ID of the trigger", + "example": "Ft0000000001" + }, + "permission_type": { + "desc": "The type of permission that defines who can run a trigger", + "type": "string", + "enum": [ + "everyone", + "app_collaborators", + "named_entities" + ] + }, + "user_ids": { + "type": "array", + "desc": "List of encoded user IDs", + "items": { + "schema": "user_id" + }, + "example": "U0000000001,U0000000002" + }, + "channel_ids": { + "type": "array", + "desc": "List of encoded channel IDs", + "items": { + "schema": "channel" + }, + "example": "C0000000001,C0000000002" + }, + "team_ids": { + "type": "array", + "desc": "List of encoded workspace IDs", + "items": { + "schema": "workspace_id" + }, + "example": "T0000000001,T0000000002" + }, + "org_ids": { + "type": "array", + "desc": "List of encoded organization IDs", + "example": "E00000001,E00000002", + "items": { + "schema": "enterprise_id" + } + } + } + }, + "output": { + "schema": "trigger-run-acl" + }, + "errors": { + "access_denied": { + "desc": "This actor does not have access to the permissions on this resource." + }, + "channel_not_found": { + "desc": "One or more of the listed channels could not be found." + }, + "connected_org_denied": { + "desc": "The workspace admin does not allow connected organizations to be named_entities." + }, + "connected_team_denied": { + "desc": "The workspace admin does not allow connected teams to be named_entities." + }, + "connected_user_denied": { + "desc": "The workspace admin does not allow connected users to be named_entities." + }, + "external_workspace_denied": { + "desc": "The channel selected is not on the workflow team." + }, + "invalid_permission_type": { + "desc": "This function requires permission_type to be set as named_entities before adding users." + }, + "named_entities_cannot_be_empty": { + "desc": "Must pass at least one valid named entity." + }, + "no_valid_named_entities": { + "desc": "None of the provided named entities were valid" + }, + "org_not_found": { + "desc": "One or more of the listed organizations could not be found." + }, + "org_not_connected": { + "desc": "One of more of the listed organizations were not connected." + }, + "shared_channel_denied": { + "desc": "The workspace admin does not allow shared channels to be named_entities." + }, + "team_not_connected": { + "desc": "One of more of the listed teams were not connected by org." + }, + "team_not_found": { + "desc": "One or more of the listed teams could not be found." + }, + "too_many_named_entities": { + "desc": "Too many named_entities passed into the trigger permissions setting." + }, + "trigger_not_found": { + "desc": "This trigger does not exist." + }, + "unknown_method": { + "desc": "This method does not exist." + }, + "user_not_found": { + "desc": "One or more of the listed users could not be found." + } + }, + "examples": { + "success": { + "url": "/api/workflows.triggers.permissions.set?token=YOUR_TOKEN", + "description": "If successful, the command returns the trigger's permission type and if applicable, the list of entities with access", + "example": { + "ok": true, + "permission_type": "named_entities", + "user_ids": [ + "U01565LTEBD" + ] + } + }, + "error": { + "url": "/api/workflows.triggers.permissions.set?token=INVALID_TOKEN", + "description": "Typical error response when `permission_type` is set to named_entities` but no entities are provided", + "example": { + "ok": false, + "error": "named_entities_cannot_be_empty" + } + } + } +} \ No newline at end of file diff --git a/tasks/download.rake b/tasks/download.rake new file mode 100644 index 00000000..2b01eb9c --- /dev/null +++ b/tasks/download.rake @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require_relative 'lib/docs/downloader' + +namespace :api do + namespace :ref do + desc 'Download JSON reference.' + task :download do + FileUtils.rm_rf 'docs.slack.dev' + downloader = SlackApi::Docs::Downloader.new + downloader.download! + puts "\nFinished downloading reference." + end + end +end diff --git a/tasks/events.rake b/tasks/events.rake new file mode 100644 index 00000000..b521eb67 --- /dev/null +++ b/tasks/events.rake @@ -0,0 +1,14 @@ +require_relative 'lib/slack_api/spec_validator' + +namespace :api do + namespace :events do + desc 'Validate scraped events are valid.' + task :validate do + schema = File.read('schemas/events.json') + validator = SlackApi::SpecValidator.new(schema) + Dir.glob('events/**/*.json').each do |file| + abort "Invalid file format: #{file}" unless validator.valid?(file) + end + end + end +end diff --git a/tasks/lib/docs/downloader.rb b/tasks/lib/docs/downloader.rb new file mode 100644 index 00000000..2a09c617 --- /dev/null +++ b/tasks/lib/docs/downloader.rb @@ -0,0 +1,25 @@ +require_relative 'methods_downloader' +require_relative 'events_downloader' + +module SlackApi + module Docs + class Downloader + def target_path + @target_path ||= File.expand_path('../../../docs.slack.dev', __dir__) + end + + def download! + methods_downloader.download! + events_downloader.download! + end + + def methods_downloader + @methods_downloader ||= MethodsDownloader.new(target_path) + end + + def events_downloader + @events_downloader ||= EventsDownloader.new(target_path) + end + end + end +end diff --git a/tasks/lib/docs/events_downloader.rb b/tasks/lib/docs/events_downloader.rb new file mode 100644 index 00000000..6406bb75 --- /dev/null +++ b/tasks/lib/docs/events_downloader.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +module SlackApi + module Docs + class EventsDownloader + def initialize(target_path) + @target_path = target_path + end + + def events_dir + File.join(@target_path, 'events') + end + + def events_path + File.join(events_dir, 'events.json') + end + + def events_url + 'https://docs.slack.dev/reference/events.json' + end + + def download! + puts "#{events_url} => #{events_path}" + URI.open(events_url) do |file| + json = JSON.parse(file.read) + FileUtils.mkdir_p(events_dir) + File.write(events_path, JSON.pretty_generate(json)) + end + end + end + end +end diff --git a/tasks/lib/docs/methods_downloader.rb b/tasks/lib/docs/methods_downloader.rb new file mode 100644 index 00000000..8faafbc2 --- /dev/null +++ b/tasks/lib/docs/methods_downloader.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +module SlackApi + module Docs + class MethodsDownloader + def initialize(target_path) + @target_path = target_path + end + + def methods_dir + File.join(@target_path, 'methods') + end + + def methods_path + File.join(methods_dir, 'methods.json') + end + + def methods_url + 'https://docs.slack.dev/reference/methods.json' + end + + def method_url(method) + "https://docs.slack.dev/reference/methods/#{method}.json" + end + + def method_target_path(method_name) + File.join(methods_dir, "#{method_name}.json") + end + + def download! + puts "#{methods_url} => #{methods_path}" + FileUtils.mkdir_p(methods_dir) + URI.open(methods_url) do |file| + json = JSON.parse(file.read) + File.write(methods_path, JSON.pretty_generate(json)) + json.each do |method| + method_name = method['name'] + method_url = method_url(method_name) + method_target_path = method_target_path(method_name) + puts "#{method_url} => #{method_target_path}" + URI.open(method_url) do |method_file| + method_json = JSON.parse(method_file.read) + File.write(method_target_path, JSON.pretty_generate(method_json)) + end + end + end + end + end + end +end diff --git a/tasks/lib/slack_api/base_spider.rb b/tasks/lib/slack_api/base_spider.rb deleted file mode 100644 index a814c718..00000000 --- a/tasks/lib/slack_api/base_spider.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module SlackApi - # Abstract base class for each Spider implementation - class BaseSpider < Spidey::AbstractSpider - class ElementNotFound < StandardError; end - - def ensure!(root, selector, label = nil) - label ||= self.class.name.split('::').last.gsub('Spider', '').downcase - element = root.search(selector) - return element if element.any? - - raise ElementNotFound, "Could not find #{selector} for #{label}" - end - end -end diff --git a/tasks/lib/slack_api/events_spider.rb b/tasks/lib/slack_api/events_spider.rb deleted file mode 100644 index 960ed04f..00000000 --- a/tasks/lib/slack_api/events_spider.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -module SlackApi - # Scrapes Slack events - class EventsSpider < BaseSpider - handle 'https://api.slack.com/events', :process_list - - def process_list(page, _default_data = {}) - events_page = ensure!(page, '.apiEventsPage') - list = events_page.search('.apiEventPage__eventList') - ref = list.search('[data-automount-component=ApiDocsFilterableReferenceList]') - data = JSON.parse(ref.attribute('data-automount-props')) - raise(ElementNotFound, 'Could not parse events reference') unless data['items'].any? - - data['items'].each do |event| - next unless event['isPublic'] - next if event['isDeprecated'] - next unless event['groups'].include?('RTM') - - handle resolve_url(event['link'], page), - :process_event, - name: event['name'], - desc: event['description'], - required_scope: 'RTM' - end - end - - def process_event(page, data = {}) - event_page = ensure!(page, '.apiEventPage', data[:name]) - descriptions = event_page.search('.apiDocsPage__markdownOutput p') - long_desc = descriptions.map(&:text).join(' ').gsub("\n", ' ').strip - # required_scopes = event_page.search('.apiReference__scope code').map(&:text).map(&:strip).join(', ') - - json_hash = { - 'name' => data[:name], - 'desc' => "#{data[:desc]}.", - 'long_desc' => long_desc, - 'required_scope' => data[:required_scope] - } - - example = begin - JSON.parse( - event_page.search('.apiDocsPage__markdownOutput pre:first code') - .text - .gsub('…', '') - .gsub('...', '') - .gsub("\n", ' ') - .gsub(/\s+/, ' ') - .gsub(', }', '}') - .gsub(', ]', ']') - ) - rescue StandardError - nil - end - - json_hash['example'] = example if example - - record(file_name: "events/#{data[:name]}.json", json: JSON.pretty_generate(json_hash)) - end - end -end diff --git a/tasks/lib/slack_api/methods_generator.rb b/tasks/lib/slack_api/methods_generator.rb new file mode 100644 index 00000000..013e5b00 --- /dev/null +++ b/tasks/lib/slack_api/methods_generator.rb @@ -0,0 +1,140 @@ +module SlackApi + class MethodsGenerator + def downloader + @downloader ||= SlackApi::Docs::Downloader.new + end + + def generate! + methods = JSON.load_file(downloader.methods_downloader.methods_path) + groups = Set.new + + methods.each do |method_data| + groups += method_data['family'] + + method_filename = downloader.methods_downloader.method_target_path(method_data['name']) + data = JSON.load_file(method_filename) + + process_method( + data.merge( + 'name' => method_data['name'], + 'group' => method_data['family'].first.split('.').first + ) + ) + end + + FileUtils.mkdir_p('groups') + groups.each do |group| + filename = "groups/#{group}.json" + puts filename + File.write(filename, JSON.pretty_generate(name: group)) + end + end + + private + + def process_method(data) + args, fields = parse_args(data) + + errors = parse_errors(data) + response = parse_response(data) + + result = { + group: data['group'], + name: data['name'], + deprecated: false, + desc: data['desc'], + args: args, + response: response, + errors: errors + }.merge(fields) + + filename = "methods/#{data['group']}/#{data['name']}.json" + FileUtils.mkdir_p("methods/#{data['group']}") + puts filename + File.write(filename, JSON.pretty_generate(result)) + end + + def parse_args(data) + args = {} + fields = {} + + data['args']['properties'].each_pair do |name, arg| + all = [] + arg['anyOf']&.each do |coll| + all << coll['type'] unless coll['type'] == 'null' + end + arg['type'] = Array(all).length == 1 ? all.first : all if all.any? + arg.delete('anyOf') + + type = massage_type(name, arg, data) + required = data['args']['required']&.include?(name) + + desc = arg['desc'] + &.tap { |t| t.slice!("\n") } + &.tap { |t| t << '.' unless t.end_with?('.') } + &.gsub('’', "'") + example = arg['example'] || arg['default'] + + case name + when 'token' + # ignore token, always required + when 'count', 'page' + fields['has_paging'] = true + fields['default_count'] = 100 + else + h = {} + h['required'] = required + h['example'] = example if example + h['desc'] = desc if desc + h['type'] = type if type + h['format'] = 'json' if desc&.include?('JSON') + args[name] = h + end + end + + [args.sort.to_h, fields] + end + + def massage_type(name, arg, data = {}) + return 'enum' if arg.key?('enum') + + case name + when 'date' then 'date' + when 'latest', 'oldest', 'ts' then 'timestamp' + when 'file' then 'file' + when 'bot', 'user' then 'user' + when 'channel' + case data[:method_group] + when 'im' then 'im' + when 'mpim' then 'mpim' + when 'groups' then 'group' + else 'channel' + end + else + case detected = arg['type'] + when '', 'null' then nil + else detected + end + end + end + + def parse_response(data) + examples = [] + data['examples']&.each_pair do |_example_type, response| + example = JSON.pretty_generate(response['example'], indent: ' ') + example.gsub!(/\{\n\s*\}/, '{}') + example.gsub!(/\[\n\s*\]/, '[]') + examples.push example + end + { 'examples' => examples } + end + + def parse_errors(data) + errors = {} + data['errors']&.each_pair do |name, desc| + errors[name] = desc['desc'] + end + errors + end + end +end diff --git a/tasks/lib/slack_api/methods_spider.rb b/tasks/lib/slack_api/methods_spider.rb deleted file mode 100644 index 715229f8..00000000 --- a/tasks/lib/slack_api/methods_spider.rb +++ /dev/null @@ -1,188 +0,0 @@ -# frozen_string_literal: true - -module SlackApi - # Scrapes Slack Web API method - class MethodsSpider < BaseSpider - handle 'https://api.slack.com/methods', :process_list - - def process_list(page, _default_data = {}) - methods_page = ensure!(page, '.apiMethodPage') - list = methods_page.search('.apiMethodPage__methodList') - ref = list.search('[data-automount-component=ApiDocsFilterableReferenceList]') - data = JSON.parse(ref.attribute('data-automount-props')) - raise(ElementNotFound, 'Could not parse methods reference') unless data['items'].any? - - groups = Set.new - data['items'].each do |method| - next unless method['isPublic'] - next if method['isDeprecated'] - - groups += method['groups'] - method_name = method['name'] - method_group = method['groups'].first.split('.').first - file_name = "methods/#{method_group}/#{method_name}.json" - method_url = resolve_url(method['link'], page) - handle method_url, - :process_method, - filename: file_name, - method_name: method_name, - method_group: method_group, - method_url: method_url - end - - groups.each do |group| - file_name = "groups/#{group}.json" - json_hash = { name: group } - record(file_name: file_name, json: JSON.pretty_generate(json_hash)) - end - end - - def process_method(page, default_data = {}) - method_page = ensure!(page, '.apiMethodPage', default_data[:method_name]) - desc = method_page.search('.apiReference__mainDescription').text.gsub('’', "'") - return if desc.downcase.start_with? 'deprecated:' - - args, arg_groups, fields = parse_args(method_page, default_data) - errors = parse_errors(method_page, default_data) - response = parse_response(method_page, default_data) - - json_hash = { - 'group' => default_data[:method_group], - 'name' => default_data[:method_name], - 'deprecated' => false, # Deprecated methods are filtered out - 'desc' => desc, - 'args' => args, - 'arg_groups' => arg_groups, - 'response' => response, - 'errors' => errors - }.compact.merge(fields) - - record(file_name: default_data[:filename], json: JSON.pretty_generate(json_hash)) - end - - private - - def parse_args(api_page, default_data = {}) - args_wrapper = ensure!(api_page, '.apiReference__arguments', default_data[:method_name]) - rows = args_wrapper.search('.apiMethodPage__argumentRow') - args = {} - fields = {} - rows.each do |row| - name = row.search('.apiMethodPage__argument code').text - type = massage_type(name, - row.search('.apiMethodPage__argumentType').text, - default_data) - required = row.search('.apiMethodPage__argumentOptionality--required').any? - - desc = row.search('.apiMethodPage__argumentDesc p') - .text - .tap { |t| t.slice!("\n") } - .tap { |t| t << '.' unless t.end_with?('.') } - .gsub('’', "'") - example = row.search('.apiReference__exampleCode code').first&.text - - case name - when 'token' - # ignore token, always required - when 'count', 'page' - fields['has_paging'] = true - fields['default_count'] = 100 - else - h = {} - h['required'] = required - h['example'] = example if example - h['desc'] = desc if desc - h['type'] = type if type - h['format'] = 'json' if desc&.include?('JSON') - args[name] = h - end - end - - arg_groups = parse_arg_groups(args_wrapper) - - [args, arg_groups, fields] - end - - def parse_arg_groups(args_wrapper) - # Look for groups of args that are interdependent - groups = args_wrapper.search('.apiMethodPage__argumentGroup') - groups = groups.map do |group| - # "At least one of" or "One of" - requirement = group.search('.apiMethodPage__argument em').text - mutually_exclusive = requirement.downcase == 'one of' - - desc = group.search('.apiMethodPage__argumentGroupDesc p') - .text - .tap { |t| t.slice!("\n") } - .tap { |t| t << '.' unless t.end_with?('.') } - .gsub('’', "'") - - rows = group.search('.apiMethodPage__argumentRow') - names = rows.map do |row| - row.search('.apiMethodPage__argument code').text - end - - { - 'args' => names, - 'desc' => desc, - 'mutually_exclusive' => mutually_exclusive - } - end - - groups unless groups.empty? - end - - def massage_type(name, detected, default_data = {}) - case name - when 'date' then 'date' - when 'latest', 'oldest', 'ts' then 'timestamp' - when 'file' then 'file' - when 'bot', 'user' then 'user' - when 'channel' - case default_data[:method_group] - when 'im' then 'im' - when 'mpim' then 'mpim' - when 'groups' then 'group' - else 'channel' - end - else - case detected - when '', 'null' then nil - else detected - end - end - end - - def parse_response(api_page, default_data = {}) - response_wrapper = ensure!(api_page, '.apiReference__response', default_data[:method_name]) - responses = response_wrapper.search('.apiReference__example') - examples = [] - responses.each do |response| - response.search('pre').each do |pre| - text = pre.text.strip - next unless text =~ /^\{.*}$/m - - examples.push(text) - end - end - { 'examples' => examples } - end - - def parse_errors(api_page, default_data = {}) - errors_wrapper = ensure!(api_page, '.apiReference__errors', default_data[:method_name]) - rows = errors_wrapper.search('.apiDocsTable tr') - errors = {} - rows.each do |row| - next if row.search('th').any? - - name = row.search('[data-label=Error]').text - desc = row.search('[data-label=Description]').text - .tap { |t| t.slice!("\n") } - .tap { |t| t << '.' unless t.end_with?('.') } - - errors[name] = desc - end - errors - end - end -end diff --git a/tasks/methods.rake b/tasks/methods.rake new file mode 100644 index 00000000..669ad712 --- /dev/null +++ b/tasks/methods.rake @@ -0,0 +1,14 @@ +require_relative 'lib/slack_api/spec_validator' + +namespace :api do + namespace :methods do + desc 'Validate scraped methods are valid.' + task :validate do + schema = File.read('schemas/methods.json') + validator = SlackApi::SpecValidator.new(schema) + Dir.glob('methods/**/*.json').each do |file| + abort "Invalid file format: #{file}" unless validator.valid?(file) + end + end + end +end diff --git a/tasks/update.rake b/tasks/update.rake index 69331109..a90e5b5e 100644 --- a/tasks/update.rake +++ b/tasks/update.rake @@ -1,103 +1,16 @@ -# frozen_string_literal: true - -require_relative 'lib/slack_api/base_spider' -require_relative 'lib/slack_api/methods_spider' -require_relative 'lib/slack_api/events_spider' -require_relative 'lib/slack_api/spec_validator' +require_relative 'lib/slack_api/methods_generator' namespace :api do - namespace :events do - desc 'Scrape Slack events, replacing previous results.' - task :update do - Rake::Task['api:clean_files'].invoke('events') - spider = SlackApi::EventsSpider.new(verbose: true, request_interval: 0) - spider.crawl - - puts "\nRecording #{spider.results.size} events" - spider.results.each do |result| - File.write(result[:file_name], result[:json]) - end - - if spider.errors.any? - puts "\nEncountered #{spider.errors.size} errors!" - spider.errors.each do |error| - puts " #{error[:error]} (#{error[:handler]}, #{error[:url]})\n" - end - end - - puts "\nFinished updating events" - end - - desc 'Validate scraped events are valid.' - task :validate do - schema = File.read('schemas/events.json') - validator = SlackApi::SpecValidator.new(schema) - Dir.glob('events/**/*.json').each do |file| - abort "Invalid file format: #{file}" unless validator.valid?(file) - end - end - end - namespace :methods do - desc 'Scrape Slack Web API methods, replacing previous results.' + desc 'Update methods.' task :update do - Rake::Task['api:clean_files'].invoke(%w[groups methods]) - spider = SlackApi::MethodsSpider.new(verbose: true, request_interval: 0) - spider.crawl - - puts "\nRecording #{spider.results.size} methods" - spider.results.each do |result| - dir = File.dirname(result[:file_name]) - FileUtils.mkdir_p(dir) - File.write(result[:file_name], result[:json]) - end - - if spider.errors.any? - puts "\nEncountered #{spider.errors.size} errors!" - spider.errors.each do |error| - puts " #{error[:error]} (#{error[:handler]}, #{error[:url]})\n" - end - end - - puts "\nFinished updating methods" - end - - desc 'Validate scraped methods are valid.' - task :validate do - schema = File.read('schemas/methods.json') - validator = SlackApi::SpecValidator.new(schema) - Dir.glob('methods/**/*.json').each do |file| - abort "Invalid file format: #{file}" unless validator.valid?(file) - end + FileUtils.rm_rf 'methods' + FileUtils.rm_rf 'groups' + SlackApi::MethodsGenerator.new.generate! end end - desc 'Update scraped Slack events and Web API methods.' task :update do Rake::Task['api:methods:update'].invoke - Rake::Task['api:events:update'].invoke - Rake::Task['api:delete_undocumented'].invoke - end - - desc 'Validate scraped Slack events and Web API methods.' - task :validate do - Rake::Task['api:methods:validate'].invoke - Rake::Task['api:events:validate'].invoke - end - - desc 'Delete all generated files except undocumented ones.' - task :clean_files, :dirs do |_t, args| - files = Dir["./{#{Array(args[:dirs]).join(',')}}/*"].grep_v(%r{/undocumented\b}) - FileUtils.rm_rf files - end - - desc 'Delete any undocumented methods that have since been documented.' - task :delete_undocumented do - Dir.glob('**/undocumented/**/*.json').each do |file| - parent_file = file.gsub 'undocumented/', '' - next unless File.exist?(parent_file) - - FileUtils.rm file - end end end diff --git a/tasks/validate.rake b/tasks/validate.rake new file mode 100644 index 00000000..6eb4b8a6 --- /dev/null +++ b/tasks/validate.rake @@ -0,0 +1,9 @@ +require_relative 'lib/slack_api/spec_validator' + +namespace :api do + desc 'Validate scraped methods and events are valid.' + task :validate do + Rake::Task['api:methods:validate'].invoke + Rake::Task['api:events:validate'].invoke + end +end