diff --git a/web-api/CHANGELOG.md b/web-api/CHANGELOG.md index 03532be..8619aec 100644 --- a/web-api/CHANGELOG.md +++ b/web-api/CHANGELOG.md @@ -1,5 +1,17 @@ # Web API specifications changelog +#### August 2020 + +A number of new methods, especially for admins, have been added to the API recently and are now accounted for here. + +Deprecated methods that precede the Conversations API are no longer listed in the specification. [Learn more](https://api.slack.com/changelog/2020-01-deprecating-antecedents-to-the-conversations-api). + +As usual, many clarifications as we harden our internal schema. + +We're really looking forward to generating an OpenAPI 3.0 spec for you soon, as well as release more schema for Block Kit. + +Thanks for hanging in there. + #### April 2020 We fixed up the scripts that generate OpenAPI specs for us and have updated the spec to include many new methods and more solid schemas across the board. Full Block Kit schemas are still unavailable. diff --git a/web-api/slack_web_openapi_v2.json b/web-api/slack_web_openapi_v2.json index 0973bf2..72c5dfb 100644 --- a/web-api/slack_web_openapi_v2.json +++ b/web-api/slack_web_openapi_v2.json @@ -62,7 +62,7 @@ "type": "string" }, "defs_enterprise_user_id": { - "pattern": "^[W][A-Z0-9]{8,}$", + "pattern": "^[WU][A-Z0-9]{8,}$", "title": "Enterprise User ID", "type": "string" }, @@ -90,6 +90,11 @@ "title": "default success response", "type": "boolean" }, + "defs_optional_app_id": { + "pattern": "^(A[A-Z0-9]{1,})?$", + "title": "App ID or empty string", + "type": "string" + }, "defs_pinned_info": { "additionalProperties": false, "title": "Info for a pinned item", @@ -465,10 +470,6 @@ "enterprise_id": { "$ref": "#/definitions/defs_enterprise_id" }, - "external_connections": { - "additionalProperties": false, - "type": "object" - }, "has_pins": { "type": "boolean" }, @@ -711,6 +712,9 @@ "unread_count_display": { "type": "integer" }, + "use_case": { + "type": "string" + }, "user": { "$ref": "#/definitions/defs_user_id" }, @@ -1185,7 +1189,6 @@ "items": { "$ref": "#/definitions/defs_team" }, - "minItems": 1, "type": "array", "uniqueItems": true } @@ -1200,6 +1203,37 @@ ], "type": "object" }, + "objs_external_org_migrations": { + "properties": { + "current": { + "items": { + "properties": { + "date_started": { + "type": "integer" + }, + "team_id": { + "type": "string" + } + }, + "required": [ + "team_id", + "date_started" + ], + "type": "object" + }, + "type": "array" + }, + "date_updated": { + "type": "integer" + } + }, + "required": [ + "date_updated", + "current" + ], + "title": "External Org Migrations", + "type": "object" + }, "objs_file": { "additionalProperties": false, "properties": { @@ -1458,141 +1492,6 @@ "title": "file object", "type": "object" }, - "objs_group": { - "additionalProperties": false, - "properties": { - "created": { - "type": "integer" - }, - "creator": { - "$ref": "#/definitions/defs_user_id" - }, - "id": { - "$ref": "#/definitions/defs_group_id" - }, - "is_archived": { - "type": "boolean" - }, - "is_deleted": { - "type": "boolean" - }, - "is_group": { - "type": "boolean" - }, - "is_moved": { - "type": "integer" - }, - "is_mpim": { - "type": "boolean" - }, - "is_open": { - "type": "boolean" - }, - "is_pending_ext_shared": { - "type": "boolean" - }, - "is_read_only": { - "type": "boolean" - }, - "is_thread_only": { - "type": "boolean" - }, - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest": { - "items": [ - { - "$ref": "#/definitions/objs_message" - }, - { - "type": "null" - } - ] - }, - "members": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, - "name": { - "type": "string" - }, - "name_normalized": { - "type": "string" - }, - "num_members": { - "type": "integer" - }, - "parent_group": { - "$ref": "#/definitions/defs_group_id" - }, - "priority": { - "type": "number" - }, - "purpose": { - "additionalProperties": false, - "properties": { - "creator": { - "$ref": "#/definitions/defs_topic_purpose_creator" - }, - "last_set": { - "type": "integer" - }, - "value": { - "type": "string" - } - }, - "required": [ - "value", - "creator", - "last_set" - ], - "type": "object" - }, - "topic": { - "additionalProperties": false, - "properties": { - "creator": { - "$ref": "#/definitions/defs_topic_purpose_creator" - }, - "last_set": { - "type": "integer" - }, - "value": { - "type": "string" - } - }, - "required": [ - "value", - "creator", - "last_set" - ], - "type": "object" - }, - "unread_count": { - "type": "integer" - }, - "unread_count_display": { - "type": "integer" - } - }, - "required": [ - "id", - "name", - "is_group", - "created", - "creator", - "name_normalized", - "topic", - "purpose" - ], - "title": "Group object", - "type": "object" - }, "objs_icon": { "properties": { "image_102": { @@ -1622,57 +1521,6 @@ }, "type": "object" }, - "objs_im": { - "additionalProperties": false, - "properties": { - "created": { - "type": "integer" - }, - "id": { - "$ref": "#/definitions/defs_dm_id" - }, - "is_app_home": { - "type": "boolean" - }, - "is_archived": { - "type": "boolean" - }, - "is_ext_shared": { - "type": "boolean" - }, - "is_frozen": { - "type": "boolean" - }, - "is_im": { - "type": "boolean" - }, - "is_org_shared": { - "type": "boolean" - }, - "is_shared": { - "type": "boolean" - }, - "is_user_deleted": { - "type": "boolean" - }, - "priority": { - "type": "number" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "id", - "is_im", - "is_org_shared", - "user", - "created", - "is_user_deleted" - ], - "title": "IM Object", - "type": "object" - }, "objs_message": { "additionalProperties": false, "properties": { @@ -1750,6 +1598,10 @@ "properties": { "emoji": { "type": "string" + }, + "image_64": { + "format": "uri", + "type": "string" } }, "type": "object" @@ -1800,25 +1652,6 @@ }, "type": "array" }, - "replies": { - "items": { - "additionalProperties": false, - "properties": { - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "user", - "ts" - ], - "type": "object" - }, - "type": "array" - }, "reply_count": { "type": "integer" }, @@ -1916,6 +1749,21 @@ "title": "paging object", "type": "object" }, + "objs_primary_owner": { + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "id", + "email" + ], + "type": "object" + }, "objs_reaction": { "additionalProperties": true, "properties": { @@ -2014,39 +1862,99 @@ "type": "object" }, "objs_response_metadata": { - "additionalProperties": false, - "properties": { - "next_cursor": { - "type": "string" - } - }, - "required": [ - "next_cursor" - ], - "title": "new paging style", - "type": "object" - }, - "objs_scopes": { - "items": { - "title": "Named OAuth scopes", - "type": "string", - "x-examples": [ - "chat:write", - "im:history", - "im:read" - ] - }, - "type": "array" - }, - "objs_subteam": { - "additionalProperties": false, - "properties": { - "auto_provision": { - "type": "boolean" - }, - "auto_type": { - "items": [ - { + "items": [ + { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string" + } + }, + "required": [ + "next_cursor" + ], + "title": "new paging style", + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "messages": { + "items": { + "type": "string" + }, + "type": "array" + }, + "warnings": { + "items": { + "enum": [ + "method_deprecated" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "messages", + "warnings" + ], + "title": "deprecation_warning", + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "messages": { + "items": { + "type": "string" + }, + "type": "array" + }, + "next_cursor": { + "type": "string" + }, + "warnings": { + "items": { + "enum": [ + "method_deprecated" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "messages", + "warnings", + "next_cursor" + ], + "title": "deprecation_warning and paging style together", + "type": "object" + } + ] + }, + "objs_scopes": { + "items": { + "title": "Named OAuth scopes", + "type": "string", + "x-examples": [ + "chat:write", + "im:history", + "im:read" + ] + }, + "type": "array" + }, + "objs_subteam": { + "additionalProperties": false, + "properties": { + "auto_provision": { + "type": "boolean" + }, + "auto_type": { + "items": [ + { "type": "null" }, { @@ -2058,6 +1966,9 @@ } ] }, + "channel_count": { + "type": "integer" + }, "created_by": { "$ref": "#/definitions/defs_user_id" }, @@ -2185,10 +2096,20 @@ "type": "boolean" }, "description": { - "type": "string" + "type": [ + "null", + "string" + ] }, "discoverable": { - "type": "string" + "items": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, "domain": { "type": "string" @@ -2202,6 +2123,9 @@ "enterprise_name": { "$ref": "#/definitions/defs_enterprise_name" }, + "external_org_migrations": { + "$ref": "#/definitions/objs_external_org_migrations" + }, "has_compliance_export": { "type": "boolean" }, @@ -2209,7 +2133,7 @@ "$ref": "#/definitions/objs_icon" }, "id": { - "$ref": "#/definitions/defs_team" + "$ref": "#/definitions/defs_workspace_id" }, "is_assigned": { "type": "boolean" @@ -2217,9 +2141,15 @@ "is_enterprise": { "type": "integer" }, + "is_over_storage_limit": { + "type": "boolean" + }, "limit_ts": { "type": "integer" }, + "locale": { + "type": "string" + }, "messages_count": { "type": "integer" }, @@ -2235,6 +2165,9 @@ "over_storage_limit": { "type": "boolean" }, + "pay_prod_cur": { + "type": "string" + }, "plan": { "enum": [ "", @@ -2244,6 +2177,23 @@ "enterprise" ], "type": "string" + }, + "primary_owner": { + "$ref": "#/definitions/objs_primary_owner" + }, + "sso_provider": { + "properties": { + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" } }, "required": [ @@ -2260,7 +2210,10 @@ "additionalProperties": false, "properties": { "field_name": { - "type": "string" + "type": [ + "null", + "string" + ] }, "hint": { "type": "string" @@ -2276,10 +2229,14 @@ "type": "string" }, "options": { - "items": { - "type": "string" - }, - "type": "array" + "items": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/objs_team_profile_field_option" + } + ] }, "ordering": { "type": "number" @@ -2288,7 +2245,10 @@ "items": { "type": "string" }, - "type": "array" + "type": [ + "null", + "array" + ] }, "type": { "enum": [ @@ -2307,11 +2267,40 @@ "ordering", "label", "hint", - "type", - "options" + "type" ], "type": "object" }, + "objs_team_profile_field_option": { + "additionalProperties": false, + "properties": { + "is_custom": { + "type": [ + "null", + "boolean" + ] + }, + "is_multiple_entry": { + "type": [ + "null", + "boolean" + ] + }, + "is_protected": { + "type": [ + "null", + "boolean" + ] + }, + "is_scim": { + "type": [ + "null", + "boolean" + ] + } + }, + "type": "object" + }, "objs_user": { "items": [ { @@ -2346,6 +2335,9 @@ "is_external": { "type": "boolean" }, + "is_forgotten": { + "type": "boolean" + }, "is_invited_user": { "type": "boolean" }, @@ -2358,6 +2350,9 @@ "is_restricted": { "type": "boolean" }, + "is_stranger": { + "type": "boolean" + }, "is_ultra_restricted": { "type": "boolean" }, @@ -2377,10 +2372,10 @@ "type": "string" }, "team": { - "$ref": "#/definitions/defs_team" + "$ref": "#/definitions/defs_workspace_id" }, "team_id": { - "$ref": "#/definitions/defs_team" + "$ref": "#/definitions/defs_workspace_id" }, "team_profile": { "additionalProperties": false, @@ -2425,7 +2420,6 @@ "required": [ "id", "name", - "deleted", "profile", "is_bot", "updated", @@ -2439,7 +2433,7 @@ "properties": { "color": { "description": "refercing to bug: https://jira.tinyspeck.com/browse/EVALUE-1559", - "pattern": "^$", + "pattern": "^([a-fA-F0-9]{6})?$", "type": "string" }, "deleted": { @@ -2466,6 +2460,9 @@ "is_external": { "type": "boolean" }, + "is_forgotten": { + "type": "boolean" + }, "is_owner": { "type": "boolean" }, @@ -2475,6 +2472,9 @@ "is_restricted": { "type": "boolean" }, + "is_stranger": { + "type": "boolean" + }, "is_ultra_restricted": { "type": "boolean" }, @@ -2494,7 +2494,7 @@ "type": "string" }, "team_id": { - "$ref": "#/definitions/defs_team" + "$ref": "#/definitions/defs_workspace_id" }, "team_profile": { "additionalProperties": false, @@ -2547,10 +2547,7 @@ "required": [ "id", "name", - "deleted", "profile", - "is_restricted", - "is_ultra_restricted", "is_bot", "updated", "is_app_user" @@ -2566,7 +2563,7 @@ "type": "boolean" }, "api_app_id": { - "$ref": "#/definitions/defs_app_id" + "$ref": "#/definitions/defs_optional_app_id" }, "avatar_hash": { "type": "string" @@ -2582,7 +2579,10 @@ }, "email": { "format": "email", - "type": "string" + "type": [ + "null", + "string" + ] }, "fields": { "items": { @@ -2595,55 +2595,121 @@ ] }, "first_name": { - "type": "string" + "type": [ + "null", + "string" + ] }, "guest_expiration_ts": { - "type": "integer" + "type": [ + "null", + "integer" + ] }, "guest_invited_by": { - "type": "string" + "type": [ + "null", + "string" + ] }, "image_1024": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_192": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_24": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_32": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_48": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_512": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_72": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_original": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] + }, + "is_app_user": { + "type": "boolean" }, "is_custom_image": { "type": "boolean" }, - "last_name": { + "is_restricted": { + "type": [ + "null", + "boolean" + ] + }, + "is_ultra_restricted": { + "type": [ + "null", + "boolean" + ] + }, + "last_avatar_image_hash": { "type": "string" }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "memberships_count": { + "type": "integer" + }, + "name": { + "type": [ + "null", + "string" + ] + }, "phone": { "type": "string" }, + "pronouns": { + "type": "string" + }, "real_name": { "type": "string" }, @@ -2653,6 +2719,18 @@ "skype": { "type": "string" }, + "status_default_emoji": { + "type": "string" + }, + "status_default_text": { + "type": "string" + }, + "status_default_text_canonical": { + "type": [ + "null", + "string" + ] + }, "status_emoji": { "type": "string" }, @@ -2663,24 +2741,42 @@ "type": "string" }, "status_text_canonical": { - "type": "string" + "type": [ + "null", + "string" + ] }, "team": { "$ref": "#/definitions/defs_workspace_id" }, - "teams": { - "$ref": "#/definitions/defs_workspace_id" - }, "title": { "type": "string" - } - }, + }, + "updated": { + "type": "integer" + }, + "user_id": { + "type": "string" + }, + "username": { + "type": [ + "null", + "string" + ] + } + }, "required": [ "real_name", "display_name", "avatar_hash", "real_name_normalized", - "display_name_normalized" + "display_name_normalized", + "title", + "phone", + "skype", + "status_text", + "status_emoji", + "fields" ], "title": "User profile object", "type": "object" @@ -2698,7 +2794,10 @@ "type": "string" }, "first_name": { - "type": "string" + "type": [ + "string", + "null" + ] }, "image_72": { "format": "uri", @@ -2749,7 +2848,7 @@ }, "description": "One way to interact with the Slack platform is its HTTP RPC-based Web API, a collection of methods requiring OAuth 2.0-based user, bot, or workspace tokens blessed with related OAuth scopes.", "title": "Slack Web API", - "version": "1.5.0" + "version": "1.7.0" }, "paths": { "/admin.apps.approve": { @@ -2765,11 +2864,6 @@ }, "operationId": "admin_apps_approve", "parameters": [ - { - "in": "formData", - "name": "team_id", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:write`", "in": "header", @@ -2788,6 +2882,11 @@ "in": "formData", "name": "request_id", "type": "string" + }, + { + "in": "formData", + "name": "team_id", + "type": "string" } ], "produces": [ @@ -2865,12 +2964,6 @@ }, "operationId": "admin_apps_approved_list", "parameters": [ - { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", - "in": "query", - "name": "cursor", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:read`", "in": "query", @@ -2884,6 +2977,12 @@ "name": "limit", "type": "integer" }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "in": "query", + "name": "cursor", + "type": "string" + }, { "in": "query", "name": "team_id", @@ -3015,12 +3114,6 @@ }, "operationId": "admin_apps_requests_list", "parameters": [ - { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", - "in": "query", - "name": "cursor", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:read`", "in": "query", @@ -3034,6 +3127,12 @@ "name": "limit", "type": "integer" }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "in": "query", + "name": "cursor", + "type": "string" + }, { "in": "query", "name": "team_id", @@ -3171,11 +3270,6 @@ }, "operationId": "admin_apps_restrict", "parameters": [ - { - "in": "formData", - "name": "team_id", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:write`", "in": "header", @@ -3194,6 +3288,11 @@ "in": "formData", "name": "request_id", "type": "string" + }, + { + "in": "formData", + "name": "team_id", + "type": "string" } ], "produces": [ @@ -3271,12 +3370,6 @@ }, "operationId": "admin_apps_restricted_list", "parameters": [ - { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", - "in": "query", - "name": "cursor", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:read`", "in": "query", @@ -3290,6 +3383,12 @@ "name": "limit", "type": "integer" }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "in": "query", + "name": "cursor", + "type": "string" + }, { "in": "query", "name": "team_id", @@ -3409,26 +3508,19 @@ ] } }, - "/admin.conversations.setTeams": { + "/admin.conversations.archive": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Set the workspaces in an Enterprise grid org that connect to a channel.", + "description": "Archive a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.conversations.setTeams" + "url": "https://api.slack.com/methods/admin.conversations.archive" }, - "operationId": "admin_conversations_setTeams", + "operationId": "admin_conversations_archive", "parameters": [ - { - "description": "The encoded `channel_id` to add or remove to workspaces.", - "in": "formData", - "name": "channel_id", - "required": true, - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "header", @@ -3437,21 +3529,10 @@ "type": "string" }, { - "description": "True if channel has to be converted to an org channel", - "in": "formData", - "name": "org_channel", - "type": "boolean" - }, - { - "description": "The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.", - "in": "formData", - "name": "team_id", - "type": "string" - }, - { - "description": "The list of workspaces to which the channel should be shared. Not required if the channel is being shared orgwide. Example: `['T1234', 'T5678']`", + "description": "The channel to archive.", "in": "formData", - "name": "target_team_ids", + "name": "channel_id", + "required": true, "type": "string" } ], @@ -3467,8 +3548,8 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.archive", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -3477,7 +3558,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.archive schema", "type": "object" } }, @@ -3490,17 +3571,31 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.archive", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_type_not_supported", + "default_org_wide_channel", + "already_archived", + "cant_archive_general", + "restricted_action", + "could_not_archive_channel" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.archive error schema", "type": "object" } } @@ -3518,36 +3613,30 @@ ] } }, - "/admin.emoji.add": { + "/admin.conversations.convertToPrivate": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Add an emoji.", + "description": "Convert a public channel to a private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.add" + "url": "https://api.slack.com/methods/admin.conversations.convertToPrivate" }, - "operationId": "admin_emoji_add", + "operationId": "admin_conversations_convertToPrivate", "parameters": [ { - "description": "The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.", - "in": "formData", - "name": "url", - "required": true, - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.", + "description": "The channel to convert to private.", "in": "formData", - "name": "name", + "name": "channel_id", "required": true, "type": "string" } @@ -3564,8 +3653,8 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.convertToPrivate", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -3574,7 +3663,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.convertToPrivate schema", "type": "object" } }, @@ -3587,17 +3676,32 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.convertToPrivate", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "restricted_action", + "name_taken", + "channel_not_found", + "channel_type_not_supported", + "default_org_wide_channel", + "method_not_supported_for_channel_type", + "could_not_convert_channel", + "external_channel_migrating" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.convertToPrivate error schema", "type": "object" } } @@ -3605,47 +3709,66 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.emoji", + "admin.conversations", "admin" ] } }, - "/admin.emoji.addAlias": { + "/admin.conversations.create": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Add an emoji alias.", + "description": "Create a public or private channel-based conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.addAlias" + "url": "https://api.slack.com/methods/admin.conversations.create" }, - "operationId": "admin_emoji_addAlias", + "operationId": "admin_conversations_create", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The name of the emoji to be aliased. Colons (`:myemoji:`) around the value are not required, although they may be included.", + "description": "Name of the public or private channel to create.", "in": "formData", "name": "name", "required": true, "type": "string" }, { - "description": "The alias of the emoji.", + "description": "Description of the public or private channel to create.", "in": "formData", - "name": "alias_for", + "name": "description", + "type": "string" + }, + { + "description": "When `true`, creates a private channel instead of a public channel", + "in": "formData", + "name": "is_private", "required": true, + "type": "boolean" + }, + { + "description": "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", + "in": "formData", + "name": "org_wide", + "type": "boolean" + }, + { + "description": "The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.", + "in": "formData", + "name": "team_id", "type": "string" } ], @@ -3657,13 +3780,17 @@ "description": "Typical success response", "examples": { "application/json": { + "channel_id": "C12345", "ok": true } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.create", "properties": { + "channel_id": { + "$ref": "#/definitions/defs_channel_id" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } @@ -3671,7 +3798,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.create schema", "type": "object" } }, @@ -3684,17 +3811,31 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.create", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "name_taken", + "restricted_action", + "team_not_found", + "invalid_team", + "invalid_name", + "could_not_create_channel", + "team_id_or_org_required" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.create error schema", "type": "object" } } @@ -3702,46 +3843,42 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.emoji", + "admin.conversations", "admin" ] } }, - "/admin.emoji.list": { - "get": { + "/admin.conversations.delete": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "List emoji for an Enterprise Grid organization.", + "description": "Delete a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.list" + "url": "https://api.slack.com/methods/admin.conversations.delete" }, - "operationId": "admin_emoji_list", + "operationId": "admin_conversations_delete", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The channel to delete.", + "in": "formData", + "name": "channel_id", + "required": true, + "type": "string" } ], "produces": [ @@ -3752,44 +3889,12 @@ "description": "Typical success response", "examples": { "application/json": { - "cache_ts": "1575283387.000000", - "categories": [ - { - "emoji_names": [ - "grinning", - "grin", - "joy", - "etc etc ..." - ], - "name": "Smileys & People" - } - ], - "categories_version": "5", - "emoji": { - "black_square": "alias:black_large_square", - "bowtie": "https://emoji.slack-edge.com/T9TK3CUKW/bowtie/f3ec6f2bb0.png", - "cubimal_chick": "https://emoji.slack-edge.com/T9TK3CUKW/cubimal_chick/85961c43d7.png", - "dusty_stick": "https://emoji.slack-edge.com/T9TK3CUKW/dusty_stick/6177a62312.png", - "glitch_crab": "https://emoji.slack-edge.com/T9TK3CUKW/glitch_crab/db049f1f9c.png", - "piggy": "https://emoji.slack-edge.com/T9TK3CUKW/piggy/b7762ee8cd.png", - "pride": "https://emoji.slack-edge.com/T9TK3CUKW/pride/56b1bd3388.png", - "shipit": "alias:squirrel", - "simple_smile": { - "apple": "https://a.slack-edge.com/80588/img/emoji_2017_12_06/apple/simple_smile.png", - "google": "https://a.slack-edge.com/80588/img/emoji_2017_12_06/google/simple_smile.png" - }, - "slack": "https://emoji.slack-edge.com/T9TK3CUKW/slack/7d462d2443.png", - "slack_call": "https://emoji.slack-edge.com/T9TK3CUKW/slack_call/b81fffd6dd.png", - "squirrel": "https://emoji.slack-edge.com/T9TK3CUKW/squirrel/465f40c0e0.png", - "thumbsup_all": "https://emoji.slack-edge.com/T9TK3CUKW/thumbsup_all/50096a1020.gif", - "white_square": "alias:white_large_square" - }, "ok": true } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.delete", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -3798,7 +3903,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.delete schema", "type": "object" } }, @@ -3811,17 +3916,31 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.delete", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "channel_not_found", + "channel_type_not_supported", + "default_org_wide_channel", + "restricted_action", + "could_not_delete_channel", + "missing_scope" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.delete error schema", "type": "object" } } @@ -3829,41 +3948,48 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.emoji", + "admin.conversations", "admin" ] } }, - "/admin.emoji.remove": { + "/admin.conversations.disconnectShared": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Remove an emoji across an Enterprise Grid organization", + "description": "Disconnect a connected channel from one or more workspaces.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.remove" + "url": "https://api.slack.com/methods/admin.conversations.disconnectShared" }, - "operationId": "admin_emoji_remove", + "operationId": "admin_conversations_disconnectShared", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.", + "description": "The channel to be disconnected from some workspaces.", "in": "formData", - "name": "name", + "name": "channel_id", "required": true, "type": "string" + }, + { + "description": "The team to be removed from the channel. Currently only a single team id can be specified.", + "in": "formData", + "name": "leaving_team_ids", + "type": "string" } ], "produces": [ @@ -3878,8 +4004,8 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.disconnectShared", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -3888,7 +4014,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.rename schema", "type": "object" } }, @@ -3901,17 +4027,36 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.disconnectShared", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "not_an_enterprise", + "channel_not_found", + "not_supported", + "team_not_found", + "restricted_action", + "missing_scope", + "leaving_team_not_in_channel", + "no_teams_to_disconnect", + "leaving_team_required", + "cannot_kick_team", + "cannot_kick_home_team" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.disconnectShared error schema", "type": "object" } } @@ -3919,47 +4064,57 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.emoji", + "admin.conversations", "admin" ] } }, - "/admin.emoji.rename": { - "post": { + "/admin.conversations.ekm.listOriginalConnectedChannelInfo": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Rename an emoji.", + "description": "List all disconnected channels\u2014i.e., channels that were once connected to other workspaces and then disconnected\u2014and the corresponding original channel IDs for key revocation with EKM.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.rename" + "url": "https://api.slack.com/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo" }, - "operationId": "admin_emoji_rename", + "operationId": "admin_conversations_ekm_listOriginalConnectedChannelInfo", "parameters": [ { - "description": "The new name of the emoji.", - "in": "formData", - "name": "new_name", + "description": "Authentication token. Requires scope: `admin.conversations:read`", + "in": "query", + "name": "token", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", - "name": "token", - "required": true, + "description": "A comma-separated list of channels to filter to.", + "in": "query", + "name": "channel_ids", "type": "string" }, { - "description": "The name of the emoji to be renamed. Colons (`:myemoji:`) around the value are not required, although they may be included.", - "in": "formData", - "name": "name", - "required": true, + "description": "A comma-separated list of the workspaces to which the channels you would like returned belong.", + "in": "query", + "name": "team_ids", + "type": "string" + }, + { + "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -3971,6 +4126,14 @@ "description": "Typical success response", "examples": { "application/json": { + "channels": [ + { + "id": "string", + "internal_team_ids": "array", + "original_connected_channel_id": "string", + "original_connected_host_id": "string" + } + ], "ok": true } }, @@ -4016,46 +4179,40 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:read" ] } ], "tags": [ - "admin.emoji", + "admin.conversations.ekm", "admin" ] } }, - "/admin.inviteRequests.approve": { - "post": { + "/admin.conversations.getConversationPrefs": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Approve a workspace invite request.", + "description": "Get conversation preferences for a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.approve" + "url": "https://api.slack.com/methods/admin.conversations.getConversationPrefs" }, - "operationId": "admin_inviteRequests_approve", + "operationId": "admin_conversations_getConversationPrefs", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.invites:write`", + "description": "Authentication token. Requires scope: `admin.conversations:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "ID for the workspace where the invite request was made.", - "in": "formData", - "name": "team_id", - "type": "string" - }, - { - "description": "ID of the request to invite.", - "in": "formData", - "name": "invite_request_id", + "description": "The channel to get preferences for.", + "in": "query", + "name": "channel_id", "required": true, "type": "string" } @@ -4072,17 +4229,56 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.getConversationPrefs", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "prefs": { + "properties": { + "can_thread": { + "properties": { + "type": { + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "who_can_post": { + "properties": { + "type": { + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "type": "object" } }, "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.getConversationPrefs schema", "type": "object" } }, @@ -4095,17 +4291,31 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.getConversationPrefs", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "not_an_enterprise", + "restricted_action", + "missing_scope", + "channel_not_found", + "channel_type_not_supported", + "could_not_get_conversation_prefs" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.unarchive error schema", "type": "object" } } @@ -4113,53 +4323,54 @@ "security": [ { "slackAuth": [ - "admin.invites:write" + "admin.conversations:read" ] } ], "tags": [ - "admin.inviteRequests", + "admin.conversations", "admin" ] } }, - "/admin.inviteRequests.approved.list": { + "/admin.conversations.getTeams": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "List all approved workspace invite requests.", + "description": "Get all the workspaces a given public or private channel is connected to within this Enterprise org.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.approved.list" + "url": "https://api.slack.com/methods/admin.conversations.getTeams" }, - "operationId": "admin_inviteRequests_approved_list", + "operationId": "admin_conversations_getTeams", "parameters": [ { - "description": "Value of the `next_cursor` field sent as part of the previous API response", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.invites:read`", + "description": "Authentication token. Requires scope: `admin.conversations:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", + "description": "The channel to determine connected workspaces within the organization for.", "in": "query", - "name": "limit", - "type": "integer" + "name": "channel_id", + "required": true, + "type": "string" }, { - "description": "ID for the workspace where the invite requests were made.", + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", "in": "query", - "name": "team_id", + "name": "cursor", "type": "string" + }, + { + "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -4170,21 +4381,44 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "ok": true, + "teams": [ + "T1234", + "T5678" + ] } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.getTeams", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "response_metadata": { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string" + } + }, + "required": [ + "next_cursor" + ], + "type": "object" + }, + "team_ids": { + "items": { + "$ref": "#/definitions/defs_team" + }, + "type": "array" } }, "required": [ - "ok" + "ok", + "team_ids" ], - "title": "Default success template", + "title": "admin.conversations.getTeams schema", "type": "object" } }, @@ -4197,17 +4431,31 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.getTeams", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_type_not_supported", + "unsupported_team_type", + "restricted_action", + "could_not_get_teams", + "invalid_cursor", + "invalid_limit" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.getTeams error schema", "type": "object" } } @@ -4215,52 +4463,48 @@ "security": [ { "slackAuth": [ - "admin.invites:read" + "admin.conversations:read" ] } ], "tags": [ - "admin.inviteRequests.approved", + "admin.conversations", "admin" ] } }, - "/admin.inviteRequests.denied.list": { - "get": { + "/admin.conversations.invite": { + "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "List all denied workspace invite requests.", + "description": "Invite a user to a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.denied.list" + "url": "https://api.slack.com/methods/admin.conversations.invite" }, - "operationId": "admin_inviteRequests_denied_list", + "operationId": "admin_conversations_invite", "parameters": [ { - "description": "Value of the `next_cursor` field sent as part of the previous api response", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.invites:read`", + "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The users to invite.", + "in": "formData", + "name": "user_ids", + "required": true, + "type": "string" }, { - "description": "ID for the workspace where the invite requests were made.", - "in": "query", - "name": "team_id", + "description": "The channel that the users will be invited to.", + "in": "formData", + "name": "channel_id", + "required": true, "type": "string" } ], @@ -4276,8 +4520,8 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.invite", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -4286,7 +4530,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.invite schema", "type": "object" } }, @@ -4300,16 +4544,29 @@ }, "schema": { "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "description": "Schema for error response from admin.conversations.invite", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_type_not_supported", + "default_org_wide_channel", + "restricted_action", + "user_must_be_admin", + "failed_for_some_users" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.invite error schema", "type": "object" } } @@ -4317,46 +4574,46 @@ "security": [ { "slackAuth": [ - "admin.invites:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.inviteRequests.denied", + "admin.conversations", "admin" ] } }, - "/admin.inviteRequests.deny": { + "/admin.conversations.rename": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Deny a workspace invite request.", + "description": "Rename a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.deny" + "url": "https://api.slack.com/methods/admin.conversations.rename" }, - "operationId": "admin_inviteRequests_deny", + "operationId": "admin_conversations_rename", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.invites:write`", + "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "ID for the workspace where the invite request was made.", + "description": "The channel to rename.", "in": "formData", - "name": "team_id", + "name": "channel_id", + "required": true, "type": "string" }, { - "description": "ID of the request to invite.", "in": "formData", - "name": "invite_request_id", + "name": "name", "required": true, "type": "string" } @@ -4373,8 +4630,8 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.rename", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -4383,7 +4640,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.rename schema", "type": "object" } }, @@ -4396,17 +4653,30 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.rename", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_type_not_supported", + "restricted_action", + "could_not_rename_channel", + "default_org_wide_channel", + "name_taken" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.unarchive error schema", "type": "object" } } @@ -4414,52 +4684,53 @@ "security": [ { "slackAuth": [ - "admin.invites:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.inviteRequests", + "admin.conversations", "admin" ] } }, - "/admin.inviteRequests.list": { - "get": { + "/admin.conversations.restrictAccess.addGroup": { + "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "List all pending workspace invite requests.", + "description": "Add an allowlist of IDP groups for accessing a channel", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.list" + "url": "https://api.slack.com/methods/admin.conversations.restrictAccess.addGroup" }, - "operationId": "admin_inviteRequests_list", + "operationId": "admin_conversations_restrictAccess_addGroup", "parameters": [ { - "description": "Value of the `next_cursor` field sent as part of the previous API response", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "formData", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `admin.invites:read`", - "in": "header", - "name": "token", - "required": true, + "description": "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.", + "in": "formData", + "name": "team_id", "type": "string" }, { - "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-Grid-org) ID to be an allowlist for the private channel.", + "in": "formData", + "name": "group_id", + "required": true, + "type": "string" }, { - "description": "ID for the workspace where the invite requests were made.", - "in": "query", - "name": "team_id", + "description": "The channel to link this group to.", + "in": "formData", + "name": "channel_id", + "required": true, "type": "string" } ], @@ -4516,51 +4787,45 @@ "security": [ { "slackAuth": [ - "admin.invites:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.inviteRequests", + "admin.conversations.restrictAccess", "admin" ] } }, - "/admin.teams.admins.list": { + "/admin.conversations.restrictAccess.listGroups": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "List all of the admins on a given workspace.", + "description": "List all IDP Groups linked to a channel", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.admins.list" + "url": "https://api.slack.com/methods/admin.conversations.restrictAccess.listGroups" }, - "operationId": "admin_teams_admins_list", + "operationId": "admin_conversations_restrictAccess_listGroups", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:read`", + "description": "Authentication token. Requires scope: `admin.conversations:read`", "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "The maximum number of items to return.", "in": "query", - "name": "limit", - "type": "integer" + "name": "channel_id", + "required": true, + "type": "string" }, { + "description": "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.", "in": "query", "name": "team_id", - "required": true, "type": "string" } ], @@ -4572,8 +4837,8 @@ "description": "Typical success response", "examples": { "application/json": { - "admin_ids": [ - "U1234" + "group_ids": [ + "YOUR_GROUP_ID" ], "ok": true } @@ -4620,60 +4885,54 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:read" ] } ], "tags": [ - "admin.teams.admins", + "admin.conversations.restrictAccess", "admin" ] } }, - "/admin.teams.create": { + "/admin.conversations.restrictAccess.removeGroup": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Create an Enterprise team.", + "description": "Remove a linked IDP group linked from a private channel", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.create" + "url": "https://api.slack.com/methods/admin.conversations.restrictAccess.removeGroup" }, - "operationId": "admin_teams_create", + "operationId": "admin_conversations_restrictAccess_removeGroup", "parameters": [ { - "description": "Team domain (for example, slacksoftballteam).", + "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "formData", - "name": "team_domain", - "required": true, - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Description for the team.", + "description": "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.", "in": "formData", - "name": "team_description", + "name": "team_id", + "required": true, "type": "string" }, { - "description": "Team name (for example, Slack Softball Team).", + "description": "The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-Grid-org) ID to remove from the private channel.", "in": "formData", - "name": "team_name", + "name": "group_id", "required": true, "type": "string" }, { - "description": "Who can join the team. A team's discoverability can be `open`, `closed`, `invite_only`, or `unlisted`.", + "description": "The channel to remove the linked group from.", "in": "formData", - "name": "team_discoverability", + "name": "channel_id", + "required": true, "type": "string" } ], @@ -4685,8 +4944,7 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "team": "T12345" + "ok": true } }, "schema": { @@ -4731,47 +4989,77 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.teams", + "admin.conversations.restrictAccess", "admin" ] } }, - "/admin.teams.list": { + "/admin.conversations.search": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "List all teams on an Enterprise organization", + "description": "Search for public or private channels in an Enterprise organization.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.list" + "url": "https://api.slack.com/methods/admin.conversations.search" }, - "operationId": "admin_teams_list", + "operationId": "admin_conversations_search", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "description": "Authentication token. Requires scope: `admin.conversations:read`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "Comma separated string of team IDs, signifying the workspaces to search through.", "in": "query", - "name": "cursor", + "name": "team_ids", "type": "string" }, { - "description": "Authentication token. Requires scope: `admin.teams:read`", - "in": "header", - "name": "token", - "required": true, + "description": "Name of the the channel to query by.", + "in": "query", + "name": "query", "type": "string" }, { - "description": "The maximum number of items to return. Must be between 1 - 100 both inclusive.", + "description": "Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.", "in": "query", "name": "limit", "type": "integer" + }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", + "type": "string" + }, + { + "description": "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).", + "in": "query", + "name": "search_channel_types", + "type": "string" + }, + { + "description": "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 ", + "in": "query", + "name": "sort", + "type": "string" + }, + { + "description": "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)", + "in": "query", + "name": "sort_dir", + "type": "string" } ], "produces": [ @@ -4782,55 +5070,105 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "teams": [ + "channels": [ { - "discoverability": "hidden", - "id": "T1234", - "name": "My Team", - "primary_owner": { - "email": "bront@slack.com", - "user_id": "W1234" - } - } - ] - } - }, - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "created": 1449252889, + "creator": "U012A3CDE", + "id": "C012AB3CD", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": true, + "is_group": false, + "is_im": false, + "is_member": true, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "name": "general", + "name_normalized": "general", + "num_members": 4, + "pending_shared": [], + "previous_names": [], + "purpose": { + "creator": "", + "last_set": 0, + "value": "This channel is for team-wide communication and announcements. All team members are in this channel." + }, + "topic": { + "creator": "", + "last_set": 0, + "value": "Company-wide announcements and work-based matters" + }, + "unlinked": 0 + } + ], + "ok": true, + "response_metadata": { + "next_cursor": "dGVhbTpDMDYxRkE1UEI=" + } + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.search", + "properties": { + "channels": { + "items": { + "$ref": "#/definitions/objs_channel" + }, + "type": "array" + }, + "next_cursor": { + "type": "string" + } + }, + "required": [ + "channels", + "next_cursor" + ], + "title": "admin.conversations.search schema", + "type": "object" + } + }, + "default": { + "description": "Typical error response", + "examples": { + "application/json": { + "error": "not_an_enterprise", + "ok": false + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.search", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "not_an_enterprise", + "team_not_found", + "not_allowed", + "invalid_auth", + "invalid_cursor", + "invalid_search_channel_type", + "invalid_sort", + "invalid_sort_dir" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.search error schema", "type": "object" } } @@ -4838,50 +5176,47 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:read" ] } ], "tags": [ - "admin.teams", + "admin.conversations", "admin" ] } }, - "/admin.teams.owners.list": { - "get": { + "/admin.conversations.setConversationPrefs": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "List all of the owners on a given workspace.", + "description": "Set the posting permissions for a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.owners.list" + "url": "https://api.slack.com/methods/admin.conversations.setConversationPrefs" }, - "operationId": "admin_teams_owners_list", + "operationId": "admin_conversations_setConversationPrefs", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The channel to set the prefs for", + "in": "formData", + "name": "channel_id", + "required": true, + "type": "string" }, { - "in": "query", - "name": "team_id", + "description": "The prefs for this channel in a stringified JSON format.", + "in": "formData", + "name": "prefs", "required": true, "type": "string" } @@ -4894,15 +5229,12 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "owner_ids": [ - "U1234" - ] + "ok": true } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.setConversationPrefs", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -4911,7 +5243,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.setConversationPrefs schema", "type": "object" } }, @@ -4924,17 +5256,31 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.setConversationPrefs", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "channel_not_found", + "channel_type_not_supported", + "restricted_action", + "missing_scope", + "could_not_set_channel_pref", + "default_org_wide_channel" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.setConversationPrefs error schema", "type": "object" } } @@ -4942,41 +5288,60 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.teams.owners", + "admin.conversations", "admin" ] } }, - "/admin.teams.settings.info": { - "get": { + "/admin.conversations.setTeams": { + "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Fetch information about settings in a workspace", + "description": "Set the workspaces in an Enterprise grid org that connect to a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.info" + "url": "https://api.slack.com/methods/admin.conversations.setTeams" }, - "operationId": "admin_teams_settings_info", + "operationId": "admin_conversations_setTeams", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.teams:read`", + "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "in": "query", - "name": "team_id", + "description": "The encoded `channel_id` to add or remove to workspaces.", + "in": "formData", + "name": "channel_id", "required": true, "type": "string" + }, + { + "description": "The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.", + "in": "formData", + "name": "team_id", + "type": "string" + }, + { + "description": "A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.", + "in": "formData", + "name": "target_team_ids", + "type": "string" + }, + { + "description": "True if channel has to be converted to an org channel", + "in": "formData", + "name": "org_channel", + "type": "boolean" } ], "produces": [ @@ -4987,17 +5352,7 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "team": { - "default_channels": "array", - "domain": "string", - "email_domain": "string", - "enterprise_id": "string", - "enterprise_name": "string", - "icon": "array", - "id": "string", - "name": "string" - } + "ok": true } }, "schema": { @@ -5042,46 +5397,40 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.teams.settings", + "admin.conversations", "admin" ] } }, - "/admin.teams.settings.setDefaultChannels": { + "/admin.conversations.unarchive": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Set the default channels of a workspace.", + "description": "Unarchive a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setDefaultChannels" + "url": "https://api.slack.com/methods/admin.conversations.unarchive" }, - "operationId": "admin_teams_settings_setDefaultChannels", + "operationId": "admin_conversations_unarchive", "parameters": [ { - "description": "An array of channel IDs.", - "in": "formData", - "name": "channel_ids", - "required": true, - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "ID for the workspace to set the default channel for.", + "description": "The channel to unarchive.", "in": "formData", - "name": "team_id", + "name": "channel_id", "required": true, "type": "string" } @@ -5098,8 +5447,8 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.unarchive", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -5108,7 +5457,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.unarchive schema", "type": "object" } }, @@ -5121,17 +5470,31 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.unarchive", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_not_archived", + "channel_type_not_supported", + "restricted_action", + "could_not_unarchive_channel", + "default_org_wide_channel", + "missing_scope" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.unarchive error schema", "type": "object" } } @@ -5139,47 +5502,46 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.teams.settings", + "admin.conversations", "admin" ] } }, - "/admin.teams.settings.setDescription": { + "/admin.emoji.add": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Set the description of a given workspace.", + "description": "Add an emoji.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setDescription" + "url": "https://api.slack.com/methods/admin.emoji.add" }, - "operationId": "admin_teams_settings_setDescription", + "operationId": "admin_emoji_add", "parameters": [ { "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "header", + "in": "formData", "name": "token", "required": true, "type": "string" }, { - "description": "ID for the workspace to set the description for.", + "description": "The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.", "in": "formData", - "name": "team_id", + "name": "name", "required": true, "type": "string" }, { - "description": "The new description for the workspace.", + "description": "The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.", "in": "formData", - "name": "description", + "name": "url", "required": true, "type": "string" } @@ -5242,42 +5604,41 @@ } ], "tags": [ - "admin.teams.settings", + "admin.emoji", "admin" ] } }, - "/admin.teams.settings.setDiscoverability": { + "/admin.emoji.addAlias": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "An API method that allows admins to set the discoverability of a given workspace", + "description": "Add an emoji alias.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setDiscoverability" + "url": "https://api.slack.com/methods/admin.emoji.addAlias" }, - "operationId": "admin_teams_settings_setDiscoverability", + "operationId": "admin_emoji_addAlias", "parameters": [ { "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "header", + "in": "formData", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the workspace to set discoverability on.", + "description": "The name of the emoji to be aliased. Colons (`:myemoji:`) around the value are not required, although they may be included.", "in": "formData", - "name": "team_id", + "name": "name", "required": true, "type": "string" }, { - "description": "This workspace's discovery setting. It must be set to one of `open`, `invite_only`, `closed`, or `unlisted`.", + "description": "The alias of the emoji.", "in": "formData", - "name": "discoverability", + "name": "alias_for", "required": true, "type": "string" } @@ -5340,43 +5701,41 @@ } ], "tags": [ - "admin.teams.settings", + "admin.emoji", "admin" ] } }, - "/admin.teams.settings.setIcon": { - "post": { + "/admin.emoji.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Sets the icon of a workspace.", + "description": "List emoji for an Enterprise Grid organization.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setIcon" + "url": "https://api.slack.com/methods/admin.emoji.list" }, - "operationId": "admin_teams_settings_setIcon", + "operationId": "admin_emoji_list", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.teams:read`", + "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "Image URL for the icon", - "in": "formData", - "name": "image_url", - "required": true, + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "in": "query", + "name": "cursor", "type": "string" }, { - "description": "ID for the workspace to set the icon for.", - "in": "formData", - "name": "team_id", - "required": true, - "type": "string" + "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -5387,6 +5746,38 @@ "description": "Typical success response", "examples": { "application/json": { + "cache_ts": "1575283387.000000", + "categories": [ + { + "emoji_names": [ + "grinning", + "grin", + "joy", + "etc etc ..." + ], + "name": "Smileys & People" + } + ], + "categories_version": "5", + "emoji": { + "black_square": "alias:black_large_square", + "bowtie": "https://emoji.slack-edge.com/T9TK3CUKW/bowtie/f3ec6f2bb0.png", + "cubimal_chick": "https://emoji.slack-edge.com/T9TK3CUKW/cubimal_chick/85961c43d7.png", + "dusty_stick": "https://emoji.slack-edge.com/T9TK3CUKW/dusty_stick/6177a62312.png", + "glitch_crab": "https://emoji.slack-edge.com/T9TK3CUKW/glitch_crab/db049f1f9c.png", + "piggy": "https://emoji.slack-edge.com/T9TK3CUKW/piggy/b7762ee8cd.png", + "pride": "https://emoji.slack-edge.com/T9TK3CUKW/pride/56b1bd3388.png", + "shipit": "alias:squirrel", + "simple_smile": { + "apple": "https://a.slack-edge.com/80588/img/emoji_2017_12_06/apple/simple_smile.png", + "google": "https://a.slack-edge.com/80588/img/emoji_2017_12_06/google/simple_smile.png" + }, + "slack": "https://emoji.slack-edge.com/T9TK3CUKW/slack/7d462d2443.png", + "slack_call": "https://emoji.slack-edge.com/T9TK3CUKW/slack_call/b81fffd6dd.png", + "squirrel": "https://emoji.slack-edge.com/T9TK3CUKW/squirrel/465f40c0e0.png", + "thumbsup_all": "https://emoji.slack-edge.com/T9TK3CUKW/thumbsup_all/50096a1020.gif", + "white_square": "alias:white_large_square" + }, "ok": true } }, @@ -5432,45 +5823,37 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.teams:read" ] } ], "tags": [ - "admin.teams.settings", + "admin.emoji", "admin" ] } }, - "/admin.teams.settings.setName": { + "/admin.emoji.remove": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Set the name of a given workspace.", + "description": "Remove an emoji across an Enterprise Grid organization", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setName" + "url": "https://api.slack.com/methods/admin.emoji.remove" }, - "operationId": "admin_teams_settings_setName", + "operationId": "admin_emoji_remove", "parameters": [ { "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "ID for the workspace to set the name for.", "in": "formData", - "name": "team_id", + "name": "token", "required": true, "type": "string" }, { - "description": "The new name of the workspace.", + "description": "The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.", "in": "formData", "name": "name", "required": true, @@ -5535,62 +5918,43 @@ } ], "tags": [ - "admin.teams.settings", + "admin.emoji", "admin" ] } }, - "/admin.users.assign": { + "/admin.emoji.rename": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Add an Enterprise user to a workspace.", + "description": "Rename an emoji.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.assign" + "url": "https://api.slack.com/methods/admin.emoji.rename" }, - "operationId": "admin_users_assign", + "operationId": "admin_emoji_rename", "parameters": [ { - "description": "The ID of the user to add to the workspace.", + "description": "Authentication token. Requires scope: `admin.teams:write`", "in": "formData", - "name": "user_id", + "name": "token", "required": true, "type": "string" }, { - "description": "Comma separated values of channel IDs to add user in the new workspace.", - "in": "formData", - "name": "channel_ids", - "type": "string" - }, - { - "description": "The ID (`T1234`) of the workspace.", + "description": "The name of the emoji to be renamed. Colons (`:myemoji:`) around the value are not required, although they may be included.", "in": "formData", - "name": "team_id", + "name": "name", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `admin.users:write`", - "in": "header", - "name": "token", + "description": "The new name of the emoji.", + "in": "formData", + "name": "new_name", "required": true, "type": "string" - }, - { - "description": "True if user should be added to the workspace as a single-channel guest.", - "in": "formData", - "name": "is_ultra_restricted", - "type": "boolean" - }, - { - "description": "True if user should be added to the workspace as a guest.", - "in": "formData", - "name": "is_restricted", - "type": "boolean" } ], "produces": [ @@ -5646,92 +6010,48 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.teams:write" ] } ], "tags": [ - "admin.users", + "admin.emoji", "admin" ] } }, - "/admin.users.invite": { + "/admin.inviteRequests.approve": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Invite a user to a workspace.", + "description": "Approve a workspace invite request.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.invite" + "url": "https://api.slack.com/methods/admin.inviteRequests.approve" }, - "operationId": "admin_users_invite", + "operationId": "admin_inviteRequests_approve", "parameters": [ { - "description": "A comma-separated list of `channel_id`s for this user to join. At least one channel is required.", - "in": "formData", - "name": "channel_ids", - "required": true, - "type": "string" - }, - { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", - "name": "team_id", - "required": true, - "type": "string" - }, - { - "description": "Full name of the user.", - "in": "formData", - "name": "real_name", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.invites:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Is this user a single channel guest user? (default: false)", - "in": "formData", - "name": "is_ultra_restricted", - "type": "boolean" - }, - { - "description": "An optional message to send to the user in the invite email.", - "in": "formData", - "name": "custom_message", - "type": "string" - }, - { - "description": "Is this user a multi-channel guest user? (default: false)", - "in": "formData", - "name": "is_restricted", - "type": "boolean" - }, - { - "description": "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.", + "description": "ID for the workspace where the invite request was made.", "in": "formData", - "name": "guest_expiration_ts", + "name": "team_id", "type": "string" }, { - "description": "The email address of the person to invite.", + "description": "ID of the request to invite.", "in": "formData", - "name": "email", + "name": "invite_request_id", "required": true, "type": "string" - }, - { - "description": "Allow this invite to be resent in the future if a user has not signed up yet. (default: false)", - "in": "formData", - "name": "resend", - "type": "boolean" } ], "produces": [ @@ -5787,77 +6107,64 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.invites:write" ] } ], "tags": [ - "admin.users", + "admin.inviteRequests", "admin" ] } }, - "/admin.users.list": { + "/admin.inviteRequests.approved.list": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "List users on a workspace", + "description": "List all approved workspace invite requests.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.list" + "url": "https://api.slack.com/methods/admin.inviteRequests.approved.list" }, - "operationId": "admin_users_list", + "operationId": "admin_inviteRequests_approved_list", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.users:read`", + "description": "Authentication token. Requires scope: `admin.invites:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Limit for how many users to be retrieved per page", + "description": "ID for the workspace where the invite requests were made.", "in": "query", - "name": "limit", - "type": "integer" + "name": "team_id", + "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", + "description": "Value of the `next_cursor` field sent as part of the previous API response", "in": "query", - "name": "team_id", - "required": true, + "name": "cursor", "type": "string" - } - ], - "produces": [ - "application/json" - ], + }, + { + "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", + "in": "query", + "name": "limit", + "type": "integer" + } + ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "users": [ - { - "email": "bront@slack.com", - "id": "T1234", - "is_admin": false, - "is_bot": false, - "is_owner": false, - "is_primary_owner": false, - "is_restricted": false, - "is_ultra_restricted": false - } - ] + "ok": true } }, "schema": { @@ -5902,49 +6209,53 @@ "security": [ { "slackAuth": [ - "admin.users:read" + "admin.invites:read" ] } ], "tags": [ - "admin.users", + "admin.inviteRequests.approved", "admin" ] } }, - "/admin.users.remove": { - "post": { + "/admin.inviteRequests.denied.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Remove a user from a workspace.", + "description": "List all denied workspace invite requests.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.remove" + "url": "https://api.slack.com/methods/admin.inviteRequests.denied.list" }, - "operationId": "admin_users_remove", + "operationId": "admin_inviteRequests_denied_list", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.invites:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to remove.", - "in": "formData", - "name": "user_id", - "required": true, + "description": "ID for the workspace where the invite requests were made.", + "in": "query", + "name": "team_id", "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", - "name": "team_id", - "required": true, + "description": "Value of the `next_cursor` field sent as part of the previous api response", + "in": "query", + "name": "cursor", "type": "string" + }, + { + "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -6000,54 +6311,48 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.invites:read" ] } ], "tags": [ - "admin.users", + "admin.inviteRequests.denied", "admin" ] } }, - "/admin.users.session.reset": { + "/admin.inviteRequests.deny": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Wipes all valid sessions on all devices for a given user", + "description": "Deny a workspace invite request.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.session.reset" + "url": "https://api.slack.com/methods/admin.inviteRequests.deny" }, - "operationId": "admin_users_session_reset", + "operationId": "admin_inviteRequests_deny", "parameters": [ { - "description": "Only expire mobile sessions (default: false)", - "in": "formData", - "name": "mobile_only", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.invites:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to wipe sessions for", + "description": "ID for the workspace where the invite request was made.", "in": "formData", - "name": "user_id", - "required": true, + "name": "team_id", "type": "string" }, { - "description": "Only expire web sessions (default: false)", + "description": "ID of the request to invite.", "in": "formData", - "name": "web_only", - "type": "boolean" + "name": "invite_request_id", + "required": true, + "type": "string" } ], "produces": [ @@ -6103,49 +6408,53 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.invites:write" ] } ], "tags": [ - "admin.users.session", + "admin.inviteRequests", "admin" ] } }, - "/admin.users.setAdmin": { - "post": { + "/admin.inviteRequests.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Set an existing guest, regular user, or owner to be an admin user.", + "description": "List all pending workspace invite requests.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.setAdmin" + "url": "https://api.slack.com/methods/admin.inviteRequests.list" }, - "operationId": "admin_users_setAdmin", + "operationId": "admin_inviteRequests_list", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.invites:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to designate as an admin.", - "in": "formData", - "name": "user_id", - "required": true, + "description": "ID for the workspace where the invite requests were made.", + "in": "query", + "name": "team_id", "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", - "name": "team_id", - "required": true, + "description": "Value of the `next_cursor` field sent as part of the previous API response", + "in": "query", + "name": "cursor", "type": "string" + }, + { + "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -6201,53 +6510,49 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.invites:read" ] } ], "tags": [ - "admin.users", + "admin.inviteRequests", "admin" ] } }, - "/admin.users.setExpiration": { - "post": { + "/admin.teams.admins.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Set an expiration for a guest user", + "description": "List all of the admins on a given workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.setExpiration" + "url": "https://api.slack.com/methods/admin.teams.admins.list" }, - "operationId": "admin_users_setExpiration", + "operationId": "admin_teams_admins_list", "parameters": [ { - "description": "Timestamp when guest account should be disabled.", - "in": "formData", - "name": "expiration_ts", - "required": true, - "type": "integer" - }, - { - "description": "Authentication token. Requires scope: `admin.users:write`", - "in": "header", + "description": "Authentication token. Requires scope: `admin.teams:read`", + "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to set an expiration for.", - "in": "formData", - "name": "user_id", - "required": true, + "description": "The maximum number of items to return.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", + "in": "query", "name": "team_id", "required": true, "type": "string" @@ -6261,6 +6566,9 @@ "description": "Typical success response", "examples": { "application/json": { + "admin_ids": [ + "U1234" + ], "ok": true } }, @@ -6306,49 +6614,61 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.teams:read" ] } ], "tags": [ - "admin.users", + "admin.teams.admins", "admin" ] } }, - "/admin.users.setOwner": { + "/admin.teams.create": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Set an existing guest, regular user, or admin user to be a workspace owner.", + "description": "Create an Enterprise team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.setOwner" + "url": "https://api.slack.com/methods/admin.teams.create" }, - "operationId": "admin_users_setOwner", + "operationId": "admin_teams_create", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.teams:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Id of the user to promote to owner.", + "description": "Team domain (for example, slacksoftballteam).", "in": "formData", - "name": "user_id", + "name": "team_domain", "required": true, "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", + "description": "Team name (for example, Slack Softball Team).", "in": "formData", - "name": "team_id", + "name": "team_name", "required": true, "type": "string" + }, + { + "description": "Description for the team.", + "in": "formData", + "name": "team_description", + "type": "string" + }, + { + "description": "Who can join the team. A team's discoverability can be `open`, `closed`, `invite_only`, or `unlisted`.", + "in": "formData", + "name": "team_discoverability", + "type": "string" } ], "produces": [ @@ -6359,7 +6679,8 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "ok": true, + "team": "T12345" } }, "schema": { @@ -6404,48 +6725,46 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.teams:write" ] } ], "tags": [ - "admin.users", + "admin.teams", "admin" ] } }, - "/admin.users.setRegular": { - "post": { + "/admin.teams.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Set an existing guest user, admin user, or owner to be a regular user.", + "description": "List all teams on an Enterprise organization", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.setRegular" + "url": "https://api.slack.com/methods/admin.teams.list" }, - "operationId": "admin_users_setRegular", + "operationId": "admin_teams_list", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.teams:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to designate as a regular user.", - "in": "formData", - "name": "user_id", - "required": true, - "type": "string" + "description": "The maximum number of items to return. Must be between 1 - 100 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" }, { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", - "name": "team_id", - "required": true, + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -6457,17 +6776,29 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, + "ok": true, + "teams": [ + { + "discoverability": "hidden", + "id": "T1234", + "name": "My Team", + "primary_owner": { + "email": "bront@slack.com", + "user_id": "W1234" + }, + "team_url": "https://subarachnoid.slack.com/" + } + ] + } + }, + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, "required": [ "ok" ], @@ -6502,39 +6833,51 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.teams:read" ] } ], "tags": [ - "admin.users", + "admin.teams", "admin" ] } }, - "/api.test": { + "/admin.teams.owners.list": { "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Checks API calling code.", + "description": "List all of the owners on a given workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/api.test" + "url": "https://api.slack.com/methods/admin.teams.owners.list" }, - "operationId": "api_test", + "operationId": "admin_teams_owners_list", "parameters": [ { - "description": "example property to return", + "description": "Authentication token. Requires scope: `admin.teams:read`", "in": "query", - "name": "foo", + "name": "token", + "required": true, "type": "string" }, { - "description": "Error response to return", "in": "query", - "name": "error", + "name": "team_id", + "required": true, + "type": "string" + }, + { + "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -6543,17 +6886,18 @@ ], "responses": { "200": { - "description": "Standard success response", + "description": "Typical success response", "examples": { "application/json": { - "ok": true + "ok": true, + "owner_ids": [ + "U1234" + ] } }, "schema": { - "additionalProperties": { - "type": "object" - }, - "description": "Schema for successful response api.test method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -6562,39 +6906,30 @@ "required": [ "ok" ], - "title": "api.test success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Artificial error response", + "description": "Typical error response", "examples": { "application/json": { - "args": { - "error": "my_error" - }, - "error": "my_error", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": { - "type": "object" - }, - "description": "Schema for error response api.test method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "api.test error schema", + "title": "Default error template", "type": "object" } } @@ -6602,31 +6937,40 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:read" ] } ], "tags": [ - "api" + "admin.teams.owners", + "admin" ] } }, - "/apps.permissions.info": { + "/admin.teams.settings.info": { "get": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Returns list of permissions this app has on a team.", + "description": "Fetch information about settings in a workspace", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.info" + "url": "https://api.slack.com/methods/admin.teams.settings.info" }, - "operationId": "apps_permissions_info", + "operationId": "admin_teams_settings_info", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.teams:read`", + "in": "header", "name": "token", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "team_id", + "required": true, "type": "string" } ], @@ -6635,164 +6979,39 @@ ], "responses": { "200": { - "description": "Standard success response when used with a user token", + "description": "Typical success response", "examples": { "application/json": { - "info": { - "app_home": { - "resources": { - "ids": [ - "D0C0NU1Q8", - "D0BH95DLH" - ] - }, - "scopes": [ - "chat:write", - "im:history", - "im:read" - ] - }, - "channel": { - "resources": { - "excluded_ids": [], - "ids": [ - "C061FA5PB" - ], - "wildcard": false - }, - "scopes": [ - "channels:read" - ] - }, - "group": { - "resources": { - "ids": [] - }, - "scopes": [] - }, - "im": { - "resources": { - "ids": [] - }, - "scopes": [] - }, - "mpim": { - "resources": { - "ids": [] - }, - "scopes": [] - }, - "team": { - "resources": { - "ids": [] - }, - "scopes": [] - } - }, - "ok": true + "ok": true, + "team": { + "default_channels": "array", + "domain": "string", + "email_domain": "string", + "enterprise_id": "string", + "enterprise_name": "string", + "icon": "array", + "id": "string", + "name": "string" + } } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from apps.permissions.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "info": { - "properties": { - "app_home": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "channel": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "group": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "im": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "mpim": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "team": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "required": [ - "scopes", - "resources" - ], - "type": "object" - } - }, - "required": [ - "team", - "channel", - "group", - "mpim", - "im", - "app_home" - ], - "type": "object" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "info" + "ok" ], - "title": "apps.permissions.info schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Standard failure response when used with an invalid token", + "description": "Typical error response", "examples": { "application/json": { "error": "invalid_auth", @@ -6800,42 +7019,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.permissions.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.permissions.info error schema", + "title": "Default error template", "type": "object" } } @@ -6843,46 +7037,46 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:read" ] } ], "tags": [ - "apps.permissions", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.request": { - "get": { + "/admin.teams.settings.setDefaultChannels": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Allows an app to request additional scopes", + "description": "Set the default channels of a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.request" + "url": "https://api.slack.com/methods/admin.teams.settings.setDefaultChannels" }, - "operationId": "apps_permissions_request", + "operationId": "admin_teams_settings_setDefaultChannels", "parameters": [ { - "description": "A comma separated list of scopes to request for", - "in": "query", - "name": "scopes", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "formData", + "name": "token", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "ID for the workspace to set the default channel for.", + "in": "formData", + "name": "team_id", "required": true, "type": "string" }, { - "description": "Token used to trigger the permissions API", - "in": "query", - "name": "trigger_id", + "description": "An array of channel IDs.", + "in": "formData", + "name": "channel_ids", "required": true, "type": "string" } @@ -6892,15 +7086,15 @@ ], "responses": { "200": { - "description": "Standard success response when used with a user token", + "description": "Typical success response", "examples": { "application/json": { "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from apps.permissions.request method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -6909,59 +7103,30 @@ "required": [ "ok" ], - "title": "apps.permissions.request schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Standard failure response when trigger_id is invalid", + "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_trigger_id", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.permissions.request method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_trigger", - "trigger_exchanged", - "invalid_scope", - "invalid_user", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.permissions.request error schema", + "title": "Default error template", "type": "object" } } @@ -6969,46 +7134,49 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.resources.list": { - "get": { + "/admin.teams.settings.setDescription": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Returns list of resource grants this app has on a team.", + "description": "Set the description of a given workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.resources.list" + "url": "https://api.slack.com/methods/admin.teams.settings.setDescription" }, - "operationId": "apps_permissions_resources_list", + "operationId": "admin_teams_settings_setDescription", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "ID for the workspace to set the description for.", + "in": "formData", + "name": "team_id", "required": true, "type": "string" }, { - "description": "The maximum number of items to return.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The new description for the workspace.", + "in": "formData", + "name": "description", + "required": true, + "type": "string" } ], "produces": [ @@ -7016,82 +7184,24 @@ ], "responses": { "200": { - "description": "Typical successful paginated response", + "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "resources": [ - { - "id": "T0DES3UAN", - "type": "team" - }, - { - "id": "D024BFF1M", - "type": "app_home" - }, - { - "id": "C024BE91L", - "type": "channel" - } - ], - "response_metadata": { - "next_cursor": "dGVhbTpDMUg5UkVTR0w=" - } + "ok": true } }, "schema": { "additionalProperties": true, - "description": "Schema for successful response apps.permissions.resources.list method", + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "resources": { - "items": { - "properties": { - "id": { - "title": "An ID for a resource", - "type": "string", - "x-examples": [ - "T0DES3UAN", - "C0ABC1ABC" - ] - }, - "type": { - "title": "The type of resource the `id` corresponds to", - "type": "string", - "x-examples": [ - "team", - "channel", - "mpim" - ] - } - }, - "type": "object" - }, - "type": "array" - }, - "response_metadata": { - "additionalProperties": false, - "properties": { - "next_cursor": { - "type": "string", - "x-examples": [ - "dGVhbTpDMUg5UkVTR0w=" - ] - } - }, - "required": [ - "next_cursor" - ], - "type": "object" } }, "required": [ - "ok", - "resources" + "ok" ], - "title": "apps.permissions.resources.list success schema", + "title": "Default success template", "type": "object" } }, @@ -7099,48 +7209,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_cursor", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.permissions.resources.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_cursor", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.permissions.resources.list error schema", + "title": "Default error template", "type": "object" } } @@ -7148,34 +7232,49 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions.resources", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.scopes.list": { - "get": { + "/admin.teams.settings.setDiscoverability": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Returns list of scopes this app has on a team.", + "description": "An API method that allows admins to set the discoverability of a given workspace", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.scopes.list" + "url": "https://api.slack.com/methods/admin.teams.settings.setDiscoverability" }, - "operationId": "apps_permissions_scopes_list", + "operationId": "admin_teams_settings_setDiscoverability", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "header", "name": "token", "required": true, "type": "string" + }, + { + "description": "The ID of the workspace to set discoverability on.", + "in": "formData", + "name": "team_id", + "required": true, + "type": "string" + }, + { + "description": "This workspace's discovery setting. It must be set to one of `open`, `invite_only`, `closed`, or `unlisted`.", + "in": "formData", + "name": "discoverability", + "required": true, + "type": "string" } ], "produces": [ @@ -7183,76 +7282,24 @@ ], "responses": { "200": { - "description": "Typical successful paginated response", + "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "scopes": { - "app_home": [ - "chat:write", - "im:history", - "im:read" - ], - "channel": [ - "channels:history", - "chat:write" - ], - "group": [ - "chat:write" - ], - "im": [ - "chat:write" - ], - "mpim": [ - "chat:write" - ], - "team": [ - "users:read" - ], - "user": [] - } + "ok": true } }, "schema": { "additionalProperties": true, - "description": "Schema for successful response api.permissions.scopes.list method", + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "scopes": { - "additionalProperties": true, - "properties": { - "app_home": { - "$ref": "#/definitions/objs_scopes" - }, - "channel": { - "$ref": "#/definitions/objs_scopes" - }, - "group": { - "$ref": "#/definitions/objs_scopes" - }, - "im": { - "$ref": "#/definitions/objs_scopes" - }, - "mpim": { - "$ref": "#/definitions/objs_scopes" - }, - "team": { - "$ref": "#/definitions/objs_scopes" - }, - "user": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" } }, "required": [ - "ok", - "scopes" + "ok" ], - "title": "api.permissions.scopes.list success schema", + "title": "Default success template", "type": "object" } }, @@ -7265,42 +7312,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.permissions.scopes.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.permissions.scopes.list error schema", + "title": "Default error template", "type": "object" } } @@ -7308,46 +7330,48 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions.scopes", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.users.list": { - "get": { + "/admin.teams.settings.setIcon": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Returns list of user grants and corresponding scopes this app has on a team.", + "description": "Sets the icon of a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.users.list" + "url": "https://api.slack.com/methods/admin.teams.settings.setIcon" }, - "operationId": "apps_permissions_users_list", + "operationId": "admin_teams_settings_setIcon", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "formData", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "Image URL for the icon", + "in": "formData", + "name": "image_url", "required": true, "type": "string" }, { - "description": "The maximum number of items to return.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "ID for the workspace to set the icon for.", + "in": "formData", + "name": "team_id", + "required": true, + "type": "string" } ], "produces": [ @@ -7355,28 +7379,10 @@ ], "responses": { "200": { - "description": "Typical successful paginated response", + "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "resources": [ - { - "id": "U0DES3UAN", - "scopes": [ - "dnd:write:user", - "reminders:write:user" - ] - }, - { - "id": "U024BFF1M", - "scopes": [ - "reminders:write:user" - ] - } - ], - "response_metadata": { - "next_cursor": "dGVhbTdPMUg5UkFTT0w=" - } + "ok": true } }, "schema": { @@ -7398,7 +7404,7 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_cursor", + "error": "invalid_auth", "ok": false } }, @@ -7421,53 +7427,47 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions.users", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.users.request": { - "get": { + "/admin.teams.settings.setName": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Enables an app to trigger a permissions modal to grant an app access to a user access scope.", + "description": "Set the name of a given workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.users.request" + "url": "https://api.slack.com/methods/admin.teams.settings.setName" }, - "operationId": "apps_permissions_users_request", + "operationId": "admin_teams_settings_setName", "parameters": [ { - "description": "A comma separated list of user scopes to request for", - "in": "query", - "name": "scopes", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "header", + "name": "token", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "ID for the workspace to set the name for.", + "in": "formData", + "name": "team_id", "required": true, "type": "string" }, { - "description": "The user this scope is being requested for", - "in": "query", - "name": "user", - "required": true, - "type": "string" - }, - { - "description": "Token used to trigger the request", - "in": "query", - "name": "trigger_id", + "description": "The new name of the workspace.", + "in": "formData", + "name": "name", "required": true, "type": "string" } @@ -7477,7 +7477,7 @@ ], "responses": { "200": { - "description": "Standard success response when used with a user token", + "description": "Typical success response", "examples": { "application/json": { "ok": true @@ -7499,10 +7499,10 @@ } }, "default": { - "description": "Standard failure response when trigger_id is invalid", + "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_trigger_id", + "error": "invalid_auth", "ok": false } }, @@ -7525,44 +7525,54 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions.users", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.uninstall": { - "get": { + "/admin.usergroups.addChannels": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Uninstalls your app from a workspace.", + "description": "Add one or more default channels to an IDP group.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.uninstall" + "url": "https://api.slack.com/methods/admin.usergroups.addChannels" }, - "operationId": "apps_uninstall", + "operationId": "admin_usergroups_addChannels", "parameters": [ { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_secret", + "description": "Authentication token. Requires scope: `admin.usergroups:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "ID of the IDP group to add default channels for.", + "in": "formData", + "name": "usergroup_id", + "required": true, "type": "string" }, { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_id", + "description": "The workspace to add default channels in.", + "in": "formData", + "name": "team_id", + "type": "string" + }, + { + "description": "Comma separated string of channel IDs.", + "in": "formData", + "name": "channel_ids", + "required": true, "type": "string" } ], @@ -7578,8 +7588,8 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from apps.uninstall method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -7588,58 +7598,30 @@ "required": [ "ok" ], - "title": "apps.uninstall schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response if the token provided is not associated with an Org Admin or Owner", "examples": { "application/json": { - "error": "invalid_auth", + "error": "not_an_admin", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.uninstall method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_client_id", - "bad_client_secret", - "client_id_token_mismatch", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.uninstall error schema", + "title": "Default error template", "type": "object" } } @@ -7647,39 +7629,55 @@ "security": [ { "slackAuth": [ - "none" + "admin.usergroups:write" ] } ], "tags": [ - "apps" + "admin.usergroups", + "admin" ] } }, - "/auth.revoke": { - "get": { + "/admin.usergroups.addTeams": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Revokes a token.", + "description": "Associate one or more default workspaces with an organization-wide IDP group.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/auth.revoke" + "url": "https://api.slack.com/methods/admin.usergroups.addTeams" }, - "operationId": "auth_revoke", + "operationId": "admin_usergroups_addTeams", "parameters": [ { - "description": "Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked.", - "in": "query", - "name": "test", - "type": "boolean" + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "header", + "name": "token", + "required": true, + "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "An encoded usergroup (IDP Group) ID.", + "in": "formData", + "name": "usergroup_id", + "required": true, + "type": "string" + }, + { + "description": "A comma separated list of encoded team (workspace) IDs. Each workspace *MUST* belong to the organization associated with the token.", + "in": "formData", + "name": "team_ids", "required": true, "type": "string" + }, + { + "description": "When `true`, this method automatically creates new workspace accounts for the IDP group members.", + "in": "formData", + "name": "auto_provision", + "type": "boolean" } ], "produces": [ @@ -7690,26 +7688,21 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "revoked": true + "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from auth.revoke method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "revoked": { - "type": "boolean" } }, "required": [ - "ok", - "revoked" + "ok" ], - "title": "auth.revoke schema", + "title": "Default success template", "type": "object" } }, @@ -7722,41 +7715,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from auth.revoke method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "auth.revoke error schema", + "title": "Default error template", "type": "object" } } @@ -7764,34 +7733,54 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "auth" + "admin.usergroups", + "admin" ] } }, - "/auth.test": { + "/admin.usergroups.listChannels": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Checks authentication & identity.", + "description": "List the channels linked to an org-level IDP group (user group).", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/auth.test" + "url": "https://api.slack.com/methods/admin.usergroups.listChannels" }, - "operationId": "auth_test", + "operationId": "admin_usergroups_listChannels", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", + "description": "Authentication token. Requires scope: `admin.usergroups:read`", "in": "header", "name": "token", "required": true, "type": "string" + }, + { + "description": "ID of the IDP group to list default channels for.", + "in": "query", + "name": "usergroup_id", + "required": true, + "type": "string" + }, + { + "description": "ID of the the workspace.", + "in": "query", + "name": "team_id", + "type": "string" + }, + { + "description": "Flag to include or exclude the count of members per channel.", + "in": "query", + "name": "include_num_members", + "type": "boolean" } ], "produces": [ @@ -7799,95 +7788,72 @@ ], "responses": { "200": { - "description": "Standard success response when used with a user token", + "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "team": "Subarachnoid Workspace", - "team_id": "T12345678", - "url": "https://subarachnoid.slack.com/", - "user": "grace", - "user_id": "W12345678" + "channels": [ + { + "id": "C024BE91L", + "name": "fun", + "num_members": 34, + "team_id": "T024BE911" + }, + { + "id": "C024BE91K", + "name": "more fun", + "team_id": "T024BE912" + }, + { + "id": "C024BE91M", + "is_redacted": true, + "name": "public-channel", + "num_members": 34, + "team_id": "T024BE911" + }, + { + "id": "C024BE91N", + "name": "some more fun", + "team_id": "T024BE921" + } + ], + "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response auth.test method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "is_enterprise_install": { - "type": "boolean" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "team": { - "type": "string" - }, - "team_id": { - "$ref": "#/definitions/defs_team" - }, - "url": { - "type": "string" - }, - "user": { - "type": "string" - }, - "user_id": { - "$ref": "#/definitions/defs_user_id" } }, "required": [ - "ok", - "url", - "team", - "user", - "team_id", - "user_id" + "ok" ], - "title": "auth.test success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Standard failure response when used with an invalid token", + "description": "Typical error response if the token provided is not associated with an Org Admin or Owner", "examples": { "application/json": { - "error": "invalid_auth", + "error": "not_an_admin", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response auth.test method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "token_revoked", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "auth.test error schema", + "title": "Default error template", "type": "object" } } @@ -7895,38 +7861,48 @@ "security": [ { "slackAuth": [ - "none" + "admin.usergroups:read" ] } ], "tags": [ - "auth" + "admin.usergroups", + "admin" ] } }, - "/bots.info": { - "get": { + "/admin.usergroups.removeChannels": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Gets information about a bot user.", + "description": "Remove one or more default channels from an org-level IDP group (user group).", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/bots.info" + "url": "https://api.slack.com/methods/admin.usergroups.removeChannels" }, - "operationId": "bots_info", + "operationId": "admin_usergroups_removeChannels", "parameters": [ { - "description": "Authentication token. Requires scope: `users:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.usergroups:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Bot user to get info on", - "in": "query", - "name": "bot", + "description": "ID of the IDP Group", + "in": "formData", + "name": "usergroup_id", + "required": true, + "type": "string" + }, + { + "description": "Comma-separated string of channel IDs", + "in": "formData", + "name": "channel_ids", + "required": true, "type": "string" } ], @@ -7935,141 +7911,47 @@ ], "responses": { "200": { - "description": "When successful, returns bot info by bot ID.", + "description": "Typical success response", "examples": { "application/json": { - "bot": { - "app_id": "A161CLERW", - "deleted": false, - "icons": { - "image_36": "https://...", - "image_48": "https://...", - "image_72": "https://..." - }, - "id": "B061F7JD2", - "name": "beforebot", - "updated": 1449272004, - "user_id": "U012ABCDEF" - }, "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from bots.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "bot": { - "additionalProperties": false, - "properties": { - "app_id": { - "$ref": "#/definitions/defs_app_id" - }, - "deleted": { - "type": "boolean" - }, - "icons": { - "additionalProperties": false, - "properties": { - "image_36": { - "format": "uri", - "type": "string" - }, - "image_48": { - "format": "uri", - "type": "string" - }, - "image_72": { - "format": "uri", - "type": "string" - } - }, - "required": [ - "image_36", - "image_48", - "image_72" - ], - "type": "object" - }, - "id": { - "$ref": "#/definitions/defs_bot_id" - }, - "name": { - "type": "string" - }, - "updated": { - "type": "integer" - }, - "user_id": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "id", - "deleted", - "name", - "updated", - "app_id", - "icons" - ], - "type": "object" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "bot" + "ok" ], - "title": "bots.info schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "When no bot can be found, it returns an error.", + "description": "Typical error response if the token provided is not associated with an Org Admin or Owner", "examples": { "application/json": { - "error": "bot_not_found", + "error": "not_an_admin", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from bots.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "bot_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "bots.info error schema", + "title": "Default error template", "type": "object" } } @@ -8077,38 +7959,66 @@ "security": [ { "slackAuth": [ - "users:read" + "admin.usergroups:write" ] } ], "tags": [ - "bots" + "admin.usergroups", + "admin" ] } }, - "/channels.archive": { + "/admin.users.assign": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Archives a channel.", + "description": "Add an Enterprise user to a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.archive" + "url": "https://api.slack.com/methods/admin.users.assign" }, - "operationId": "channels_archive", + "operationId": "admin_users_assign", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Channel to archive", + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "channel", + "name": "team_id", + "required": true, + "type": "string" + }, + { + "description": "The ID of the user to add to the workspace.", + "in": "formData", + "name": "user_id", + "required": true, + "type": "string" + }, + { + "description": "True if user should be added to the workspace as a guest.", + "in": "formData", + "name": "is_restricted", + "type": "boolean" + }, + { + "description": "True if user should be added to the workspace as a single-channel guest.", + "in": "formData", + "name": "is_ultra_restricted", + "type": "boolean" + }, + { + "description": "Comma separated values of channel IDs to add user in the new workspace.", + "in": "formData", + "name": "channel_ids", "type": "string" } ], @@ -8124,8 +8034,8 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.archive method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -8134,7 +8044,7 @@ "required": [ "ok" ], - "title": "channels.archive success schema", + "title": "Default success template", "type": "object" } }, @@ -8147,46 +8057,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.archive method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "already_archived", - "cant_archive_general", - "restricted_action", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.archive error schema", + "title": "Default error template", "type": "object" } } @@ -8194,44 +8075,91 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.create": { + "/admin.users.invite": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Creates a channel.", + "description": "Invite a user to a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.create" + "url": "https://api.slack.com/methods/admin.users.invite" }, - "operationId": "channels_create", + "operationId": "admin_users_invite", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", - "in": "formData", - "name": "validate", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Name of channel to create", + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "name", + "name": "team_id", + "required": true, + "type": "string" + }, + { + "description": "The email address of the person to invite.", + "in": "formData", + "name": "email", + "required": true, + "type": "string" + }, + { + "description": "A comma-separated list of `channel_id`s for this user to join. At least one channel is required.", + "in": "formData", + "name": "channel_ids", + "required": true, + "type": "string" + }, + { + "description": "An optional message to send to the user in the invite email.", + "in": "formData", + "name": "custom_message", + "type": "string" + }, + { + "description": "Full name of the user.", + "in": "formData", + "name": "real_name", + "type": "string" + }, + { + "description": "Allow this invite to be resent in the future if a user has not signed up yet. (default: false)", + "in": "formData", + "name": "resend", + "type": "boolean" + }, + { + "description": "Is this user a multi-channel guest user? (default: false)", + "in": "formData", + "name": "is_restricted", + "type": "boolean" + }, + { + "description": "Is this user a single channel guest user? (default: false)", + "in": "formData", + "name": "is_ultra_restricted", + "type": "boolean" + }, + { + "description": "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.", + "in": "formData", + "name": "guest_expiration_ts", "type": "string" } ], @@ -8240,118 +8168,47 @@ ], "responses": { "200": { - "description": "Typical success response resulting in a new channel", + "description": "Typical success response", "examples": { "application/json": { - "channel": { - "created": 1502833204, - "creator": "U061F7AUR", - "id": "C0DEL09A5", - "is_archived": false, - "is_channel": true, - "is_general": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_private": false, - "is_shared": false, - "last_read": "0000000000.000000", - "latest": null, - "members": [ - "U061F7AUR" - ], - "name": "endeavor", - "name_normalized": "endeavor", - "previous_names": [], - "purpose": { - "creator": "", - "last_set": 0, - "value": "" - }, - "topic": { - "creator": "", - "last_set": 0, - "value": "" - }, - "unread_count": 0, - "unread_count_display": 0 - }, "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.create method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.create error schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Example error response when an invalid name is provided", + "description": "Typical error response", "examples": { "application/json": { - "detail": "Value passed for `name` contained unallowed special characters.", - "error": "invalid_name_specials", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.create method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "name_taken", - "restricted_action", - "no_channel", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "invalid_name", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.create error schema", + "title": "Default error template", "type": "object" } } @@ -8359,68 +8216,54 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.history": { + "/admin.users.list": { "get": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Fetches history of messages and events from a channel.", + "description": "List users on a workspace", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.history" + "url": "https://api.slack.com/methods/admin.users.list" }, - "operationId": "channels_history", + "operationId": "admin_users_list", "parameters": [ { - "description": "Number of messages to return, between 1 and 1000.", - "in": "query", - "name": "count", - "type": "integer" - }, - { - "description": "Include `unread_count_display` in the output?", - "in": "query", - "name": "unreads", - "type": "boolean" - }, - { - "description": "Include messages with latest or oldest timestamp in results.", - "in": "query", - "name": "inclusive", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `channels:history`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.users:read`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Start of time range of messages to include in results.", + "description": "The ID (`T1234`) of the workspace.", "in": "query", - "name": "oldest", - "type": "number" + "name": "team_id", + "required": true, + "type": "string" }, { - "description": "Channel to fetch history for.", + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", "in": "query", - "name": "channel", + "name": "cursor", "type": "string" }, { - "description": "End of time range of messages to include in results.", + "description": "Limit for how many users to be retrieved per page", "in": "query", - "name": "latest", - "type": "number" + "name": "limit", + "type": "integer" } ], "produces": [ @@ -8428,157 +8271,59 @@ ], "responses": { "200": { - "description": "Typical success response containing the channel's history", + "description": "Typical success response", "examples": { "application/json": { - "has_more": false, - "messages": [ - { - "text": "Hello", - "ts": "1358546515.000008", - "type": "message", - "user": "U2147483896" - }, - { - "is_starred": true, - "reactions": [ - { - "count": 3, - "name": "space_invader", - "users": [ - "U1", - "U2", - "U3" - ] - }, - { - "count": 5, - "name": "sweet_potato", - "users": [ - "U1", - "U2", - "U3", - "U4", - "U5" - ] - } - ], - "text": "World", - "ts": "1358546515.000007", - "type": "message", - "user": "U2147483896" - }, - { - "ts": "1358546515.000007", - "type": "something_else" - }, + "ok": true, + "users": [ { - "attachments": [ - { - "fallback": "This is an attachment fallback", - "id": 1, - "text": "Don't get too attached" - } - ], - "bot_id": "B19LU7CSY", - "subtype": "bot_message", - "text": "Containment unit is 98% full", - "ts": "1503435956.000247", - "type": "message", - "username": "ecto1138" + "email": "bront@slack.com", + "id": "T1234", + "is_admin": false, + "is_bot": false, + "is_owner": false, + "is_primary_owner": false, + "is_restricted": false, + "is_ultra_restricted": false } - ], - "ok": true + ] } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.history method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "has_more": { - "type": "boolean" - }, - "is_limited": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages", - "has_more", - "channel_actions_ts", - "channel_actions_count" + "ok" ], - "title": "channels.history success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Error response when the specified channel cannot be found", + "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.history method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.history error schema", + "title": "Default error template", "type": "object" } } @@ -8586,43 +8331,48 @@ "security": [ { "slackAuth": [ - "channels:history" + "admin.users:read" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.info": { - "get": { + "/admin.users.remove": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Gets information about a channel.", + "description": "Remove a user from a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.info" + "url": "https://api.slack.com/methods/admin.users.remove" }, - "operationId": "channels_info", + "operationId": "admin_users_remove", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.users:write`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Set this to `true` to receive the locale for this channel. Defaults to `false`", - "in": "query", - "name": "include_locale", - "type": "boolean" + "description": "The ID (`T1234`) of the workspace.", + "in": "formData", + "name": "team_id", + "required": true, + "type": "string" }, { - "description": "Channel to get info on", - "in": "query", - "name": "channel", + "description": "The ID of the user to remove.", + "in": "formData", + "name": "user_id", + "required": true, "type": "string" } ], @@ -8634,121 +8384,44 @@ "description": "Typical success response", "examples": { "application/json": { - "channel": { - "created": 1466025154, - "creator": "U0G9QF9C6", - "id": "C1H9RESGL", - "is_archived": false, - "is_channel": true, - "is_general": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_private": false, - "is_shared": false, - "last_read": "1503435939.000101", - "latest": { - "attachments": [ - { - "fallback": "This is an attachment fallback", - "id": 1, - "text": "Don't get too attached" - } - ], - "bot_id": "B19LU7CSY", - "subtype": "bot_message", - "text": "Containment unit is 98% full", - "ts": "1503435956.000247", - "type": "message", - "username": "ecto1138" - }, - "members": [ - "U0G9QF9C6", - "U1QNSQB9U" - ], - "name": "busting", - "name_normalized": "busting", - "previous_names": [ - "dusting" - ], - "purpose": { - "creator": "U0G9QF9C6", - "last_set": 1503435128, - "value": "Discuss busting ghosts" - }, - "topic": { - "creator": "U0G9QF9C6", - "last_set": 1503435128, - "value": "Spiritual containment strategies" - }, - "unread_count": 1, - "unread_count_display": 1 - }, "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.info success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Error response when the specified channel cannot be found", + "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.info error schema", + "title": "Default error template", "type": "object" } } @@ -8756,45 +8429,48 @@ "security": [ { "slackAuth": [ - "channels:read" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.invite": { + "/admin.users.session.invalidate": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Invites a user to a channel.", + "description": "Invalidate a single session for a user by session_id", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.invite" + "url": "https://api.slack.com/methods/admin.users.session.invalidate" }, - "operationId": "channels_invite", + "operationId": "admin_users_session_invalidate", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "User to invite to channel.", + "description": "ID of the team that the session belongs to", "in": "formData", - "name": "user", + "name": "team_id", + "required": true, "type": "string" }, { - "description": "Channel to invite user to.", "in": "formData", - "name": "channel", - "type": "string" + "name": "session_id", + "required": true, + "type": "integer" } ], "produces": [ @@ -8805,122 +8481,44 @@ "description": "Typical success response", "examples": { "application/json": { - "channel": { - "created": 1466025154, - "creator": "U0G9QF9C6", - "id": "C1H9RESGL", - "is_archived": false, - "is_channel": true, - "is_general": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_private": false, - "is_shared": false, - "last_read": "1503435963.000307", - "latest": { - "subtype": "channel_leave", - "text": "<@U1QNSQB9U|protobot> has left the channel", - "ts": "1503435963.000307", - "type": "message", - "user": "U1QNSQB9U" - }, - "members": [ - "U0G9QF9C6", - "U1QNSQB9U" - ], - "name": "busting", - "name_normalized": "busting", - "previous_names": [], - "purpose": { - "creator": "U0G9QF9C6", - "last_set": 1503435128, - "value": "My Purpose" - }, - "topic": { - "creator": "U0G9QF9C6", - "last_set": 1503435128, - "value": "My Topic" - }, - "unread_count": 0, - "unread_count_display": 0 - }, "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.invite method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.invite error schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "A somewhat typical error response", + "description": "Typical error response", "examples": { "application/json": { - "error": "cant_invite", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.invite method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "user_not_found", - "cant_invite_self", - "not_in_channel", - "already_in_channel", - "is_archived", - "cant_invite", - "too_many_users", - "ura_max_channels", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.invite error schema", + "title": "Default error template", "type": "object" } } @@ -8928,45 +8526,54 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users.session", + "admin" ] } }, - "/channels.join": { + "/admin.users.session.reset": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Joins a channel, creating it if needed.", + "description": "Wipes all valid sessions on all devices for a given user", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.join" + "url": "https://api.slack.com/methods/admin.users.session.reset" }, - "operationId": "channels_join", + "operationId": "admin_users_session_reset", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", - "in": "formData", - "name": "validate", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Name of channel to join", + "description": "The ID of the user to wipe sessions for", "in": "formData", - "name": "name", + "name": "user_id", + "required": true, "type": "string" + }, + { + "description": "Only expire mobile sessions (default: false)", + "in": "formData", + "name": "mobile_only", + "type": "boolean" + }, + { + "description": "Only expire web sessions (default: false)", + "in": "formData", + "name": "web_only", + "type": "boolean" } ], "produces": [ @@ -8977,59 +8584,21 @@ "description": "Typical success response", "examples": { "application/json": { - "already_in_channel": true, - "channel": { - "created": 1466025154, - "creator": "U0G9QF9C6", - "id": "C1H9RESGL", - "is_archived": false, - "is_channel": true, - "is_general": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_private": false, - "is_shared": false, - "members": [ - "U0G9QF9C6", - "U1QNSQB9U" - ], - "name": "busting", - "name_normalized": "busting", - "previous_names": [], - "purpose": { - "creator": "U0G9QF9C6", - "last_set": 1503435128, - "value": "My Purpose" - }, - "topic": { - "creator": "U0G9QF9C6", - "last_set": 1503435128, - "value": "My Topic" - } - }, "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.join method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "already_in_channel": { - "type": "boolean" - }, - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.join schema", + "title": "Default success template", "type": "object" } }, @@ -9037,58 +8606,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.join method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "name_taken", - "restricted_action", - "no_channel", - "is_archived", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "invalid_name", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.join error schema", + "title": "Default error template", "type": "object" } } @@ -9096,44 +8629,48 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users.session", + "admin" ] } }, - "/channels.kick": { + "/admin.users.setAdmin": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Removes a user from a channel.", + "description": "Set an existing guest, regular user, or owner to be an admin user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.kick" + "url": "https://api.slack.com/methods/admin.users.setAdmin" }, - "operationId": "channels_kick", + "operationId": "admin_users_setAdmin", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "User to remove from channel.", + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "user", + "name": "team_id", + "required": true, "type": "string" }, { - "description": "Channel to remove user from.", + "description": "The ID of the user to designate as an admin.", "in": "formData", - "name": "channel", + "name": "user_id", + "required": true, "type": "string" } ], @@ -9149,8 +8686,8 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.kick method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -9159,7 +8696,7 @@ "required": [ "ok" ], - "title": "channels.kick schema", + "title": "Default success template", "type": "object" } }, @@ -9167,54 +8704,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "not_in_channel", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.kick method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "user_not_found", - "cant_kick_self", - "not_in_channel", - "cant_kick_from_general", - "restricted_action", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.kick error schema", + "title": "Default error template", "type": "object" } } @@ -9222,39 +8727,56 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.leave": { + "/admin.users.setExpiration": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Leaves a channel.", + "description": "Set an expiration for a guest user", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.leave" + "url": "https://api.slack.com/methods/admin.users.setExpiration" }, - "operationId": "channels_leave", + "operationId": "admin_users_setExpiration", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Channel to leave", + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "channel", + "name": "team_id", + "required": true, + "type": "string" + }, + { + "description": "The ID of the user to set an expiration for.", + "in": "formData", + "name": "user_id", + "required": true, "type": "string" + }, + { + "description": "Timestamp when guest account should be disabled.", + "in": "formData", + "name": "expiration_ts", + "required": true, + "type": "integer" } ], "produces": [ @@ -9269,8 +8791,8 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.leave method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -9279,7 +8801,7 @@ "required": [ "ok" ], - "title": "channels.leave schema", + "title": "Default success template", "type": "object" } }, @@ -9292,47 +8814,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.leave method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "is_archived", - "cant_leave_general", - "cant_leave_mandatory_shared_channel", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.leave error schema", + "title": "Default error template", "type": "object" } } @@ -9340,56 +8832,49 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.list": { - "get": { + "/admin.users.setOwner": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Lists all channels in a Slack team.", + "description": "Set an existing guest, regular user, or admin user to be a workspace owner.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.list" + "url": "https://api.slack.com/methods/admin.users.setOwner" }, - "operationId": "channels_list", + "operationId": "admin_users_setOwner", "parameters": [ { - "description": "Exclude the `members` collection from each `channel`", - "in": "query", - "name": "exclude_members", - "type": "boolean" - }, - { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `channels:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.users:write`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The ID (`T1234`) of the workspace.", + "in": "formData", + "name": "team_id", + "required": true, + "type": "string" }, { - "description": "Exclude archived channels from the list", - "in": "query", - "name": "exclude_archived", - "type": "boolean" + "description": "Id of the user to promote to owner.", + "in": "formData", + "name": "user_id", + "required": true, + "type": "string" } ], "produces": [ @@ -9397,103 +8882,24 @@ ], "responses": { "200": { - "description": "Typical cursored success response", + "description": "Typical success response", "examples": { "application/json": { - "channels": [ - { - "created": 1449709280, - "creator": "U0G9QF9C6", - "id": "C0G9QF9GW", - "is_archived": false, - "is_channel": true, - "is_general": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_private": false, - "is_shared": false, - "members": [ - "U0G9QF9C6", - "U0G9WFXNZ" - ], - "name": "random", - "name_normalized": "random", - "num_members": 2, - "previous_names": [], - "purpose": { - "creator": "", - "last_set": 0, - "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." - }, - "topic": { - "creator": "U0G9QF9C6", - "last_set": 1449709352, - "value": "Other stuff" - } - }, - { - "created": 1449709280, - "creator": "U0G9QF9C6", - "id": "C0G9QKBBL", - "is_archived": false, - "is_channel": true, - "is_general": true, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_private": false, - "is_shared": false, - "members": [ - "U0G9QF9C6", - "U0G9WFXNZ" - ], - "name": "general", - "name_normalized": "general", - "num_members": 2, - "previous_names": [], - "purpose": { - "creator": "U0G9QF9C6", - "last_set": 1449709334, - "value": "To talk about anything!" - }, - "topic": { - "creator": "U0G9QF9C6", - "last_set": 1449709364, - "value": "Talk about anything!" - } - } - ], - "ok": true, - "response_metadata": { - "next_cursor": "dGVhbTpDMUg5UkVTR0w=" - } + "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channels": { - "items": { - "$ref": "#/definitions/objs_channel" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" } }, "required": [ - "ok", - "channels" + "ok" ], - "title": "channels.list success schema", + "title": "Default success template", "type": "object" } }, @@ -9506,37 +8912,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "limit_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.list error schema", + "title": "Default error template", "type": "object" } } @@ -9544,44 +8930,48 @@ "security": [ { "slackAuth": [ - "channels:read" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.mark": { + "/admin.users.setRegular": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Sets the read cursor in a channel.", + "description": "Set an existing guest user, admin user, or owner to be a regular user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.mark" + "url": "https://api.slack.com/methods/admin.users.setRegular" }, - "operationId": "channels_mark", + "operationId": "admin_users_setRegular", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Timestamp of the most recently seen message.", + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "ts", - "type": "number" + "name": "team_id", + "required": true, + "type": "string" }, { - "description": "Channel to set reading cursor in.", + "description": "The ID of the user to designate as a regular user.", "in": "formData", - "name": "channel", + "name": "user_id", + "required": true, "type": "string" } ], @@ -9597,8 +8987,8 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -9607,7 +8997,7 @@ "required": [ "ok" ], - "title": "channels.mark success schema", + "title": "Default success template", "type": "object" } }, @@ -9620,39 +9010,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "invalid_timestamp", - "not_in_channel", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.mark error schema", + "title": "Default error template", "type": "object" } } @@ -9660,50 +9028,39 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.rename": { - "post": { + "/api.test": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Renames a channel.", + "description": "Checks API calling code.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.rename" + "url": "https://api.slack.com/methods/api.test" }, - "operationId": "channels_rename", + "operationId": "api_test", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", - "in": "formData", - "name": "validate", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `channels:write`", - "in": "header", - "name": "token", - "type": "string" - }, - { - "description": "New name for channel.", - "in": "formData", - "name": "name", + "description": "Error response to return", + "in": "query", + "name": "error", "type": "string" }, { - "description": "Channel to rename", - "in": "formData", - "name": "channel", + "description": "example property to return", + "in": "query", + "name": "foo", "type": "string" } ], @@ -9712,105 +9069,47 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Standard success response", "examples": { "application/json": { - "channel": { - "created": 1477445146, - "creator": "U2U85N1RZ", - "id": "C2U875RJN", - "is_archived": false, - "is_channel": true, - "is_general": false, - "is_member": false, - "is_mpim": false, - "is_org_shared": false, - "is_private": false, - "is_shared": false, - "members": [], - "name": "humans-and-bots", - "name_normalized": "humans-and-bots", - "previous_names": [ - "humans" - ], - "purpose": { - "creator": "U2U85N1RZ", - "last_set": 1509475801, - "value": "the purpose of this channel is to bring people and robots together in harmony" - }, - "topic": { - "creator": "U2U85N1RZ", - "last_set": 1509475775, - "value": "here be robots" - }, - "unlinked": 0 - }, "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.rename method", + "additionalProperties": { + "type": "object" + }, + "description": "Schema for successful response api.test method", "properties": { - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.rename schema", + "title": "api.test success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Artificial error response", "examples": { "application/json": { - "error": "invalid_auth", + "args": { + "error": "my_error" + }, + "error": "my_error", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.rename method", + "additionalProperties": { + "type": "object" + }, + "description": "Schema for error response api.test method", "properties": { "error": { - "enum": [ - "channel_not_found", - "not_in_channel", - "not_authorized", - "invalid_name", - "name_taken", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], "type": "string" }, "ok": { @@ -9821,7 +9120,7 @@ "ok", "error" ], - "title": "channels.rename error schema", + "title": "api.test error schema", "type": "object" } } @@ -9829,44 +9128,50 @@ "security": [ { "slackAuth": [ - "channels:write" + "none" ] } ], "tags": [ - "channels" + "api" ] } }, - "/channels.replies": { + "/apps.event.authorizations.list": { "get": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieve a thread of messages posted to a channel", + "description": "Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.replies" + "url": "https://api.slack.com/methods/apps.event.authorizations.list" }, - "operationId": "channels_replies", + "operationId": "apps_event_authorizations_list", "parameters": [ { - "description": "Unique identifier of a thread's parent message", - "in": "query", - "name": "thread_ts", - "type": "number" + "description": "Authentication token. Requires scope: `authorizations:read`", + "in": "header", + "name": "token", + "required": true, + "type": "string" }, { - "description": "Authentication token. Requires scope: `channels:history`", "in": "query", - "name": "token", + "name": "event_context", + "required": true, "type": "string" }, { - "description": "Channel to fetch thread from", "in": "query", - "name": "channel", + "name": "cursor", "type": "string" + }, + { + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -9877,207 +9182,27 @@ "description": "Typical success response", "examples": { "application/json": { - "has_more": false, - "messages": [ - { - "last_read": "1509484885.000082", - "replies": [ - { - "ts": "1509484424.000601", - "user": "U2U85N1RZ" - }, - { - "ts": "1509484885.000082", - "user": "U2U85N1RZ" - } - ], - "reply_count": 2, - "subscribed": true, - "text": "This is a channel message", - "thread_ts": "1485913694.000025", - "ts": "1485913694.000025", - "type": "message", - "unread_count": 0, - "user": "U2X9P5FEL" - }, - { - "parent_user_id": "U2X9P5FEL", - "text": "This is a thread reply", - "thread_ts": "1485913694.000025", - "ts": "1509484424.000601", - "type": "message", - "user": "U2U85N1RZ" - }, - { - "parent_user_id": "U2X9P5FEL", - "text": "This is another thread reply", - "thread_ts": "1485913694.000025", - "ts": "1509484885.000082", - "type": "message", - "user": "U2U85N1RZ" - } - ], + "authorizations": { + "enterprise_id": "string", + "is_bot": "string", + "team_id": "string", + "user_id": "string" + }, "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.replies method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest_reply": { - "$ref": "#/definitions/defs_ts" - }, - "replies": { - "items": { - "additionalProperties": false, - "properties": { - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "user", - "ts" - ], - "type": "object" - }, - "type": "array" - }, - "reply_count": { - "type": "integer" - }, - "reply_users": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "type": "array", - "uniqueItems": true - }, - "reply_users_count": { - "type": "integer" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "subscribed": { - "type": "boolean" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "unread_count": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "reply_count", - "replies", - "subscribed", - "ts" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "is_starred": { - "type": "boolean" - }, - "parent_user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "parent_user_id", - "ts" - ], - "type": "object" - } - ] - }, - "type": "array" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages", - "has_more" + "ok" ], - "title": "channels.replies schema", + "title": "Default success template", "type": "object" } }, @@ -10085,48 +9210,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "thread_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.replies method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "thread_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.replies error schema", + "title": "Default error template", "type": "object" } } @@ -10134,53 +9233,32 @@ "security": [ { "slackAuth": [ - "channels:history" + "authorizations:read" ] } ], "tags": [ - "channels" + "apps.event.authorizations", + "apps" ] } }, - "/channels.setPurpose": { - "post": { + "/apps.permissions.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the purpose for a channel.", + "description": "Returns list of permissions this app has on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.setPurpose" + "url": "https://api.slack.com/methods/apps.permissions.info" }, - "operationId": "channels_setPurpose", + "operationId": "apps_permissions_info", "parameters": [ { - "description": "if it is true, treat this like a message and not an unescaped thing", - "in": "formData", - "name": "name_tagging", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `channels:write`", - "in": "header", + "description": "Authentication token. Requires scope: `none`", + "in": "query", "name": "token", - "required": true, - "type": "string" - }, - { - "description": "The new purpose", - "in": "formData", - "name": "purpose", - "required": true, - "type": "string" - }, - { - "description": "Channel to set the purpose of", - "in": "formData", - "name": "channel", - "required": true, "type": "string" } ], @@ -10189,65 +9267,195 @@ ], "responses": { "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true, - "purpose": "My special purpose" - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.setPurpose method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "purpose": { - "type": "string" - } - }, - "required": [ - "ok", - "purpose" - ], - "title": "channels.setPurpose schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", + "description": "Standard success response when used with a user token", "examples": { "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.setPurpose method", - "properties": { - "error": { - "enum": [ - "channel_not_found", - "not_in_channel", - "is_archived", - "too_long", - "user_is_restricted", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", + "info": { + "app_home": { + "resources": { + "ids": [ + "D0C0NU1Q8", + "D0BH95DLH" + ] + }, + "scopes": [ + "chat:write", + "im:history", + "im:read" + ] + }, + "channel": { + "resources": { + "excluded_ids": [], + "ids": [ + "C061FA5PB" + ], + "wildcard": false + }, + "scopes": [ + "channels:read" + ] + }, + "group": { + "resources": { + "ids": [] + }, + "scopes": [] + }, + "im": { + "resources": { + "ids": [] + }, + "scopes": [] + }, + "mpim": { + "resources": { + "ids": [] + }, + "scopes": [] + }, + "team": { + "resources": { + "ids": [] + }, + "scopes": [] + } + }, + "ok": true + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for successful response from apps.permissions.info method", + "properties": { + "info": { + "properties": { + "app_home": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" + }, + "channel": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" + }, + "group": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" + }, + "im": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" + }, + "mpim": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" + }, + "team": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "required": [ + "scopes", + "resources" + ], + "type": "object" + } + }, + "required": [ + "team", + "channel", + "group", + "mpim", + "im", + "app_home" + ], + "type": "object" + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok", + "info" + ], + "title": "apps.permissions.info schema", + "type": "object" + } + }, + "default": { + "description": "Standard failure response when used with an invalid token", + "examples": { + "application/json": { + "error": "invalid_auth", + "ok": false + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for error response from apps.permissions.info method", + "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", "json_not_object", "request_timeout", "upgrade_required", @@ -10263,7 +9471,7 @@ "ok", "error" ], - "title": "channels.setPurpose error schema", + "title": "apps.permissions.info error schema", "type": "object" } } @@ -10271,46 +9479,46 @@ "security": [ { "slackAuth": [ - "channels:write" + "none" ] } ], "tags": [ - "channels" + "apps.permissions", + "apps" ] } }, - "/channels.setTopic": { - "post": { + "/apps.permissions.request": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the topic for a channel.", + "description": "Allows an app to request additional scopes", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.setTopic" + "url": "https://api.slack.com/methods/apps.permissions.request" }, - "operationId": "channels_setTopic", + "operationId": "apps_permissions_request", "parameters": [ { - "description": "The new topic", - "in": "formData", - "name": "topic", + "description": "Authentication token. Requires scope: `none`", + "in": "query", + "name": "token", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `channels:write`", - "in": "header", - "name": "token", + "description": "A comma separated list of scopes to request for", + "in": "query", + "name": "scopes", "required": true, "type": "string" }, { - "description": "Channel to set the topic of", - "in": "formData", - "name": "channel", + "description": "Token used to trigger the permissions API", + "in": "query", + "name": "trigger_id", "required": true, "type": "string" } @@ -10320,57 +9528,56 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Standard success response when used with a user token", "examples": { "application/json": { - "ok": true, - "topic": "To picture topicality" + "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from channels.setTopic method", + "description": "Schema for successful response from apps.permissions.request method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "topic": { - "type": "string" } }, "required": [ - "topic", "ok" ], - "title": "channels.setTopic schema", + "title": "apps.permissions.request schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Standard failure response when trigger_id is invalid", "examples": { "application/json": { - "error": "invalid_auth", + "error": "invalid_trigger_id", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from channels.setTopic method", + "description": "Schema for error response from apps.permissions.request method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_in_channel", - "is_archived", - "too_long", - "user_is_restricted", + "invalid_trigger", + "trigger_exchanged", + "invalid_scope", + "invalid_user", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -10394,7 +9601,7 @@ "ok", "error" ], - "title": "channels.setTopic error schema", + "title": "apps.permissions.request error schema", "type": "object" } } @@ -10402,41 +9609,46 @@ "security": [ { "slackAuth": [ - "channels:write" + "none" ] } ], "tags": [ - "channels" + "apps.permissions", + "apps" ] } }, - "/channels.unarchive": { - "post": { + "/apps.permissions.resources.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Unarchives a channel.", + "description": "Returns list of resource grants this app has on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.unarchive" + "url": "https://api.slack.com/methods/apps.permissions.resources.list" }, - "operationId": "channels_unarchive", + "operationId": "apps_permissions_resources_list", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", - "in": "header", - "name": "token", + "description": "Authentication token. Requires scope: `none`", + "in": "query", + "name": "token", "required": true, "type": "string" }, { - "description": "Channel to unarchive", - "in": "formData", - "name": "channel", - "required": true, + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" + }, + { + "description": "The maximum number of items to return.", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -10444,24 +9656,82 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical successful paginated response", "examples": { "application/json": { - "ok": true + "ok": true, + "resources": [ + { + "id": "T0DES3UAN", + "type": "team" + }, + { + "id": "D024BFF1M", + "type": "app_home" + }, + { + "id": "C024BE91L", + "type": "channel" + } + ], + "response_metadata": { + "next_cursor": "dGVhbTpDMUg5UkVTR0w=" + } } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.unarchive method", + "additionalProperties": true, + "description": "Schema for successful response apps.permissions.resources.list method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "resources": { + "items": { + "properties": { + "id": { + "title": "An ID for a resource", + "type": "string", + "x-examples": [ + "T0DES3UAN", + "C0ABC1ABC" + ] + }, + "type": { + "title": "The type of resource the `id` corresponds to", + "type": "string", + "x-examples": [ + "team", + "channel", + "mpim" + ] + } + }, + "type": "object" + }, + "type": "array" + }, + "response_metadata": { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string", + "x-examples": [ + "dGVhbTpDMUg5UkVTR0w=" + ] + } + }, + "required": [ + "next_cursor" + ], + "type": "object" } }, "required": [ - "ok" + "ok", + "resources" ], - "title": "channels.unarchive schema", + "title": "apps.permissions.resources.list success schema", "type": "object" } }, @@ -10469,18 +9739,21 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_auth", + "error": "invalid_cursor", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from channels.unarchive method", + "description": "Schema for error response from apps.permissions.resources.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_archived", + "invalid_cursor", "not_authed", "invalid_auth", "account_inactive", @@ -10488,7 +9761,6 @@ "no_permission", "org_login_required", "user_is_bot", - "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -10512,7 +9784,7 @@ "ok", "error" ], - "title": "channels.unarchive error schema", + "title": "apps.permissions.resources.list error schema", "type": "object" } } @@ -10520,50 +9792,33 @@ "security": [ { "slackAuth": [ - "channels:write" + "none" ] } ], "tags": [ - "channels" + "apps.permissions.resources", + "apps" ] } }, - "/chat.delete": { - "post": { + "/apps.permissions.scopes.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Deletes a message.", + "description": "Returns list of scopes this app has on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.delete" + "url": "https://api.slack.com/methods/apps.permissions.scopes.list" }, - "operationId": "chat_delete", + "operationId": "apps_permissions_scopes_list", "parameters": [ { - "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", - "in": "formData", - "name": "as_user", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", - "in": "header", + "description": "Authentication token. Requires scope: `none`", + "in": "query", "name": "token", - "type": "string" - }, - { - "description": "Timestamp of the message to be deleted.", - "in": "formData", - "name": "ts", - "type": "number" - }, - { - "description": "Channel containing the message to be deleted.", - "in": "formData", - "name": "channel", + "required": true, "type": "string" } ], @@ -10572,34 +9827,76 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical successful paginated response", "examples": { "application/json": { - "channel": "C024BE91L", "ok": true, - "ts": "1401383885.000061" + "scopes": { + "app_home": [ + "chat:write", + "im:history", + "im:read" + ], + "channel": [ + "channels:history", + "chat:write" + ], + "group": [ + "chat:write" + ], + "im": [ + "chat:write" + ], + "mpim": [ + "chat:write" + ], + "team": [ + "users:read" + ], + "user": [] + } } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response of chat.delete method", + "additionalProperties": true, + "description": "Schema for successful response api.permissions.scopes.list method", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "ts": { - "$ref": "#/definitions/defs_ts" + "scopes": { + "additionalProperties": true, + "properties": { + "app_home": { + "$ref": "#/definitions/objs_scopes" + }, + "channel": { + "$ref": "#/definitions/objs_scopes" + }, + "group": { + "$ref": "#/definitions/objs_scopes" + }, + "im": { + "$ref": "#/definitions/objs_scopes" + }, + "mpim": { + "$ref": "#/definitions/objs_scopes" + }, + "team": { + "$ref": "#/definitions/objs_scopes" + }, + "user": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" } }, "required": [ "ok", - "channel", - "ts" + "scopes" ], - "title": "chat.delete success schema", + "title": "api.permissions.scopes.list success schema", "type": "object" } }, @@ -10607,25 +9904,27 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "message_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from chat.delete method", + "description": "Schema for error response from apps.permissions.scopes.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "message_not_found", - "channel_not_found", - "cant_delete_message", - "compliance_exports_prevent_deletion", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", + "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -10649,7 +9948,7 @@ "ok", "error" ], - "title": "chat.delete error schema", + "title": "apps.permissions.scopes.list error schema", "type": "object" } } @@ -10657,55 +9956,46 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "none" ] } ], "tags": [ - "chat" + "apps.permissions.scopes", + "apps" ] } }, - "/chat.deleteScheduledMessage": { - "post": { + "/apps.permissions.users.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Deletes a pending scheduled message from the queue.", + "description": "Returns list of user grants and corresponding scopes this app has on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.deleteScheduledMessage" + "url": "https://api.slack.com/methods/apps.permissions.users.list" }, - "operationId": "chat_deleteScheduledMessage", + "operationId": "apps_permissions_users_list", "parameters": [ { - "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", - "in": "formData", - "name": "as_user", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", - "in": "header", + "description": "Authentication token. Requires scope: `none`", + "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "The channel the scheduled_message is posting to", - "in": "formData", - "name": "channel", - "required": true, + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" }, { - "description": "`scheduled_message_id` returned from call to chat.scheduleMessage", - "in": "formData", - "name": "scheduled_message_id", - "required": true, - "type": "string" + "description": "The maximum number of items to return.", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -10713,15 +10003,33 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical successful paginated response", "examples": { "application/json": { - "ok": true + "ok": true, + "resources": [ + { + "id": "U0DES3UAN", + "scopes": [ + "dnd:write:user", + "reminders:write:user" + ] + }, + { + "id": "U024BFF1M", + "scopes": [ + "reminders:write:user" + ] + } + ], + "response_metadata": { + "next_cursor": "dGVhbTdPMUg5UkFTT0w=" + } } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from chat.deleteScheduledMessage method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -10730,59 +10038,30 @@ "required": [ "ok" ], - "title": "chat.deleteScheduledMessage schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response if no message is found", + "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_scheduled_message_id", + "error": "invalid_cursor", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from chat.deleteScheduledMessage method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_scheduled_message_id", - "channel_not_found", - "bad_token", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "ekm_access_denied", - "missing_scope", - "invalid_arguments", - "invalid_arg_name", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.deleteScheduledMessage error schema", + "title": "Default error template", "type": "object" } } @@ -10790,27 +10069,27 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "none" ] } ], "tags": [ - "chat" + "apps.permissions.users", + "apps" ] } }, - "/chat.getPermalink": { + "/apps.permissions.users.request": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve a permalink URL for a specific extant message", + "description": "Enables an app to trigger a permissions modal to grant an app access to a user access scope.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.getPermalink" + "url": "https://api.slack.com/methods/apps.permissions.users.request" }, - "operationId": "chat_getPermalink", + "operationId": "apps_permissions_users_request", "parameters": [ { "description": "Authentication token. Requires scope: `none`", @@ -10820,16 +10099,23 @@ "type": "string" }, { - "description": "A message's `ts` value, uniquely identifying it within a channel", + "description": "A comma separated list of user scopes to request for", "in": "query", - "name": "message_ts", + "name": "scopes", "required": true, "type": "string" }, { - "description": "The ID of the conversation or channel containing the message", + "description": "Token used to trigger the request", "in": "query", - "name": "channel", + "name": "trigger_id", + "required": true, + "type": "string" + }, + { + "description": "The user this scope is being requested for", + "in": "query", + "name": "user", "required": true, "type": "string" } @@ -10839,84 +10125,47 @@ ], "responses": { "200": { - "description": "Standard success response", + "description": "Standard success response when used with a user token", "examples": { "application/json": { - "channel": "C1H9RESGA", - "ok": true, - "permalink": "https://ghostbusters.slack.com/archives/C1H9RESGA/p135854651500008" + "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response chat.getPermalink", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "permalink": { - "format": "uri", - "type": "string" } }, "required": [ - "ok", - "channel", - "permalink" + "ok" ], - "title": "chat.getPermalink success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Error response when channel cannot be found", + "description": "Standard failure response when trigger_id is invalid", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_trigger_id", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from chat.getPermalink method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "message_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.getPermalink error schema", + "title": "Default error template", "type": "object" } } @@ -10929,39 +10178,39 @@ } ], "tags": [ - "chat" + "apps.permissions.users", + "apps" ] } }, - "/chat.meMessage": { - "post": { + "/apps.uninstall": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Share a me message into a channel.", + "description": "Uninstalls your app from a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.meMessage" + "url": "https://api.slack.com/methods/apps.uninstall" }, - "operationId": "chat_meMessage", + "operationId": "apps_uninstall", "parameters": [ { - "description": "Text of the message to send.", - "in": "formData", - "name": "text", + "description": "Authentication token. Requires scope: `none`", + "in": "query", + "name": "token", "type": "string" }, { - "description": "Authentication token. Requires scope: `chat:write:user`", - "in": "header", - "name": "token", + "description": "Issued when you created your application.", + "in": "query", + "name": "client_id", "type": "string" }, { - "description": "Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.", - "in": "formData", - "name": "channel", + "description": "Issued when you created your application.", + "in": "query", + "name": "client_secret", "type": "string" } ], @@ -10973,29 +10222,21 @@ "description": "Typical success response", "examples": { "application/json": { - "channel": "C024BE7LR", - "ok": true, - "ts": "1417671948.000006" + "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from chat.meMessage method", + "description": "Schema for successful response from apps.uninstall method", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "ts": { - "$ref": "#/definitions/defs_ts" } }, "required": [ "ok" ], - "title": "chat.meMessage schema", + "title": "apps.uninstall schema", "type": "object" } }, @@ -11009,22 +10250,24 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from chat.meMessage method", + "description": "Schema for error response from apps.uninstall method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_in_channel", - "is_archived", - "msg_too_long", - "no_text", - "rate_limited", + "invalid_client_id", + "bad_client_secret", + "client_id_token_mismatch", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -11048,7 +10291,7 @@ "ok", "error" ], - "title": "chat.meMessage error schema", + "title": "apps.uninstall error schema", "type": "object" } } @@ -11056,108 +10299,39 @@ "security": [ { "slackAuth": [ - "chat:write:user" + "none" ] } ], "tags": [ - "chat" + "apps" ] } }, - "/chat.postEphemeral": { - "post": { + "/auth.revoke": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sends an ephemeral message to a user in a channel.", + "description": "Revokes a token.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.postEphemeral" + "url": "https://api.slack.com/methods/auth.revoke" }, - "operationId": "chat_postEphemeral", + "operationId": "auth_revoke", "parameters": [ { - "description": "Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", - "in": "formData", - "name": "username", - "type": "string" - }, - { - "description": "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.", - "in": "formData", - "name": "thread_ts", + "description": "Authentication token. Requires scope: `none`", + "in": "query", + "name": "token", + "required": true, "type": "string" }, { - "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", - "in": "formData", - "name": "blocks", - "type": "string" - }, - { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", - "in": "formData", - "name": "attachments", - "type": "string" - }, - { - "description": "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.", - "in": "formData", - "name": "as_user", - "type": "boolean" - }, - { - "description": "Find and link channel names and usernames.", - "in": "formData", - "name": "link_names", + "description": "Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked.", + "in": "query", + "name": "test", "type": "boolean" - }, - { - "description": "Change how messages are treated. Defaults to `none`. See [below](#formatting).", - "in": "formData", - "name": "parse", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "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.", - "in": "formData", - "name": "text", - "type": "string" - }, - { - "description": "`id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument.", - "in": "formData", - "name": "user", - "required": true, - "type": "string" - }, - { - "description": "Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below.", - "in": "formData", - "name": "icon_emoji", - "type": "string" - }, - { - "description": "URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", - "in": "formData", - "name": "icon_url", - "type": "string" - }, - { - "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.", - "in": "formData", - "name": "channel", - "required": true, - "type": "string" } ], "produces": [ @@ -11168,26 +10342,26 @@ "description": "Typical success response", "examples": { "application/json": { - "message_ts": "1502210682.580145", - "ok": true + "ok": true, + "revoked": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from chat.postEphemeral method", + "description": "Schema for successful response from auth.revoke method", "properties": { - "message_ts": { - "$ref": "#/definitions/defs_ts" - }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "revoked": { + "type": "boolean" } }, "required": [ "ok", - "message_ts" + "revoked" ], - "title": "chat.postEphemeral success schema", + "title": "auth.revoke schema", "type": "object" } }, @@ -11195,23 +10369,20 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "user_not_in_channel", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from chat.postEphemeral method", + "description": "Schema for error response from auth.revoke method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "is_archived", - "msg_too_long", - "no_text", - "restricted_action", - "too_many_attachments", - "user_not_in_channel", "not_authed", "invalid_auth", "account_inactive", @@ -11241,7 +10412,7 @@ "ok", "error" ], - "title": "chat.postEphemeral error schema", + "title": "auth.revoke error schema", "type": "object" } } @@ -11249,126 +10420,34 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "none" ] } ], "tags": [ - "chat" + "auth" ] } }, - "/chat.postMessage": { - "post": { + "/auth.test": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Sends a message to a channel.", + "description": "Checks authentication & identity.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.postMessage" + "url": "https://api.slack.com/methods/auth.test" }, - "operationId": "chat_postMessage", + "operationId": "auth_test", "parameters": [ { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", - "in": "formData", - "name": "attachments", - "type": "string" - }, - { - "description": "Pass true to enable unfurling of primarily text-based content.", - "in": "formData", - "name": "unfurl_links", - "type": "boolean" - }, - { - "description": "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.", - "in": "formData", - "name": "text", - "type": "string" - }, - { - "description": "Pass false to disable unfurling of media content.", - "in": "formData", - "name": "unfurl_media", - "type": "boolean" - }, - { - "description": "Change how messages are treated. Defaults to `none`. See [below](#formatting).", - "in": "formData", - "name": "parse", - "type": "string" - }, - { - "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.", - "in": "formData", - "name": "as_user", - "type": "string" - }, - { - "description": "Disable Slack markup parsing by setting to `false`. Enabled by default.", - "in": "formData", - "name": "mrkdwn", - "type": "boolean" - }, - { - "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", - "in": "formData", - "name": "channel", - "required": true, - "type": "string" - }, - { - "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", - "in": "formData", - "name": "blocks", - "type": "string" - }, - { - "description": "Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below.", - "in": "formData", - "name": "icon_emoji", - "type": "string" - }, - { - "description": "Find and link channel names and usernames.", - "in": "formData", - "name": "link_names", - "type": "boolean" - }, - { - "description": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", - "in": "formData", - "name": "reply_broadcast", - "type": "boolean" - }, - { - "description": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", - "in": "formData", - "name": "thread_ts", - "type": "string" - }, - { - "description": "Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", - "in": "formData", - "name": "username", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", + "description": "Authentication token. Requires scope: `none`", "in": "header", "name": "token", "required": true, "type": "string" - }, - { - "description": "URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", - "in": "formData", - "name": "icon_url", - "type": "string" } ], "produces": [ @@ -11376,86 +10455,90 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Standard success response when used with a user token", "examples": { "application/json": { - "channel": "C1H9RESGL", - "message": { - "attachments": [ - { - "fallback": "This is an attachment's fallback", - "id": 1, - "text": "This is an attachment" - } - ], - "bot_id": "B19LU7CSY", - "subtype": "bot_message", - "text": "Here's a message for you", - "ts": "1503435956.000247", - "type": "message", - "username": "ecto1" - }, "ok": true, - "ts": "1503435956.000247" + "team": "Subarachnoid Workspace", + "team_id": "T12345678", + "url": "https://subarachnoid.slack.com/", + "user": "grace", + "user_id": "W12345678" } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response of chat.postMessage method", + "description": "Schema for successful response auth.test method", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" + "bot_id": { + "$ref": "#/definitions/defs_bot_id" }, - "message": { - "$ref": "#/definitions/objs_message" + "is_enterprise_install": { + "type": "boolean" }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "ts": { - "$ref": "#/definitions/defs_ts" + "team": { + "type": "string" + }, + "team_id": { + "$ref": "#/definitions/defs_team" + }, + "url": { + "type": "string" + }, + "user": { + "type": "string" + }, + "user_id": { + "$ref": "#/definitions/defs_user_id" } }, "required": [ "ok", - "channel", - "ts", - "message" + "url", + "team", + "user", + "team_id", + "user_id" ], - "title": "chat.postMessage success schema", + "title": "auth.test success schema", "type": "object" } }, "default": { - "description": "Typical error response if too many attachments are included", + "description": "Standard failure response when used with an invalid token", "examples": { "application/json": { - "error": "too_many_attachments", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response chat.postMessage method", + "description": "Schema for error response auth.test method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_in_channel", - "is_archived", - "msg_too_long", - "no_text", - "too_many_attachments", - "rate_limited", "not_authed", "invalid_auth", + "token_revoked", "account_inactive", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", - "missing_post_type" + "missing_post_type", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required" ], "type": "string" }, @@ -11467,7 +10550,7 @@ "ok", "error" ], - "title": "chat.postMessage error schema", + "title": "auth.test error schema", "type": "object" } } @@ -11475,106 +10558,39 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "none" ] } ], "tags": [ - "chat" + "auth" ] } }, - "/chat.scheduleMessage": { - "post": { + "/bots.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Schedules a message to be sent to a channel.", + "description": "Gets information about a bot user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.scheduleMessage" + "url": "https://api.slack.com/methods/bots.info" }, - "operationId": "chat_scheduleMessage", + "operationId": "bots_info", "parameters": [ { - "description": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", - "in": "formData", - "name": "thread_ts", - "type": "number" - }, - { - "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", - "in": "formData", - "name": "blocks", - "type": "string" - }, - { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", - "in": "formData", - "name": "attachments", - "type": "string" - }, - { - "description": "Pass true to enable unfurling of primarily text-based content.", - "in": "formData", - "name": "unfurl_links", - "type": "boolean" - }, - { - "description": "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.", - "in": "formData", - "name": "text", - "type": "string" - }, - { - "description": "Find and link channel names and usernames.", - "in": "formData", - "name": "link_names", - "type": "boolean" - }, - { - "description": "Pass false to disable unfurling of media content.", - "in": "formData", - "name": "unfurl_media", - "type": "boolean" - }, - { - "description": "Change how messages are treated. Defaults to `none`. See [chat.postMessage](chat.postMessage#formatting).", - "in": "formData", - "name": "parse", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", - "in": "header", + "description": "Authentication token. Requires scope: `users:read`", + "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [chat.postMessage](chat.postMessage#authorship).", - "in": "formData", - "name": "as_user", - "type": "boolean" - }, - { - "description": "Unix EPOCH timestamp of time in future to send the message.", - "in": "formData", - "name": "post_at", - "type": "string" - }, - { - "description": "Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", - "in": "formData", - "name": "channel", + "description": "Bot user to get info on", + "in": "query", + "name": "bot", "type": "string" - }, - { - "description": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", - "in": "formData", - "name": "reply_broadcast", - "type": "boolean" } ], "produces": [ @@ -11582,132 +10598,123 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "When successful, returns bot info by bot ID.", "examples": { "application/json": { - "channel": "C1H9RESGL", - "message": { - "attachments": [ - { - "fallback": "This is an attachment's fallback", - "id": 1, - "text": "This is an attachment" - } - ], - "bot_id": "B19LU7CSY", - "subtype": "bot_message", - "text": "Here's a message for you in the future", - "type": "delayed_message", - "username": "ecto1" + "bot": { + "app_id": "A161CLERW", + "deleted": false, + "icons": { + "image_36": "https://...", + "image_48": "https://...", + "image_72": "https://..." + }, + "id": "B061F7JD2", + "name": "beforebot", + "updated": 1449272004, + "user_id": "U012ABCDEF" }, - "ok": true, - "post_at": "1562180400", - "scheduled_message_id": "Q1298393284" + "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response of chat.scheduleMessage method", + "description": "Schema for successful response from bots.info method", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, - "message": { + "bot": { "additionalProperties": false, "properties": { - "bot_id": { - "$ref": "#/definitions/defs_bot_id" + "app_id": { + "$ref": "#/definitions/defs_app_id" }, - "bot_profile": { - "$ref": "#/definitions/objs_bot_profile" + "deleted": { + "type": "boolean" }, - "team": { - "$ref": "#/definitions/defs_team" + "icons": { + "additionalProperties": false, + "properties": { + "image_36": { + "format": "uri", + "type": "string" + }, + "image_48": { + "format": "uri", + "type": "string" + }, + "image_72": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "image_36", + "image_48", + "image_72" + ], + "type": "object" }, - "text": { - "type": "string" + "id": { + "$ref": "#/definitions/defs_bot_id" }, - "type": { + "name": { "type": "string" }, - "user": { - "$ref": "#/definitions/defs_user_id" + "updated": { + "type": "integer" }, - "username": { - "type": "string" + "user_id": { + "$ref": "#/definitions/defs_user_id" } }, "required": [ - "type", - "text", - "bot_id", - "user", - "team" + "id", + "deleted", + "name", + "updated", + "app_id", + "icons" ], "type": "object" }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "post_at": { - "pattern": "^\\d{10}$", - "type": "integer" - }, - "scheduled_message_id": { - "pattern": "^[Q][A-Z0-9]{8,}$", - "title": "Scheduled Message ID", - "type": "string" } }, "required": [ "ok", - "channel", - "post_at", - "scheduled_message_id", - "message" + "bot" ], - "title": "chat.scheduleMessage success schema", + "title": "bots.info schema", "type": "object" } }, "default": { - "description": "Typical error response if the `post_at` is invalid (ex. in the past or too far into the future)", + "description": "When no bot can be found, it returns an error.", "examples": { "application/json": { - "error": "time_in_past", + "error": "bot_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response chat.scheduleMessage method", + "description": "Schema for error response from bots.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "invalid_time", - "time_in_past", - "time_too_far", - "channel_not_found", - "not_in_channel", - "is_archived", - "msg_too_long", - "no_text", - "restricted_action", - "restricted_action_read_only_channel", - "restricted_action_thread_only_channel", - "restricted_action_non_threadable_channel", - "too_many_attachments", - "rate_limited", + "bot_not_found", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", - "ekm_access_denied", - "missing_scope", - "invalid_arguments", "invalid_arg_name", + "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", @@ -11729,7 +10736,7 @@ "ok", "error" ], - "title": "chat.scheduleMessage error schema", + "title": "bots.info error schema", "type": "object" } } @@ -11737,64 +10744,84 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "users:read" ] } ], "tags": [ - "chat" + "bots" ] } }, - "/chat.scheduledMessages.list": { - "get": { + "/calls.add": { + "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Returns a list of scheduled messages.", + "description": "Registers a new Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.scheduledMessages.list" + "url": "https://api.slack.com/methods/calls.add" }, - "operationId": "chat_scheduledMessages_list", + "operationId": "calls_add", "parameters": [ { - "description": "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.", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `calls:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "header", - "name": "token", + "description": "An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.", + "in": "formData", + "name": "external_unique_id", + "required": true, "type": "string" }, { - "description": "Maximum number of original entries to return.", - "in": "query", - "name": "limit", + "description": "An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.", + "in": "formData", + "name": "external_display_id", + "type": "string" + }, + { + "description": "The URL required for a client to join the Call.", + "in": "formData", + "name": "join_url", + "required": true, + "type": "string" + }, + { + "description": "When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.", + "in": "formData", + "name": "desktop_app_join_url", + "type": "string" + }, + { + "description": "Call start time in UTC UNIX timestamp format", + "in": "formData", + "name": "date_start", "type": "integer" }, { - "description": "A UNIX timestamp of the oldest value in the time range", - "in": "query", - "name": "oldest", - "type": "number" + "description": "The name of the Call.", + "in": "formData", + "name": "title", + "type": "string" }, { - "description": "The channel of the scheduled messages", - "in": "query", - "name": "channel", + "description": "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.", + "in": "formData", + "name": "created_by", "type": "string" }, { - "description": "A UNIX timestamp of the latest value in the time range", - "in": "query", - "name": "latest", - "type": "number" + "description": "The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/calls#users).", + "in": "formData", + "name": "users", + "type": "string" } ], "produces": [ @@ -11805,130 +10832,44 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "response_metadata": { - "next_cursor": "" - }, - "scheduled_messages": [ - { - "channel_id": "C1H9RESGL", - "date_created": 1551891734, - "id": 1298393284, - "post_at": 1551991428, - "text": "Here's a message for you in the future" - } - ] + "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from chat.scheduledMessages.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "additionalProperties": false, - "properties": { - "next_cursor": { - "type": "string" - } - }, - "required": [ - "next_cursor" - ], - "type": "object" - }, - "scheduled_messages": { - "items": { - "additionalProperties": false, - "properties": { - "channel_id": { - "$ref": "#/definitions/defs_channel_id" - }, - "date_created": { - "pattern": "^\\d{10}$", - "type": "integer" - }, - "id": { - "pattern": "^[Q][A-Z0-9]{8,}$", - "type": "string" - }, - "post_at": { - "pattern": "^\\d{10}$", - "type": "integer" - }, - "text": { - "type": "string" - } - }, - "required": [ - "id", - "channel_id", - "post_at", - "date_created" - ], - "type": "object" - }, - "type": "array" } }, "required": [ - "ok", - "scheduled_messages", - "response_metadata" + "ok" ], - "title": "chat.scheduledMessages.list schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response if the channel passed is invalid", + "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_channel", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from chat.scheduledMessages.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_channel", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "ekm_access_denied", - "missing_scope", - "invalid_arguments", - "invalid_arg_name", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.scheduledMessages.list error schema", + "title": "Default error template", "type": "object" } } @@ -11936,73 +10877,47 @@ "security": [ { "slackAuth": [ - "none" + "calls:write" ] } ], "tags": [ - "chat.scheduledMessages", - "chat" + "calls" ] } }, - "/chat.unfurl": { + "/calls.end": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Provide custom unfurl behavior for user-posted URLs", + "description": "Ends a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.unfurl" + "url": "https://api.slack.com/methods/calls.end" }, - "operationId": "chat_unfurl", + "operationId": "calls_end", "parameters": [ { - "description": "Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior", - "in": "formData", - "name": "user_auth_message", - "type": "string" - }, - { - "description": "Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain", - "in": "formData", - "name": "user_auth_required", - "type": "boolean" - }, - { - "description": "URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.", - "in": "formData", - "name": "unfurls", - "type": "string" - }, - { - "description": "Timestamp of the message to add unfurl behavior to.", - "in": "formData", - "name": "ts", + "description": "Authentication token. Requires scope: `calls:write`", + "in": "header", + "name": "token", "required": true, "type": "string" }, { - "description": "Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.", + "description": "`id` returned when registering the call using the [`calls.add`](/methods/calls.add) method.", "in": "formData", - "name": "user_auth_url", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `links:write`", - "in": "header", - "name": "token", + "name": "id", "required": true, "type": "string" }, { - "description": "Channel ID of the message", + "description": "Call duration in seconds", "in": "formData", - "name": "channel", - "required": true, - "type": "string" + "name": "duration", + "type": "integer" } ], "produces": [ @@ -12010,15 +10925,15 @@ ], "responses": { "200": { - "description": "Typical, minimal success response", + "description": "Typical success response", "examples": { "application/json": { "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from chat.unfurl method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -12027,7 +10942,7 @@ "required": [ "ok" ], - "title": "chat.unfurl success schema", + "title": "Default success template", "type": "object" } }, @@ -12035,51 +10950,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "cannot_unfurl_url", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from chat.unfurl method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "cannot_unfurl_url", - "cannot_find_service", - "missing_unfurls", - "cannot_prompt", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.unfurl error schema", + "title": "Default error template", "type": "object" } } @@ -12087,82 +10973,39 @@ "security": [ { "slackAuth": [ - "links:write" + "calls:write" ] } ], "tags": [ - "chat" + "calls" ] } }, - "/chat.update": { - "post": { + "/calls.info": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Updates a message.", + "description": "Returns information about a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.update" + "url": "https://api.slack.com/methods/calls.info" }, - "operationId": "chat_update", + "operationId": "calls_info", "parameters": [ { - "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", - "in": "formData", - "name": "blocks", - "type": "string" - }, - { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting `text`.", - "in": "formData", - "name": "attachments", - "type": "string" - }, - { - "description": "Pass true to update the message as the authed user. [Bot users](/bot-users) in this context are considered authed users.", - "in": "formData", - "name": "as_user", - "type": "string" - }, - { - "description": "Timestamp of the message to be updated.", - "in": "formData", - "name": "ts", - "required": true, - "type": "string" - }, - { - "description": "Change how messages are treated. Defaults to `client`, unlike `chat.postMessage`. Accepts either `none` or `full`. See [below](#formatting).", - "in": "formData", - "name": "parse", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", + "description": "Authentication token. Requires scope: `calls:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "New text for the message, using the [default formatting rules](/docs/formatting). It's not required when presenting `attachments`.", - "in": "formData", - "name": "text", - "type": "string" - }, - { - "description": "Find and link channel names and usernames. Defaults to `none`. See [below](#formatting).", - "in": "formData", - "name": "link_names", - "type": "string" - }, - { - "description": "Channel containing the message to be updated.", - "in": "formData", - "name": "channel", + "description": "`id` of the Call returned by the [`calls.add`](/methods/calls.add) method.", + "in": "query", + "name": "id", "required": true, "type": "string" } @@ -12175,62 +11018,21 @@ "description": "Typical success response", "examples": { "application/json": { - "channel": "C024BE91L", - "message": { - "text": "Updated text you carefully authored", - "user": "U34567890" - }, - "ok": true, - "text": "Updated text you carefully authored", - "ts": "1401383885.000061" + "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response of chat.update method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "type": "string" - }, - "message": { - "properties": { - "attachments": { - "items": { - "type": "object" - }, - "type": "array" - }, - "blocks": { - "$ref": "#/definitions/blocks" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "title": "Message object", - "type": "object" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "text": { - "type": "string" - }, - "ts": { - "type": "string" } }, "required": [ - "ok", - "channel", - "ts", - "text", - "message" + "ok" ], - "title": "chat.update success schema", + "title": "Default success template", "type": "object" } }, @@ -12238,53 +11040,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "cant_update_message", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response chat.update method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "message_not_found", - "cant_update_message", - "channel_not_found", - "edit_window_closed", - "msg_too_long", - "too_many_attachments", - "rate_limited", - "no_text", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "request_timeout", - "invalid_json", - "json_not_object", - "upgrade_required", - "fatal_error", - "is_inactive" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.update error schema", + "title": "Default error template", "type": "object" } } @@ -12292,39 +11063,47 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "calls:read" ] } ], "tags": [ - "chat" + "calls" ] } }, - "/conversations.archive": { + "/calls.participants.add": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Archives a conversation.", + "description": "Registers new participants added to a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.archive" + "url": "https://api.slack.com/methods/calls.participants.add" }, - "operationId": "conversations_archive", + "operationId": "calls_participants_add", "parameters": [ { - "description": "Authentication token. Requires scope: `conversations:write`", + "description": "Authentication token. Requires scope: `calls:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "ID of conversation to archive", + "description": "`id` returned by the [`calls.add`](/methods/calls.add) method.", "in": "formData", - "name": "channel", + "name": "id", + "required": true, + "type": "string" + }, + { + "description": "The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/calls#users).", + "in": "formData", + "name": "users", + "required": true, "type": "string" } ], @@ -12340,8 +11119,8 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response conversations.archive method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -12350,7 +11129,7 @@ "required": [ "ok" ], - "title": "conversations.archive success schema", + "title": "Default success template", "type": "object" } }, @@ -12358,60 +11137,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from conversations.archive method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", - "not_supported", - "channel_not_found", - "already_archived", - "cant_archive_general", - "restricted_action", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "conversations.archive error schema", + "title": "Default error template", "type": "object" } } @@ -12419,41 +11160,48 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "calls:write" ] } ], "tags": [ - "conversations" + "calls.participants", + "calls" ] } }, - "/conversations.close": { + "/calls.participants.remove": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Closes a direct message or multi-person direct message.", + "description": "Registers participants removed from a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.close" + "url": "https://api.slack.com/methods/calls.participants.remove" }, - "operationId": "conversations_close", + "operationId": "calls_participants_remove", "parameters": [ { - "description": "Authentication token. Requires scope: `conversations:write`", + "description": "Authentication token. Requires scope: `calls:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Conversation to close.", + "description": "`id` returned by the [`calls.add`](/methods/calls.add) method.", "in": "formData", - "name": "channel", + "name": "id", + "required": true, + "type": "string" + }, + { + "description": "The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/calls#users).", + "in": "formData", + "name": "users", + "required": true, "type": "string" } ], @@ -12469,15 +11217,9 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response conversations.close method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "already_closed": { - "type": "boolean" - }, - "no_op": { - "type": "boolean" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } @@ -12485,7 +11227,7 @@ "required": [ "ok" ], - "title": "conversations.close success schema", + "title": "Default success template", "type": "object" } }, @@ -12493,52 +11235,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from conversations.close method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "method_not_supported_for_channel_type", - "channel_not_found", - "user_does_not_own_channel", - "missing_scope", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "conversations.close error schema", + "title": "Default error template", "type": "object" } } @@ -12546,54 +11258,60 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "calls:write" ] } ], "tags": [ - "conversations" + "calls.participants", + "calls" ] } }, - "/conversations.create": { + "/calls.update": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Initiates a public or private channel-based conversation", + "description": "Updates information about a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.create" + "url": "https://api.slack.com/methods/calls.update" }, - "operationId": "conversations_create", + "operationId": "calls_update", "parameters": [ { - "description": "Name of the public or private channel to create", + "description": "Authentication token. Requires scope: `calls:write`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "`id` returned by the [`calls.add`](/methods/calls.add) method.", "in": "formData", - "name": "name", + "name": "id", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:write`", - "in": "header", - "name": "token", + "description": "The name of the Call.", + "in": "formData", + "name": "title", "type": "string" }, { - "description": "**Required** for workspace apps. A list of between 1 and 30 human users that will be added to the newly-created conversation. This argument has no effect when used by classic Slack apps.", + "description": "The URL required for a client to join the Call.", "in": "formData", - "name": "user_ids", + "name": "join_url", "type": "string" }, { - "description": "Create a private channel instead of a public one", + "description": "When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.", "in": "formData", - "name": "is_private", - "type": "boolean" + "name": "desktop_app_join_url", + "type": "string" } ], "produces": [ @@ -12601,129 +11319,47 @@ ], "responses": { "200": { - "description": "If successful, the command returns a rather stark [conversation object](/types/conversation)", + "description": "Typical success response", "examples": { "application/json": { - "channel": { - "created": 1504554479, - "creator": "U0123456", - "id": "C0EAQDV4Z", - "is_archived": false, - "is_channel": true, - "is_ext_shared": false, - "is_general": false, - "is_group": false, - "is_im": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_pending_ext_shared": false, - "is_private": false, - "is_shared": false, - "last_read": "0000000000.000000", - "latest": null, - "name": "endeavor", - "name_normalized": "endeavor", - "pending_shared": [], - "previous_names": [], - "priority": 0, - "purpose": { - "creator": "", - "last_set": 0, - "value": "" - }, - "topic": { - "creator": "", - "last_set": 0, - "value": "" - }, - "unlinked": 0, - "unread_count": 0, - "unread_count_display": 0 - }, "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response conversations.create method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "conversations.create success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response when name already in use", + "description": "Typical error response", "examples": { "application/json": { - "error": "name_taken", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from conversations.create method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "detail": { - "type": "string" - }, - "error": { - "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", - "name_taken", - "restricted_action", - "no_channel", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "invalid_name", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "conversations.create error schema", + "title": "Default error template", "type": "object" } } @@ -12731,71 +11367,51 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "calls:write" ] } ], "tags": [ - "conversations" + "calls" ] } }, - "/conversations.history": { - "get": { + "/chat.delete": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Fetches a conversation's history of messages and events.", + "description": "Deletes a message.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.history" + "url": "https://api.slack.com/methods/chat.delete" }, - "operationId": "conversations_history", + "operationId": "chat_delete", "parameters": [ { - "description": "Include messages with latest or oldest timestamp in results only when either timestamp is specified.", - "in": "query", - "name": "inclusive", - "type": "boolean" - }, - { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `conversations:history`", - "in": "query", + "description": "Authentication token. Requires scope: `chat:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "Start of time range of messages to include in results.", - "in": "query", - "name": "oldest", + "description": "Timestamp of the message to be deleted.", + "in": "formData", + "name": "ts", "type": "number" }, { - "description": "Conversation ID to fetch history for.", - "in": "query", + "description": "Channel containing the message to be deleted.", + "in": "formData", "name": "channel", "type": "string" }, { - "description": "End of time range of messages to include in results.", - "in": "query", - "name": "latest", - "type": "number" + "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", + "in": "formData", + "name": "as_user", + "type": "boolean" } ], "produces": [ @@ -12803,75 +11419,34 @@ ], "responses": { "200": { - "description": "Typical success response containing a channel's messages", + "description": "Typical success response", "examples": { "application/json": { - "has_more": true, - "messages": [ - { - "text": "I find you punny and would like to smell your nose letter", - "ts": "1512085950.000216", - "type": "message", - "user": "U012AB3CDE" - }, - { - "text": "What, you want to smell my shoes better?", - "ts": "1512104434.000490", - "type": "message", - "user": "U061F7AUR" - } - ], + "channel": "C024BE91L", "ok": true, - "pin_count": 0, - "response_metadata": { - "next_cursor": "bmV4dF90czoxNTEyMDg1ODYxMDAwNTQz" - } + "ts": "1401383885.000061" } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.history method", + "description": "Schema for successful response of chat.delete method", "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true + "channel": { + "$ref": "#/definitions/defs_channel" }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "pin_count": { - "type": "integer" + "ts": { + "$ref": "#/definitions/defs_ts" } }, "required": [ "ok", - "messages", - "has_more", - "pin_count", - "channel_actions_ts", - "channel_actions_count" + "channel", + "ts" ], - "title": "conversations.history success schema", + "title": "chat.delete success schema", "type": "object" } }, @@ -12879,51 +11454,53 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "message_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.history method", + "description": "Schema for error response from chat.delete method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "missing_scope", + "message_not_found", "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", + "cant_delete_message", + "compliance_exports_prevent_deletion", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.history error schema", + "title": "chat.delete error schema", "type": "object" } } @@ -12931,53 +11508,55 @@ "security": [ { "slackAuth": [ - "channels:history", - "groups:history", - "im:history", - "mpim:history" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.info": { - "get": { + "/chat.deleteScheduledMessage": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieve information about a conversation.", + "description": "Deletes a pending scheduled message from the queue.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.info" + "url": "https://api.slack.com/methods/chat.deleteScheduledMessage" }, - "operationId": "conversations_info", + "operationId": "chat_deleteScheduledMessage", "parameters": [ { - "description": "Set to `true` to include the member count for the specified conversation. Defaults to `false`", - "in": "query", - "name": "include_num_members", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `conversations:read`", - "in": "query", + "description": "Authentication token. Requires scope: `chat:write`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Conversation ID to learn more about", - "in": "query", + "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", + "in": "formData", + "name": "as_user", + "type": "boolean" + }, + { + "description": "The channel the scheduled_message is posting to", + "in": "formData", "name": "channel", + "required": true, "type": "string" }, { - "description": "Set this to `true` to receive the locale for this conversation. Defaults to `false`", - "in": "query", - "name": "include_locale", - "type": "boolean" + "description": "`scheduled_message_id` returned from call to chat.scheduleMessage", + "in": "formData", + "name": "scheduled_message_id", + "required": true, + "type": "string" } ], "produces": [ @@ -12985,119 +11564,80 @@ ], "responses": { "200": { - "description": "Typical success response for a public channel. (Also, a response from a private channel and a multi-party IM is very similar to this example.)", + "description": "Typical success response", "examples": { "application/json": { - "channel": { - "created": 1449252889, - "creator": "W012A3BCD", - "id": "C012AB3CD", - "is_archived": false, - "is_channel": true, - "is_ext_shared": false, - "is_general": true, - "is_group": false, - "is_im": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_pending_ext_shared": false, - "is_private": false, - "is_read_only": false, - "is_shared": false, - "last_read": "1502126650.228446", - "locale": "en-US", - "name": "general", - "name_normalized": "general", - "parent_conversation": null, - "pending_shared": [], - "previous_names": [ - "specifics", - "abstractions", - "etc" - ], - "purpose": { - "creator": "W012A3BCD", - "last_set": 1449709364, - "value": "This part of the workspace is for fun. Make fun here." - }, - "topic": { - "creator": "W012A3BCD", - "last_set": 1449709364, - "value": "For public discussion of generalities" - }, - "unlinked": 0 - }, "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response conversations.info", + "description": "Schema for successful response from chat.deleteScheduledMessage method", "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "conversations.info success schema", + "title": "chat.deleteScheduledMessage schema", "type": "object" } }, "default": { - "description": "Typical error response when a channel cannot be found", + "description": "Typical error response if no message is found", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_scheduled_message_id", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.info method", + "description": "Schema for error response from chat.deleteScheduledMessage method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "missing_scope", + "invalid_scheduled_message_id", "channel_not_found", - "team_added_to_org", + "bad_token", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "ekm_access_denied", + "missing_scope", + "invalid_arguments", "invalid_arg_name", - "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.info error schema", + "title": "chat.deleteScheduledMessage error schema", "type": "object" } } @@ -13105,47 +11645,47 @@ "security": [ { "slackAuth": [ - "channels:read", - "groups:read", - "im:read", - "mpim:read" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.invite": { - "post": { + "/chat.getPermalink": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Invites users to a channel.", + "description": "Retrieve a permalink URL for a specific extant message", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.invite" + "url": "https://api.slack.com/methods/chat.getPermalink" }, - "operationId": "conversations_invite", + "operationId": "chat_getPermalink", "parameters": [ { - "description": "A comma separated list of user IDs. Up to 1000 users may be listed.", - "in": "formData", - "name": "users", + "description": "Authentication token. Requires scope: `none`", + "in": "query", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:write`", - "in": "header", - "name": "token", + "description": "The ID of the conversation or channel containing the message", + "in": "query", + "name": "channel", + "required": true, "type": "string" }, { - "description": "The ID of the public or private channel to invite user(s) to.", - "in": "formData", - "name": "channel", + "description": "A message's `ts` value, uniquely identifying it within a channel", + "in": "query", + "name": "message_ts", + "required": true, "type": "string" } ], @@ -13154,191 +11694,88 @@ ], "responses": { "200": { - "description": "Typical success response when an invitation is extended", + "description": "Standard success response", "examples": { "application/json": { - "channel": { - "created": 1449252889, - "creator": "W012A3BCD", - "id": "C012AB3CD", - "is_archived": false, - "is_channel": true, - "is_ext_shared": false, - "is_general": true, - "is_group": false, - "is_im": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_pending_ext_shared": false, - "is_private": false, - "is_read_only": false, - "is_shared": false, - "last_read": "1502126650.228446", - "locale": "en-US", - "name": "general", - "name_normalized": "general", - "num_members": 23, - "pending_shared": [], - "previous_names": [ - "specifics", - "abstractions", - "etc" - ], - "purpose": { - "creator": "W012A3BCD", - "last_set": 1449709364, - "value": "This part of the workspace is for fun. Make fun here." - }, - "topic": { - "creator": "W012A3BCD", - "last_set": 1449709364, - "value": "For public discussion of generalities" - }, - "unlinked": 0 - }, - "ok": true + "channel": "C1H9RESGA", + "ok": true, + "permalink": "https://ghostbusters.slack.com/archives/C1H9RESGA/p135854651500008" } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.invite method", + "description": "Schema for successful response chat.getPermalink", "properties": { "channel": { - "$ref": "#/definitions/objs_conversation" + "$ref": "#/definitions/defs_channel" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "permalink": { + "format": "uri", + "type": "string" } }, "required": [ "ok", - "channel" + "channel", + "permalink" ], - "title": "conversations.invite error schema", + "title": "chat.getPermalink success schema", "type": "object" } }, "default": { - "description": "Typical error response when an invite is attempted on a conversation type that does not support it", + "description": "Error response when channel cannot be found", "examples": { "application/json": { - "error": "method_not_supported_for_channel_type", + "error": "channel_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.invite method", + "description": "Schema for error response from chat.getPermalink method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", "channel_not_found", - "user_not_found", - "no_user", - "cant_invite_self", - "not_in_channel", - "already_in_channel", - "is_archived", - "cant_invite", - "too_many_users", - "ura_max_channels", + "message_not_found", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", + "token_revoked", + "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" + "fatal_error" ], "type": "string" }, - "errors": { - "items": { - "additionalProperties": false, - "properties": { - "error": { - "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", - "channel_not_found", - "user_not_found", - "no_user", - "cant_invite_self", - "not_in_channel", - "already_in_channel", - "is_archived", - "cant_invite", - "too_many_users", - "ura_max_channels", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "ok", - "error" - ], - "type": "object" - }, - "minItems": 1, - "title": "errors is returned when an error associates an user", - "type": "array", - "uniqueItems": true - }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "conversations.invite error schema", + "title": "chat.getPermalink error schema", "type": "object" } } @@ -13346,42 +11783,45 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "none" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.join": { + "/chat.meMessage": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Joins an existing conversation.", + "description": "Share a me message into a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.join" + "url": "https://api.slack.com/methods/chat.meMessage" }, - "operationId": "conversations_join", + "operationId": "chat_meMessage", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `chat:write`", "in": "header", "name": "token", "type": "string" }, { - "description": "ID of conversation to join", + "description": "Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.", "in": "formData", "name": "channel", "type": "string" + }, + { + "description": "Text of the message to send.", + "in": "formData", + "name": "text", + "type": "string" } ], "produces": [ @@ -13392,138 +11832,86 @@ "description": "Typical success response", "examples": { "application/json": { - "channel": { - "created": 1449252889, - "creator": "U061F7AUR", - "id": "C061EG9SL", - "is_archived": false, - "is_channel": true, - "is_ext_shared": false, - "is_general": true, - "is_group": false, - "is_im": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_pending_ext_shared": false, - "is_private": false, - "is_shared": false, - "name": "general", - "name_normalized": "general", - "pending_shared": [], - "previous_names": [], - "purpose": { - "creator": "", - "last_set": 0, - "value": "For widget discussion" - }, - "topic": { - "creator": "", - "last_set": 0, - "value": "Which widget do you worry about?" - }, - "unlinked": 0 - }, + "channel": "C024BE7LR", "ok": true, - "response_metadata": { - "warnings": [ - "already_in_channel" - ] - }, - "warning": "already_in_channel" + "ts": "1417671948.000006" } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.join method", + "description": "Schema for successful response from chat.meMessage method", "properties": { "channel": { - "$ref": "#/definitions/objs_conversation" + "$ref": "#/definitions/defs_channel" }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "response_metadata": { - "properties": { - "warnings": { - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - } - }, - "title": "Response metadata", - "type": "object" - }, - "warning": { - "type": "string" + "ts": { + "$ref": "#/definitions/defs_ts" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "conversations.join success schema", + "title": "chat.meMessage schema", "type": "object" } }, "default": { - "description": "Typical error response if the conversation is archived and cannot be joined", + "description": "Typical error response", "examples": { "application/json": { - "error": "is_archived", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.join method", + "description": "Schema for error response from chat.meMessage method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", "channel_not_found", + "not_in_channel", "is_archived", - "not_authed", - "invalid_auth", + "msg_too_long", + "no_text", + "rate_limited", + "not_authed", + "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", + "token_revoked", + "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.join error schema", + "title": "chat.meMessage error schema", "type": "object" } } @@ -13531,44 +11919,108 @@ "security": [ { "slackAuth": [ - "channels:write" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.kick": { + "/chat.postEphemeral": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Removes a user from a conversation.", + "description": "Sends an ephemeral message to a user in a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.kick" + "url": "https://api.slack.com/methods/chat.postEphemeral" }, - "operationId": "conversations_kick", + "operationId": "chat_postEphemeral", "parameters": [ { - "description": "Authentication token. Requires scope: `conversations:write`", + "description": "Authentication token. Requires scope: `chat:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "User ID to be removed.", + "description": "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.", "in": "formData", - "name": "user", + "name": "as_user", + "type": "boolean" + }, + { + "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "in": "formData", + "name": "attachments", "type": "string" }, { - "description": "ID of conversation to remove user from.", + "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "in": "formData", + "name": "blocks", + "type": "string" + }, + { + "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.", "in": "formData", "name": "channel", + "required": true, + "type": "string" + }, + { + "description": "Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "icon_emoji", + "type": "string" + }, + { + "description": "URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "icon_url", + "type": "string" + }, + { + "description": "Find and link channel names and usernames.", + "in": "formData", + "name": "link_names", + "type": "boolean" + }, + { + "description": "Change how messages are treated. Defaults to `none`. See [below](#formatting).", + "in": "formData", + "name": "parse", + "type": "string" + }, + { + "description": "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.", + "in": "formData", + "name": "text", + "type": "string" + }, + { + "description": "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.", + "in": "formData", + "name": "thread_ts", + "type": "string" + }, + { + "description": "`id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument.", + "in": "formData", + "name": "user", + "required": true, + "type": "string" + }, + { + "description": "Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "username", "type": "string" } ], @@ -13580,79 +12032,84 @@ "description": "Typical success response", "examples": { "application/json": { + "message_ts": "1502210682.580145", "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response conversations.kick method", + "description": "Schema for successful response from chat.postEphemeral method", "properties": { + "message_ts": { + "$ref": "#/definitions/defs_ts" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "message_ts" ], - "title": "conversations.kick success schema", + "title": "chat.postEphemeral success schema", "type": "object" } }, "default": { - "description": "Typical error response when you attempt to kick yourself from a channel", + "description": "Typical error response", "examples": { "application/json": { - "error": "cant_kick_self", + "error": "user_not_in_channel", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response conversations.kick method", + "description": "Schema for error response from chat.postEphemeral method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", "channel_not_found", - "user_not_found", - "cant_kick_self", - "not_in_channel", - "cant_kick_from_general", + "is_archived", + "msg_too_long", + "no_text", "restricted_action", + "too_many_attachments", + "user_not_in_channel", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_restricted", + "token_revoked", + "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.kick error schema", + "title": "chat.postEphemeral error schema", "type": "object" } } @@ -13660,192 +12117,125 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.leave": { + "/chat.postMessage": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Leaves a conversation.", + "description": "Sends a message to a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.leave" + "url": "https://api.slack.com/methods/chat.postMessage" }, - "operationId": "conversations_leave", + "operationId": "chat_postMessage", "parameters": [ { - "description": "Authentication token. Requires scope: `conversations:write`", + "description": "Authentication token. Requires scope: `chat:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Conversation to leave", + "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.", + "in": "formData", + "name": "as_user", + "type": "string" + }, + { + "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "in": "formData", + "name": "attachments", + "type": "string" + }, + { + "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "in": "formData", + "name": "blocks", + "type": "string" + }, + { + "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", "in": "formData", "name": "channel", + "required": true, "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from conversations.leave method", - "properties": { - "not_in_channel": { - "enum": [ - true - ], - "type": "boolean" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "conversations.leave success schema", - "type": "object" - } }, - "default": { - "description": "Typical error response when attempting to leave a workspace's \"general\" channel", - "examples": { - "application/json": { - "error": "cant_leave_general", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from conversations.leave method", - "properties": { - "error": { - "enum": [ - "method_not_supported_for_channel_type", - "last_member", - "missing_scope", - "channel_not_found", - "is_archived", - "cant_leave_general", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "needed": { - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" - } - }, - "required": [ - "ok", - "error" - ], - "title": "conversations.leave error schema", - "type": "object" - } - } - }, - "security": [ { - "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" - ] - } - ], - "tags": [ - "conversations" - ] - } - }, - "/conversations.list": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Lists all channels in a Slack team.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.list" - }, - "operationId": "conversations_list", - "parameters": [ + "description": "Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "icon_emoji", + "type": "string" + }, { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "icon_url", "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:read`", - "in": "query", - "name": "token", + "description": "Find and link channel names and usernames.", + "in": "formData", + "name": "link_names", + "type": "boolean" + }, + { + "description": "Disable Slack markup parsing by setting to `false`. Enabled by default.", + "in": "formData", + "name": "mrkdwn", + "type": "boolean" + }, + { + "description": "Change how messages are treated. Defaults to `none`. See [below](#formatting).", + "in": "formData", + "name": "parse", "type": "string" }, { - "description": "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 no larger than 1000.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", + "in": "formData", + "name": "reply_broadcast", + "type": "boolean" }, { - "description": "Set to `true` to exclude archived channels from the list", - "in": "query", - "name": "exclude_archived", + "description": "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.", + "in": "formData", + "name": "text", + "type": "string" + }, + { + "description": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", + "in": "formData", + "name": "thread_ts", + "type": "string" + }, + { + "description": "Pass true to enable unfurling of primarily text-based content.", + "in": "formData", + "name": "unfurl_links", "type": "boolean" }, { - "description": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", - "in": "query", - "name": "types", + "description": "Pass false to disable unfurling of media content.", + "in": "formData", + "name": "unfurl_media", + "type": "boolean" + }, + { + "description": "Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "username", "type": "string" } ], @@ -13854,133 +12244,81 @@ ], "responses": { "200": { - "description": "Typical success response with only public channels", + "description": "Typical success response", "examples": { "application/json": { - "channels": [ - { - "created": 1449252889, - "creator": "U012A3CDE", - "id": "C012AB3CD", - "is_archived": false, - "is_channel": true, - "is_ext_shared": false, - "is_general": true, - "is_group": false, - "is_im": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_pending_ext_shared": false, - "is_private": false, - "is_shared": false, - "name": "general", - "name_normalized": "general", - "num_members": 4, - "pending_shared": [], - "previous_names": [], - "purpose": { - "creator": "", - "last_set": 0, - "value": "This channel is for team-wide communication and announcements. All team members are in this channel." - }, - "topic": { - "creator": "", - "last_set": 0, - "value": "Company-wide announcements and work-based matters" - }, - "unlinked": 0 - }, - { - "created": 1449252889, - "creator": "U061F7AUR", - "id": "C061EG9T2", - "is_archived": false, - "is_channel": true, - "is_ext_shared": false, - "is_general": false, - "is_group": false, - "is_im": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_pending_ext_shared": false, - "is_private": false, - "is_shared": false, - "name": "random", - "name_normalized": "random", - "num_members": 4, - "pending_shared": [], - "previous_names": [], - "purpose": { - "creator": "", - "last_set": 0, - "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." - }, - "topic": { - "creator": "", - "last_set": 0, - "value": "Non-work banter and water cooler conversation" - }, - "unlinked": 0 - } - ], + "channel": "C1H9RESGL", + "message": { + "attachments": [ + { + "fallback": "This is an attachment's fallback", + "id": 1, + "text": "This is an attachment" + } + ], + "bot_id": "B19LU7CSY", + "subtype": "bot_message", + "text": "Here's a message for you", + "ts": "1503435956.000247", + "type": "message", + "username": "ecto1" + }, "ok": true, - "response_metadata": { - "next_cursor": "dGVhbTpDMDYxRkE1UEI=" - } + "ts": "1503435956.000247" } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.list method", + "description": "Schema for successful response of chat.postMessage method", "properties": { - "channels": { - "items": { - "$ref": "#/definitions/objs_conversation" - }, - "type": "array", - "uniqueItems": true + "channel": { + "$ref": "#/definitions/defs_channel" + }, + "message": { + "$ref": "#/definitions/objs_message" }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "response_metadata": { - "additionalProperties": false, - "properties": { - "next_cursor": { - "type": "string" - } - }, - "required": [ - "next_cursor" - ], - "type": "object" + "ts": { + "$ref": "#/definitions/defs_ts" } }, "required": [ "ok", - "channels" + "channel", + "ts", + "message" ], - "title": "conversations.list success schema", + "title": "chat.postMessage success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response if too many attachments are included", "examples": { "application/json": { - "error": "invalid_auth", + "error": "too_many_attachments", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.list method", + "description": "Schema for error response chat.postMessage method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "missing_scope", + "channel_not_found", + "not_in_channel", + "is_archived", + "msg_too_long", + "no_text", + "too_many_attachments", + "rate_limited", "not_authed", "invalid_auth", "account_inactive", @@ -13989,29 +12327,19 @@ "invalid_charset", "invalid_form_data", "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" + "missing_post_type" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.list error schema", + "title": "chat.postMessage error schema", "type": "object" } } @@ -14019,53 +12347,106 @@ "security": [ { "slackAuth": [ - "channels:read", - "groups:read", - "im:read", - "mpim:read" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.members": { - "get": { + "/chat.scheduleMessage": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieve members of a conversation.", + "description": "Schedules a message to be sent to a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.members" + "url": "https://api.slack.com/methods/chat.scheduleMessage" }, - "operationId": "conversations_members", + "operationId": "chat_scheduleMessage", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `chat:write`", + "in": "header", + "name": "token", "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:read`", - "in": "query", - "name": "token", + "description": "Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", + "in": "formData", + "name": "channel", "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "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.", + "in": "formData", + "name": "text", + "type": "string" }, { - "description": "ID of the conversation to retrieve members for", - "in": "query", - "name": "channel", + "description": "Unix EPOCH timestamp of time in future to send the message.", + "in": "formData", + "name": "post_at", + "type": "string" + }, + { + "description": "Change how messages are treated. Defaults to `none`. See [chat.postMessage](chat.postMessage#formatting).", + "in": "formData", + "name": "parse", + "type": "string" + }, + { + "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [chat.postMessage](chat.postMessage#authorship).", + "in": "formData", + "name": "as_user", + "type": "boolean" + }, + { + "description": "Find and link channel names and usernames.", + "in": "formData", + "name": "link_names", + "type": "boolean" + }, + { + "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "in": "formData", + "name": "attachments", + "type": "string" + }, + { + "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "in": "formData", + "name": "blocks", "type": "string" + }, + { + "description": "Pass true to enable unfurling of primarily text-based content.", + "in": "formData", + "name": "unfurl_links", + "type": "boolean" + }, + { + "description": "Pass false to disable unfurling of media content.", + "in": "formData", + "name": "unfurl_media", + "type": "boolean" + }, + { + "description": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", + "in": "formData", + "name": "thread_ts", + "type": "number" + }, + { + "description": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", + "in": "formData", + "name": "reply_broadcast", + "type": "boolean" } ], "produces": [ @@ -14073,80 +12454,136 @@ ], "responses": { "200": { - "description": "Typical paginated success response", + "description": "Typical success response", "examples": { "application/json": { - "members": [ - "U023BECGF", - "U061F7AUR", - "W012A3CDE" - ], + "channel": "C1H9RESGL", + "message": { + "attachments": [ + { + "fallback": "This is an attachment's fallback", + "id": 1, + "text": "This is an attachment" + } + ], + "bot_id": "B19LU7CSY", + "subtype": "bot_message", + "text": "Here's a message for you in the future", + "type": "delayed_message", + "username": "ecto1" + }, "ok": true, - "response_metadata": { - "next_cursor": "e3VzZXJfaWQ6IFcxMjM0NTY3fQ==" - } + "post_at": "1562180400", + "scheduled_message_id": "Q1298393284" } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response conversations.members method", + "description": "Schema for successful response of chat.scheduleMessage method", "properties": { - "members": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" + "channel": { + "$ref": "#/definitions/defs_channel" }, - "response_metadata": { + "message": { "additionalProperties": false, "properties": { - "next_cursor": { + "bot_id": { + "$ref": "#/definitions/defs_bot_id" + }, + "bot_profile": { + "$ref": "#/definitions/objs_bot_profile" + }, + "team": { + "$ref": "#/definitions/defs_team" + }, + "text": { + "type": "string" + }, + "type": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + }, + "username": { "type": "string" } }, "required": [ - "next_cursor" + "type", + "text", + "bot_id", + "user", + "team" ], "type": "object" + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "post_at": { + "pattern": "^\\d{10}$", + "type": "integer" + }, + "scheduled_message_id": { + "pattern": "^[Q][A-Z0-9]{8,}$", + "title": "Scheduled Message ID", + "type": "string" } }, "required": [ "ok", - "members", - "response_metadata" + "channel", + "post_at", + "scheduled_message_id", + "message" ], - "title": "conversations.members success schema", + "title": "chat.scheduleMessage success schema", "type": "object" } }, "default": { - "description": "Typical error response when an invalid cursor is provided", + "description": "Typical error response if the `post_at` is invalid (ex. in the past or too far into the future)", "examples": { "application/json": { - "error": "invalid_cursor", + "error": "time_in_past", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response conversations.members method", + "description": "Schema for error response chat.scheduleMessage method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "invalid_time", + "time_in_past", + "time_too_far", "channel_not_found", - "invalid_limit", - "invalid_cursor", - "fetch_members_failed", + "not_in_channel", + "is_archived", + "msg_too_long", + "no_text", + "restricted_action", + "restricted_action_read_only_channel", + "restricted_action_thread_only_channel", + "restricted_action_non_threadable_channel", + "too_many_attachments", + "rate_limited", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "ekm_access_denied", + "missing_scope", + "invalid_arguments", "invalid_arg_name", - "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", @@ -14155,7 +12592,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -14167,7 +12605,7 @@ "ok", "error" ], - "title": "conversations.members error schema", + "title": "chat.scheduleMessage error schema", "type": "object" } } @@ -14175,53 +12613,63 @@ "security": [ { "slackAuth": [ - "channels:read", - "groups:read", - "im:read", - "mpim:read" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.open": { - "post": { + "/chat.scheduledMessages.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Opens or resumes a direct message or multi-person direct message.", + "description": "Returns a list of scheduled messages.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.open" + "url": "https://api.slack.com/methods/chat.scheduledMessages.list" }, - "operationId": "conversations_open", + "operationId": "chat_scheduledMessages_list", "parameters": [ { - "description": "Boolean, indicates you want the full IM channel definition in the response.", - "in": "formData", - "name": "return_im", - "type": "boolean" + "description": "Authentication token. Requires scope: `none`", + "in": "header", + "name": "token", + "type": "string" }, { - "description": "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`.", - "in": "formData", - "name": "users", + "description": "The channel of the scheduled messages", + "in": "query", + "name": "channel", "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:write`", - "in": "header", - "name": "token", - "type": "string" + "description": "A UNIX timestamp of the latest value in the time range", + "in": "query", + "name": "latest", + "type": "number" }, { - "description": "Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.", - "in": "formData", - "name": "channel", + "description": "A UNIX timestamp of the oldest value in the time range", + "in": "query", + "name": "oldest", + "type": "number" + }, + { + "description": "Maximum number of original entries to return.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -14233,103 +12681,112 @@ "description": "Typical success response", "examples": { "application/json": { - "channel": { - "id": "D069C7QFK" + "ok": true, + "response_metadata": { + "next_cursor": "" }, - "ok": true + "scheduled_messages": [ + { + "channel_id": "C1H9RESGL", + "date_created": 1551891734, + "id": 1298393284, + "post_at": 1551991428, + "text": "Here's a message for you in the future" + } + ] } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.open method when opening channels, ims, mpims", + "description": "Schema for successful response from chat.scheduledMessages.list method", "properties": { - "already_open": { - "type": "boolean" + "ok": { + "$ref": "#/definitions/defs_ok_true" }, - "channel": { - "items": [ - { - "$ref": "#/definitions/objs_conversation" - }, - { - "additionalProperties": false, - "properties": { - "created": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/defs_dm_id" - }, - "is_im": { - "type": "boolean" - }, - "is_open": { - "type": "boolean" - }, - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest": { - "$ref": "#/definitions/objs_message" - }, - "unread_count": { - "type": "number" - }, - "unread_count_display": { - "type": "number" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "id" - ], - "type": "object" + "response_metadata": { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string" } - ] - }, - "no_op": { - "type": "boolean" + }, + "required": [ + "next_cursor" + ], + "type": "object" }, - "ok": { - "$ref": "#/definitions/defs_ok_true" + "scheduled_messages": { + "items": { + "additionalProperties": false, + "properties": { + "channel_id": { + "$ref": "#/definitions/defs_channel_id" + }, + "date_created": { + "pattern": "^\\d{10}$", + "type": "integer" + }, + "id": { + "pattern": "^[Q][A-Z0-9]{8,}$", + "type": "string" + }, + "post_at": { + "pattern": "^\\d{10}$", + "type": "integer" + }, + "text": { + "type": "string" + } + }, + "required": [ + "id", + "channel_id", + "post_at", + "date_created" + ], + "type": "object" + }, + "type": "array" } }, "required": [ "ok", - "channel" + "scheduled_messages", + "response_metadata" ], - "title": "conversations.open success schema", + "title": "chat.scheduledMessages.list schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response if the channel passed is invalid", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_channel", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.open method", + "description": "Schema for error response from chat.scheduledMessages.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", - "user_not_found", - "user_not_visible", - "user_disabled", - "users_list_not_supplied", - "not_enough_users", - "too_many_users", + "invalid_channel", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "ekm_access_denied", + "missing_scope", + "invalid_arguments", "invalid_arg_name", - "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", @@ -14339,7 +12796,7 @@ "json_not_object", "request_timeout", "upgrade_required", - "channel_not_found" + "fatal_error" ], "type": "string" }, @@ -14351,7 +12808,7 @@ "ok", "error" ], - "title": "conversations.open error schema", + "title": "chat.scheduledMessages.list error schema", "type": "object" } } @@ -14359,47 +12816,72 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "none" ] } ], "tags": [ - "conversations" + "chat.scheduledMessages", + "chat" ] } }, - "/conversations.rename": { + "/chat.unfurl": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Renames a conversation.", + "description": "Provide custom unfurl behavior for user-posted URLs", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.rename" + "url": "https://api.slack.com/methods/chat.unfurl" }, - "operationId": "conversations_rename", + "operationId": "chat_unfurl", "parameters": [ { - "description": "Authentication token. Requires scope: `conversations:write`", + "description": "Authentication token. Requires scope: `links:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "New name for conversation.", + "description": "Channel ID of the message", "in": "formData", - "name": "name", + "name": "channel", + "required": true, "type": "string" }, { - "description": "ID of conversation to rename", + "description": "Timestamp of the message to add unfurl behavior to.", "in": "formData", - "name": "channel", + "name": "ts", + "required": true, + "type": "string" + }, + { + "description": "URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.", + "in": "formData", + "name": "unfurls", + "type": "string" + }, + { + "description": "Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior", + "in": "formData", + "name": "user_auth_message", + "type": "string" + }, + { + "description": "Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain", + "in": "formData", + "name": "user_auth_required", + "type": "boolean" + }, + { + "description": "Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.", + "in": "formData", + "name": "user_auth_url", "type": "string" } ], @@ -14408,128 +12890,80 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical, minimal success response", "examples": { "application/json": { - "channel": { - "created": 1449252889, - "creator": "W012A3BCD", - "id": "C012AB3CD", - "is_archived": false, - "is_channel": true, - "is_ext_shared": false, - "is_general": true, - "is_group": false, - "is_im": false, - "is_member": true, - "is_mpim": false, - "is_org_shared": false, - "is_pending_ext_shared": false, - "is_private": false, - "is_read_only": false, - "is_shared": false, - "last_read": "1502126650.228446", - "locale": "en-US", - "name": "general", - "name_normalized": "general", - "num_members": 23, - "pending_shared": [], - "previous_names": [ - "specifics", - "abstractions", - "etc" - ], - "purpose": { - "creator": "W012A3BCD", - "last_set": 1449709364, - "value": "This part of the workspace is for fun. Make fun here." - }, - "topic": { - "creator": "W012A3BCD", - "last_set": 1449709364, - "value": "For public discussion of generalities" - }, - "unlinked": 0 - }, "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.rename method", + "description": "Schema for successful response from chat.unfurl method", "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "conversations.rename success schema", + "title": "chat.unfurl success schema", "type": "object" } }, "default": { - "description": "Typical error response when the calling user is not a member of the conversation", + "description": "Typical error response", "examples": { "application/json": { - "error": "not_in_channel", + "error": "cannot_unfurl_url", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.rename method", + "description": "Schema for error response from chat.unfurl method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "user_is_restricted", - "method_not_supported_for_channel_type", - "missing_scope", - "channel_not_found", - "not_in_channel", - "not_authorized", - "invalid_name", - "name_taken", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", + "cannot_unfurl_url", + "cannot_find_service", + "missing_unfurls", + "cannot_prompt", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.rename error schema", + "title": "chat.unfurl error schema", "type": "object" } } @@ -14537,77 +12971,84 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "links:write" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.replies": { - "get": { + "/chat.update": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieve a thread of messages posted to a conversation", + "description": "Updates a message.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.replies" + "url": "https://api.slack.com/methods/chat.update" }, - "operationId": "conversations_replies", + "operationId": "chat_update", "parameters": [ { - "description": "Include messages with latest or oldest timestamp in results only when either timestamp is specified.", - "in": "query", - "name": "inclusive", - "type": "boolean" + "description": "Authentication token. Requires scope: `chat:write`", + "in": "header", + "name": "token", + "required": true, + "type": "string" }, { - "description": "Unique identifier of a thread's parent message.", - "in": "query", - "name": "ts", - "type": "number" + "description": "Pass true to update the message as the authed user. [Bot users](/bot-users) in this context are considered authed users.", + "in": "formData", + "name": "as_user", + "type": "string" }, { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting `text`. If you don't include this field, the message's previous `attachments` will be retained. To remove previous `attachments`, include an empty array for this field.", + "in": "formData", + "name": "attachments", "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:history`", - "in": "query", - "name": "token", + "description": "A JSON-based array of [structured blocks](/block-kit/building), presented as a URL-encoded string. If you don't include this field, the message's previous `blocks` will be retained. To remove previous `blocks`, include an empty array for this field.", + "in": "formData", + "name": "blocks", "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "Channel containing the message to be updated.", + "in": "formData", + "name": "channel", + "required": true, + "type": "string" }, { - "description": "Start of time range of messages to include in results.", - "in": "query", - "name": "oldest", - "type": "number" + "description": "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`.", + "in": "formData", + "name": "link_names", + "type": "string" }, { - "description": "Conversation ID to fetch thread from.", - "in": "query", - "name": "channel", + "description": "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`.", + "in": "formData", + "name": "parse", "type": "string" }, { - "description": "End of time range of messages to include in results.", - "in": "query", - "name": "latest", - "type": "number" + "description": "New text for the message, using the [default formatting rules](/reference/surfaces/formatting). It's not required when presenting `blocks` or `attachments`.", + "in": "formData", + "name": "text", + "type": "string" + }, + { + "description": "Timestamp of the message to be updated.", + "in": "formData", + "name": "ts", + "required": true, + "type": "string" } ], "produces": [ @@ -14618,221 +13059,62 @@ "description": "Typical success response", "examples": { "application/json": { - "has_more": true, - "messages": [ - { - "last_read": "1484678597.521003", - "replies": [ - { - "ts": "1483037603.017503", - "user": "U061F7AUR" - }, - { - "ts": "1483051909.018632", - "user": "U061F7AUR" - }, - { - "ts": "1483125339.020269", - "user": "U061F7AUR" - } - ], - "reply_count": 3, - "subscribed": true, - "text": "island", - "thread_ts": "1482960137.003543", - "ts": "1482960137.003543", - "type": "message", - "unread_count": 0, - "user": "U061F7AUR" - }, - { - "parent_user_id": "U061F7AUR", - "text": "one island", - "thread_ts": "1482960137.003543", - "ts": "1483037603.017503", - "type": "message", - "user": "U061F7AUR" - }, - { - "parent_user_id": "U061F7AUR", - "text": "two island", - "thread_ts": "1482960137.003543", - "ts": "1483051909.018632", - "type": "message", - "user": "U061F7AUR" - }, - { - "parent_user_id": "U061F7AUR", - "text": "three for the land", - "thread_ts": "1482960137.003543", - "ts": "1483125339.020269", - "type": "message", - "user": "U061F7AUR" - } - ], + "channel": "C024BE91L", + "message": { + "text": "Updated text you carefully authored", + "user": "U34567890" + }, "ok": true, - "response_metadata": { - "next_cursor": "bmV4dF90czoxNDg0Njc4MjkwNTE3MDkx" - } + "text": "Updated text you carefully authored", + "ts": "1401383885.000061" } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.replies method", + "description": "Schema for successful response of chat.update method", "properties": { - "has_more": { - "type": "boolean" + "channel": { + "type": "string" }, - "messages": { - "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest_reply": { - "$ref": "#/definitions/defs_ts" - }, - "replies": { - "items": { - "additionalProperties": false, - "properties": { - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "user", - "ts" - ], - "type": "object" - }, - "type": "array" - }, - "reply_count": { - "type": "integer" - }, - "reply_users": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "type": "array", - "uniqueItems": true - }, - "reply_users_count": { - "type": "integer" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "subscribed": { - "type": "boolean" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "unread_count": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "reply_count", - "replies", - "subscribed", - "ts" - ], + "message": { + "properties": { + "attachments": { + "items": { "type": "object" }, - { - "additionalProperties": false, - "properties": { - "is_starred": { - "type": "boolean" - }, - "parent_user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "parent_user_id", - "ts" - ], - "type": "object" - } - ] + "type": "array" + }, + "blocks": { + "type": "object" + }, + "text": { + "type": "string" + } }, - "type": "array" + "required": [ + "text" + ], + "title": "Message object", + "type": "object" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "text": { + "type": "string" + }, + "ts": { + "type": "string" } }, "required": [ "ok", - "messages" + "channel", + "ts", + "text", + "message" ], - "title": "conversations.replies success schema", + "title": "chat.update success schema", "type": "object" } }, @@ -14840,51 +13122,57 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "thread_not_found", + "error": "cant_update_message", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.replies method", + "description": "Schema for error response chat.update method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "missing_scope", + "message_not_found", + "cant_update_message", "channel_not_found", - "thread_not_found", + "edit_window_closed", + "msg_too_long", + "too_many_attachments", + "rate_limited", + "no_text", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", + "request_timeout", "invalid_json", "json_not_object", - "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error", + "is_inactive" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.replies error schema", + "title": "chat.update error schema", "type": "object" } } @@ -14892,30 +13180,28 @@ "security": [ { "slackAuth": [ - "channels:history", - "groups:history", - "im:history", - "mpim:history" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.setPurpose": { + "/conversations.archive": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Sets the purpose for a conversation.", + "description": "Archives a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.setPurpose" + "url": "https://api.slack.com/methods/conversations.archive" }, - "operationId": "conversations_setPurpose", + "operationId": "conversations_archive", "parameters": [ { "description": "Authentication token. Requires scope: `conversations:write`", @@ -14924,13 +13210,7 @@ "type": "string" }, { - "description": "A new, specialer purpose", - "in": "formData", - "name": "purpose", - "type": "string" - }, - { - "description": "Conversation to set the purpose of", + "description": "ID of conversation to archive", "in": "formData", "name": "channel", "type": "string" @@ -14949,20 +13229,16 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.setPurpose method", + "description": "Schema for successful response conversations.archive method", "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "conversations.setPurpose success schema", + "title": "conversations.archive success schema", "type": "object" } }, @@ -14970,37 +13246,46 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_auth", + "error": "channel_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.setPurpose method", + "description": "Schema for error response from conversations.archive method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "method_not_supported_for_channel_type", "missing_scope", + "not_supported", "channel_not_found", - "not_in_channel", - "is_archived", - "too_long", - "user_is_restricted", + "already_archived", + "cant_archive_general", + "restricted_action", "not_authed", "invalid_auth", "account_inactive", + "user_is_bot", + "user_is_restricted", + "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "team_added_to_org", + "missing_charset", + "superfluous_charset" ], "type": "string" }, @@ -15018,7 +13303,7 @@ "ok", "error" ], - "title": "conversations.setPurpose error schema", + "title": "conversations.archive error schema", "type": "object" } } @@ -15038,25 +13323,19 @@ ] } }, - "/conversations.setTopic": { + "/conversations.close": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Sets the topic for a conversation.", + "description": "Closes a direct message or multi-person direct message.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.setTopic" + "url": "https://api.slack.com/methods/conversations.close" }, - "operationId": "conversations_setTopic", + "operationId": "conversations_close", "parameters": [ - { - "description": "The new topic string. Does not support formatting or linkification.", - "in": "formData", - "name": "topic", - "type": "string" - }, { "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", @@ -15064,7 +13343,7 @@ "type": "string" }, { - "description": "Conversation to set the topic of", + "description": "Conversation to close.", "in": "formData", "name": "channel", "type": "string" @@ -15083,20 +13362,22 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.setTopic method", + "description": "Schema for successful response conversations.close method", "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" + "already_closed": { + "type": "boolean" + }, + "no_op": { + "type": "boolean" }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "conversations.setTopic success schema", + "title": "conversations.close success schema", "type": "object" } }, @@ -15104,23 +13385,24 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_auth", + "error": "channel_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.setTopic method", + "description": "Schema for error response from conversations.close method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "method_not_supported_for_channel_type", - "missing_scope", "channel_not_found", - "not_in_channel", - "is_archived", - "too_long", - "user_is_restricted", + "user_does_not_own_channel", + "missing_scope", "not_authed", "invalid_auth", "account_inactive", @@ -15152,7 +13434,7 @@ "ok", "error" ], - "title": "conversations.setTopic error schema", + "title": "conversations.close error schema", "type": "object" } } @@ -15172,18 +13454,18 @@ ] } }, - "/conversations.unarchive": { + "/conversations.create": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Reverses conversation archival.", + "description": "Initiates a public or private channel-based conversation", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.unarchive" + "url": "https://api.slack.com/methods/conversations.create" }, - "operationId": "conversations_unarchive", + "operationId": "conversations_create", "parameters": [ { "description": "Authentication token. Requires scope: `conversations:write`", @@ -15192,10 +13474,16 @@ "type": "string" }, { - "description": "ID of conversation to unarchive", + "description": "Name of the public or private channel to create", "in": "formData", - "name": "channel", + "name": "name", "type": "string" + }, + { + "description": "Create a private channel instead of a public one", + "in": "formData", + "name": "is_private", + "type": "boolean" } ], "produces": [ @@ -15203,64 +13491,115 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "If successful, the command returns a rather stark [conversation object](/types/conversation)", "examples": { "application/json": { + "channel": { + "created": 1504554479, + "creator": "U0123456", + "id": "C0EAQDV4Z", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": false, + "is_group": false, + "is_im": false, + "is_member": true, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "last_read": "0000000000.000000", + "latest": null, + "name": "endeavor", + "name_normalized": "endeavor", + "pending_shared": [], + "previous_names": [], + "priority": 0, + "purpose": { + "creator": "", + "last_set": 0, + "value": "" + }, + "topic": { + "creator": "", + "last_set": 0, + "value": "" + }, + "unlinked": 0, + "unread_count": 0, + "unread_count_display": 0 + }, "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.unarchive method", + "description": "Schema for successful response conversations.create method", "properties": { + "channel": { + "$ref": "#/definitions/objs_conversation" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "channel" ], - "title": "conversations.unarchive success schema", + "title": "conversations.create success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when name already in use", "examples": { "application/json": { - "error": "channel_not_found", + "error": "name_taken", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.unarchive method", + "description": "Schema for error response from conversations.create method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "detail": { + "type": "string" + }, "error": { "enum": [ "method_not_supported_for_channel_type", "missing_scope", - "channel_not_found", - "not_archived", + "name_taken", + "restricted_action", + "no_channel", + "invalid_name_required", + "invalid_name_punctuation", + "invalid_name_maxlength", + "invalid_name_specials", + "invalid_name", "not_authed", "invalid_auth", "account_inactive", "user_is_bot", "user_is_restricted", - "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" + "upgrade_required" ], "type": "string" }, @@ -15278,7 +13617,7 @@ "ok", "error" ], - "title": "conversations.unarchive error schema", + "title": "conversations.create error schema", "type": "object" } } @@ -15298,38 +13637,58 @@ ] } }, - "/dialog.open": { + "/conversations.history": { "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Open a dialog with a user", + "description": "Fetches a conversation's history of messages and events.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/dialog.open" + "url": "https://api.slack.com/methods/conversations.history" }, - "operationId": "dialog_open", + "operationId": "conversations_history", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", - "in": "header", + "description": "Authentication token. Requires scope: `conversations:history`", + "in": "query", "name": "token", - "required": true, "type": "string" }, { - "description": "Exchange a trigger to post to the user.", + "description": "Conversation ID to fetch history for.", "in": "query", - "name": "trigger_id", - "required": true, + "name": "channel", "type": "string" }, { - "description": "The dialog definition. This must be a JSON-encoded string.", + "description": "End of time range of messages to include in results.", "in": "query", - "name": "dialog", - "required": true, + "name": "latest", + "type": "number" + }, + { + "description": "Start of time range of messages to include in results.", + "in": "query", + "name": "oldest", + "type": "number" + }, + { + "description": "Include messages with latest or oldest timestamp in results only when either timestamp is specified.", + "in": "query", + "name": "inclusive", + "type": "boolean" + }, + { + "description": "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.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -15338,80 +13697,131 @@ ], "responses": { "200": { - "description": "Typical success response is quite minimal.", + "description": "Typical success response containing a channel's messages", "examples": { "application/json": { - "ok": true + "has_more": true, + "messages": [ + { + "text": "I find you punny and would like to smell your nose letter", + "ts": "1512085950.000216", + "type": "message", + "user": "U012AB3CDE" + }, + { + "text": "What, you want to smell my shoes better?", + "ts": "1512104434.000490", + "type": "message", + "user": "U061F7AUR" + } + ], + "ok": true, + "pin_count": 0, + "response_metadata": { + "next_cursor": "bmV4dF90czoxNTEyMDg1ODYxMDAwNTQz" + } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from dialog.open method", + "description": "Schema for successful response from conversations.history method", "properties": { + "channel_actions_count": { + "type": "integer" + }, + "channel_actions_ts": { + "items": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "has_more": { + "type": "boolean" + }, + "messages": { + "items": { + "$ref": "#/definitions/objs_message" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "pin_count": { + "type": "integer" } }, "required": [ - "ok" + "ok", + "messages", + "has_more", + "pin_count", + "channel_actions_ts", + "channel_actions_count" ], - "title": "dialog.open schema", + "title": "conversations.history success schema", "type": "object" } }, "default": { - "description": "Typical error response, before getting to any possible validation errors.", + "description": "Typical error response", "examples": { "application/json": { - "error": "missing_trigger", + "error": "channel_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from dialog.open method", + "description": "Schema for error response from conversations.history method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "validation_errors", - "missing_trigger", - "missing_dialog", - "trigger_exchanged", - "trigger_expired", - "invalid_trigger", - "app_missing_action_url", - "cannot_create_dialog", - "failed_sending_dialog", + "missing_scope", + "channel_not_found", + "invalid_ts_latest", + "invalid_ts_oldest", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "dialog.open error schema", + "title": "conversations.history error schema", "type": "object" } } @@ -15419,34 +13829,53 @@ "security": [ { "slackAuth": [ - "none" + "channels:history", + "groups:history", + "im:history", + "mpim:history" ] } ], "tags": [ - "dialog" + "conversations" ] } }, - "/dnd.endDnd": { - "post": { + "/conversations.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Ends the current user's Do Not Disturb session immediately.", + "description": "Retrieve information about a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.endDnd" + "url": "https://api.slack.com/methods/conversations.info" }, - "operationId": "dnd_endDnd", + "operationId": "conversations_info", "parameters": [ { - "description": "Authentication token. Requires scope: `dnd:write`", - "in": "header", + "description": "Authentication token. Requires scope: `conversations:read`", + "in": "query", "name": "token", - "required": true, "type": "string" + }, + { + "description": "Conversation ID to learn more about", + "in": "query", + "name": "channel", + "type": "string" + }, + { + "description": "Set this to `true` to receive the locale for this conversation. Defaults to `false`", + "in": "query", + "name": "include_locale", + "type": "boolean" + }, + { + "description": "Set to `true` to include the member count for the specified conversation. Defaults to `false`", + "in": "query", + "name": "include_num_members", + "type": "boolean" } ], "produces": [ @@ -15454,73 +13883,123 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response for a public channel. (Also, a response from a private channel and a multi-party IM is very similar to this example.)", "examples": { "application/json": { + "channel": { + "created": 1449252889, + "creator": "W012A3BCD", + "id": "C012AB3CD", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": true, + "is_group": false, + "is_im": false, + "is_member": true, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_read_only": false, + "is_shared": false, + "last_read": "1502126650.228446", + "locale": "en-US", + "name": "general", + "name_normalized": "general", + "parent_conversation": null, + "pending_shared": [], + "previous_names": [ + "specifics", + "abstractions", + "etc" + ], + "purpose": { + "creator": "W012A3BCD", + "last_set": 1449709364, + "value": "This part of the workspace is for fun. Make fun here." + }, + "topic": { + "creator": "W012A3BCD", + "last_set": 1449709364, + "value": "For public discussion of generalities" + }, + "unlinked": 0 + }, "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from dnd.endDnd method", + "description": "Schema for successful response conversations.info", "properties": { + "channel": { + "$ref": "#/definitions/objs_conversation" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "channel" ], - "title": "dnd.endDnd schema", + "title": "conversations.info success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when a channel cannot be found", "examples": { "application/json": { - "error": "invalid_auth", + "error": "channel_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from dnd.endDnd method", + "description": "Schema for error response from conversations.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "unknown_error", + "missing_scope", + "channel_not_found", + "team_added_to_org", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "dnd.endDnd error schema", + "title": "conversations.info error schema", "type": "object" } } @@ -15528,33 +14007,47 @@ "security": [ { "slackAuth": [ - "dnd:write" + "channels:read", + "groups:read", + "im:read", + "mpim:read" ] } ], "tags": [ - "dnd" + "conversations" ] } }, - "/dnd.endSnooze": { + "/conversations.invite": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Ends the current user's snooze mode immediately.", + "description": "Invites users to a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.endSnooze" + "url": "https://api.slack.com/methods/conversations.invite" }, - "operationId": "dnd_endSnooze", + "operationId": "conversations_invite", "parameters": [ { - "description": "Authentication token. Requires scope: `dnd:write`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", - "required": true, + "type": "string" + }, + { + "description": "The ID of the public or private channel to invite user(s) to.", + "in": "formData", + "name": "channel", + "type": "string" + }, + { + "description": "A comma separated list of user IDs. Up to 1000 users may be listed.", + "in": "formData", + "name": "users", "type": "string" } ], @@ -15563,128 +14056,237 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response when an invitation is extended", "examples": { "application/json": { + "channel": { + "created": 1449252889, + "creator": "W012A3BCD", + "id": "C012AB3CD", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": true, + "is_group": false, + "is_im": false, + "is_member": true, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_read_only": false, + "is_shared": false, + "last_read": "1502126650.228446", + "locale": "en-US", + "name": "general", + "name_normalized": "general", + "num_members": 23, + "pending_shared": [], + "previous_names": [ + "specifics", + "abstractions", + "etc" + ], + "purpose": { + "creator": "W012A3BCD", + "last_set": 1449709364, + "value": "This part of the workspace is for fun. Make fun here." + }, + "topic": { + "creator": "W012A3BCD", + "last_set": 1449709364, + "value": "For public discussion of generalities" + }, + "unlinked": 0 + }, "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from dnd.endSnooze method", + "description": "Schema for successful response from conversations.invite method", "properties": { - "dnd_enabled": { - "type": "boolean" - }, - "next_dnd_end_ts": { - "type": "integer" - }, - "next_dnd_start_ts": { - "type": "integer" + "channel": { + "$ref": "#/definitions/objs_conversation" }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "snooze_enabled": { - "type": "boolean" } }, "required": [ "ok", - "dnd_enabled", - "next_dnd_start_ts", - "next_dnd_end_ts", - "snooze_enabled" + "channel" ], - "title": "dnd.endSnooze schema", + "title": "conversations.invite error schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when an invite is attempted on a conversation type that does not support it", "examples": { "application/json": { - "error": "invalid_auth", + "error": "method_not_supported_for_channel_type", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from dnd.endSnooze method", + "description": "Schema for error response from conversations.invite method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "snooze_not_active", - "snooze_end_failed", + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "user_not_found", + "no_user", + "cant_invite_self", + "not_in_channel", + "already_in_channel", + "is_archived", + "cant_invite", + "too_many_users", + "ura_max_channels", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", "user_is_bot", + "user_is_restricted", + "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "fatal_error" + "team_added_to_org", + "missing_charset", + "superfluous_charset" ], "type": "string" }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "dnd.endSnooze error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "dnd:write" - ] - } - ], - "tags": [ - "dnd" + "errors": { + "items": { + "additionalProperties": false, + "properties": { + "error": { + "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "user_not_found", + "no_user", + "cant_invite_self", + "not_in_channel", + "already_in_channel", + "is_archived", + "cant_invite", + "too_many_users", + "ura_max_channels", + "not_authed", + "invalid_auth", + "account_inactive", + "user_is_bot", + "user_is_restricted", + "user_is_ultra_restricted", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "team_added_to_org", + "missing_charset", + "superfluous_charset" + ], + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + } + }, + "required": [ + "ok", + "error" + ], + "type": "object" + }, + "minItems": 1, + "title": "errors is returned when an error associates an user", + "type": "array", + "uniqueItems": true + }, + "needed": { + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" + } + }, + "required": [ + "ok" + ], + "title": "conversations.invite error schema", + "type": "object" + } + } + }, + "security": [ + { + "slackAuth": [ + "channels:write", + "groups:write", + "im:write", + "mpim:write" + ] + } + ], + "tags": [ + "conversations" ] } }, - "/dnd.info": { - "get": { + "/conversations.join": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieves a user's current Do Not Disturb status.", + "description": "Joins an existing conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.info" + "url": "https://api.slack.com/methods/conversations.join" }, - "operationId": "dnd_info", + "operationId": "conversations_join", "parameters": [ { - "description": "Authentication token. Requires scope: `dnd:read`", - "in": "query", + "description": "Authentication token. Requires scope: `channels:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "User to fetch status for (defaults to current user)", - "in": "query", - "name": "user", + "description": "ID of conversation to join", + "in": "formData", + "name": "channel", "type": "string" } ], @@ -15696,93 +14298,142 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "channel": { + "created": 1449252889, + "creator": "U061F7AUR", + "id": "C061EG9SL", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": true, + "is_group": false, + "is_im": false, + "is_member": true, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "name": "general", + "name_normalized": "general", + "pending_shared": [], + "previous_names": [], + "purpose": { + "creator": "", + "last_set": 0, + "value": "For widget discussion" + }, + "topic": { + "creator": "", + "last_set": 0, + "value": "Which widget do you worry about?" + }, + "unlinked": 0 + }, + "ok": true, + "response_metadata": { + "warnings": [ + "already_in_channel" + ] + }, + "warning": "already_in_channel" } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from dnd.info method", + "description": "Schema for successful response from conversations.join method", "properties": { - "dnd_enabled": { - "type": "boolean" - }, - "next_dnd_end_ts": { - "type": "integer" - }, - "next_dnd_start_ts": { - "type": "integer" + "channel": { + "$ref": "#/definitions/objs_conversation" }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "snooze_enabled": { - "type": "boolean" - }, - "snooze_endtime": { - "type": "integer" + "response_metadata": { + "properties": { + "warnings": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + } + }, + "title": "Response metadata", + "type": "object" }, - "snooze_remaining": { - "type": "integer" + "warning": { + "type": "string" } }, "required": [ "ok", - "dnd_enabled", - "next_dnd_start_ts", - "next_dnd_end_ts", - "snooze_enabled", - "snooze_endtime", - "snooze_remaining" + "channel" ], - "title": "dnd.info schema", + "title": "conversations.join success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response if the conversation is archived and cannot be joined", "examples": { "application/json": { - "error": "invalid_auth", + "error": "is_archived", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from dnd.info method", + "description": "Schema for error response from conversations.join method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "user_not_found", + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "is_archived", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", + "user_is_bot", + "user_is_restricted", + "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "fatal_error" + "team_added_to_org", + "missing_charset", + "superfluous_charset" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "dnd.info error schema", + "title": "conversations.join error schema", "type": "object" } } @@ -15790,43 +14441,48 @@ "security": [ { "slackAuth": [ - "dnd:read" + "channels:write" ] } ], "tags": [ - "dnd" + "conversations" ] } }, - "/dnd.setSnooze": { + "/conversations.kick": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Turns on Do Not Disturb mode for the current user, or changes its duration.", + "description": "Removes a user from a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.setSnooze" + "url": "https://api.slack.com/methods/conversations.kick" }, - "operationId": "dnd_setSnooze", + "operationId": "conversations_kick", "parameters": [ { - "description": "Number of minutes, from now, to snooze until.", - "in": "formData", - "name": "num_minutes", - "required": true, + "description": "Authentication token. Requires scope: `conversations:write`", + "in": "header", + "name": "token", "type": "string" }, { - "description": "Authentication token. Requires scope: `dnd:write`", + "description": "ID of conversation to remove user from.", "in": "formData", - "name": "token", - "required": true, + "name": "channel", "type": "string" - } - ], - "produces": [ + }, + { + "description": "User ID to be removed.", + "in": "formData", + "name": "user", + "type": "string" + } + ], + "produces": [ "application/json" ], "responses": { @@ -15839,79 +14495,78 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from dnd.setSnooze method", + "description": "Schema for successful response conversations.kick method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "snooze_enabled": { - "type": "boolean" - }, - "snooze_endtime": { - "type": "integer" - }, - "snooze_remaining": { - "type": "integer" } }, "required": [ - "ok", - "snooze_enabled", - "snooze_endtime", - "snooze_remaining" + "ok" ], - "title": "dnd.setSnooze schema", + "title": "conversations.kick success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when you attempt to kick yourself from a channel", "examples": { "application/json": { - "error": "invalid_auth", + "error": "cant_kick_self", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from dnd.setSnooze method", + "description": "Schema for error response conversations.kick method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "missing_duration", - "snooze_failed", + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "user_not_found", + "cant_kick_self", + "not_in_channel", + "cant_kick_from_general", + "restricted_action", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "too_long", - "fatal_error" + "upgrade_required" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "dnd.setSnooze error schema", + "title": "conversations.kick error schema", "type": "object" } } @@ -15919,37 +14574,41 @@ "security": [ { "slackAuth": [ - "dnd:write" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "dnd" + "conversations" ] } }, - "/dnd.teamInfo": { - "get": { + "/conversations.leave": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieves the Do Not Disturb status for up to 50 users on a team.", + "description": "Leaves a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.teamInfo" + "url": "https://api.slack.com/methods/conversations.leave" }, - "operationId": "dnd_teamInfo", + "operationId": "conversations_leave", "parameters": [ { - "description": "Authentication token. Requires scope: `dnd:read`", - "in": "query", + "description": "Authentication token. Requires scope: `conversations:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "Comma-separated list of users to fetch Do Not Disturb status for", - "in": "query", - "name": "users", + "description": "Conversation to leave", + "in": "formData", + "name": "channel", "type": "string" } ], @@ -15961,70 +14620,73 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "users": { - "U023BECGF": { - "dnd_enabled": true, - "next_dnd_end_ts": 1450423800, - "next_dnd_start_ts": 1450387800 - }, - "W058CJVAA": { - "dnd_enabled": false, - "next_dnd_end_ts": 1, - "next_dnd_start_ts": 1 - } - } + "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from dnd.teamInfo method", + "description": "Schema for successful response from conversations.leave method", "properties": { - "cached": { + "not_in_channel": { + "enum": [ + true + ], "type": "boolean" }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "users": { - "additionalProperties": false, - "type": "object" } }, "required": [ - "ok", - "users" + "ok" ], - "title": "dnd.teamInfo success schema", + "title": "conversations.leave success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when attempting to leave a workspace's \"general\" channel", "examples": { "application/json": { - "error": "invalid_auth", + "error": "cant_leave_general", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from dnd.teamInfo method", + "description": "Schema for error response from conversations.leave method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "method_not_supported_for_channel_type", + "last_member", + "missing_scope", + "channel_not_found", + "is_archived", + "cant_leave_general", "not_authed", "invalid_auth", "account_inactive", + "user_is_bot", + "user_is_restricted", + "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", + "invalid_json", + "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "team_added_to_org", + "missing_charset", + "superfluous_charset" ], "type": "string" }, @@ -16042,7 +14704,7 @@ "ok", "error" ], - "title": "dnd.teamInfo error schema", + "title": "conversations.leave error schema", "type": "object" } } @@ -16050,32 +14712,58 @@ "security": [ { "slackAuth": [ - "dnd:read" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "dnd" + "conversations" ] } }, - "/emoji.list": { + "/conversations.list": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Lists custom emoji for a team.", + "description": "Lists all channels in a Slack team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/emoji.list" + "url": "https://api.slack.com/methods/conversations.list" }, - "operationId": "emoji_list", + "operationId": "conversations_list", "parameters": [ { - "description": "Authentication token. Requires scope: `emoji:read`", + "description": "Authentication token. Requires scope: `conversations:read`", "in": "query", "name": "token", - "required": true, + "type": "string" + }, + { + "description": "Set to `true` to exclude archived channels from the list", + "in": "query", + "name": "exclude_archived", + "type": "boolean" + }, + { + "description": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", + "in": "query", + "name": "types", + "type": "string" + }, + { + "description": "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 no larger than 1000.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -16084,141 +14772,140 @@ ], "responses": { "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } - }, - "default": { - "description": "Typical error response", + "description": "Typical success response with only public channels", "examples": { "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "emoji:read" - ] - } - ], - "tags": [ - "emoji" - ] - } - }, - "/files.comments.delete": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ], - "description": "Deletes an existing comment on a file.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.comments.delete" - }, - "operationId": "files_comments_delete", - "parameters": [ - { - "description": "Authentication token. Requires scope: `files:write:user`", - "in": "header", - "name": "token", - "type": "string" - }, - { - "description": "The comment to delete.", - "in": "formData", - "name": "id", - "type": "string" - }, - { - "description": "File to delete a comment from.", - "in": "formData", - "name": "file", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Standard success response is very simple", - "examples": { - "application/json": { - "ok": true + "channels": [ + { + "created": 1449252889, + "creator": "U012A3CDE", + "id": "C012AB3CD", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": true, + "is_group": false, + "is_im": false, + "is_member": true, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "name": "general", + "name_normalized": "general", + "num_members": 4, + "pending_shared": [], + "previous_names": [], + "purpose": { + "creator": "", + "last_set": 0, + "value": "This channel is for team-wide communication and announcements. All team members are in this channel." + }, + "topic": { + "creator": "", + "last_set": 0, + "value": "Company-wide announcements and work-based matters" + }, + "unlinked": 0 + }, + { + "created": 1449252889, + "creator": "U061F7AUR", + "id": "C061EG9T2", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": false, + "is_group": false, + "is_im": false, + "is_member": true, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "name": "random", + "name_normalized": "random", + "num_members": 4, + "pending_shared": [], + "previous_names": [], + "purpose": { + "creator": "", + "last_set": 0, + "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." + }, + "topic": { + "creator": "", + "last_set": 0, + "value": "Non-work banter and water cooler conversation" + }, + "unlinked": 0 + } + ], + "ok": true, + "response_metadata": { + "next_cursor": "dGVhbTpDMDYxRkE1UEI=" + } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response files.comments.delete method", + "description": "Schema for successful response from conversations.list method", "properties": { + "channels": { + "items": { + "$ref": "#/definitions/objs_conversation" + }, + "type": "array", + "uniqueItems": true + }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "response_metadata": { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string" + } + }, + "required": [ + "next_cursor" + ], + "type": "object" } }, "required": [ - "ok" + "ok", + "channels" ], - "title": "files.comments.delete schema", + "title": "conversations.list success schema", "type": "object" } }, "default": { - "description": "Standard failure response when used with an invalid token", + "description": "Typical error response", "examples": { "application/json": { - "error": "file_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response files.comments.delete method", + "description": "Schema for error response from conversations.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "cant_delete", - "comment_not_found", + "missing_scope", "not_authed", "invalid_auth", "account_inactive", - "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -16232,15 +14919,21 @@ ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "files.comments.delete error schema", + "title": "conversations.list error schema", "type": "object" } } @@ -16248,40 +14941,48 @@ "security": [ { "slackAuth": [ - "files:write:user" + "channels:read", + "groups:read", + "im:read", + "mpim:read" ] } ], "tags": [ - "files.comments", - "files" + "conversations" ] } }, - "/files.delete": { + "/conversations.mark": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Deletes a file.", + "description": "Sets the read cursor in a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.delete" + "url": "https://api.slack.com/methods/conversations.mark" }, - "operationId": "files_delete", + "operationId": "conversations_mark", "parameters": [ { - "description": "Authentication token. Requires scope: `files:write:user`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", "type": "string" }, { - "description": "ID of file to delete.", + "description": "Channel or conversation to set the read cursor for.", "in": "formData", - "name": "file", + "name": "channel", "type": "string" + }, + { + "description": "Unique identifier of message you want marked as most recently seen in this conversation.", + "in": "formData", + "name": "ts", + "type": "number" } ], "produces": [ @@ -16297,7 +14998,7 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response files.delete method", + "description": "Schema for successful response conversations.mark method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -16306,7 +15007,7 @@ "required": [ "ok" ], - "title": "files.delete schema", + "title": "conversations.mark success schema", "type": "object" } }, @@ -16320,40 +15021,51 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response files.delete method", + "description": "Schema for error response from conversations.mark method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "file_not_found", - "file_deleted", - "cant_delete_file", + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "invalid_timestamp", + "not_in_channel", "not_authed", "invalid_auth", "account_inactive", - "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "not_allowed_token_type" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "files.delete error schema", + "title": "conversations.mark error schema", "type": "object" } } @@ -16361,59 +15073,52 @@ "security": [ { "slackAuth": [ - "files:write:user" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "files" + "conversations" ] } }, - "/files.info": { + "/conversations.members": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Gets information about a team file.", + "description": "Retrieve members of a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.info" + "url": "https://api.slack.com/methods/conversations.members" }, - "operationId": "files_info", + "operationId": "conversations_members", "parameters": [ { + "description": "Authentication token. Requires scope: `conversations:read`", "in": "query", - "name": "count", - "type": "string" - }, - { - "description": "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](/docs/pagination) for more details.", - "in": "query", - "name": "cursor", + "name": "token", "type": "string" }, { - "description": "Authentication token. Requires scope: `files:read`", + "description": "ID of the conversation to retrieve members for", "in": "query", - "name": "token", + "name": "channel", "type": "string" }, { - "description": "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.", + "description": "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.", "in": "query", "name": "limit", "type": "integer" }, { - "description": "Specify a file by providing its ID.", - "in": "query", - "name": "file", - "type": "string" - }, - { + "description": "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](/docs/pagination) for more detail.", "in": "query", - "name": "page", + "name": "cursor", "type": "string" } ], @@ -16422,134 +15127,82 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical paginated success response", "examples": { "application/json": { - "comments": [], - "file": { - "channels": [ - "C0T8SE4AU" - ], - "comments_count": 0, - "created": 1531763342, - "deanimate_gif": "https://.../tedair_deanimate_gif.png", - "display_as_bot": false, - "editable": false, - "external_type": "", - "filetype": "gif", - "groups": [], - "has_rich_preview": false, - "id": "F0S43PZDF", - "image_exif_rotation": 1, - "ims": [], - "is_external": false, - "is_public": true, - "is_starred": false, - "mimetype": "image/gif", - "mode": "hosted", - "name": "tedair.gif", - "original_h": 226, - "original_w": 176, - "permalink": "https://https://.../tedair.gif", - "permalink_public": "https://.../...", - "pjpeg": "https://.../tedair_pjpeg.jpg", - "pretty_type": "GIF", - "public_url_shared": false, - "shares": { - "public": { - "C0T8SE4AU": [ - { - "channel_name": "file-under", - "latest_reply": "1531763348.000001", - "reply_count": 1, - "reply_users": [ - "U061F7AUR" - ], - "reply_users_count": 1, - "team_id": "T061EG9R6", - "thread_ts": "1531763273.000015", - "ts": "1531763348.000001" - } - ] - } - }, - "size": 137531, - "thumb_160": "https://.../tedair_=_160.png", - "thumb_360": "https://.../tedair_360.png", - "thumb_360_gif": "https://.../tedair_360.gif", - "thumb_360_h": 226, - "thumb_360_w": 176, - "thumb_64": "https://.../tedair_64.png", - "thumb_80": "https://.../tedair_80.png", - "timestamp": 1531763342, - "title": "tedair.gif", - "url_private": "https://.../tedair.gif", - "url_private_download": "https://.../tedair.gif", - "user": "U061F7AUR", - "username": "" - }, + "members": [ + "U023BECGF", + "U061F7AUR", + "W012A3CDE" + ], "ok": true, "response_metadata": { - "next_cursor": "dGVhbTpDMUg5UkVTR0w=" + "next_cursor": "e3VzZXJfaWQ6IFcxMjM0NTY3fQ==" } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from files.info method", + "description": "Schema for successful response conversations.members method", "properties": { - "comments": { - "$ref": "#/definitions/objs_comments" - }, - "content_html": { - "type": "null" - }, - "editor": { - "$ref": "#/definitions/defs_user_id" - }, - "file": { - "$ref": "#/definitions/objs_file" + "members": { + "items": { + "$ref": "#/definitions/defs_user_id" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "paging": { - "$ref": "#/definitions/objs_paging" - }, "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string" + } + }, + "required": [ + "next_cursor" + ], + "type": "object" } }, "required": [ "ok", - "file", - "comments" + "members", + "response_metadata" ], - "title": "files.info schema", + "title": "conversations.members success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when an invalid cursor is provided", "examples": { "application/json": { - "error": "invalid_auth", + "error": "invalid_cursor", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from files.info method", + "description": "Schema for error response conversations.members method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "file_not_found", - "file_deleted", - "timezone_count_failed", + "channel_not_found", + "invalid_limit", + "invalid_cursor", + "fetch_members_failed", "not_authed", "invalid_auth", "account_inactive", - "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -16572,7 +15225,7 @@ "ok", "error" ], - "title": "files.info error schema", + "title": "conversations.members error schema", "type": "object" } } @@ -16580,78 +15233,54 @@ "security": [ { "slackAuth": [ - "files:read" + "channels:read", + "groups:read", + "im:read", + "mpim:read" ] } ], "tags": [ - "files" + "conversations" ] } }, - "/files.list": { - "get": { + "/conversations.open": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Lists & filters team files.", + "description": "Opens or resumes a direct message or multi-person direct message.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.list" + "url": "https://api.slack.com/methods/conversations.open" }, - "operationId": "files_list", + "operationId": "conversations_open", "parameters": [ { - "in": "query", - "name": "count", + "description": "Authentication token. Requires scope: `conversations:write`", + "in": "header", + "name": "token", "type": "string" }, { - "description": "Filter files appearing in a specific channel, indicated by its ID.", - "in": "query", + "description": "Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.", + "in": "formData", "name": "channel", "type": "string" }, { - "description": "Filter files created before this timestamp (inclusive).", - "in": "query", - "name": "ts_to", - "type": "number" - }, - { - "description": "Filter files created after this timestamp (inclusive).", - "in": "query", - "name": "ts_from", - "type": "number" - }, - { - "description": "Authentication token. Requires scope: `files:read`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "Filter files created by a single user.", - "in": "query", - "name": "user", + "description": "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`.", + "in": "formData", + "name": "users", "type": "string" }, { - "description": "Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.", - "in": "query", - "name": "show_files_hidden_by_limit", + "description": "Boolean, indicates you want the full IM channel definition in the response.", + "in": "formData", + "name": "return_im", "type": "boolean" - }, - { - "in": "query", - "name": "page", - "type": "string" - }, - { - "description": "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.", - "in": "query", - "name": "types", - "type": "string" } ], "produces": [ @@ -16662,126 +15291,74 @@ "description": "Typical success response", "examples": { "application/json": { - "files": [ - { - "channels": [ - "C0T8SE4AU" - ], - "comments_count": 0, - "created": 1531763254, - "deanimate_gif": "https://.../billair_deanimate_gif.png", - "display_as_bot": false, - "editable": false, - "external_type": "", - "filetype": "gif", - "groups": [], - "id": "F0S43P1CZ", - "image_exif_rotation": 1, - "ims": [], - "is_external": false, - "is_public": true, - "mimetype": "image/gif", - "mode": "hosted", - "name": "billair.gif", - "original_h": 226, - "original_w": 176, - "permalink": "https://https://.../billair.gif", - "permalink_public": "https://.../...", - "pjpeg": "https://.../billair_pjpeg.jpg", - "pretty_type": "GIF", - "public_url_shared": false, - "size": 144538, - "thumb_160": "https://.../billair_=_160.png", - "thumb_360": "https://.../billair_360.png", - "thumb_360_gif": "https://.../billair_360.gif", - "thumb_360_h": 226, - "thumb_360_w": 176, - "thumb_64": "https://.../billair_64.png", - "thumb_80": "https://.../billair_80.png", - "timestamp": 1531763254, - "title": "billair.gif", - "url_private": "https://.../billair.gif", - "url_private_download": "https://.../billair.gif", - "user": "U061F7AUR", - "username": "" - }, - { - "channels": [ - "C0T8SE4AU" - ], - "comments_count": 0, - "created": 1531763342, - "deanimate_gif": "https://.../tedair_deanimate_gif.png", - "display_as_bot": false, - "editable": false, - "external_type": "", - "filetype": "gif", - "groups": [], - "id": "F0S43PZDF", - "image_exif_rotation": 1, - "ims": [], - "is_external": false, - "is_public": true, - "mimetype": "image/gif", - "mode": "hosted", - "name": "tedair.gif", - "original_h": 226, - "original_w": 176, - "permalink": "https://https://.../tedair.gif", - "permalink_public": "https://.../...", - "pjpeg": "https://.../tedair_pjpeg.jpg", - "pretty_type": "GIF", - "public_url_shared": false, - "size": 137531, - "thumb_160": "https://.../tedair_=_160.png", - "thumb_360": "https://.../tedair_360.png", - "thumb_360_gif": "https://.../tedair_360.gif", - "thumb_360_h": 226, - "thumb_360_w": 176, - "thumb_64": "https://.../tedair_64.png", - "thumb_80": "https://.../tedair_80.png", - "timestamp": 1531763342, - "title": "tedair.gif", - "url_private": "https://.../tedair.gif", - "url_private_download": "https://.../tedair.gif", - "user": "U061F7AUR", - "username": "" - } - ], - "ok": true, - "paging": { - "count": 100, - "page": 1, - "pages": 1, - "total": 2 - } + "channel": { + "id": "D069C7QFK" + }, + "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from files.list method", + "description": "Schema for successful response from conversations.open method when opening channels, ims, mpims", "properties": { - "files": { - "items": { - "$ref": "#/definitions/objs_file" - }, - "minItems": 0, - "type": "array", - "uniqueItems": true + "already_open": { + "type": "boolean" + }, + "channel": { + "items": [ + { + "$ref": "#/definitions/objs_conversation" + }, + { + "additionalProperties": false, + "properties": { + "created": { + "type": "string" + }, + "id": { + "$ref": "#/definitions/defs_dm_id" + }, + "is_im": { + "type": "boolean" + }, + "is_open": { + "type": "boolean" + }, + "last_read": { + "$ref": "#/definitions/defs_ts" + }, + "latest": { + "$ref": "#/definitions/objs_message" + }, + "unread_count": { + "type": "number" + }, + "unread_count_display": { + "type": "number" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + } + }, + "required": [ + "id" + ], + "type": "object" + } + ] + }, + "no_op": { + "type": "boolean" }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "paging": { - "$ref": "#/definitions/objs_paging" } }, "required": [ "ok", - "files", - "paging" + "channel" ], - "title": "files.list schema", + "title": "conversations.open success schema", "type": "object" } }, @@ -16789,23 +15366,31 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_auth", + "error": "channel_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from files.list method", + "description": "Schema for error response from conversations.open method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "method_not_supported_for_channel_type", "user_not_found", - "unknown_type", + "user_not_visible", + "user_disabled", + "users_list_not_supplied", + "not_enough_users", + "too_many_users", + "invalid_user_combination", "not_authed", "invalid_auth", "account_inactive", - "no_permission", - "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -16816,7 +15401,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "channel_not_found" ], "type": "string" }, @@ -16828,7 +15414,7 @@ "ok", "error" ], - "title": "files.list error schema", + "title": "conversations.open error schema", "type": "object" } } @@ -16836,67 +15422,47 @@ "security": [ { "slackAuth": [ - "files:read" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "files" + "conversations" ] } }, - "/files.remote.add": { + "/conversations.rename": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Adds a file from a remote service", + "description": "Renames a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.add" + "url": "https://api.slack.com/methods/conversations.rename" }, - "operationId": "files_remote_add", + "operationId": "conversations_rename", "parameters": [ { - "description": "Title of the file being shared.", - "in": "formData", - "name": "title", - "type": "string" - }, - { - "description": "type of file", - "in": "formData", - "name": "filetype", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `remote_files:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `conversations:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.", - "in": "formData", - "name": "indexable_file_contents", - "type": "string" - }, - { - "description": "Preview of the document via `multipart/form-data`.", - "in": "formData", - "name": "preview_image", - "type": "string" - }, - { - "description": "Creator defined GUID for the file.", + "description": "ID of conversation to rename", "in": "formData", - "name": "external_id", + "name": "channel", "type": "string" }, { - "description": "URL of the remote file.", + "description": "New name for conversation.", "in": "formData", - "name": "external_url", + "name": "name", "type": "string" } ], @@ -16908,44 +15474,129 @@ "description": "Typical success response", "examples": { "application/json": { + "channel": { + "created": 1449252889, + "creator": "W012A3BCD", + "id": "C012AB3CD", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": true, + "is_group": false, + "is_im": false, + "is_member": true, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_read_only": false, + "is_shared": false, + "last_read": "1502126650.228446", + "locale": "en-US", + "name": "general", + "name_normalized": "general", + "num_members": 23, + "pending_shared": [], + "previous_names": [ + "specifics", + "abstractions", + "etc" + ], + "purpose": { + "creator": "W012A3BCD", + "last_set": 1449709364, + "value": "This part of the workspace is for fun. Make fun here." + }, + "topic": { + "creator": "W012A3BCD", + "last_set": 1449709364, + "value": "For public discussion of generalities" + }, + "unlinked": 0 + }, "ok": true } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from conversations.rename method", "properties": { + "channel": { + "$ref": "#/definitions/objs_conversation" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "channel" ], - "title": "Default success template", + "title": "conversations.rename success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when the calling user is not a member of the conversation", "examples": { "application/json": { - "error": "invalid_auth", + "error": "not_in_channel", "ok": false } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from conversations.rename method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "user_is_restricted", + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "not_in_channel", + "not_authorized", + "invalid_name", + "name_taken", + "invalid_name_required", + "invalid_name_punctuation", + "invalid_name_maxlength", + "invalid_name_specials", + "not_authed", + "invalid_auth", + "account_inactive", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required" + ], + "type": "string" + }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "conversations.rename error schema", "type": "object" } } @@ -16953,156 +15604,76 @@ "security": [ { "slackAuth": [ - "remote_files:write" - ] - } + "channels:write", + "groups:write", + "im:write", + "mpim:write" + ] + } ], "tags": [ - "files.remote", - "files" + "conversations" ] } }, - "/files.remote.info": { + "/conversations.replies": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve information about a remote file added to Slack", + "description": "Retrieve a thread of messages posted to a conversation", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.info" + "url": "https://api.slack.com/methods/conversations.replies" }, - "operationId": "files_remote_info", + "operationId": "conversations_replies", "parameters": [ { - "description": "Authentication token. Requires scope: `remote_files:read`", + "description": "Authentication token. Requires scope: `conversations:history`", "in": "query", "name": "token", "type": "string" }, { - "description": "Creator defined GUID for the file.", - "in": "query", - "name": "external_id", - "type": "string" - }, - { - "description": "Specify a file by providing its ID.", + "description": "Conversation ID to fetch thread from.", "in": "query", - "name": "file", + "name": "channel", "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "remote_files:read" - ] - } - ], - "tags": [ - "files.remote", - "files" - ] - } - }, - "/files.remote.list": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Retrieve information about a remote file added to Slack", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.list" - }, - "operationId": "files_remote_list", - "parameters": [ { - "description": "Filter files created before this timestamp (inclusive).", + "description": "Unique identifier of a thread's parent message. `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.", "in": "query", - "name": "ts_to", + "name": "ts", "type": "number" }, { - "description": "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](/docs/pagination) for more detail.", + "description": "End of time range of messages to include in results.", "in": "query", - "name": "cursor", - "type": "string" + "name": "latest", + "type": "number" }, { - "description": "Filter files created after this timestamp (inclusive).", + "description": "Start of time range of messages to include in results.", "in": "query", - "name": "ts_from", + "name": "oldest", "type": "number" }, { - "description": "Authentication token. Requires scope: `remote_files:read`", + "description": "Include messages with latest or oldest timestamp in results only when either timestamp is specified.", "in": "query", - "name": "token", - "type": "string" + "name": "inclusive", + "type": "boolean" }, { - "description": "The maximum number of items to return.", + "description": "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.", "in": "query", "name": "limit", "type": "integer" }, { - "description": "Filter files appearing in a specific channel, indicated by its ID.", + "description": "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](/docs/pagination) for more detail.", "in": "query", - "name": "channel", + "name": "cursor", "type": "string" } ], @@ -17114,115 +15685,187 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" + "has_more": true, + "messages": [ + { + "last_read": "1484678597.521003", + "reply_count": 3, + "subscribed": true, + "text": "island", + "thread_ts": "1482960137.003543", + "ts": "1482960137.003543", + "type": "message", + "unread_count": 0, + "user": "U061F7AUR" + }, + { + "parent_user_id": "U061F7AUR", + "text": "one island", + "thread_ts": "1482960137.003543", + "ts": "1483037603.017503", + "type": "message", + "user": "U061F7AUR" + }, + { + "parent_user_id": "U061F7AUR", + "text": "two island", + "thread_ts": "1482960137.003543", + "ts": "1483051909.018632", + "type": "message", + "user": "U061F7AUR" + }, + { + "parent_user_id": "U061F7AUR", + "text": "three for the land", + "thread_ts": "1482960137.003543", + "ts": "1483125339.020269", + "type": "message", + "user": "U061F7AUR" + } + ], + "ok": true, + "response_metadata": { + "next_cursor": "bmV4dF90czoxNDg0Njc4MjkwNTE3MDkx" } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "remote_files:read" - ] - } - ], - "tags": [ - "files.remote", - "files" - ] - } - }, - "/files.remote.remove": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Remove a remote file.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.remove" - }, - "operationId": "files_remote_remove", - "parameters": [ - { - "description": "Authentication token. Requires scope: `remote_files:write`", - "in": "formData", - "name": "token", - "type": "string" - }, - { - "description": "Creator defined GUID for the file.", - "in": "formData", - "name": "external_id", - "type": "string" - }, - { - "description": "Specify a file by providing its ID.", - "in": "formData", - "name": "file", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from conversations.replies method", "properties": { + "has_more": { + "type": "boolean" + }, + "messages": { + "items": { + "items": [ + { + "additionalProperties": false, + "properties": { + "last_read": { + "$ref": "#/definitions/defs_ts" + }, + "latest_reply": { + "$ref": "#/definitions/defs_ts" + }, + "reply_count": { + "type": "integer" + }, + "reply_users": { + "items": { + "$ref": "#/definitions/defs_user_id" + }, + "type": "array", + "uniqueItems": true + }, + "reply_users_count": { + "type": "integer" + }, + "source_team": { + "$ref": "#/definitions/defs_team" + }, + "subscribed": { + "type": "boolean" + }, + "team": { + "$ref": "#/definitions/defs_team" + }, + "text": { + "type": "string" + }, + "thread_ts": { + "$ref": "#/definitions/defs_ts" + }, + "ts": { + "$ref": "#/definitions/defs_ts" + }, + "type": { + "type": "string" + }, + "unread_count": { + "type": "integer" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + }, + "user_profile": { + "$ref": "#/definitions/objs_user_profile_short" + }, + "user_team": { + "$ref": "#/definitions/defs_team" + } + }, + "required": [ + "type", + "user", + "text", + "thread_ts", + "reply_count", + "subscribed", + "ts" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "is_starred": { + "type": "boolean" + }, + "parent_user_id": { + "$ref": "#/definitions/defs_user_id" + }, + "source_team": { + "$ref": "#/definitions/defs_team" + }, + "team": { + "$ref": "#/definitions/defs_team" + }, + "text": { + "type": "string" + }, + "thread_ts": { + "$ref": "#/definitions/defs_ts" + }, + "ts": { + "$ref": "#/definitions/defs_ts" + }, + "type": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + }, + "user_profile": { + "$ref": "#/definitions/objs_user_profile_short" + }, + "user_team": { + "$ref": "#/definitions/defs_team" + } + }, + "required": [ + "type", + "user", + "text", + "thread_ts", + "parent_user_id", + "ts" + ], + "type": "object" + } + ] + }, + "type": "array" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "messages" ], - "title": "Default success template", + "title": "conversations.replies success schema", "type": "object" } }, @@ -17230,22 +15873,55 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_auth", + "error": "thread_not_found", "ok": false } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from conversations.replies method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "missing_scope", + "channel_not_found", + "thread_not_found", + "not_authed", + "invalid_auth", + "account_inactive", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required" + ], + "type": "string" + }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "conversations.replies error schema", "type": "object" } } @@ -17253,50 +15929,47 @@ "security": [ { "slackAuth": [ - "remote_files:write" + "channels:history", + "groups:history", + "im:history", + "mpim:history" ] } ], "tags": [ - "files.remote", - "files" + "conversations" ] } }, - "/files.remote.share": { - "get": { + "/conversations.setPurpose": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Share a remote file into a channel.", + "description": "Sets the purpose for a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.share" + "url": "https://api.slack.com/methods/conversations.setPurpose" }, - "operationId": "files_remote_share", + "operationId": "conversations_setPurpose", "parameters": [ { - "description": "Comma-separated list of channel IDs where the file will be shared.", - "in": "query", - "name": "channels", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `remote_files:share`", - "in": "query", + "description": "Authentication token. Requires scope: `conversations:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "Creator defined GUID for the file.", - "in": "query", - "name": "external_id", + "description": "Conversation to set the purpose of", + "in": "formData", + "name": "channel", "type": "string" }, { - "description": "Specify a file by providing its ID.", - "in": "query", - "name": "file", + "description": "A new, specialer purpose", + "in": "formData", + "name": "purpose", "type": "string" } ], @@ -17312,17 +15985,21 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from conversations.setPurpose method", "properties": { + "channel": { + "$ref": "#/definitions/objs_conversation" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "channel" ], - "title": "Default success template", + "title": "conversations.setPurpose success schema", "type": "object" } }, @@ -17335,92 +16012,102 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from conversations.setPurpose method", "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "not_in_channel", + "is_archived", + "too_long", + "user_is_restricted", + "not_authed", + "invalid_auth", + "account_inactive", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required" + ], + "type": "string" + }, + "needed": { + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" + } + }, + "required": [ + "ok", + "error" + ], + "title": "conversations.setPurpose error schema", + "type": "object" + } + } + }, + "security": [ + { "slackAuth": [ - "remote_files:share" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "files.remote", - "files" + "conversations" ] } }, - "/files.remote.update": { + "/conversations.setTopic": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Updates an existing remote file.", + "description": "Sets the topic for a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.update" + "url": "https://api.slack.com/methods/conversations.setTopic" }, - "operationId": "files_remote_update", + "operationId": "conversations_setTopic", "parameters": [ { - "description": "Title of the file being shared.", - "in": "formData", - "name": "title", - "type": "string" - }, - { - "description": "type of file", - "in": "formData", - "name": "filetype", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `remote_files:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `conversations:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "Specify a file by providing its ID.", - "in": "formData", - "name": "file", - "type": "string" - }, - { - "description": "File containing contents that can be used to improve searchability for the remote file.", - "in": "formData", - "name": "indexable_file_contents", - "type": "string" - }, - { - "description": "Preview of the document via `multipart/form-data`.", - "in": "formData", - "name": "preview_image", - "type": "string" - }, - { - "description": "Creator defined GUID for the file.", + "description": "Conversation to set the topic of", "in": "formData", - "name": "external_id", + "name": "channel", "type": "string" }, { - "description": "URL of the remote file.", + "description": "The new topic string. Does not support formatting or linkification.", "in": "formData", - "name": "external_url", + "name": "topic", "type": "string" } ], @@ -17436,17 +16123,21 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from conversations.setTopic method", "properties": { + "channel": { + "$ref": "#/definitions/objs_conversation" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "channel" ], - "title": "Default success template", + "title": "conversations.setTopic success schema", "type": "object" } }, @@ -17459,17 +16150,54 @@ } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from conversations.setTopic method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "not_in_channel", + "is_archived", + "too_long", + "user_is_restricted", + "not_authed", + "invalid_auth", + "account_inactive", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required" + ], + "type": "string" + }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "conversations.setTopic error schema", "type": "object" } } @@ -17477,39 +16205,41 @@ "security": [ { "slackAuth": [ - "remote_files:write" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "files.remote", - "files" + "conversations" ] } }, - "/files.revokePublicURL": { + "/conversations.unarchive": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Revokes public/external sharing access for a file", + "description": "Reverses conversation archival.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.revokePublicURL" + "url": "https://api.slack.com/methods/conversations.unarchive" }, - "operationId": "files_revokePublicURL", + "operationId": "conversations_unarchive", "parameters": [ { - "description": "Authentication token. Requires scope: `files:write:user`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", "type": "string" }, { - "description": "File to revoke", + "description": "ID of conversation to unarchive", "in": "formData", - "name": "file", + "name": "channel", "type": "string" } ], @@ -17526,20 +16256,16 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from files.revokePublicURL method", + "description": "Schema for successful response from conversations.unarchive method", "properties": { - "file": { - "$ref": "#/definitions/objs_file" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "file" + "ok" ], - "title": "files.revokePublicURL schema", + "title": "conversations.unarchive success schema", "type": "object" } }, @@ -17547,49 +16273,61 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_auth", + "error": "channel_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from files.revokePublicURL method", + "description": "Schema for error response from conversations.unarchive method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "file_not_found", + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "not_archived", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", "user_is_bot", "user_is_restricted", + "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "fatal_error" + "team_added_to_org", + "missing_charset", + "superfluous_charset" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "files.revokePublicURL error schema", + "title": "conversations.unarchive error schema", "type": "object" } } @@ -17597,47 +16335,59 @@ "security": [ { "slackAuth": [ - "files:write:user" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "files" + "conversations" ] } }, - "/files.sharedPublicURL": { - "post": { + "/dialog.open": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Enables a file for public/external sharing.", + "description": "Open a dialog with a user", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.sharedPublicURL" + "url": "https://api.slack.com/methods/dialog.open" }, - "operationId": "files_sharedPublicURL", + "operationId": "dialog_open", "parameters": [ { - "description": "Authentication token. Requires scope: `files:write:user`", + "description": "Authentication token. Requires scope: `none`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "File to share", - "in": "formData", - "name": "file", + "description": "The dialog definition. This must be a JSON-encoded string.", + "in": "query", + "name": "dialog", + "required": true, "type": "string" - } - ], - "produces": [ - "application/json" + }, + { + "description": "Exchange a trigger to post to the user.", + "in": "query", + "name": "trigger_id", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response is quite minimal.", "examples": { "application/json": { "ok": true @@ -17645,47 +16395,52 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from files.sharedPublicURL method", + "description": "Schema for successful response from dialog.open method", "properties": { - "file": { - "$ref": "#/definitions/objs_file" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "file" + "ok" ], - "title": "files.sharedPublicURL schema", + "title": "dialog.open schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response, before getting to any possible validation errors.", "examples": { "application/json": { - "error": "invalid_auth", + "error": "missing_trigger", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from files.sharedPublicURL method", + "description": "Schema for error response from dialog.open method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "file_not_found", - "not_allowed", + "validation_errors", + "missing_trigger", + "missing_dialog", + "trigger_exchanged", + "trigger_expired", + "invalid_trigger", + "app_missing_action_url", + "cannot_create_dialog", + "failed_sending_dialog", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", - "user_is_bot", - "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -17709,7 +16464,7 @@ "ok", "error" ], - "title": "files.sharedPublicURL error schema", + "title": "dialog.open error schema", "type": "object" } } @@ -17717,80 +16472,34 @@ "security": [ { "slackAuth": [ - "files:write:user" + "none" ] } ], "tags": [ - "files" + "dialog" ] } }, - "/files.upload": { + "/dnd.endDnd": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Uploads or creates a file.", + "description": "Ends the current user's Do Not Disturb session immediately.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.upload" + "url": "https://api.slack.com/methods/dnd.endDnd" }, - "operationId": "files_upload", + "operationId": "dnd_endDnd", "parameters": [ { - "description": "Comma-separated list of channel names or IDs where the file will be shared.", - "in": "formData", - "name": "channels", - "type": "string" - }, - { - "description": "Title of file.", - "in": "formData", - "name": "title", - "type": "string" - }, - { - "description": "The message text introducing the file in specified `channels`.", - "in": "formData", - "name": "initial_comment", - "type": "string" - }, - { - "description": "A [file type](/types/file#file_types) identifier.", - "in": "formData", - "name": "filetype", - "type": "string" - }, - { - "description": "Filename of file.", - "in": "formData", - "name": "filename", - "type": "string" - }, - { - "description": "File contents via a POST variable. If omitting this parameter, you must provide a `file`.", - "in": "formData", - "name": "content", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `files:write:user`", - "in": "formData", + "description": "Authentication token. Requires scope: `dnd:write`", + "in": "header", "name": "token", + "required": true, "type": "string" - }, - { - "description": "File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`.", - "in": "formData", - "name": "file", - "type": "string" - }, - { - "description": "Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead.", - "in": "formData", - "name": "thread_ts", - "type": "number" } ], "produces": [ @@ -17798,84 +16507,24 @@ ], "responses": { "200": { - "description": "Success response after uploading a file to a channel with an initial message", + "description": "Typical success response", "examples": { "application/json": { - "file": { - "channels": [], - "comments_count": 0, - "created": 1532293501, - "display_as_bot": false, - "editable": false, - "external_type": "", - "filetype": "gif", - "groups": [], - "has_rich_preview": false, - "id": "F0TD00400", - "image_exif_rotation": 1, - "ims": [ - "D0L4B9P0Q" - ], - "is_external": false, - "is_public": false, - "is_starred": false, - "mimetype": "image/jpeg", - "mode": "hosted", - "name": "dramacat.gif", - "original_h": 366, - "original_w": 526, - "permalink": "https://.../dramacat.gif", - "permalink_public": "https://.../More-Path-Components", - "pretty_type": "JPEG", - "public_url_shared": false, - "shares": { - "private": { - "D0L4B9P0Q": [ - { - "reply_count": 0, - "reply_users": [], - "reply_users_count": 0, - "ts": "1532293503.000001" - } - ] - } - }, - "size": 43518, - "thumb_160": "https://.../dramacat_160.gif", - "thumb_360": "https://.../dramacat_360.gif", - "thumb_360_h": 250, - "thumb_360_w": 360, - "thumb_480": "https://.../dramacat_480.gif", - "thumb_480_h": 334, - "thumb_480_w": 480, - "thumb_64": "https://.../dramacat_64.gif", - "thumb_80": "https://.../dramacat_80.gif", - "timestamp": 1532293501, - "title": "dramacat", - "url_private": "https://.../dramacat.gif", - "url_private_download": "https://.../dramacat.gif", - "user": "U0L4B9NSU", - "username": "" - }, "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response files.upload method", + "description": "Schema for successful response from dnd.endDnd method", "properties": { - "file": { - "$ref": "#/definitions/objs_file" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "file" + "ok" ], - "title": "files.upload schema", + "title": "dnd.endDnd schema", "type": "object" } }, @@ -17889,19 +16538,22 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response files.upload method", + "description": "Schema for error response from dnd.endDnd method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "posting_to_general_channel_denied", - "invalid_channel", - "file_uploads_disabled", - "file_uploads_except_images_disabled", - "storage_limit_reached", + "unknown_error", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", "no_permission", + "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -17912,7 +16564,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -17924,7 +16577,7 @@ "ok", "error" ], - "title": "files.upload error schema", + "title": "dnd.endDnd error schema", "type": "object" } } @@ -17932,38 +16585,33 @@ "security": [ { "slackAuth": [ - "files:write:user" + "dnd:write" ] } ], "tags": [ - "files" + "dnd" ] } }, - "/groups.archive": { + "/dnd.endSnooze": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Archives a private channel.", + "description": "Ends the current user's snooze mode immediately.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.archive" + "url": "https://api.slack.com/methods/dnd.endSnooze" }, - "operationId": "groups_archive", + "operationId": "dnd_endSnooze", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `dnd:write`", "in": "header", "name": "token", - "type": "string" - }, - { - "description": "Private channel to archive", - "in": "formData", - "name": "channel", + "required": true, "type": "string" } ], @@ -17980,16 +16628,32 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.archive method", + "description": "Schema for successful response from dnd.endSnooze method", "properties": { + "dnd_enabled": { + "type": "boolean" + }, + "next_dnd_end_ts": { + "type": "integer" + }, + "next_dnd_start_ts": { + "type": "integer" + }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "snooze_enabled": { + "type": "boolean" } }, "required": [ - "ok" + "ok", + "dnd_enabled", + "next_dnd_start_ts", + "next_dnd_end_ts", + "snooze_enabled" ], - "title": "groups.archive schema", + "title": "dnd.endSnooze schema", "type": "object" } }, @@ -18003,14 +16667,16 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.archive method", + "description": "Schema for error response from dnd.endSnooze method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "already_archived", - "group_contains_others", - "restricted_action", + "snooze_not_active", + "snooze_end_failed", "not_authed", "invalid_auth", "account_inactive", @@ -18018,7 +16684,6 @@ "no_permission", "org_login_required", "user_is_bot", - "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -18042,7 +16707,7 @@ "ok", "error" ], - "title": "groups.archive error schema", + "title": "dnd.endSnooze error schema", "type": "object" } } @@ -18050,44 +16715,37 @@ "security": [ { "slackAuth": [ - "groups:write" + "dnd:write" ] } ], "tags": [ - "groups" + "dnd" ] } }, - "/groups.create": { - "post": { + "/dnd.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Creates a private channel.", + "description": "Retrieves a user's current Do Not Disturb status.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.create" + "url": "https://api.slack.com/methods/dnd.info" }, - "operationId": "groups_create", + "operationId": "dnd_info", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", - "in": "formData", - "name": "validate", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", + "description": "Authentication token. Requires scope: `dnd:read`", + "in": "query", "name": "token", "type": "string" }, { - "description": "Name of private channel to create", - "in": "formData", - "name": "name", + "description": "User to fetch status for (defaults to current user)", + "in": "query", + "name": "user", "type": "string" } ], @@ -18104,20 +16762,37 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response groups.create method", + "description": "Schema for successful response from dnd.info method", "properties": { - "group": { - "$ref": "#/definitions/objs_group" + "dnd_enabled": { + "type": "boolean" + }, + "next_dnd_end_ts": { + "type": "integer" + }, + "next_dnd_start_ts": { + "type": "integer" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "snooze_enabled": { + "type": "boolean" + }, + "snooze_endtime": { + "type": "integer" + }, + "snooze_remaining": { + "type": "integer" } }, "required": [ "ok", - "group" + "dnd_enabled", + "next_dnd_start_ts", + "next_dnd_end_ts" ], - "title": "groups.create success schema", + "title": "dnd.info schema", "type": "object" } }, @@ -18131,23 +16806,21 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response groups.create method", + "description": "Schema for error response from dnd.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "no_channel", - "restricted_action", - "name_taken", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "invalid_name", + "user_not_found", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_ultra_restricted", + "token_revoked", + "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -18158,7 +16831,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -18170,7 +16844,7 @@ "ok", "error" ], - "title": "groups.create error schema", + "title": "dnd.info error schema", "type": "object" } } @@ -18178,37 +16852,39 @@ "security": [ { "slackAuth": [ - "groups:write" + "dnd:read" ] } ], "tags": [ - "groups" + "dnd" ] } }, - "/groups.createChild": { + "/dnd.setSnooze": { "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Clones and archives a private channel.", + "description": "Turns on Do Not Disturb mode for the current user, or changes its duration.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.createChild" + "url": "https://api.slack.com/methods/dnd.setSnooze" }, - "operationId": "groups_createChild", + "operationId": "dnd_setSnooze", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `dnd:write`", "in": "formData", "name": "token", + "required": true, "type": "string" }, { - "description": "Private channel to clone and archive.", + "description": "Number of minutes, from now, to snooze until.", "in": "formData", - "name": "channel", + "name": "num_minutes", + "required": true, "type": "string" } ], @@ -18225,20 +16901,28 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.createChild method", + "description": "Schema for successful response from dnd.setSnooze method", "properties": { - "group": { - "$ref": "#/definitions/objs_group" - }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "snooze_enabled": { + "type": "boolean" + }, + "snooze_endtime": { + "type": "integer" + }, + "snooze_remaining": { + "type": "integer" } }, "required": [ "ok", - "group" + "snooze_enabled", + "snooze_endtime", + "snooze_remaining" ], - "title": "groups.createChild schema", + "title": "dnd.setSnooze schema", "type": "object" } }, @@ -18252,13 +16936,16 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.createChild method", + "description": "Schema for error response from dnd.setSnooze method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "already_archived", - "restricted_action", + "missing_duration", + "snooze_failed", "not_authed", "invalid_auth", "account_inactive", @@ -18266,7 +16953,6 @@ "no_permission", "org_login_required", "user_is_bot", - "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -18278,6 +16964,7 @@ "json_not_object", "request_timeout", "upgrade_required", + "too_long", "fatal_error" ], "type": "string" @@ -18290,7 +16977,7 @@ "ok", "error" ], - "title": "groups.createChild error schema", + "title": "dnd.setSnooze error schema", "type": "object" } } @@ -18298,68 +16985,38 @@ "security": [ { "slackAuth": [ - "groups:write" + "dnd:write" ] } ], "tags": [ - "groups" + "dnd" ] } }, - "/groups.history": { + "/dnd.teamInfo": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Fetches history of messages and events from a private channel.", + "description": "Retrieves the Do Not Disturb status for up to 50 users on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.history" + "url": "https://api.slack.com/methods/dnd.teamInfo" }, - "operationId": "groups_history", + "operationId": "dnd_teamInfo", "parameters": [ { - "description": "Number of messages to return, between 1 and 1000.", - "in": "query", - "name": "count", - "type": "integer" - }, - { - "description": "Include `unread_count_display` in the output?", - "in": "query", - "name": "unreads", - "type": "boolean" - }, - { - "description": "Include messages with latest or oldest timestamp in results.", - "in": "query", - "name": "inclusive", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `groups:history`", + "description": "Authentication token. Requires scope: `dnd:read`", "in": "query", "name": "token", "type": "string" }, { - "description": "Start of time range of messages to include in results.", - "in": "query", - "name": "oldest", - "type": "number" - }, - { - "description": "Private channel to fetch history for.", + "description": "Comma-separated list of users to fetch Do Not Disturb status for", "in": "query", - "name": "channel", + "name": "users", "type": "string" - }, - { - "description": "End of time range of messages to include in results.", - "in": "query", - "name": "latest", - "type": "number" } ], "produces": [ @@ -18370,70 +17027,33 @@ "description": "Typical success response", "examples": { "application/json": { - "has_more": false, - "latest": "1358547726.000003", - "messages": [ - { - "text": "Hello", - "ts": "1358546515.000008", - "type": "message", - "user": "U2147483896" - }, - { - "is_starred": true, - "text": "World", - "ts": "1358546515.000007", - "type": "message", - "user": "U2147483896" + "ok": true, + "users": { + "U023BECGF": { + "dnd_enabled": true, + "next_dnd_end_ts": 1450423800, + "next_dnd_start_ts": 1450387800 }, - { - "ts": "1358546515.000007", - "type": "something_else" + "W058CJVAA": { + "dnd_enabled": false, + "next_dnd_end_ts": 1, + "next_dnd_start_ts": 1 } - ], - "ok": true + } } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response groups.history method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages", - "has_more", - "channel_actions_ts", - "channel_actions_count" + "ok" ], - "title": "groups.history success schema", + "title": "Default success template", "type": "object" } }, @@ -18441,48 +17061,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response groups.history method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "ekm_access_denied", - "missing_scope", - "invalid_arguments", - "invalid_arg_name", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "request_timeout", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.history error schema", + "title": "Default error template", "type": "object" } } @@ -18490,43 +17084,32 @@ "security": [ { "slackAuth": [ - "groups:history" + "dnd:read" ] } ], "tags": [ - "groups" + "dnd" ] } }, - "/groups.info": { + "/emoji.list": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Gets information about a private channel.", + "description": "Lists custom emoji for a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.info" + "url": "https://api.slack.com/methods/emoji.list" }, - "operationId": "groups_info", + "operationId": "emoji_list", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:read`", + "description": "Authentication token. Requires scope: `emoji:read`", "in": "query", "name": "token", - "type": "string" - }, - { - "description": "Set this to `true` to receive the locale for this group. Defaults to `false`", - "in": "query", - "name": "include_locale", - "type": "boolean" - }, - { - "description": "Private channel to get info on", - "in": "query", - "name": "channel", + "required": true, "type": "string" } ], @@ -18542,21 +17125,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response groups.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "group": { - "$ref": "#/definitions/objs_group" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "group" + "ok" ], - "title": "groups.info success schema", + "title": "Default success template", "type": "object" } }, @@ -18569,39 +17148,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response groups.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "invalid_for_external_shared_channel" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.info error schema", + "title": "Default error template", "type": "object" } } @@ -18609,44 +17166,44 @@ "security": [ { "slackAuth": [ - "groups:read" + "emoji:read" ] } ], "tags": [ - "groups" + "emoji" ] } }, - "/groups.invite": { + "/files.comments.delete": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Invites a user to a private channel.", + "description": "Deletes an existing comment on a file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.invite" + "url": "https://api.slack.com/methods/files.comments.delete" }, - "operationId": "groups_invite", + "operationId": "files_comments_delete", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `files:write:user`", "in": "header", "name": "token", "type": "string" }, { - "description": "User to invite.", + "description": "File to delete a comment from.", "in": "formData", - "name": "user", + "name": "file", "type": "string" }, { - "description": "Private channel to invite user to.", + "description": "The comment to delete.", "in": "formData", - "name": "channel", + "name": "id", "type": "string" } ], @@ -18655,7 +17212,7 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Standard success response is very simple", "examples": { "application/json": { "ok": true @@ -18663,55 +17220,49 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response groups.invite method", + "description": "Schema for successful response files.comments.delete method", "properties": { - "group": { - "$ref": "#/definitions/objs_group" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "group" + "ok" ], - "title": "groups.invite success schema", + "title": "files.comments.delete schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Standard failure response when used with an invalid token", "examples": { "application/json": { - "error": "invalid_auth", + "error": "file_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response groups.invite method", + "description": "Schema for error response files.comments.delete method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "user_not_found", - "cant_invite_self", - "is_archived", - "cant_invite", - "ura_max_channels", + "cant_delete", + "comment_not_found", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_ultra_restricted", + "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", @@ -18727,7 +17278,7 @@ "ok", "error" ], - "title": "groups.invite error schema", + "title": "files.comments.delete error schema", "type": "object" } } @@ -18735,47 +17286,39 @@ "security": [ { "slackAuth": [ - "groups:write" + "files:write:user" ] } ], "tags": [ - "groups" + "files.comments", + "files" ] } }, - "/groups.kick": { + "/files.delete": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Removes a user from a private channel.", + "description": "Deletes a file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.kick" + "url": "https://api.slack.com/methods/files.delete" }, - "operationId": "groups_kick", + "operationId": "files_delete", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `files:write:user`", "in": "header", "name": "token", - "required": true, - "type": "string" - }, - { - "description": "User to remove from private channel.", - "in": "formData", - "name": "user", - "required": true, "type": "string" }, { - "description": "Private channel to remove user from.", + "description": "ID of file to delete.", "in": "formData", - "name": "channel", - "required": true, + "name": "file", "type": "string" } ], @@ -18792,7 +17335,7 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.kick method", + "description": "Schema for successful response files.delete method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -18801,7 +17344,7 @@ "required": [ "ok" ], - "title": "groups.kick schema", + "title": "files.delete schema", "type": "object" } }, @@ -18815,23 +17358,21 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.kick method", + "description": "Schema for error response files.delete method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "user_not_found", - "cant_kick_self", - "not_in_group", - "restricted_action", + "file_not_found", + "file_deleted", + "cant_delete_file", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -18842,8 +17383,7 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, @@ -18855,7 +17395,7 @@ "ok", "error" ], - "title": "groups.kick error schema", + "title": "files.delete error schema", "type": "object" } } @@ -18863,40 +17403,59 @@ "security": [ { "slackAuth": [ - "groups:write" + "files:write:user" ] } ], "tags": [ - "groups" + "files" ] } }, - "/groups.leave": { - "post": { + "/files.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Leaves a private channel.", + "description": "Gets information about a file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.leave" + "url": "https://api.slack.com/methods/files.info" }, - "operationId": "groups_leave", + "operationId": "files_info", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", + "description": "Authentication token. Requires scope: `files:read`", + "in": "query", "name": "token", - "required": true, "type": "string" }, { - "description": "Private channel to leave", - "in": "formData", - "name": "channel", - "required": true, + "description": "Specify a file by providing its ID.", + "in": "query", + "name": "file", + "type": "string" + }, + { + "in": "query", + "name": "count", + "type": "string" + }, + { + "in": "query", + "name": "page", + "type": "string" + }, + { + "description": "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.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more details.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -18908,21 +17467,107 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "comments": [], + "file": { + "channels": [ + "C0T8SE4AU" + ], + "comments_count": 0, + "created": 1531763342, + "deanimate_gif": "https://.../tedair_deanimate_gif.png", + "display_as_bot": false, + "editable": false, + "external_type": "", + "filetype": "gif", + "groups": [], + "has_rich_preview": false, + "id": "F0S43PZDF", + "image_exif_rotation": 1, + "ims": [], + "is_external": false, + "is_public": true, + "is_starred": false, + "mimetype": "image/gif", + "mode": "hosted", + "name": "tedair.gif", + "original_h": 226, + "original_w": 176, + "permalink": "https://.../tedair.gif", + "permalink_public": "https://.../...", + "pjpeg": "https://.../tedair_pjpeg.jpg", + "pretty_type": "GIF", + "public_url_shared": false, + "shares": { + "public": { + "C0T8SE4AU": [ + { + "channel_name": "file-under", + "latest_reply": "1531763348.000001", + "reply_count": 1, + "reply_users": [ + "U061F7AUR" + ], + "reply_users_count": 1, + "team_id": "T061EG9R6", + "thread_ts": "1531763273.000015", + "ts": "1531763348.000001" + } + ] + } + }, + "size": 137531, + "thumb_160": "https://.../tedair_=_160.png", + "thumb_360": "https://.../tedair_360.png", + "thumb_360_gif": "https://.../tedair_360.gif", + "thumb_360_h": 226, + "thumb_360_w": 176, + "thumb_64": "https://.../tedair_64.png", + "thumb_80": "https://.../tedair_80.png", + "timestamp": 1531763342, + "title": "tedair.gif", + "url_private": "https://.../tedair.gif", + "url_private_download": "https://.../tedair.gif", + "user": "U061F7AUR", + "username": "" + }, + "ok": true, + "response_metadata": { + "next_cursor": "dGVhbTpDMUg5UkVTR0w=" + } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.leave method", + "description": "Schema for successful response from files.info method", "properties": { + "comments": { + "$ref": "#/definitions/objs_comments" + }, + "content_html": { + "type": "null" + }, + "editor": { + "$ref": "#/definitions/defs_user_id" + }, + "file": { + "$ref": "#/definitions/objs_file" + }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "paging": { + "$ref": "#/definitions/objs_paging" + }, + "response_metadata": { + "$ref": "#/definitions/objs_response_metadata" } }, "required": [ - "ok" + "ok", + "file", + "comments" ], - "title": "groups.leave schema", + "title": "files.info schema", "type": "object" } }, @@ -18936,20 +17581,21 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.leave method", + "description": "Schema for error response from files.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "is_archived", + "file_not_found", + "file_deleted", + "timezone_count_failed", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", - "user_is_bot", - "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -18960,8 +17606,7 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, @@ -18973,7 +17618,7 @@ "ok", "error" ], - "title": "groups.leave error schema", + "title": "files.info error schema", "type": "object" } } @@ -18981,55 +17626,77 @@ "security": [ { "slackAuth": [ - "groups:write" + "files:read" ] } ], "tags": [ - "groups" + "files" ] } }, - "/groups.list": { + "/files.list": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Lists private channels that the calling user has access to.", + "description": "List for a team, in a channel, or from a user with applied filters.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.list" + "url": "https://api.slack.com/methods/files.list" }, - "operationId": "groups_list", + "operationId": "files_list", "parameters": [ { - "description": "Exclude the `members` from each `group`", + "description": "Authentication token. Requires scope: `files:read`", "in": "query", - "name": "exclude_members", - "type": "boolean" + "name": "token", + "type": "string" }, { - "description": "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](/docs/pagination) for more details.", + "description": "Filter files created by a single user.", "in": "query", - "name": "cursor", + "name": "user", "type": "string" }, { - "description": "Authentication token. Requires scope: `groups:read`", + "description": "Filter files appearing in a specific channel, indicated by its ID.", "in": "query", - "name": "token", + "name": "channel", "type": "string" }, { - "description": "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.", + "description": "Filter files created after this timestamp (inclusive).", "in": "query", - "name": "limit", - "type": "integer" + "name": "ts_from", + "type": "number" }, { - "description": "Don't return archived private channels.", + "description": "Filter files created before this timestamp (inclusive).", "in": "query", - "name": "exclude_archived", + "name": "ts_to", + "type": "number" + }, + { + "description": "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.", + "in": "query", + "name": "types", + "type": "string" + }, + { + "in": "query", + "name": "count", + "type": "string" + }, + { + "in": "query", + "name": "page", + "type": "string" + }, + { + "description": "Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.", + "in": "query", + "name": "show_files_hidden_by_limit", "type": "boolean" } ], @@ -19041,33 +17708,126 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "files": [ + { + "channels": [ + "C0T8SE4AU" + ], + "comments_count": 0, + "created": 1531763254, + "deanimate_gif": "https://.../billair_deanimate_gif.png", + "display_as_bot": false, + "editable": false, + "external_type": "", + "filetype": "gif", + "groups": [], + "id": "F0S43P1CZ", + "image_exif_rotation": 1, + "ims": [], + "is_external": false, + "is_public": true, + "mimetype": "image/gif", + "mode": "hosted", + "name": "billair.gif", + "original_h": 226, + "original_w": 176, + "permalink": "https://.../billair.gif", + "permalink_public": "https://.../...", + "pjpeg": "https://.../billair_pjpeg.jpg", + "pretty_type": "GIF", + "public_url_shared": false, + "size": 144538, + "thumb_160": "https://.../billair_=_160.png", + "thumb_360": "https://.../billair_360.png", + "thumb_360_gif": "https://.../billair_360.gif", + "thumb_360_h": 226, + "thumb_360_w": 176, + "thumb_64": "https://.../billair_64.png", + "thumb_80": "https://.../billair_80.png", + "timestamp": 1531763254, + "title": "billair.gif", + "url_private": "https://.../billair.gif", + "url_private_download": "https://.../billair.gif", + "user": "U061F7AUR", + "username": "" + }, + { + "channels": [ + "C0T8SE4AU" + ], + "comments_count": 0, + "created": 1531763342, + "deanimate_gif": "https://.../tedair_deanimate_gif.png", + "display_as_bot": false, + "editable": false, + "external_type": "", + "filetype": "gif", + "groups": [], + "id": "F0S43PZDF", + "image_exif_rotation": 1, + "ims": [], + "is_external": false, + "is_public": true, + "mimetype": "image/gif", + "mode": "hosted", + "name": "tedair.gif", + "original_h": 226, + "original_w": 176, + "permalink": "https://.../tedair.gif", + "permalink_public": "https://.../...", + "pjpeg": "https://.../tedair_pjpeg.jpg", + "pretty_type": "GIF", + "public_url_shared": false, + "size": 137531, + "thumb_160": "https://.../tedair_=_160.png", + "thumb_360": "https://.../tedair_360.png", + "thumb_360_gif": "https://.../tedair_360.gif", + "thumb_360_h": 226, + "thumb_360_w": 176, + "thumb_64": "https://.../tedair_64.png", + "thumb_80": "https://.../tedair_80.png", + "timestamp": 1531763342, + "title": "tedair.gif", + "url_private": "https://.../tedair.gif", + "url_private_download": "https://.../tedair.gif", + "user": "U061F7AUR", + "username": "" + } + ], + "ok": true, + "paging": { + "count": 100, + "page": 1, + "pages": 1, + "total": 2 + } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response groups.list method", + "description": "Schema for successful response from files.list method", "properties": { - "groups": { + "files": { "items": { - "$ref": "#/definitions/objs_group" + "$ref": "#/definitions/objs_file" }, - "minItems": 1, + "minItems": 0, "type": "array", "uniqueItems": true }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" + "paging": { + "$ref": "#/definitions/objs_paging" } }, "required": [ "ok", - "groups" + "files", + "paging" ], - "title": "groups.list success schema", + "title": "files.list schema", "type": "object" } }, @@ -19081,19 +17841,28 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response groups.list method", + "description": "Schema for error response from files.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "user_not_found", + "unknown_type", "not_authed", "invalid_auth", "account_inactive", + "no_permission", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", @@ -19109,7 +17878,7 @@ "ok", "error" ], - "title": "groups.list error schema", + "title": "files.list error schema", "type": "object" } } @@ -19117,44 +17886,67 @@ "security": [ { "slackAuth": [ - "groups:read" + "files:read" ] } ], "tags": [ - "groups" + "files" ] } }, - "/groups.mark": { + "/files.remote.add": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the read cursor in a private channel.", + "description": "Adds a file from a remote service", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.mark" + "url": "https://api.slack.com/methods/files.remote.add" }, - "operationId": "groups_mark", + "operationId": "files_remote_add", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", + "description": "Authentication token. Requires scope: `remote_files:write`", + "in": "formData", "name": "token", "type": "string" }, { - "description": "Timestamp of the most recently seen message.", + "description": "Creator defined GUID for the file.", "in": "formData", - "name": "ts", - "type": "number" + "name": "external_id", + "type": "string" }, { - "description": "Private channel to set reading cursor in.", + "description": "Title of the file being shared.", "in": "formData", - "name": "channel", + "name": "title", + "type": "string" + }, + { + "description": "type of file", + "in": "formData", + "name": "filetype", + "type": "string" + }, + { + "description": "URL of the remote file.", + "in": "formData", + "name": "external_url", + "type": "string" + }, + { + "description": "Preview of the document via `multipart/form-data`.", + "in": "formData", + "name": "preview_image", + "type": "string" + }, + { + "description": "A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.", + "in": "formData", + "name": "indexable_file_contents", "type": "string" } ], @@ -19170,8 +17962,8 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from groups.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -19180,7 +17972,7 @@ "required": [ "ok" ], - "title": "groups.mark success schema", + "title": "Default success template", "type": "object" } }, @@ -19193,38 +17985,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from groups.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "invalid_timestamp", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.mark error schema", + "title": "Default error template", "type": "object" } } @@ -19232,38 +18003,44 @@ "security": [ { "slackAuth": [ - "groups:write" + "remote_files:write" ] } ], "tags": [ - "groups" + "files.remote", + "files" ] } }, - "/groups.open": { - "post": { + "/files.remote.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Opens a private channel.", + "description": "Retrieve information about a remote file added to Slack", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.open" + "url": "https://api.slack.com/methods/files.remote.info" }, - "operationId": "groups_open", + "operationId": "files_remote_info", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", + "description": "Authentication token. Requires scope: `remote_files:read`", + "in": "query", "name": "token", "type": "string" }, { - "description": "Private channel to open.", - "in": "formData", - "name": "channel", + "description": "Specify a file by providing its ID.", + "in": "query", + "name": "file", + "type": "string" + }, + { + "description": "Creator defined GUID for the file.", + "in": "query", + "name": "external_id", "type": "string" } ], @@ -19279,8 +18056,8 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from groups.open method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -19289,7 +18066,7 @@ "required": [ "ok" ], - "title": "groups.open schema", + "title": "Default success template", "type": "object" } }, @@ -19302,42 +18079,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from groups.open method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.open error schema", + "title": "Default error template", "type": "object" } } @@ -19345,50 +18097,62 @@ "security": [ { "slackAuth": [ - "groups:write" + "remote_files:read" ] } ], "tags": [ - "groups" + "files.remote", + "files" ] } }, - "/groups.rename": { - "post": { + "/files.remote.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Renames a private channel.", + "description": "Retrieve information about a remote file added to Slack", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.rename" + "url": "https://api.slack.com/methods/files.remote.list" }, - "operationId": "groups_rename", + "operationId": "files_remote_list", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", - "in": "formData", - "name": "validate", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", + "description": "Authentication token. Requires scope: `remote_files:read`", + "in": "query", "name": "token", "type": "string" }, { - "description": "New name for private channel.", - "in": "formData", - "name": "name", + "description": "Filter files appearing in a specific channel, indicated by its ID.", + "in": "query", + "name": "channel", "type": "string" }, { - "description": "Private channel to rename", - "in": "formData", - "name": "channel", + "description": "Filter files created after this timestamp (inclusive).", + "in": "query", + "name": "ts_from", + "type": "number" + }, + { + "description": "Filter files created before this timestamp (inclusive).", + "in": "query", + "name": "ts_to", + "type": "number" + }, + { + "description": "The maximum number of items to return.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -19404,21 +18168,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from groups.rename method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/objs_group" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "groups.rename schema", + "title": "Default success template", "type": "object" } }, @@ -19431,50 +18191,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from groups.rename method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "invalid_name", - "name_taken", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.rename error schema", + "title": "Default error template", "type": "object" } } @@ -19482,43 +18209,44 @@ "security": [ { "slackAuth": [ - "groups:write" + "remote_files:read" ] } ], "tags": [ - "groups" + "files.remote", + "files" ] } }, - "/groups.replies": { - "get": { + "/files.remote.remove": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve a thread of messages posted to a private channel", + "description": "Remove a remote file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.replies" + "url": "https://api.slack.com/methods/files.remote.remove" }, - "operationId": "groups_replies", + "operationId": "files_remote_remove", "parameters": [ { - "description": "Unique identifier of a thread's parent message", - "in": "query", - "name": "thread_ts", - "type": "number" + "description": "Authentication token. Requires scope: `remote_files:write`", + "in": "formData", + "name": "token", + "type": "string" }, { - "description": "Authentication token. Requires scope: `groups:history`", - "in": "query", - "name": "token", + "description": "Specify a file by providing its ID.", + "in": "formData", + "name": "file", "type": "string" }, { - "description": "Private channel to fetch thread from", - "in": "query", - "name": "channel", + "description": "Creator defined GUID for the file.", + "in": "formData", + "name": "external_id", "type": "string" } ], @@ -19530,52 +18258,21 @@ "description": "Typical success response", "examples": { "application/json": { - "messages": [ - { - "text": "Hello", - "ts": "1358546515.000008", - "type": "message", - "user": "U2147483896" - }, - { - "is_starred": true, - "text": "World", - "ts": "1358546515.000007", - "type": "message", - "user": "U2147483896" - }, - { - "ts": "1358546515.000007", - "type": "something_else" - } - ], "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from groups.replies method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages" + "ok" ], - "title": "groups.replies schema", + "title": "Default success template", "type": "object" } }, @@ -19583,49 +18280,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from groups.replies method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "thread_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.replies error schema", + "title": "Default error template", "type": "object" } } @@ -19633,44 +18303,50 @@ "security": [ { "slackAuth": [ - "groups:history" + "remote_files:write" ] } ], "tags": [ - "groups" + "files.remote", + "files" ] } }, - "/groups.setPurpose": { - "post": { + "/files.remote.share": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the purpose for a private channel.", + "description": "Share a remote file into a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.setPurpose" + "url": "https://api.slack.com/methods/files.remote.share" }, - "operationId": "groups_setPurpose", + "operationId": "files_remote_share", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", + "description": "Authentication token. Requires scope: `remote_files:share`", + "in": "query", "name": "token", "type": "string" }, { - "description": "The new purpose", - "in": "formData", - "name": "purpose", + "description": "Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.", + "in": "query", + "name": "file", "type": "string" }, { - "description": "Private channel to set the purpose of", - "in": "formData", - "name": "channel", + "description": "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.", + "in": "query", + "name": "external_id", + "type": "string" + }, + { + "description": "Comma-separated list of channel IDs where the file will be shared.", + "in": "query", + "name": "channels", "type": "string" } ], @@ -19686,21 +18362,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from groups.setPurpose method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "purpose": { - "type": "string" } }, "required": [ - "ok", - "purpose" + "ok" ], - "title": "groups.setPurpose schema", + "title": "Default success template", "type": "object" } }, @@ -19713,45 +18385,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from groups.setPurpose method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "is_archived", - "too_long", - "user_is_restricted", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.setPurpose error schema", + "title": "Default error template", "type": "object" } } @@ -19759,44 +18403,74 @@ "security": [ { "slackAuth": [ - "groups:write" + "remote_files:share" ] } ], "tags": [ - "groups" + "files.remote", + "files" ] } }, - "/groups.setTopic": { + "/files.remote.update": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the topic for a private channel.", + "description": "Updates an existing remote file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.setTopic" + "url": "https://api.slack.com/methods/files.remote.update" }, - "operationId": "groups_setTopic", + "operationId": "files_remote_update", "parameters": [ { - "description": "The new topic", + "description": "Authentication token. Requires scope: `remote_files:write`", "in": "formData", - "name": "topic", + "name": "token", "type": "string" }, { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", - "name": "token", + "description": "Specify a file by providing its ID.", + "in": "formData", + "name": "file", "type": "string" }, { - "description": "Private channel to set the topic of", + "description": "Creator defined GUID for the file.", "in": "formData", - "name": "channel", + "name": "external_id", + "type": "string" + }, + { + "description": "Title of the file being shared.", + "in": "formData", + "name": "title", + "type": "string" + }, + { + "description": "type of file", + "in": "formData", + "name": "filetype", + "type": "string" + }, + { + "description": "URL of the remote file.", + "in": "formData", + "name": "external_url", + "type": "string" + }, + { + "description": "Preview of the document via `multipart/form-data`.", + "in": "formData", + "name": "preview_image", + "type": "string" + }, + { + "description": "File containing contents that can be used to improve searchability for the remote file.", + "in": "formData", + "name": "indexable_file_contents", "type": "string" } ], @@ -19812,21 +18486,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from groups.setTopic method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "topic": { - "type": "string" } }, "required": [ - "ok", - "topic" + "ok" ], - "title": "groups.setTopic schema", + "title": "Default success template", "type": "object" } }, @@ -19839,45 +18509,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from groups.setTopic method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "is_archived", - "too_long", - "user_is_restricted", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.setTopic error schema", + "title": "Default error template", "type": "object" } } @@ -19885,38 +18527,39 @@ "security": [ { "slackAuth": [ - "groups:write" + "remote_files:write" ] } ], "tags": [ - "groups" + "files.remote", + "files" ] } }, - "/groups.unarchive": { + "/files.revokePublicURL": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Unarchives a private channel.", + "description": "Revokes public/external sharing access for a file", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.unarchive" + "url": "https://api.slack.com/methods/files.revokePublicURL" }, - "operationId": "groups_unarchive", + "operationId": "files_revokePublicURL", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `files:write:user`", "in": "header", "name": "token", "type": "string" }, { - "description": "Private channel to unarchive", + "description": "File to revoke", "in": "formData", - "name": "channel", + "name": "file", "type": "string" } ], @@ -19933,16 +18576,20 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.unarchive method", + "description": "Schema for successful response from files.revokePublicURL method", "properties": { + "file": { + "$ref": "#/definitions/objs_file" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "file" ], - "title": "groups.unarchive schema", + "title": "files.revokePublicURL schema", "type": "object" } }, @@ -19956,12 +18603,15 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.unarchive method", + "description": "Schema for error response from files.revokePublicURL method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_archived", + "file_not_found", "not_authed", "invalid_auth", "account_inactive", @@ -19993,7 +18643,7 @@ "ok", "error" ], - "title": "groups.unarchive error schema", + "title": "files.revokePublicURL error schema", "type": "object" } } @@ -20001,40 +18651,38 @@ "security": [ { "slackAuth": [ - "groups:write" + "files:write:user" ] } ], "tags": [ - "groups" + "files" ] } }, - "/im.close": { + "/files.sharedPublicURL": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Close a direct message channel.", + "description": "Enables a file for public/external sharing.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.close" + "url": "https://api.slack.com/methods/files.sharedPublicURL" }, - "operationId": "im_close", + "operationId": "files_sharedPublicURL", "parameters": [ { - "description": "Authentication token. Requires scope: `im:write`", + "description": "Authentication token. Requires scope: `files:write:user`", "in": "header", "name": "token", - "required": true, "type": "string" }, { - "description": "Direct message channel to close.", + "description": "File to share", "in": "formData", - "name": "channel", - "required": true, + "name": "file", "type": "string" } ], @@ -20051,22 +18699,20 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from im.close method", + "description": "Schema for successful response from files.sharedPublicURL method", "properties": { - "already_closed": { - "type": "boolean" - }, - "no_op": { - "type": "boolean" + "file": { + "$ref": "#/definitions/objs_file" }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "file" ], - "title": "im.close schema", + "title": "files.sharedPublicURL schema", "type": "object" } }, @@ -20080,18 +18726,24 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from im.close method", + "description": "Schema for error response from files.sharedPublicURL method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "user_does_not_own_channel", + "file_not_found", + "not_allowed", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -20115,7 +18767,7 @@ "ok", "error" ], - "title": "im.close error schema", + "title": "files.sharedPublicURL error schema", "type": "object" } } @@ -20123,67 +18775,79 @@ "security": [ { "slackAuth": [ - "im:write" + "files:write:user" ] } ], "tags": [ - "im" + "files" ] } }, - "/im.history": { - "get": { + "/files.upload": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Fetches history of messages and events from direct message channel.", + "description": "Uploads or creates a file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.history" + "url": "https://api.slack.com/methods/files.upload" }, - "operationId": "im_history", + "operationId": "files_upload", "parameters": [ { - "description": "Number of messages to return, between 1 and 1000.", - "in": "query", - "name": "count", - "type": "integer" + "description": "Authentication token. Requires scope: `files:write:user`", + "in": "formData", + "name": "token", + "type": "string" }, { - "description": "Include `unread_count_display` in the output?", - "in": "query", - "name": "unreads", - "type": "boolean" + "description": "File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`.", + "in": "formData", + "name": "file", + "type": "string" }, { - "description": "Include messages with latest or oldest timestamp in results.", - "in": "query", - "name": "inclusive", - "type": "boolean" + "description": "File contents via a POST variable. If omitting this parameter, you must provide a `file`.", + "in": "formData", + "name": "content", + "type": "string" }, { - "description": "Authentication token. Requires scope: `im:history`", - "in": "query", - "name": "token", + "description": "A [file type](/types/file#file_types) identifier.", + "in": "formData", + "name": "filetype", "type": "string" }, { - "description": "Start of time range of messages to include in results.", - "in": "query", - "name": "oldest", - "type": "number" + "description": "Filename of file.", + "in": "formData", + "name": "filename", + "type": "string" }, { - "description": "Direct message channel to fetch history for.", - "in": "query", - "name": "channel", + "description": "Title of file.", + "in": "formData", + "name": "title", "type": "string" }, { - "description": "End of time range of messages to include in results.", - "in": "query", - "name": "latest", + "description": "The message text introducing the file in specified `channels`.", + "in": "formData", + "name": "initial_comment", + "type": "string" + }, + { + "description": "Comma-separated list of channel names or IDs where the file will be shared.", + "in": "formData", + "name": "channels", + "type": "string" + }, + { + "description": "Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead.", + "in": "formData", + "name": "thread_ts", "type": "number" } ], @@ -20192,60 +18856,74 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Success response after uploading a file to a channel with an initial message", "examples": { "application/json": { - "has_more": false, - "latest": "1358547726.000003", - "messages": [ - { - "text": "Hello", - "ts": "1358546515.000008", - "type": "message", - "user": "U2147483896" - }, - { - "is_starred": true, - "text": "World", - "ts": "1358546515.000007", - "type": "message", - "user": "U2147483896" - }, - { - "ts": "1358546515.000007", - "type": "something_else" - } - ], - "ok": true - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from im.history method", - "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" + "file": { + "channels": [], + "comments_count": 0, + "created": 1532293501, + "display_as_bot": false, + "editable": false, + "external_type": "", + "filetype": "gif", + "groups": [], + "has_rich_preview": false, + "id": "F0TD00400", + "image_exif_rotation": 1, + "ims": [ + "D0L4B9P0Q" + ], + "is_external": false, + "is_public": false, + "is_starred": false, + "mimetype": "image/jpeg", + "mode": "hosted", + "name": "dramacat.gif", + "original_h": 366, + "original_w": 526, + "permalink": "https://.../dramacat.gif", + "permalink_public": "https://.../More-Path-Components", + "pretty_type": "JPEG", + "public_url_shared": false, + "shares": { + "private": { + "D0L4B9P0Q": [ + { + "reply_count": 0, + "reply_users": [], + "reply_users_count": 0, + "ts": "1532293503.000001" + } + ] } - ] - }, - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" }, - "minItems": 1, - "type": "array", - "uniqueItems": true + "size": 43518, + "thumb_160": "https://.../dramacat_160.gif", + "thumb_360": "https://.../dramacat_360.gif", + "thumb_360_h": 250, + "thumb_360_w": 360, + "thumb_480": "https://.../dramacat_480.gif", + "thumb_480_h": 334, + "thumb_480_w": 480, + "thumb_64": "https://.../dramacat_64.gif", + "thumb_80": "https://.../dramacat_80.gif", + "timestamp": 1532293501, + "title": "dramacat", + "url_private": "https://.../dramacat.gif", + "url_private_download": "https://.../dramacat.gif", + "user": "U0L4B9NSU", + "username": "" + }, + "ok": true + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for successful response files.upload method", + "properties": { + "file": { + "$ref": "#/definitions/objs_file" }, "ok": { "$ref": "#/definitions/defs_ok_true" @@ -20253,12 +18931,9 @@ }, "required": [ "ok", - "messages", - "has_more", - "channel_actions_ts", - "channel_actions_count" + "file" ], - "title": "im.history success schema", + "title": "files.upload schema", "type": "object" } }, @@ -20266,28 +18941,36 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from im.history method", + "description": "Schema for error response files.upload method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", + "posting_to_general_channel_denied", + "invalid_channel", + "file_uploads_disabled", + "file_uploads_except_images_disabled", + "storage_limit_reached", "not_authed", "invalid_auth", "account_inactive", + "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", @@ -20295,21 +18978,15 @@ ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "im.history error schema", + "title": "files.upload error schema", "type": "object" } } @@ -20317,44 +18994,52 @@ "security": [ { "slackAuth": [ - "im:history" + "files:write:user" ] } ], "tags": [ - "im" + "files" ] } }, - "/im.list": { + "/migration.exchange": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Lists direct message channels for the calling user.", + "description": "For Enterprise Grid workspaces, map local user IDs to global user IDs", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.list" + "url": "https://api.slack.com/methods/migration.exchange" }, - "operationId": "im_list", + "operationId": "migration_exchange", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", + "description": "Authentication token. Requires scope: `tokens.basic`", "in": "query", - "name": "cursor", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `im:read`", + "description": "A comma-separated list of user ids, up to 400 per request", "in": "query", - "name": "token", + "name": "users", + "required": true, "type": "string" }, { - "description": "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.", + "description": "Specify team_id starts with `T` in case of Org Token", "in": "query", - "name": "limit", - "type": "integer" + "name": "team_id", + "type": "string" + }, + { + "description": "Specify `true` to convert `W` global user IDs to workspace-specific `U` IDs. Defaults to `false`.", + "in": "query", + "name": "to_old", + "type": "boolean" } ], "produces": [ @@ -20362,118 +19047,86 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response when mappings exist for the specified user IDs", "examples": { "application/json": { - "ims": [ - { - "created": 1449709280, - "id": "D0G9QPY56", - "is_im": true, - "is_org_shared": false, - "is_user_deleted": false, - "user": "USLACKBOT" - }, - { - "created": 1466692204, - "id": "D1KL59A72", - "is_im": true, - "is_org_shared": false, - "is_user_deleted": false, - "user": "U0G9QF9C6" - }, - { - "created": 1449722883, - "id": "D0G9XPFH9", - "is_im": true, - "is_org_shared": false, - "is_user_deleted": false, - "user": "U0G9WFXNZ" - }, - { - "created": 1452098023, - "id": "D0HRHJSF7", - "is_im": true, - "is_org_shared": false, - "is_user_deleted": false, - "user": "W0HRJL7CK" - }, - { - "created": 1465834222, - "id": "D1GD7CHC0", - "is_im": true, - "is_org_shared": false, - "is_user_deleted": true, - "user": "U1GDBDGR3" - }, - { - "created": 1468274703, - "id": "D1QMF76M9", - "is_im": true, - "is_org_shared": false, - "is_user_deleted": false, - "user": "U1QNSQB9U" - }, - { - "created": 1502210225, - "id": "D6K48KKRN", - "is_im": true, - "is_org_shared": false, - "is_user_deleted": false, - "user": "U6KR7BVFW" - } + "enterprise_id": "E1KQTNXE1", + "invalid_user_ids": [ + "U21ABZZXX" ], "ok": true, - "response_metadata": { - "next_cursor": "aW1faWQ6RDBCSDk1RExI=" + "team_id": "T1KR7PE1W", + "user_id_map": { + "U06UBSUN5": "W06M56XJM", + "U06UBSVB3": "W06PUUDLY", + "U06UBSVDX": "W06PUUDMW", + "U06UEB62U": "W06PTT6GH", + "W06UAZ65Q": "W06UAZ65Q" } } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response im.list method", + "additionalProperties": true, + "description": "Schema for successful response from migration.exchange method", "properties": { - "ims": { + "enterprise_id": { + "title": "The enterprise grid organization ID containing the workspace/team.", + "type": "string" + }, + "invalid_user_ids": { "items": { - "$ref": "#/definitions/objs_im" + "type": "string" }, - "type": "array", - "uniqueItems": true + "title": "A list of User IDs that cannot be mapped or found", + "type": "array" }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" + "team_id": { + "$ref": "#/definitions/defs_team" + }, + "user_id_map": { + "additionalProperties": true, + "title": "A mapping of provided user IDs with mapped user IDs", + "type": "object" } }, "required": [ "ok", - "ims" + "team_id", + "enterprise_id" ], - "title": "im.list success schema", + "title": "migration.exchange success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when there are no mappings to provide", "examples": { "application/json": { - "error": "invalid_auth", + "error": "not_enterprise_team", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from im.list method", + "description": "Schema for error response from migration.exchange method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "invalid_cursor", + "not_enterprise_team", + "too_many_users", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -20484,7 +19137,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -20496,7 +19150,7 @@ "ok", "error" ], - "title": "im.list error schema", + "title": "migration.exchange error schema", "type": "object" } } @@ -20504,48 +19158,56 @@ "security": [ { "slackAuth": [ - "im:read" + "tokens.basic" ] } ], "tags": [ - "im" + "migration" ] } }, - "/im.mark": { - "post": { + "/oauth.access": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the read cursor in a direct message channel.", + "description": "Exchanges a temporary OAuth verifier code for an access token.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.mark" + "url": "https://api.slack.com/methods/oauth.access" }, - "operationId": "im_mark", + "operationId": "oauth_access", "parameters": [ { - "description": "Authentication token. Requires scope: `im:write`", - "in": "header", - "name": "token", - "required": true, + "description": "Issued when you created your application.", + "in": "query", + "name": "client_id", "type": "string" }, { - "description": "Direct message channel to set reading cursor in.", - "in": "formData", - "name": "channel", - "required": true, + "description": "Issued when you created your application.", + "in": "query", + "name": "client_secret", "type": "string" }, { - "description": "Timestamp of the most recently seen message.", - "in": "formData", - "name": "ts", - "required": true, + "description": "The `code` param returned via the OAuth callback.", + "in": "query", + "name": "code", + "type": "string" + }, + { + "description": "This must match the originally submitted URI (if one was sent).", + "in": "query", + "name": "redirect_uri", "type": "string" + }, + { + "description": "Request the user to add your app only to a single channel. Only valid with a [legacy workspace app](https://api.slack.com/legacy-workspace-apps).", + "in": "query", + "name": "single_channel", + "type": "boolean" } ], "produces": [ @@ -20553,15 +19215,19 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Successful user token negotiation for a single scope", "examples": { "application/json": { - "ok": true + "access_token": "xoxp-XXXXXXXX-XXXXXXXX-XXXXX", + "enterprise_id": null, + "scope": "groups:write", + "team_id": "TXXXXXXXXX", + "team_name": "Wyld Stallyns LLC" } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response im.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -20570,7 +19236,7 @@ "required": [ "ok" ], - "title": "im.mark success schema", + "title": "Default success template", "type": "object" } }, @@ -20578,44 +19244,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_auth", + "error": "invalid_client_id", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response im.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "invalid_timestamp", - "not_in_channel", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "im.mark error schema", + "title": "Default error template", "type": "object" } } @@ -20623,50 +19267,55 @@ "security": [ { "slackAuth": [ - "im:write" + "none" ] } ], "tags": [ - "im" + "oauth" ] } }, - "/im.open": { - "post": { + "/oauth.token": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Opens a direct message channel.", + "description": "Exchanges a temporary OAuth verifier code for a workspace token.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.open" + "url": "https://api.slack.com/methods/oauth.token" }, - "operationId": "im_open", + "operationId": "oauth_token", "parameters": [ { - "description": "Authentication token. Requires scope: `im:write`", - "in": "header", - "name": "token", + "description": "Issued when you created your application.", + "in": "query", + "name": "client_id", "type": "string" }, { - "description": "Boolean, indicates you want the full IM channel definition in the response.", - "in": "formData", - "name": "return_im", - "type": "boolean" + "description": "Issued when you created your application.", + "in": "query", + "name": "client_secret", + "type": "string" }, { - "description": "User to open a direct message channel with.", - "in": "formData", - "name": "user", + "description": "The `code` param returned via the OAuth callback.", + "in": "query", + "name": "code", "type": "string" }, { - "description": "Set this to `true` to receive the locale for this im. Defaults to `false`", - "in": "formData", - "name": "include_locale", + "description": "This must match the originally submitted URI (if one was sent).", + "in": "query", + "name": "redirect_uri", + "type": "string" + }, + { + "description": "Request the user to add your app only to a single channel.", + "in": "query", + "name": "single_channel", "type": "boolean" } ], @@ -20675,70 +19324,43 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Success example using a workspace app produces a very different kind of response", "examples": { "application/json": { - "channel": { - "id": "D947RLWRX" - }, - "ok": true + "access_token": "xoxa-access-token-string", + "app_id": "A012345678", + "app_user_id": "U0AB12ABC", + "authorizing_user_id": "U0HTT3Q0G", + "installer_user_id": "U061F7AUR", + "ok": true, + "permissions": [ + { + "resource_id": 0, + "resource_type": "channel", + "scopes": [ + "channels:read", + "chat:write:user" + ] + } + ], + "single_channel_id": "C061EG9T2", + "team_id": "T061EG9Z9", + "team_name": "Subarachnoid Workspace", + "token_type": "app" } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from im.open method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "already_open": { - "type": "boolean" - }, - "channel": { - "additionalProperties": false, - "properties": { - "created": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/defs_dm_id" - }, - "is_im": { - "type": "boolean" - }, - "is_open": { - "type": "boolean" - }, - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest": { - "$ref": "#/definitions/objs_message" - }, - "unread_count": { - "type": "number" - }, - "unread_count_display": { - "type": "number" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "no_op": { - "type": "boolean" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "im.open success schema", + "title": "Default success template", "type": "object" } }, @@ -20746,46 +19368,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_auth", + "error": "invalid_client_id", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from im.open method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "user_not_found", - "user_not_visible", - "user_disabled", - "not_authed", - "invalid_auth", - "account_inactive", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "im.open error schema", + "title": "Default error template", "type": "object" } } @@ -20793,43 +19391,50 @@ "security": [ { "slackAuth": [ - "im:write" + "none" ] } ], "tags": [ - "im" + "oauth" ] } }, - "/im.replies": { + "/oauth.v2.access": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve a thread of messages posted to a direct message conversation", + "description": "Exchanges a temporary OAuth verifier code for an access token.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.replies" + "url": "https://api.slack.com/methods/oauth.v2.access" }, - "operationId": "im_replies", + "operationId": "oauth_v2_access", "parameters": [ { - "description": "Unique identifier of a thread's parent message", + "description": "Issued when you created your application.", "in": "query", - "name": "thread_ts", - "type": "number" + "name": "client_id", + "type": "string" }, { - "description": "Authentication token. Requires scope: `im:history`", + "description": "Issued when you created your application.", "in": "query", - "name": "token", + "name": "client_secret", "type": "string" }, { - "description": "Direct message channel to fetch thread from", + "description": "The `code` param returned via the OAuth callback.", "in": "query", - "name": "channel", + "name": "code", + "required": true, + "type": "string" + }, + { + "description": "This must match the originally submitted URI (if one was sent).", + "in": "query", + "name": "redirect_uri", "type": "string" } ], @@ -20838,189 +19443,43 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Successful token request with scopes for both a bot user and a user token", "examples": { "application/json": { - "messages": [ - { - "text": "Hello", - "ts": "1358546515.000008", - "type": "message", - "user": "U2147483896" - }, - { - "is_starred": true, - "text": "World", - "ts": "1358546515.000007", - "type": "message", - "user": "U2147483896" - }, - { - "ts": "1358546515.000007", - "type": "something_else" - } - ], - "ok": true + "access_token": "xoxb-17653672481-19874698323-pdFZKVeTuE8sk7oOcBrzbqgy", + "app_id": "A0KRD7HC3", + "authed_user": { + "access_token": "xoxp-1234", + "id": "U1234", + "scope": "chat:write", + "token_type": "user" + }, + "bot_user_id": "U0KRQLJ9H", + "enterprise": { + "id": "E12345678", + "name": "slack-sports" + }, + "ok": true, + "scope": "commands,incoming-webhook", + "team": { + "id": "T9TK3CUKW", + "name": "Slack Softball Team" + }, + "token_type": "bot" } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from im.replies method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest_reply": { - "$ref": "#/definitions/defs_ts" - }, - "replies": { - "items": { - "additionalProperties": false, - "properties": { - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "user", - "ts" - ], - "type": "object" - }, - "type": "array" - }, - "reply_count": { - "type": "integer" - }, - "reply_users": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "type": "array", - "uniqueItems": true - }, - "reply_users_count": { - "type": "integer" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "subscribed": { - "type": "boolean" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "unread_count": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "reply_count", - "replies", - "subscribed", - "ts" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "is_starred": { - "type": "boolean" - }, - "parent_user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "parent_user_id", - "ts" - ], - "type": "object" - } - ] - }, - "type": "array" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages", - "has_more" + "ok" ], - "title": "im.replies schema", + "title": "Default success template", "type": "object" } }, @@ -21028,48 +19487,22 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_client_id", "ok": false } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from im.replies method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "thread_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "im.replies error schema", + "title": "Default error template", "type": "object" } } @@ -21077,45 +19510,47 @@ "security": [ { "slackAuth": [ - "im:history" + "none" ] } ], "tags": [ - "im" + "oauth.v2", + "oauth" ] } }, - "/migration.exchange": { - "get": { + "/pins.add": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "For Enterprise Grid workspaces, map local user IDs to global user IDs", + "description": "Pins an item to a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/migration.exchange" + "url": "https://api.slack.com/methods/pins.add" }, - "operationId": "migration_exchange", + "operationId": "pins_add", "parameters": [ { - "description": "Authentication token. Requires scope: `tokens.basic`", - "in": "query", + "description": "Authentication token. Requires scope: `pins:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Specify `true` to convert `W` global user IDs to workspace-specific `U` IDs. Defaults to `false`.", - "in": "query", - "name": "to_old", - "type": "boolean" + "description": "Channel to pin the item in.", + "in": "formData", + "name": "channel", + "required": true, + "type": "string" }, { - "description": "A comma-separated list of user ids, up to 400 per request", - "in": "query", - "name": "users", - "required": true, + "description": "Timestamp of the message to pin.", + "in": "formData", + "name": "timestamp", "type": "string" } ], @@ -21124,82 +19559,57 @@ ], "responses": { "200": { - "description": "Typical success response when mappings exist for the specified user IDs", + "description": "Typical success response", "examples": { "application/json": { - "enterprise_id": "E1KQTNXE1", - "invalid_user_ids": [ - "U21ABZZXX" - ], - "ok": true, - "team_id": "T1KR7PE1W", - "user_id_map": { - "U06UBSUN5": "W06M56XJM", - "U06UBSVB3": "W06PUUDLY", - "U06UBSVDX": "W06PUUDMW", - "U06UEB62U": "W06PTT6GH", - "W06UAZ65Q": "W06UAZ65Q" - } + "ok": true } }, "schema": { - "additionalProperties": true, - "description": "Schema for successful response from migration.exchange method", + "additionalProperties": false, + "description": "Schema for successful response from pins.add method", "properties": { - "enterprise_id": { - "title": "The enterprise grid organization ID containing the workspace/team.", - "type": "string" - }, - "invalid_user_ids": { - "items": { - "type": "string" - }, - "title": "A list of User IDs that cannot be mapped or found", - "type": "array" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "team_id": { - "$ref": "#/definitions/defs_team" - }, - "user_id_map": { - "additionalProperties": true, - "title": "A mapping of provided user IDs with mapped user IDs", - "type": "object" } }, "required": [ - "ok", - "team_id", - "enterprise_id" + "ok" ], - "title": "migration.exchange success schema", + "title": "pins.add schema", "type": "object" } }, "default": { - "description": "Typical error response when there are no mappings to provide", + "description": "Typical error response", "examples": { "application/json": { - "error": "not_enterprise_team", + "error": "channel_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from migration.exchange method", + "description": "Schema for error response from pins.add method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "not_enterprise_team", - "too_many_users", + "bad_timestamp", + "message_not_found", + "channel_not_found", + "no_item_specified", + "already_pinned", + "permission_denied", + "file_not_shared", + "not_pinnable", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -21210,8 +19620,7 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, @@ -21223,7 +19632,7 @@ "ok", "error" ], - "title": "migration.exchange error schema", + "title": "pins.add error schema", "type": "object" } } @@ -21231,38 +19640,37 @@ "security": [ { "slackAuth": [ - "tokens.basic" + "pins:write" ] } ], "tags": [ - "migration" + "pins" ] } }, - "/mpim.close": { - "post": { + "/pins.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Closes a multiparty direct message channel.", + "description": "Lists items pinned to a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.close" + "url": "https://api.slack.com/methods/pins.list" }, - "operationId": "mpim_close", + "operationId": "pins_list", "parameters": [ { - "description": "Authentication token. Requires scope: `mpim:write`", - "in": "header", + "description": "Authentication token. Requires scope: `pins:read`", + "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "MPIM to close.", - "in": "formData", + "description": "Channel to get pinned items for.", + "in": "query", "name": "channel", "required": true, "type": "string" @@ -21276,22 +19684,130 @@ "description": "Typical success response", "examples": { "application/json": { + "items": [ + { + "channel": "C2U86NC6H", + "created": 1508881078, + "created_by": "U2U85N1RZ", + "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": "U2U85N1RZ" + }, + "type": "message" + }, + { + "channel": "C2U86NC6H", + "created": 1508880991, + "created_by": "U2U85N1RZ", + "message": { + "permalink": "https://hitchhikers.slack.com/archives/C2U86NC6H/p1508284197000015", + "pinned_to": [ + "C2U86NC6H" + ], + "text": "The meaning of life, the universe, and everything is 42.", + "ts": "1503289197.000015", + "type": "message", + "user": "U2U85N1RZ" + }, + "type": "message" + } + ], "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from mpim.close method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" + "description": "Schema for successful response from pins.list method", + "items": [ + { + "additionalProperties": false, + "properties": { + "items": { + "items": [ + { + "additionalProperties": false, + "properties": { + "created": { + "type": "integer" + }, + "created_by": { + "$ref": "#/definitions/defs_user_id" + }, + "file": { + "$ref": "#/definitions/objs_file" + }, + "type": { + "enum": [ + "file" + ], + "type": "string" + } + }, + "title": "File Pin", + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "channel": { + "$ref": "#/definitions/defs_channel" + }, + "created": { + "type": "integer" + }, + "created_by": { + "$ref": "#/definitions/defs_user_id" + }, + "message": { + "$ref": "#/definitions/objs_message" + }, + "type": { + "enum": [ + "message" + ], + "type": "string" + } + }, + "title": "Message Pin", + "type": "object" + } + ], + "type": "array", + "uniqueItems": true + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok", + "items" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "count": { + "type": "integer" + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok", + "count" + ], + "type": "object" } - }, - "required": [ - "ok" ], - "title": "mpim.close schema", - "type": "object" + "title": "pins.list success schema" } }, "default": { @@ -21304,17 +19820,19 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.close method", + "description": "Schema for error response from pins.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "channel_not_found", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -21325,8 +19843,7 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, @@ -21338,7 +19855,7 @@ "ok", "error" ], - "title": "mpim.close error schema", + "title": "pins.list error schema", "type": "object" } } @@ -21346,68 +19863,47 @@ "security": [ { "slackAuth": [ - "mpim:write" + "pins:read" ] } ], "tags": [ - "mpim" + "pins" ] } }, - "/mpim.history": { - "get": { + "/pins.remove": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Fetches history of messages and events from a multiparty direct message.", + "description": "Un-pins an item from a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.history" + "url": "https://api.slack.com/methods/pins.remove" }, - "operationId": "mpim_history", + "operationId": "pins_remove", "parameters": [ { - "description": "Number of messages to return, between 1 and 1000.", - "in": "query", - "name": "count", - "type": "integer" - }, - { - "description": "Include `unread_count_display` in the output?", - "in": "query", - "name": "unreads", - "type": "boolean" - }, - { - "description": "Include messages with latest or oldest timestamp in results.", - "in": "query", - "name": "inclusive", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `mpim:history`", - "in": "query", + "description": "Authentication token. Requires scope: `pins:write`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Start of time range of messages to include in results.", - "in": "query", - "name": "oldest", - "type": "number" - }, - { - "description": "Multiparty direct message to fetch history for.", - "in": "query", + "description": "Channel where the item is pinned to.", + "in": "formData", "name": "channel", + "required": true, "type": "string" }, { - "description": "End of time range of messages to include in results.", - "in": "query", - "name": "latest", - "type": "number" + "description": "Timestamp of the message to un-pin.", + "in": "formData", + "name": "timestamp", + "type": "string" } ], "produces": [ @@ -21418,70 +19914,21 @@ "description": "Typical success response", "examples": { "application/json": { - "has_more": false, - "latest": "1358547726.000003", - "messages": [ - { - "text": "Hello", - "ts": "1358546515.000008", - "type": "message", - "user": "U2147483896" - }, - { - "is_starred": true, - "text": "World", - "ts": "1358546515.000007", - "type": "message", - "user": "U2147483896" - }, - { - "ts": "1358546515.000007", - "type": "something_else" - } - ], "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from mpim.history method", + "description": "Schema for successful response from pins.remove method", "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages", - "has_more", - "channel_actions_ts", - "channel_actions_count" + "ok" ], - "title": "mpim.history schema", + "title": "pins.remove schema", "type": "object" } }, @@ -21489,37 +19936,42 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "no_pin", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.history method", + "description": "Schema for error response from pins.remove method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", + "bad_timestamp", + "file_not_found", + "file_comment_not_found", + "message_not_found", + "no_item_specified", + "not_pinned", + "permission_denied", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", - "invalid_post_type", - "missing_post_type", + "invalid_post_typ", + "missing_post_typ", "team_added_to_org", "invalid_json", "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" + "request_timeou", + "upgrade_required" ], "type": "string" }, @@ -21531,7 +19983,7 @@ "ok", "error" ], - "title": "mpim.history error schema", + "title": "pins.remove error schema", "type": "object" } } @@ -21539,44 +19991,55 @@ "security": [ { "slackAuth": [ - "mpim:history" + "pins:write" ] } ], "tags": [ - "mpim" + "pins" ] } }, - "/mpim.list": { - "get": { + "/reactions.add": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Lists multiparty direct message channels for the calling user.", + "description": "Adds a reaction to an item.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.list" + "url": "https://api.slack.com/methods/reactions.add" }, - "operationId": "mpim_list", + "operationId": "reactions_add", "parameters": [ { - "description": "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](/docs/pagination) for more details.", - "in": "query", - "name": "cursor", + "description": "Channel where the message to add reaction to was posted.", + "in": "formData", + "name": "channel", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `mpim:read`", - "in": "query", - "name": "token", + "description": "Reaction (emoji) name.", + "in": "formData", + "name": "name", + "required": true, "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "Timestamp of the message to add reaction to.", + "in": "formData", + "name": "timestamp", + "required": true, + "type": "string" + }, + { + "description": "Authentication token. Requires scope: `reactions:write`", + "in": "header", + "name": "token", + "required": true, + "type": "string" } ], "produces": [ @@ -21592,28 +20055,16 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from mpim.list method", + "description": "Schema for successful response from reactions.add method", "properties": { - "groups": { - "items": { - "$ref": "#/definitions/objs_group" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" } }, "required": [ - "ok", - "groups" + "ok" ], - "title": "mpim.list schema", + "title": "reactions.add schema", "type": "object" } }, @@ -21621,22 +20072,31 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_auth", + "error": "already_reacted", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.list method", + "description": "Schema for error response from reactions.add method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "bad_timestamp", + "message_not_found", + "no_item_specified", + "invalid_name", + "already_reacted", + "too_many_emoji", + "too_many_reactions", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -21647,8 +20107,7 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, @@ -21660,7 +20119,7 @@ "ok", "error" ], - "title": "mpim.list error schema", + "title": "reactions.add error schema", "type": "object" } } @@ -21668,44 +20127,62 @@ "security": [ { "slackAuth": [ - "mpim:read" + "reactions:write" ] } ], "tags": [ - "mpim" + "reactions" ] } }, - "/mpim.mark": { - "post": { + "/reactions.get": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the read cursor in a multiparty direct message channel.", + "description": "Gets reactions for an item.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.mark" + "url": "https://api.slack.com/methods/reactions.get" }, - "operationId": "mpim_mark", + "operationId": "reactions_get", "parameters": [ { - "description": "Authentication token. Requires scope: `mpim:write`", - "in": "header", + "description": "Authentication token. Requires scope: `reactions:read`", + "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "Timestamp of the most recently seen message.", - "in": "formData", - "name": "ts", - "type": "number" + "description": "Channel where the message to get reactions for was posted.", + "in": "query", + "name": "channel", + "type": "string" }, { - "description": "multiparty direct message channel to set reading cursor in.", - "in": "formData", - "name": "channel", + "description": "File to get reactions for.", + "in": "query", + "name": "file", + "type": "string" + }, + { + "description": "File comment to get reactions for.", + "in": "query", + "name": "file_comment", + "type": "string" + }, + { + "description": "If true always return the complete reaction list.", + "in": "query", + "name": "full", + "type": "boolean" + }, + { + "description": "Timestamp of the message to get reactions for.", + "in": "query", + "name": "timestamp", "type": "string" } ], @@ -21717,21 +20194,112 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "file": { + "channels": [ + "C2U7V2YA2" + ], + "comments_count": 1, + "created": 1507850315, + "groups": [], + "id": "F7H0D7ZA4", + "ims": [], + "name": "computer.gif", + "reactions": [ + { + "count": 1, + "name": "stuck_out_tongue_winking_eye", + "users": [ + "U2U85N1RV" + ] + } + ], + "timestamp": 1507850315, + "title": "computer.gif", + "user": "U2U85N1RV" + }, + "ok": true, + "type": "file" } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from mpim.mark method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" + "description": "Schema for successful response from reactions.get method", + "items": [ + { + "additionalProperties": false, + "properties": { + "channel": { + "$ref": "#/definitions/defs_channel" + }, + "message": { + "$ref": "#/definitions/objs_message" + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "type": { + "enum": [ + "message" + ], + "type": "string" + } + }, + "required": [ + "ok", + "type", + "channel", + "message" + ] + }, + { + "additionalProperties": false, + "properties": { + "file": { + "$ref": "#/definitions/objs_file" + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "type": { + "enum": [ + "file" + ], + "type": "string" + } + }, + "required": [ + "ok", + "type", + "file" + ] + }, + { + "additionalProperties": false, + "properties": { + "comment": { + "$ref": "#/definitions/objs_comment" + }, + "file": { + "$ref": "#/definitions/objs_file" + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "type": { + "enum": [ + "file_comment" + ], + "type": "string" + } + }, + "required": [ + "ok", + "type", + "file", + "comment" + ] } - }, - "required": [ - "ok" ], - "title": "mpim.mark schema", + "title": "reactions.get success schema", "type": "object" } }, @@ -21745,19 +20313,23 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.mark method", + "description": "Schema for error response from reactions.get method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "invalid_timestamp", + "bad_timestamp", + "file_not_found", + "file_comment_not_found", + "message_not_found", + "no_item_specified", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", - "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", @@ -21767,8 +20339,7 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, @@ -21780,7 +20351,7 @@ "ok", "error" ], - "title": "mpim.mark error schema", + "title": "reactions.get error schema", "type": "object" } } @@ -21788,39 +20359,67 @@ "security": [ { "slackAuth": [ - "mpim:write" + "reactions:read" ] } ], "tags": [ - "mpim" + "reactions" ] } }, - "/mpim.open": { - "post": { + "/reactions.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "This method opens a multiparty direct message.", + "description": "Lists reactions made by a user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.open" + "url": "https://api.slack.com/methods/reactions.list" }, - "operationId": "mpim_open", + "operationId": "reactions_list", "parameters": [ { - "description": "Authentication token. Requires scope: `mpim:write`", - "in": "header", + "description": "Authentication token. Requires scope: `reactions:read`", + "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned.", - "in": "formData", - "name": "users", + "description": "Show reactions made by this user. Defaults to the authed user.", + "in": "query", + "name": "user", + "type": "string" + }, + { + "description": "If true always return the complete reaction list.", + "in": "query", + "name": "full", + "type": "boolean" + }, + { + "in": "query", + "name": "count", + "type": "integer" + }, + { + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more details.", + "in": "query", + "name": "cursor", "type": "string" + }, + { + "description": "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.", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -21831,28 +20430,188 @@ "description": "Typical success response", "examples": { "application/json": { - "channel": { - "id": "D024BFF1M" - }, - "ok": true + "items": [ + { + "channel": "C3UKJTQAC", + "message": { + "bot_id": "B4VLRLMKJ", + "reactions": [ + { + "count": 1, + "name": "robot_face", + "users": [ + "U2U85N1RV" + ] + } + ], + "subtype": "bot_message", + "text": "Hello from Python! :tada:", + "ts": "1507849573.000090", + "username": "Shipit Notifications" + }, + "type": "message" + }, + { + "comment": { + "comment": "This is a file comment", + "created": 1508286096, + "id": "Fc7LP08P1U", + "reactions": [ + { + "count": 1, + "name": "white_check_mark", + "users": [ + "U2U85N1RV" + ] + } + ], + "timestamp": 1508286096, + "type": "file_comment", + "user": "U2U85N1RV" + }, + "file": { + "channels": [ + "C2U7V2YA2" + ], + "comments_count": 1, + "created": 1507850315, + "reactions": [ + { + "count": 1, + "name": "stuck_out_tongue_winking_eye", + "users": [ + "U2U85N1RV" + ] + } + ], + "title": "computer.gif", + "user": "U2U85N1RV", + "username": "" + } + }, + { + "file": { + "channels": [ + "C2U7V2YA2" + ], + "comments_count": 1, + "created": 1507850315, + "id": "F7H0D7ZA4", + "name": "computer.gif", + "reactions": [ + { + "count": 1, + "name": "stuck_out_tongue_winking_eye", + "users": [ + "U2U85N1RV" + ] + } + ], + "size": 1639034, + "title": "computer.gif", + "user": "U2U85N1RV", + "username": "" + }, + "type": "file" + } + ], + "ok": true, + "response_metadata": { + "next_cursor": "dGVhbTpDMUg5UkVTR0w=" + } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from mpim.open method", + "description": "Schema for successful response from reactions.list method", "properties": { - "group": { - "$ref": "#/definitions/objs_group" + "items": { + "items": { + "items": [ + { + "additionalProperties": false, + "properties": { + "channel": { + "$ref": "#/definitions/defs_channel" + }, + "message": { + "$ref": "#/definitions/objs_message" + }, + "type": { + "enum": [ + "message" + ], + "type": "string" + } + }, + "required": [ + "type", + "channel", + "message" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "file": { + "$ref": "#/definitions/objs_file" + }, + "type": { + "enum": [ + "file" + ], + "type": "string" + } + }, + "required": [ + "type", + "file" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "comment": { + "$ref": "#/definitions/objs_comment" + }, + "file": { + "$ref": "#/definitions/objs_file" + }, + "type": { + "enum": [ + "file_comment" + ], + "type": "string" + } + }, + "required": [ + "type", + "file", + "comment" + ], + "type": "object" + } + ] + }, + "type": "array" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "paging": { + "$ref": "#/definitions/objs_paging" + }, + "response_metadata": { + "$ref": "#/definitions/objs_response_metadata" } }, "required": [ "ok", - "group" + "items" ], - "title": "mpim.open success schema", + "title": "reactions.list schema", "type": "object" } }, @@ -21866,16 +20625,18 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.open method", + "description": "Schema for error response from reactions.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "users_list_not_supplied", - "not_enough_users", - "too_many_users", + "user_not_found", "not_authed", "invalid_auth", - "account_inactive", + "account_inactiv", "no_permission", "invalid_arg_name", "invalid_array_arg", @@ -21887,7 +20648,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -21899,7 +20661,7 @@ "ok", "error" ], - "title": "mpim.open error schema", + "title": "reactions.list error schema", "type": "object" } } @@ -21907,43 +20669,64 @@ "security": [ { "slackAuth": [ - "mpim:write" + "reactions:read" ] } ], "tags": [ - "mpim" + "reactions" ] } }, - "/mpim.replies": { - "get": { + "/reactions.remove": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message.", + "description": "Removes a reaction from an item.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.replies" + "url": "https://api.slack.com/methods/reactions.remove" }, - "operationId": "mpim_replies", + "operationId": "reactions_remove", "parameters": [ { - "description": "Unique identifier of a thread's parent message.", - "in": "query", - "name": "thread_ts", - "type": "number" - }, - { - "description": "Authentication token. Requires scope: `mpim:history`", - "in": "query", + "description": "Authentication token. Requires scope: `reactions:write`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Multiparty direct message channel to fetch thread from.", - "in": "query", - "name": "channel", + "description": "Reaction (emoji) name.", + "in": "formData", + "name": "name", + "required": true, + "type": "string" + }, + { + "description": "File to remove reaction from.", + "in": "formData", + "name": "file", + "type": "string" + }, + { + "description": "File comment to remove reaction from.", + "in": "formData", + "name": "file_comment", + "type": "string" + }, + { + "description": "Channel where the message to remove reaction from was posted.", + "in": "formData", + "name": "channel", + "type": "string" + }, + { + "description": "Timestamp of the message to remove reaction from.", + "in": "formData", + "name": "timestamp", "type": "string" } ], @@ -21955,186 +20738,21 @@ "description": "Typical success response", "examples": { "application/json": { - "messages": [ - { - "text": "Hello", - "ts": "1358546515.000008", - "type": "message", - "user": "U2147483896" - }, - { - "is_starred": true, - "text": "World", - "ts": "1358546515.000007", - "type": "message", - "user": "U2147483896" - }, - { - "ts": "1358546515.000007", - "type": "something_else" - } - ], "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from mpim.replies method", + "description": "Schema for successful response from reactions.remove method", "properties": { - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest_reply": { - "$ref": "#/definitions/defs_ts" - }, - "replies": { - "items": { - "additionalProperties": false, - "properties": { - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "user", - "ts" - ], - "type": "object" - }, - "type": "array" - }, - "reply_count": { - "type": "integer" - }, - "reply_users": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "type": "array", - "uniqueItems": true - }, - "reply_users_count": { - "type": "integer" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "subscribed": { - "type": "boolean" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "unread_count": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "reply_count", - "replies", - "subscribed", - "ts" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "is_starred": { - "type": "boolean" - }, - "parent_user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "parent_user_id", - "ts" - ], - "type": "object" - } - ] - }, - "type": "array" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages", - "has_more" + "ok" ], - "title": "mpim.replies schema", + "title": "reactions.remove schema", "type": "object" } }, @@ -22142,25 +20760,31 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "no_reaction", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.replies method", + "description": "Schema for error response from reactions.remove method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "thread_not_found", + "bad_timestamp", + "file_not_found", + "file_comment_not_found", + "message_not_found", + "no_item_specified", + "invalid_name", + "no_reaction", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", - "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -22184,7 +20808,7 @@ "ok", "error" ], - "title": "mpim.replies error schema", + "title": "reactions.remove error schema", "type": "object" } } @@ -22192,61 +20816,53 @@ "security": [ { "slackAuth": [ - "mpim:history" + "reactions:write" ] } ], "tags": [ - "mpim" + "reactions" ] } }, - "/oauth.access": { - "get": { + "/reminders.add": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Exchanges a temporary OAuth verifier code for an access token.", + "description": "Creates a reminder.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/oauth.access" + "url": "https://api.slack.com/methods/reminders.add" }, - "operationId": "oauth_access", + "operationId": "reminders_add", "parameters": [ { - "description": "The `code` param returned via the OAuth callback.", - "in": "query", - "name": "code", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `none`", - "in": "query", + "description": "Authentication token. Requires scope: `reminders:write`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "This must match the originally submitted URI (if one was sent).", - "in": "query", - "name": "redirect_uri", + "description": "The content of the reminder", + "in": "formData", + "name": "text", + "required": true, "type": "string" }, { - "description": "Request the user to add your app only to a single channel. Only valid with a [legacy workspace app](https://api.slack.com/legacy-workspace-apps).", - "in": "query", - "name": "single_channel", - "type": "boolean" - }, - { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_id", + "description": "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\")", + "in": "formData", + "name": "time", + "required": true, "type": "string" }, { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_secret", + "description": "The user who will receive the reminder. If no user is specified, the reminder will go to user who created it.", + "in": "formData", + "name": "user", "type": "string" } ], @@ -22255,28 +20871,28 @@ ], "responses": { "200": { - "description": "Successful user token negotiation for a single scope", + "description": "Typical success response", "examples": { "application/json": { - "access_token": "xoxp-XXXXXXXX-XXXXXXXX-XXXXX", - "enterprise_id": null, - "scope": "groups:write", - "team_id": "TXXXXXXXXX", - "team_name": "Wyld Stallyns LLC" + "ok": true } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from reminders.add method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - } - }, + }, + "reminder": { + "$ref": "#/definitions/objs_reminder" + } + }, "required": [ - "ok" + "ok", + "reminder" ], - "title": "Default success template", + "title": "reminders.add schema", "type": "object" } }, @@ -22284,22 +20900,57 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_client_id", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from reminders.add method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "cannot_parse", + "user_not_found", + "cannot_add_bot", + "cannot_add_slackbot", + "cannot_add_others", + "cannot_add_others_recurring", + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "fatal_error" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "reminders.add error schema", "type": "object" } } @@ -22307,55 +20958,38 @@ "security": [ { "slackAuth": [ - "none" + "reminders:write" ] } ], "tags": [ - "oauth" + "reminders" ] } }, - "/oauth.token": { - "get": { + "/reminders.complete": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Exchanges a temporary OAuth verifier code for a workspace token.", + "description": "Marks a reminder as complete.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/oauth.token" + "url": "https://api.slack.com/methods/reminders.complete" }, - "operationId": "oauth_token", + "operationId": "reminders_complete", "parameters": [ { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_secret", - "type": "string" - }, - { - "description": "The `code` param returned via the OAuth callback.", - "in": "query", - "name": "code", - "type": "string" - }, - { - "description": "Request the user to add your app only to a single channel.", - "in": "query", - "name": "single_channel", - "type": "boolean" - }, - { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_id", + "description": "Authentication token. Requires scope: `reminders:write`", + "in": "header", + "name": "token", "type": "string" }, { - "description": "This must match the originally submitted URI (if one was sent).", - "in": "query", - "name": "redirect_uri", + "description": "The ID of the reminder to be marked as complete", + "in": "formData", + "name": "reminder", "type": "string" } ], @@ -22364,34 +20998,15 @@ ], "responses": { "200": { - "description": "Success example using a workspace app produces a very different kind of response", + "description": "Typical success response", "examples": { "application/json": { - "access_token": "xoxa-access-token-string", - "app_id": "A012345678", - "app_user_id": "U0AB12ABC", - "authorizing_user_id": "U0HTT3Q0G", - "installer_user_id": "U061F7AUR", - "ok": true, - "permissions": [ - { - "resource_id": 0, - "resource_type": "channel", - "scopes": [ - "channels:read", - "chat:write:user" - ] - } - ], - "single_channel_id": "C061EG9T2", - "team_id": "T061EG9Z9", - "team_name": "Subarachnoid Workspace", - "token_type": "app" + "ok": true } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from reminders.complete method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -22400,7 +21015,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "reminders.complete schema", "type": "object" } }, @@ -22408,22 +21023,54 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_client_id", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from reminders.complete method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "not_found", + "cannot_complete_recurring", + "cannot_complete_others", + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "fatal_error" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "reminders.complete error schema", "type": "object" } } @@ -22431,50 +21078,38 @@ "security": [ { "slackAuth": [ - "none" + "reminders:write" ] } ], "tags": [ - "oauth" + "reminders" ] } }, - "/oauth.v2.access": { - "get": { + "/reminders.delete": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Exchanges a temporary OAuth verifier code for an access token.", + "description": "Deletes a reminder.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/oauth.v2.access" + "url": "https://api.slack.com/methods/reminders.delete" }, - "operationId": "oauth_v2_access", + "operationId": "reminders_delete", "parameters": [ { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_secret", - "type": "string" - }, - { - "description": "The `code` param returned via the OAuth callback.", - "in": "query", - "name": "code", - "required": true, - "type": "string" - }, - { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_id", + "description": "Authentication token. Requires scope: `reminders:write`", + "in": "header", + "name": "token", "type": "string" }, { - "description": "This must match the originally submitted URI (if one was sent).", - "in": "query", - "name": "redirect_uri", + "description": "The ID of the reminder", + "in": "formData", + "name": "reminder", "type": "string" } ], @@ -22483,34 +21118,15 @@ ], "responses": { "200": { - "description": "Successful token request with scopes for both a bot user and a user token", + "description": "Typical success response", "examples": { "application/json": { - "access_token": "xoxb-17653672481-19874698323-pdFZKVeTuE8sk7oOcBrzbqgy", - "app_id": "A0KRD7HC3", - "authed_user": { - "access_token": "xoxp-1234", - "id": "U1234", - "scope": "chat:write", - "token_type": "user" - }, - "bot_user_id": "U0KRQLJ9H", - "enterprise": { - "id": "E12345678", - "name": "slack-sports" - }, - "ok": true, - "scope": "commands,incoming-webhook", - "team": { - "id": "T9TK3CUKW", - "name": "Slack Softball Team" - }, - "token_type": "bot" + "ok": true } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from reminders.delete method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -22519,7 +21135,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "reminders.delete schema", "type": "object" } }, @@ -22527,68 +21143,90 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_client_id", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from reminders.delete method", "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "not_found", + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "fatal_error" + ], + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" + } + }, + "required": [ + "ok", + "error" + ], + "title": "reminders.delete error schema", + "type": "object" + } } }, "security": [ { "slackAuth": [ - "none" + "reminders:write" ] } ], "tags": [ - "oauth.v2", - "oauth" + "reminders" ] } }, - "/pins.add": { - "post": { + "/reminders.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Pins an item to a channel.", + "description": "Gets information about a reminder.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/pins.add" + "url": "https://api.slack.com/methods/reminders.info" }, - "operationId": "pins_add", + "operationId": "reminders_info", "parameters": [ { - "description": "Timestamp of the message to pin.", - "in": "formData", - "name": "timestamp", - "type": "number" - }, - { - "description": "Authentication token. Requires scope: `pins:write`", - "in": "header", + "description": "Authentication token. Requires scope: `reminders:read`", + "in": "query", "name": "token", "type": "string" }, { - "description": "Channel to pin the item in.", - "in": "formData", - "name": "channel", + "description": "The ID of the reminder", + "in": "query", + "name": "reminder", "type": "string" } ], @@ -22605,16 +21243,20 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from pins.add method", + "description": "Schema for successful response from reminders.info method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "reminder": { + "$ref": "#/definitions/objs_reminder" } }, "required": [ - "ok" + "ok", + "reminder" ], - "title": "pins.add schema", + "title": "reminders.info schema", "type": "object" } }, @@ -22622,28 +21264,28 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "channel_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from pins.add method", + "description": "Schema for error response from reminders.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "bad_timestamp", - "message_not_found", - "channel_not_found", - "no_item_specified", - "already_pinned", - "permission_denied", - "file_not_shared", - "not_pinnable", + "not_found", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", "no_permission", + "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -22654,7 +21296,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -22666,7 +21309,7 @@ "ok", "error" ], - "title": "pins.add error schema", + "title": "reminders.info error schema", "type": "object" } } @@ -22674,38 +21317,32 @@ "security": [ { "slackAuth": [ - "pins:write" + "reminders:read" ] } ], "tags": [ - "pins" + "reminders" ] } }, - "/pins.list": { + "/reminders.list": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Lists items pinned to a channel.", + "description": "Lists all reminders created by or for a given user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/pins.list" + "url": "https://api.slack.com/methods/reminders.list" }, - "operationId": "pins_list", + "operationId": "reminders_list", "parameters": [ { - "description": "Authentication token. Requires scope: `pins:read`", + "description": "Authentication token. Requires scope: `reminders:read`", "in": "query", "name": "token", "type": "string" - }, - { - "description": "Channel to get pinned items for.", - "in": "query", - "name": "channel", - "type": "string" } ], "produces": [ @@ -22716,130 +21353,29 @@ "description": "Typical success response", "examples": { "application/json": { - "items": [ - { - "channel": "C2U86NC6H", - "created": 1508881078, - "created_by": "U2U85N1RZ", - "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": "U2U85N1RZ" - }, - "type": "message" - }, - { - "channel": "C2U86NC6H", - "created": 1508880991, - "created_by": "U2U85N1RZ", - "message": { - "permalink": "https://hitchhikers.slack.com/archives/C2U86NC6H/p1508284197000015", - "pinned_to": [ - "C2U86NC6H" - ], - "text": "The meaning of life, the universe, and everything is 42.", - "ts": "1503289197.000015", - "type": "message", - "user": "U2U85N1RZ" - }, - "type": "message" - } - ], "ok": true } }, "schema": { - "description": "Schema for successful response from pins.list method", - "items": [ - { - "additionalProperties": false, - "properties": { - "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "created": { - "type": "integer" - }, - "created_by": { - "$ref": "#/definitions/defs_user_id" - }, - "file": { - "$ref": "#/definitions/objs_file" - }, - "type": { - "enum": [ - "file" - ], - "type": "string" - } - }, - "title": "File Pin", - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, - "created": { - "type": "integer" - }, - "created_by": { - "$ref": "#/definitions/defs_user_id" - }, - "message": { - "$ref": "#/definitions/objs_message" - }, - "type": { - "enum": [ - "message" - ], - "type": "string" - } - }, - "title": "Message Pin", - "type": "object" - } - ], - "type": "array", - "uniqueItems": true - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok", - "items" - ], - "type": "object" + "additionalProperties": false, + "description": "Schema for successful response from reminders.list method", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" }, - { - "additionalProperties": false, - "properties": { - "count": { - "type": "integer" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - } + "reminders": { + "items": { + "$ref": "#/definitions/objs_reminder" }, - "required": [ - "ok", - "count" - ], - "type": "object" + "type": "array" } + }, + "required": [ + "ok", + "reminders" ], - "title": "pins.list success schema" + "title": "reminders.list schema", + "type": "object" } }, "default": { @@ -22852,15 +21388,21 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from pins.list method", + "description": "Schema for error response from reminders.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", "no_permission", + "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -22871,7 +21413,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -22883,7 +21426,7 @@ "ok", "error" ], - "title": "pins.list error schema", + "title": "reminders.list error schema", "type": "object" } } @@ -22891,57 +21434,45 @@ "security": [ { "slackAuth": [ - "pins:read" + "reminders:read" ] } ], "tags": [ - "pins" + "reminders" ] } }, - "/pins.remove": { - "post": { + "/rtm.connect": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Un-pins an item from a channel.", + "description": "Starts a Real Time Messaging session.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/pins.remove" + "url": "https://api.slack.com/methods/rtm.connect" }, - "operationId": "pins_remove", + "operationId": "rtm_connect", "parameters": [ { - "description": "File comment to un-pin.", - "in": "formData", - "name": "file_comment", - "type": "string" - }, - { - "description": "Timestamp of the message to un-pin.", - "in": "formData", - "name": "timestamp", - "type": "number" - }, - { - "description": "Authentication token. Requires scope: `pins:write`", - "in": "header", + "description": "Authentication token. Requires scope: `rtm:stream`", + "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "File to un-pin.", - "in": "formData", - "name": "file", - "type": "string" + "description": "Batch presence deliveries via subscription. Enabling changes the shape of `presence_change` events. See [batch presence](/docs/presence-and-status#batching).", + "in": "query", + "name": "batch_presence_aware", + "type": "boolean" }, { - "description": "Channel where the item is pinned to.", - "in": "formData", - "name": "channel", - "type": "string" + "description": "Only deliver presence events when requested by subscription. See [presence subscriptions](/docs/presence-and-status#subscriptions).", + "in": "query", + "name": "presence_sub", + "type": "boolean" } ], "produces": [ @@ -22952,21 +21483,74 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "ok": true, + "self": { + "id": "U4X318ZMZ", + "name": "robotoverlord" + }, + "team": { + "domain": "slackdemo", + "id": "T2U81E2FP", + "name": "SlackDemo" + }, + "url": "wss://..." } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from pins.remove method", + "description": "Schema for successful response from rtm.connect method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "self": { + "additionalProperties": false, + "properties": { + "id": { + "$ref": "#/definitions/defs_user_id" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object" + }, + "team": { + "additionalProperties": false, + "properties": { + "domain": { + "type": "string" + }, + "id": { + "$ref": "#/definitions/defs_team" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "domain" + ], + "type": "object" + }, + "url": { + "format": "uri", + "type": "string" } }, "required": [ - "ok" + "ok", + "url", + "team", + "self" ], - "title": "pins.remove schema", + "title": "rtm.connect schema", "type": "object" } }, @@ -22974,38 +21558,37 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "no_pin", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from pins.remove method", + "description": "Schema for error response from rtm.connect method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "bad_timestamp", - "file_not_found", - "file_comment_not_found", - "message_not_found", - "no_item_specified", - "not_pinned", - "permission_denied", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", - "invalid_post_typ", - "missing_post_typ", + "invalid_post_type", + "missing_post_type", "team_added_to_org", "invalid_json", "json_not_object", - "request_timeou", - "upgrade_required" + "request_timeout", + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -23017,7 +21600,7 @@ "ok", "error" ], - "title": "pins.remove error schema", + "title": "rtm.connect error schema", "type": "object" } } @@ -23025,54 +21608,68 @@ "security": [ { "slackAuth": [ - "pins:write" + "rtm:stream" ] } ], "tags": [ - "pins" + "rtm" ] } }, - "/reactions.add": { - "post": { + "/search.messages": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Adds a reaction to an item.", + "description": "Searches for messages matching a query.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/reactions.add" + "url": "https://api.slack.com/methods/search.messages" }, - "operationId": "reactions_add", + "operationId": "search_messages", "parameters": [ { - "description": "Timestamp of the message to add reaction to.", - "in": "formData", - "name": "timestamp", + "description": "Authentication token. Requires scope: `search:read`", + "in": "query", + "name": "token", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `reactions:write`", - "in": "header", - "name": "token", + "description": "Pass the number of results you want per \"page\". Maximum of `100`.", + "in": "query", + "name": "count", + "type": "integer" + }, + { + "description": "Pass a value of `true` to enable query highlight markers (see below).", + "in": "query", + "name": "highlight", + "type": "boolean" + }, + { + "in": "query", + "name": "page", + "type": "integer" + }, + { + "description": "Search query.", + "in": "query", + "name": "query", "required": true, "type": "string" }, { - "description": "Reaction (emoji) name.", - "in": "formData", - "name": "name", - "required": true, + "description": "Return matches sorted by either `score` or `timestamp`.", + "in": "query", + "name": "sort", "type": "string" }, { - "description": "Channel where the message to add reaction to was posted.", - "in": "formData", - "name": "channel", - "required": true, + "description": "Change sort direction to ascending (`asc`) or descending (`desc`).", + "in": "query", + "name": "sort_dir", "type": "string" } ], @@ -23084,72 +21681,106 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from reactions.add method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "reactions.add schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "already_reacted", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from reactions.add method", - "properties": { - "error": { - "enum": [ - "bad_timestamp", - "message_not_found", - "no_item_specified", - "invalid_name", - "already_reacted", - "too_many_emoji", - "too_many_reactions", - "not_authed", - "invalid_auth", - "account_inactive", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" + "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" + } ], - "type": "string" + "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" + } + }, + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok" + ], + "title": "Default success template", + "type": "object" + } + }, + "default": { + "description": "Typical error response", + "examples": { + "application/json": { + "error": "No query passed", + "ok": false + } + }, + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "properties": { "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "reactions.add error schema", + "title": "Default error template", "type": "object" } } @@ -23157,62 +21788,57 @@ "security": [ { "slackAuth": [ - "reactions:write" + "search:read" ] } ], "tags": [ - "reactions" + "search" ] } }, - "/reactions.get": { - "get": { + "/stars.add": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Gets reactions for an item.", + "description": "Adds a star to an item.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/reactions.get" + "url": "https://api.slack.com/methods/stars.add" }, - "operationId": "reactions_get", + "operationId": "stars_add", "parameters": [ { - "description": "If true always return the complete reaction list.", - "in": "query", - "name": "full", - "type": "boolean" - }, - { - "description": "File comment to get reactions for.", - "in": "query", - "name": "file_comment", + "description": "Authentication token. Requires scope: `stars:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Timestamp of the message to get reactions for.", - "in": "query", - "name": "timestamp", + "description": "Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`).", + "in": "formData", + "name": "channel", "type": "string" }, { - "description": "Authentication token. Requires scope: `reactions:read`", - "in": "query", - "name": "token", - "required": true, + "description": "File to add star to.", + "in": "formData", + "name": "file", "type": "string" }, { - "description": "File to get reactions for.", - "in": "query", - "name": "file", + "description": "File comment to add star to.", + "in": "formData", + "name": "file_comment", "type": "string" }, { - "description": "Channel where the message to get reactions for was posted.", - "in": "query", - "name": "channel", + "description": "Timestamp of the message to add star to.", + "in": "formData", + "name": "timestamp", "type": "string" } ], @@ -23224,138 +21850,56 @@ "description": "Typical success response", "examples": { "application/json": { - "file": { - "channels": [ - "C2U7V2YA2" - ], - "comments_count": 1, - "created": 1507850315, - "groups": [], - "id": "F7H0D7ZA4", - "ims": [], - "name": "computer.gif", - "reactions": [ - { - "count": 1, - "name": "stuck_out_tongue_winking_eye", - "users": [ - "U2U85N1RV" - ] - } - ], - "timestamp": 1507850315, - "title": "computer.gif", - "user": "U2U85N1RV" - }, - "ok": true, - "type": "file" + "ok": true } }, "schema": { - "description": "Schema for successful response from reactions.get method", - "items": [ - { - "additionalProperties": false, - "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, - "message": { - "$ref": "#/definitions/objs_message" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "type": { - "enum": [ - "message" - ], - "type": "string" - } - }, - "required": [ - "ok", - "type", - "channel", - "message" - ] + "additionalProperties": false, + "description": "Schema for successful response from stars.add method", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok" + ], + "title": "stars.add schema", + "type": "object" + } + }, + "default": { + "description": "Typical error response", + "examples": { + "application/json": { + "error": "invalid_auth", + "ok": false + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for error response from stars.add method", + "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" }, - { - "additionalProperties": false, - "properties": { - "file": { - "$ref": "#/definitions/objs_file" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "type": { - "enum": [ - "file" - ], - "type": "string" - } - }, - "required": [ - "ok", - "type", - "file" - ] - }, - { - "additionalProperties": false, - "properties": { - "comment": { - "$ref": "#/definitions/objs_comment" - }, - "file": { - "$ref": "#/definitions/objs_file" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "type": { - "enum": [ - "file_comment" - ], - "type": "string" - } - }, - "required": [ - "ok", - "type", - "file", - "comment" - ] - } - ], - "title": "reactions.get success schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from reactions.get method", - "properties": { "error": { "enum": [ "bad_timestamp", + "message_not_found", "file_not_found", "file_comment_not_found", - "message_not_found", + "channel_not_found", "no_item_specified", + "already_starred", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", "no_permission", + "org_login_required", + "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", @@ -23365,7 +21909,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -23377,7 +21922,7 @@ "ok", "error" ], - "title": "reactions.get error schema", + "title": "stars.add error schema", "type": "object" } } @@ -23385,49 +21930,47 @@ "security": [ { "slackAuth": [ - "reactions:read" + "stars:write" ] } ], "tags": [ - "reactions" + "stars" ] } }, - "/reactions.list": { + "/stars.list": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Lists reactions made by a user.", + "description": "Lists stars for a user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/reactions.list" + "url": "https://api.slack.com/methods/stars.list" }, - "operationId": "reactions_list", + "operationId": "stars_list", "parameters": [ { + "description": "Authentication token. Requires scope: `stars:read`", "in": "query", - "name": "count", - "type": "integer" + "name": "token", + "type": "string" }, { - "description": "If true always return the complete reaction list.", "in": "query", - "name": "full", - "type": "boolean" + "name": "count", + "type": "string" }, { - "description": "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](/docs/pagination) for more details.", "in": "query", - "name": "cursor", + "name": "page", "type": "string" }, { - "description": "Authentication token. Requires scope: `reactions:read`", + "description": "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](/docs/pagination) for more details.", "in": "query", - "name": "token", - "required": true, + "name": "cursor", "type": "string" }, { @@ -23435,17 +21978,6 @@ "in": "query", "name": "limit", "type": "integer" - }, - { - "description": "Show reactions made by this user. Defaults to the authed user.", - "in": "query", - "name": "user", - "type": "string" - }, - { - "in": "query", - "name": "page", - "type": "integer" } ], "produces": [ @@ -23456,100 +21988,12 @@ "description": "Typical success response", "examples": { "application/json": { - "items": [ - { - "channel": "C3UKJTQAC", - "message": { - "bot_id": "B4VLRLMKJ", - "reactions": [ - { - "count": 1, - "name": "robot_face", - "users": [ - "U2U85N1RV" - ] - } - ], - "subtype": "bot_message", - "text": "Hello from Python! :tada:", - "ts": "1507849573.000090", - "username": "Shipit Notifications" - }, - "type": "message" - }, - { - "comment": { - "comment": "This is a file comment", - "created": 1508286096, - "id": "Fc7LP08P1U", - "reactions": [ - { - "count": 1, - "name": "white_check_mark", - "users": [ - "U2U85N1RV" - ] - } - ], - "timestamp": 1508286096, - "type": "file_comment", - "user": "U2U85N1RV" - }, - "file": { - "channels": [ - "C2U7V2YA2" - ], - "comments_count": 1, - "created": 1507850315, - "reactions": [ - { - "count": 1, - "name": "stuck_out_tongue_winking_eye", - "users": [ - "U2U85N1RV" - ] - } - ], - "title": "computer.gif", - "user": "U2U85N1RV", - "username": "" - } - }, - { - "file": { - "channels": [ - "C2U7V2YA2" - ], - "comments_count": 1, - "created": 1507850315, - "id": "F7H0D7ZA4", - "name": "computer.gif", - "reactions": [ - { - "count": 1, - "name": "stuck_out_tongue_winking_eye", - "users": [ - "U2U85N1RV" - ] - } - ], - "size": 1639034, - "title": "computer.gif", - "user": "U2U85N1RV", - "username": "" - }, - "type": "file" - } - ], - "ok": true, - "response_metadata": { - "next_cursor": "dGVhbTpDMUg5UkVTR0w=" - } + "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from reactions.list method", + "description": "Schema for successful response from stars.list method", "properties": { "items": { "items": { @@ -23560,6 +22004,9 @@ "channel": { "$ref": "#/definitions/defs_channel" }, + "date_create": { + "type": "integer" + }, "message": { "$ref": "#/definitions/objs_message" }, @@ -23573,13 +22020,17 @@ "required": [ "type", "channel", - "message" + "message", + "date_create" ], "type": "object" }, { "additionalProperties": false, "properties": { + "date_create": { + "type": "integer" + }, "file": { "$ref": "#/definitions/objs_file" }, @@ -23592,7 +22043,8 @@ }, "required": [ "type", - "file" + "file", + "date_create" ], "type": "object" }, @@ -23602,6 +22054,9 @@ "comment": { "$ref": "#/definitions/objs_comment" }, + "date_create": { + "type": "integer" + }, "file": { "$ref": "#/definitions/objs_file" }, @@ -23615,57 +22070,130 @@ "required": [ "type", "file", - "comment" + "comment", + "date_create" ], "type": "object" - } - ] - }, - "type": "array" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "paging": { - "$ref": "#/definitions/objs_paging" - }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" - } - }, - "required": [ - "ok", - "items" - ], - "title": "reactions.list schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from reactions.list method", - "properties": { - "error": { - "enum": [ - "user_not_found", - "not_authed", - "invalid_auth", - "account_inactiv", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", + }, + { + "additionalProperties": false, + "properties": { + "channel": { + "$ref": "#/definitions/defs_channel" + }, + "date_create": { + "type": "integer" + }, + "type": { + "enum": [ + "channel" + ], + "type": "string" + } + }, + "required": [ + "type", + "channel", + "date_create" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "channel": { + "$ref": "#/definitions/defs_dm_id" + }, + "date_create": { + "type": "integer" + }, + "type": { + "enum": [ + "im" + ], + "type": "string" + } + }, + "required": [ + "type", + "channel", + "date_create" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "channel": { + "$ref": "#/definitions/defs_group_id" + }, + "date_create": { + "type": "integer" + }, + "type": { + "enum": [ + "group" + ], + "type": "string" + } + }, + "required": [ + "type", + "channel", + "date_create" + ], + "type": "object" + } + ] + }, + "type": "array" + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "paging": { + "$ref": "#/definitions/objs_paging" + } + }, + "required": [ + "ok", + "items" + ], + "title": "stars.list schema", + "type": "object" + } + }, + "default": { + "description": "Typical error response", + "examples": { + "application/json": { + "error": "invalid_auth", + "ok": false + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for error response from stars.list method", + "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", "team_added_to_org", "invalid_json", "json_not_object", @@ -23683,7 +22211,7 @@ "ok", "error" ], - "title": "reactions.list error schema", + "title": "stars.list error schema", "type": "object" } } @@ -23691,64 +22219,57 @@ "security": [ { "slackAuth": [ - "reactions:read" + "stars:read" ] } ], "tags": [ - "reactions" + "stars" ] } }, - "/reactions.remove": { + "/stars.remove": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Removes a reaction from an item.", + "description": "Removes a star from an item.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/reactions.remove" + "url": "https://api.slack.com/methods/stars.remove" }, - "operationId": "reactions_remove", + "operationId": "stars_remove", "parameters": [ { - "description": "Reaction (emoji) name.", - "in": "formData", - "name": "name", + "description": "Authentication token. Requires scope: `stars:write`", + "in": "header", + "name": "token", "required": true, "type": "string" }, { - "description": "File comment to remove reaction from.", + "description": "Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`).", "in": "formData", - "name": "file_comment", + "name": "channel", "type": "string" }, { - "description": "Timestamp of the message to remove reaction from.", + "description": "File to remove star from.", "in": "formData", - "name": "timestamp", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `reactions:write`", - "in": "header", - "name": "token", - "required": true, + "name": "file", "type": "string" }, { - "description": "File to remove reaction from.", + "description": "File comment to remove star from.", "in": "formData", - "name": "file", + "name": "file_comment", "type": "string" }, { - "description": "Channel where the message to remove reaction from was posted.", + "description": "Timestamp of the message to remove star from.", "in": "formData", - "name": "channel", + "name": "timestamp", "type": "string" } ], @@ -23765,7 +22286,7 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from reactions.remove method", + "description": "Schema for successful response from stars.remove method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -23774,7 +22295,7 @@ "required": [ "ok" ], - "title": "reactions.remove schema", + "title": "stars.remove schema", "type": "object" } }, @@ -23782,27 +22303,33 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "no_reaction", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from reactions.remove method", + "description": "Schema for error response from stars.remove method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "bad_timestamp", + "message_not_found", "file_not_found", "file_comment_not_found", - "message_not_found", + "channel_not_found", "no_item_specified", - "invalid_name", - "no_reaction", + "not_starred", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -23826,7 +22353,7 @@ "ok", "error" ], - "title": "reactions.remove error schema", + "title": "stars.remove error schema", "type": "object" } } @@ -23834,50 +22361,48 @@ "security": [ { "slackAuth": [ - "reactions:write" + "stars:write" ] } ], "tags": [ - "reactions" + "stars" ] } }, - "/reminders.add": { - "post": { + "/team.accessLogs": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Creates a reminder.", + "description": "Gets the access logs for the current team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/reminders.add" + "url": "https://api.slack.com/methods/team.accessLogs" }, - "operationId": "reminders_add", + "operationId": "team_accessLogs", "parameters": [ { - "description": "The content of the reminder", - "in": "formData", - "name": "text", + "description": "Authentication token. Requires scope: `admin`", + "in": "query", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `reminders:write`", - "in": "header", - "name": "token", + "description": "End of time range of logs to include in results (inclusive).", + "in": "query", + "name": "before", "type": "string" }, { - "description": "The user who will receive the reminder. If no user is specified, the reminder will go to user who created it.", - "in": "formData", - "name": "user", + "in": "query", + "name": "count", "type": "string" }, { - "description": "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\")", - "in": "formData", - "name": "time", + "in": "query", + "name": "page", "type": "string" } ], @@ -23886,51 +22411,149 @@ ], "responses": { "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from reminders.add method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "reminder": { - "$ref": "#/definitions/objs_reminder" - } - }, - "required": [ - "ok", - "reminder" - ], - "title": "reminders.add schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", + "description": "This response demonstrates pagination and two access log entries.", "examples": { "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from reminders.add method", + "logins": [ + { + "count": 1, + "country": "US", + "date_first": 1422922864, + "date_last": 1422922864, + "ip": "127.0.0.1", + "isp": "BigCo ISP", + "region": "CA", + "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", + "user_id": "U45678", + "username": "alice" + }, + { + "count": 1, + "country": "US", + "date_first": 1422922493, + "date_last": 1422922493, + "ip": "127.0.0.1", + "isp": "BigCo ISP", + "region": "CA", + "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", + "user_id": "U12345", + "username": "white_rabbit" + } + ], + "ok": true, + "paging": { + "count": 100, + "page": 1, + "pages": 1, + "total": 2 + } + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for successful response from team.accessLogs method", + "properties": { + "logins": { + "items": { + "additionalProperties": false, + "properties": { + "count": { + "type": "integer" + }, + "country": { + "type": [ + "string", + "null" + ] + }, + "date_first": { + "type": "integer" + }, + "date_last": { + "type": "integer" + }, + "ip": { + "type": [ + "string", + "null" + ] + }, + "isp": { + "type": [ + "string", + "null" + ] + }, + "region": { + "type": [ + "string", + "null" + ] + }, + "user_agent": { + "type": "string" + }, + "user_id": { + "$ref": "#/definitions/defs_user_id" + }, + "username": { + "type": "string" + } + }, + "required": [ + "user_id", + "username", + "date_first", + "date_last", + "count", + "ip", + "user_agent", + "isp", + "country", + "region" + ], + "type": "object" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "paging": { + "$ref": "#/definitions/objs_paging" + } + }, + "required": [ + "ok", + "logins", + "paging" + ], + "title": "team.accessLogs schema", + "type": "object" + } + }, + "default": { + "description": "A workspace must be on a paid plan to use this method, otherwise the `paid_only` error is thrown:", + "examples": { + "application/json": { + "error": "paid_only", + "ok": false + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for error response from team.accessLogs method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "cannot_parse", - "user_not_found", - "cannot_add_bot", - "cannot_add_slackbot", - "cannot_add_others", - "cannot_add_others_recurring", + "paid_only", + "over_pagination_limit", "not_authed", "invalid_auth", "account_inactive", @@ -23961,7 +22584,7 @@ "ok", "error" ], - "title": "reminders.add error schema", + "title": "team.accessLogs error schema", "type": "object" } } @@ -23969,38 +22592,38 @@ "security": [ { "slackAuth": [ - "reminders:write" + "admin" ] } ], "tags": [ - "reminders" + "team" ] } }, - "/reminders.complete": { - "post": { + "/team.billableInfo": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Marks a reminder as complete.", + "description": "Gets billable users information for the current team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/reminders.complete" + "url": "https://api.slack.com/methods/team.billableInfo" }, - "operationId": "reminders_complete", + "operationId": "team_billableInfo", "parameters": [ { - "description": "Authentication token. Requires scope: `reminders:write`", - "in": "header", + "description": "Authentication token. Requires scope: `admin`", + "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "The ID of the reminder to be marked as complete", - "in": "formData", - "name": "reminder", + "description": "A user to retrieve the billable information for. Defaults to all users.", + "in": "query", + "name": "user", "type": "string" } ], @@ -24012,12 +22635,23 @@ "description": "Typical success response", "examples": { "application/json": { + "billable_info": { + "U02UCPE1R": { + "billing_active": true + }, + "U02UEBSD2": { + "billing_active": true + }, + "U0632EWRW": { + "billing_active": false + } + }, "ok": true } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from reminders.complete method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -24026,7 +22660,7 @@ "required": [ "ok" ], - "title": "reminders.complete schema", + "title": "Default success template", "type": "object" } }, @@ -24039,45 +22673,17 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from reminders.complete method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_found", - "cannot_complete_recurring", - "cannot_complete_others", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "reminders.complete error schema", + "title": "Default error template", "type": "object" } } @@ -24085,38 +22691,38 @@ "security": [ { "slackAuth": [ - "reminders:write" + "admin" ] } ], "tags": [ - "reminders" + "team" ] } }, - "/reminders.delete": { - "post": { + "/team.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Deletes a reminder.", + "description": "Gets information about the current team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/reminders.delete" + "url": "https://api.slack.com/methods/team.info" }, - "operationId": "reminders_delete", + "operationId": "team_info", "parameters": [ { - "description": "Authentication token. Requires scope: `reminders:write`", - "in": "header", + "description": "Authentication token. Requires scope: `team:read`", + "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "The ID of the reminder", - "in": "formData", - "name": "reminder", + "description": "Team to get info on, if omitted, will return information about the current team. Will only return team that the authenticated token is allowed to see through external shared channels", + "in": "query", + "name": "team", "type": "string" } ], @@ -24128,21 +22734,42 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "ok": true, + "team": { + "domain": "example", + "email_domain": "example.com", + "enterprise_id": "E1234A12AB", + "enterprise_name": "Umbrella Corporation", + "icon": { + "image_102": "https://...", + "image_132": "https://...", + "image_34": "https://...", + "image_44": "https://...", + "image_68": "https://...", + "image_88": "https://...", + "image_default": true + }, + "id": "T12345", + "name": "My Team" + } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from reminders.delete method", + "description": "Schema for successful response from team.info method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - } + }, + "team": { + "$ref": "#/definitions/objs_team" + } }, "required": [ - "ok" + "ok", + "team" ], - "title": "reminders.delete schema", + "title": "team.info schema", "type": "object" } }, @@ -24156,18 +22783,19 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from reminders.delete method", + "description": "Schema for error response from team.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "not_found", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", - "org_login_required", - "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -24191,7 +22819,7 @@ "ok", "error" ], - "title": "reminders.delete error schema", + "title": "team.info error schema", "type": "object" } } @@ -24199,37 +22827,66 @@ "security": [ { "slackAuth": [ - "reminders:write" + "team:read" ] } ], "tags": [ - "reminders" + "team" ] } }, - "/reminders.info": { + "/team.integrationLogs": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Gets information about a reminder.", + "description": "Gets the integration logs for the current team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/reminders.info" + "url": "https://api.slack.com/methods/team.integrationLogs" }, - "operationId": "reminders_info", + "operationId": "team_integrationLogs", "parameters": [ { - "description": "Authentication token. Requires scope: `reminders:read`", + "description": "Authentication token. Requires scope: `admin`", "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "The ID of the reminder", + "description": "Filter logs to this Slack app. Defaults to all logs.", "in": "query", - "name": "reminder", + "name": "app_id", + "type": "string" + }, + { + "description": "Filter logs with this change type. Defaults to all logs.", + "in": "query", + "name": "change_type", + "type": "string" + }, + { + "in": "query", + "name": "count", + "type": "string" + }, + { + "in": "query", + "name": "page", + "type": "string" + }, + { + "description": "Filter logs to this service. Defaults to all logs.", + "in": "query", + "name": "service_id", + "type": "string" + }, + { + "description": "Filter logs generated by this user\u2019s actions. Defaults to all logs.", + "in": "query", + "name": "user", "type": "string" } ], @@ -24246,20 +22903,74 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from reminders.info method", + "description": "Schema for successful response from team.integrationLogs method", "properties": { + "logs": { + "items": { + "additionalProperties": false, + "properties": { + "admin_app_id": { + "$ref": "#/definitions/defs_app_id" + }, + "app_id": { + "$ref": "#/definitions/defs_app_id" + }, + "app_type": { + "type": "string" + }, + "change_type": { + "type": "string" + }, + "channel": { + "$ref": "#/definitions/defs_channel" + }, + "date": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "service_type": { + "type": "string" + }, + "user_id": { + "$ref": "#/definitions/defs_user_id" + }, + "user_name": { + "type": "string" + } + }, + "required": [ + "user_id", + "user_name", + "date", + "change_type", + "app_type", + "app_id", + "scope" + ], + "type": "object" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "reminder": { - "$ref": "#/definitions/objs_reminder" + "paging": { + "$ref": "#/definitions/objs_paging" } }, "required": [ "ok", - "reminder" + "logs", + "paging" ], - "title": "reminders.info schema", + "title": "team.integrationLogs schema", "type": "object" } }, @@ -24273,11 +22984,14 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from reminders.info method", + "description": "Schema for error response from team.integrationLogs method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "not_found", "not_authed", "invalid_auth", "account_inactive", @@ -24308,7 +23022,7 @@ "ok", "error" ], - "title": "reminders.info error schema", + "title": "team.integrationLogs error schema", "type": "object" } } @@ -24316,31 +23030,38 @@ "security": [ { "slackAuth": [ - "reminders:read" + "admin" ] } ], "tags": [ - "reminders" + "team" ] } }, - "/reminders.list": { + "/team.profile.get": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Lists all reminders created by or for a given user.", + "description": "Retrieve a team's profile.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/reminders.list" + "url": "https://api.slack.com/methods/team.profile.get" }, - "operationId": "reminders_list", + "operationId": "team_profile_get", "parameters": [ { - "description": "Authentication token. Requires scope: `reminders:read`", + "description": "Authentication token. Requires scope: `users.profile:read`", "in": "query", "name": "token", + "required": true, + "type": "string" + }, + { + "description": "Filter by visibility.", + "in": "query", + "name": "visibility", "type": "string" } ], @@ -24352,28 +23073,104 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "ok": true, + "profile": { + "fields": [ + { + "hint": "Enter the extension to reach your desk", + "id": "Xf06054AAA", + "is_hidden": 1, + "label": "Phone extension", + "options": null, + "ordering": 0, + "possible_values": null, + "type": "text" + }, + { + "hint": "When you were born", + "id": "Xf06054BBB", + "label": "Date of birth", + "options": null, + "ordering": 1, + "possible_values": null, + "type": "date" + }, + { + "hint": "Enter a link to your Facebook profile", + "id": "Xf06054CCC", + "label": "Facebook", + "options": null, + "ordering": 2, + "possible_values": null, + "type": "link" + }, + { + "hint": "Hogwarts, obviously", + "id": "Xf06054DDD", + "label": "House", + "options": null, + "ordering": 3, + "possible_values": [ + "Gryffindor", + "Hufflepuff", + "Ravenclaw", + "Slytherin" + ], + "type": "options_list" + }, + { + "hint": "Office location (LDAP)", + "id": "Xf06054EEE", + "label": "Location", + "options": { + "is_protected": 1 + }, + "ordering": 4, + "possible_values": null, + "type": "text" + }, + { + "hint": "The boss", + "id": "Xf06054FFF", + "label": "Manager", + "options": null, + "ordering": 5, + "possible_values": null, + "type": "user" + } + ] + } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from reminders.list method", + "description": "Schema for successful response from team.profile.get method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" }, - "reminders": { - "items": { - "$ref": "#/definitions/objs_reminder" + "profile": { + "additionalProperties": false, + "properties": { + "fields": { + "items": { + "$ref": "#/definitions/objs_team_profile_field" + }, + "type": "array", + "uniqueItems": true + } }, - "type": "array" + "required": [ + "fields" + ], + "type": "object" } }, "required": [ "ok", - "reminders" + "profile" ], - "title": "reminders.list schema", + "title": "team.profile.get success schema", "type": "object" } }, @@ -24387,29 +23184,30 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from reminders.list method", + "description": "Schema for error response from team.profile.get method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", - "invalid_post_type", + "invalid_post_typ", "missing_post_type", "team_added_to_org", "invalid_json", "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" + "request_timeou", + "upgrade_required" ], "type": "string" }, @@ -24421,7 +23219,7 @@ "ok", "error" ], - "title": "reminders.list error schema", + "title": "team.profile.get error schema", "type": "object" } } @@ -24429,45 +23227,66 @@ "security": [ { "slackAuth": [ - "reminders:read" + "users.profile:read" ] } ], "tags": [ - "reminders" + "team.profile", + "team" ] } }, - "/rtm.connect": { - "get": { + "/usergroups.create": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Starts a Real Time Messaging session.", + "description": "Create a User Group", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/rtm.connect" + "url": "https://api.slack.com/methods/usergroups.create" }, - "operationId": "rtm_connect", + "operationId": "usergroups_create", "parameters": [ { - "description": "Only deliver presence events when requested by subscription. See [presence subscriptions](/docs/presence-and-status#subscriptions).", - "in": "query", - "name": "presence_sub", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `rtm:stream`", - "in": "query", + "description": "Authentication token. Requires scope: `usergroups:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Batch presence deliveries via subscription. Enabling changes the shape of `presence_change` events. See [batch presence](/docs/presence-and-status#batching).", - "in": "query", - "name": "batch_presence_aware", + "description": "A comma separated string of encoded channel IDs for which the User Group uses as a default.", + "in": "formData", + "name": "channels", + "type": "string" + }, + { + "description": "A short description of the User Group.", + "in": "formData", + "name": "description", + "type": "string" + }, + { + "description": "A mention handle. Must be unique among channels, users and User Groups.", + "in": "formData", + "name": "handle", + "type": "string" + }, + { + "description": "Include the number of users in each User Group.", + "in": "formData", + "name": "include_count", "type": "boolean" + }, + { + "description": "A name for the User Group. Must be unique among User Groups.", + "in": "formData", + "name": "name", + "required": true, + "type": "string" } ], "produces": [ @@ -24478,74 +23297,25 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "self": { - "id": "U4X318ZMZ", - "name": "robotoverlord" - }, - "team": { - "domain": "slackdemo", - "id": "T2U81E2FP", - "name": "SlackDemo" - }, - "url": "wss://..." + "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from rtm.connect method", + "description": "Schema for successful response from usergroups.create method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" }, - "self": { - "additionalProperties": false, - "properties": { - "id": { - "$ref": "#/definitions/defs_user_id" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name" - ], - "type": "object" - }, - "team": { - "additionalProperties": false, - "properties": { - "domain": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/defs_team" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "domain" - ], - "type": "object" - }, - "url": { - "format": "uri", - "type": "string" + "usergroup": { + "$ref": "#/definitions/objs_subteam" } }, "required": [ "ok", - "url", - "team", - "self" + "usergroup" ], - "title": "rtm.connect schema", + "title": "usergroups.create schema", "type": "object" } }, @@ -24559,15 +23329,23 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from rtm.connect method", + "description": "Schema for error response from usergroups.create method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "permission_denied", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", + "org_login_required", + "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -24591,7 +23369,7 @@ "ok", "error" ], - "title": "rtm.connect error schema", + "title": "usergroups.create error schema", "type": "object" } } @@ -24599,69 +23377,47 @@ "security": [ { "slackAuth": [ - "rtm:stream" + "usergroups:write" ] } ], "tags": [ - "rtm" + "usergroups" ] } }, - "/search.messages": { - "get": { + "/usergroups.disable": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Searches for messages matching a query.", + "description": "Disable an existing User Group", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/search.messages" + "url": "https://api.slack.com/methods/usergroups.disable" }, - "operationId": "search_messages", + "operationId": "usergroups_disable", "parameters": [ { - "description": "Change sort direction to ascending (`asc`) or descending (`desc`).", - "in": "query", - "name": "sort_dir", - "type": "string" - }, - { - "description": "Search query.", - "in": "query", - "name": "query", - "required": true, - "type": "string" - }, - { - "description": "Return matches sorted by either `score` or `timestamp`.", - "in": "query", - "name": "sort", - "type": "string" - }, - { - "description": "Pass the number of results you want per \"page\". Maximum of `100`.", - "in": "query", - "name": "count", - "type": "integer" - }, - { - "description": "Authentication token. Requires scope: `search:read`", - "in": "query", + "description": "Authentication token. Requires scope: `usergroups:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Pass a value of `true` to enable query highlight markers (see below).", - "in": "query", - "name": "highlight", + "description": "Include the number of users in the User Group.", + "in": "formData", + "name": "include_count", "type": "boolean" }, { - "in": "query", - "name": "page", - "type": "integer" + "description": "The encoded ID of the User Group to disable.", + "in": "formData", + "name": "usergroup", + "required": true, + "type": "string" } ], "produces": [ @@ -24672,83 +23428,25 @@ "description": "Typical success response", "examples": { "application/json": { - "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" + "ok": true } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from usergroups.disable method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "usergroup": { + "$ref": "#/definitions/objs_subteam" } }, "required": [ - "ok" + "ok", + "usergroup" ], - "title": "Default success template", + "title": "usergroups.disable schema", "type": "object" } }, @@ -24756,22 +23454,53 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "No query passed", + "error": "invalid_auth", "ok": false } }, "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from usergroups.disable method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "permission_denied", + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", + "user_is_restricted", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "fatal_error" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "usergroups.disable error schema", "type": "object" } } @@ -24779,57 +23508,46 @@ "security": [ { "slackAuth": [ - "search:read" + "usergroups:write" ] } ], "tags": [ - "search" + "usergroups" ] } }, - "/stars.add": { + "/usergroups.enable": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Adds a star to an item.", + "description": "Enable a User Group", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/stars.add" + "url": "https://api.slack.com/methods/usergroups.enable" }, - "operationId": "stars_add", + "operationId": "usergroups_enable", "parameters": [ { - "description": "File comment to add star to.", - "in": "formData", - "name": "file_comment", - "type": "string" - }, - { - "description": "Timestamp of the message to add star to.", - "in": "formData", - "name": "timestamp", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `stars:write`", + "description": "Authentication token. Requires scope: `usergroups:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "File to add star to.", + "description": "Include the number of users in the User Group.", "in": "formData", - "name": "file", - "type": "string" + "name": "include_count", + "type": "boolean" }, { - "description": "Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`).", + "description": "The encoded ID of the User Group to enable.", "in": "formData", - "name": "channel", + "name": "usergroup", + "required": true, "type": "string" } ], @@ -24846,16 +23564,20 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from stars.add method", + "description": "Schema for successful response from usergroups.enable method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "usergroup": { + "$ref": "#/definitions/objs_subteam" } }, "required": [ - "ok" + "ok", + "usergroup" ], - "title": "stars.add schema", + "title": "usergroups.enable schema", "type": "object" } }, @@ -24869,23 +23591,22 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from stars.add method", + "description": "Schema for error response from usergroups.enable method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "bad_timestamp", - "message_not_found", - "file_not_found", - "file_comment_not_found", - "channel_not_found", - "no_item_specified", - "already_starred", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -24896,8 +23617,10 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_require", + "fatal_error", + "missing_charset", + "superfluous_charset" ], "type": "string" }, @@ -24909,7 +23632,7 @@ "ok", "error" ], - "title": "stars.add error schema", + "title": "usergroups.enable error schema", "type": "object" } } @@ -24917,54 +23640,51 @@ "security": [ { "slackAuth": [ - "stars:write" + "usergroups:write" ] } ], "tags": [ - "stars" + "usergroups" ] } }, - "/stars.list": { + "/usergroups.list": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Lists stars for a user.", + "description": "List all User Groups for a team", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/stars.list" + "url": "https://api.slack.com/methods/usergroups.list" }, - "operationId": "stars_list", + "operationId": "usergroups_list", "parameters": [ { + "description": "Include the list of users for each User Group.", "in": "query", - "name": "count", - "type": "string" - }, - { - "description": "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](/docs/pagination) for more details.", - "in": "query", - "name": "cursor", - "type": "string" + "name": "include_users", + "type": "boolean" }, { - "description": "Authentication token. Requires scope: `stars:read`", + "description": "Authentication token. Requires scope: `usergroups:read`", "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "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.", + "description": "Include the number of users in each User Group.", "in": "query", - "name": "limit", - "type": "integer" + "name": "include_count", + "type": "boolean" }, { + "description": "Include disabled User Groups.", "in": "query", - "name": "page", - "type": "string" + "name": "include_disabled", + "type": "boolean" } ], "produces": [ @@ -24975,178 +23695,93 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "ok": true, + "usergroups": [ + { + "auto_type": "admin", + "created_by": "USLACKBOT", + "date_create": 1446598059, + "date_delete": 0, + "date_update": 1446670362, + "deleted_by": null, + "description": "A group of all Administrators on your team.", + "handle": "admins", + "id": "S0614TZR7", + "is_external": false, + "is_usergroup": true, + "name": "Team Admins", + "prefs": { + "channels": [], + "groups": [] + }, + "team_id": "T060RNRCH", + "updated_by": "U060RNRCZ", + "user_count": "2" + }, + { + "auto_type": "owner", + "created_by": "USLACKBOT", + "date_create": 1446678371, + "date_delete": 0, + "date_update": 1446678371, + "deleted_by": null, + "description": "A group of all Owners on your team.", + "handle": "owners", + "id": "S06158AV7", + "is_external": false, + "is_usergroup": true, + "name": "Team Owners", + "prefs": { + "channels": [], + "groups": [] + }, + "team_id": "T060RNRCH", + "updated_by": "USLACKBOT", + "user_count": "1" + }, + { + "auto_type": null, + "created_by": "U060RNRCZ", + "date_create": 1446746793, + "date_delete": 1446748865, + "date_update": 1446747767, + "deleted_by": null, + "description": "Marketing gurus, PR experts and product advocates.", + "handle": "marketing-team", + "id": "S0615G0KT", + "is_external": false, + "is_usergroup": true, + "name": "Marketing Team", + "prefs": { + "channels": [], + "groups": [] + }, + "team_id": "T060RNRCH", + "updated_by": "U060RNRCZ", + "user_count": "0" + } + ] } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from stars.list method", + "description": "Schema for successful response from usergroups.list method", "properties": { - "items": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "usergroups": { "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, - "date_create": { - "type": "integer" - }, - "message": { - "$ref": "#/definitions/objs_message" - }, - "type": { - "enum": [ - "message" - ], - "type": "string" - } - }, - "required": [ - "type", - "channel", - "message", - "date_create" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "date_create": { - "type": "integer" - }, - "file": { - "$ref": "#/definitions/objs_file" - }, - "type": { - "enum": [ - "file" - ], - "type": "string" - } - }, - "required": [ - "type", - "file", - "date_create" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "comment": { - "$ref": "#/definitions/objs_comment" - }, - "date_create": { - "type": "integer" - }, - "file": { - "$ref": "#/definitions/objs_file" - }, - "type": { - "enum": [ - "file_comment" - ], - "type": "string" - } - }, - "required": [ - "type", - "file", - "comment", - "date_create" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, - "date_create": { - "type": "integer" - }, - "type": { - "enum": [ - "channel" - ], - "type": "string" - } - }, - "required": [ - "type", - "channel", - "date_create" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "channel": { - "$ref": "#/definitions/defs_dm_id" - }, - "date_create": { - "type": "integer" - }, - "type": { - "enum": [ - "im" - ], - "type": "string" - } - }, - "required": [ - "type", - "channel", - "date_create" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "channel": { - "$ref": "#/definitions/defs_group_id" - }, - "date_create": { - "type": "integer" - }, - "type": { - "enum": [ - "group" - ], - "type": "string" - } - }, - "required": [ - "type", - "channel", - "date_create" - ], - "type": "object" - } - ] + "$ref": "#/definitions/objs_subteam" }, "type": "array" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "paging": { - "$ref": "#/definitions/objs_paging" } }, "required": [ "ok", - "items" + "usergroups" ], - "title": "stars.list schema", + "title": "usergroups.list schema", "type": "object" } }, @@ -25160,8 +23795,12 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from stars.list method", + "description": "Schema for error response from usergroups.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -25171,6 +23810,7 @@ "no_permission", "org_login_required", "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -25181,8 +23821,10 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_require", + "fatal_error", + "missing_charset", + "superfluous_charset" ], "type": "string" }, @@ -25194,7 +23836,7 @@ "ok", "error" ], - "title": "stars.list error schema", + "title": "usergroups.list error schema", "type": "object" } } @@ -25202,56 +23844,70 @@ "security": [ { "slackAuth": [ - "stars:read" + "usergroups:read" ] } ], "tags": [ - "stars" + "usergroups" ] } }, - "/stars.remove": { + "/usergroups.update": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Removes a star from an item.", + "description": "Update an existing User Group", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/stars.remove" + "url": "https://api.slack.com/methods/usergroups.update" }, - "operationId": "stars_remove", + "operationId": "usergroups_update", "parameters": [ { - "description": "File comment to remove star from.", + "description": "A mention handle. Must be unique among channels, users and User Groups.", "in": "formData", - "name": "file_comment", + "name": "handle", "type": "string" }, { - "description": "Timestamp of the message to remove star from.", + "description": "A short description of the User Group.", "in": "formData", - "name": "timestamp", - "type": "number" + "name": "description", + "type": "string" }, { - "description": "Authentication token. Requires scope: `stars:write`", + "description": "A comma separated string of encoded channel IDs for which the User Group uses as a default.", + "in": "formData", + "name": "channels", + "type": "string" + }, + { + "description": "Authentication token. Requires scope: `usergroups:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`).", + "description": "Include the number of users in the User Group.", "in": "formData", - "name": "channel", + "name": "include_count", + "type": "boolean" + }, + { + "description": "The encoded ID of the User Group to update.", + "in": "formData", + "name": "usergroup", + "required": true, "type": "string" }, { - "description": "File to remove star from.", + "description": "A name for the User Group. Must be unique among User Groups.", "in": "formData", - "name": "file", + "name": "name", "type": "string" } ], @@ -25263,21 +23919,50 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "ok": true, + "usergroup": { + "auto_type": null, + "created_by": "U060R4BJ4", + "date_create": 1447096577, + "date_delete": 0, + "date_update": 1447102109, + "deleted_by": null, + "description": "Marketing gurus, PR experts and product advocates.", + "handle": "marketing-team", + "id": "S0616NG6M", + "is_external": false, + "is_usergroup": true, + "name": "Marketing Team", + "prefs": { + "channels": [], + "groups": [] + }, + "team_id": "T060R4BHN", + "updated_by": "U060R4BJ4", + "user_count": 1, + "users": [ + "U060R4BJ4", + "U060RNRCZ" + ] + } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from stars.remove method", + "description": "Schema for successful response from usergroups.update method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "usergroup": { + "$ref": "#/definitions/objs_subteam" } }, "required": [ - "ok" + "ok", + "usergroup" ], - "title": "stars.remove schema", + "title": "usergroups.update schema", "type": "object" } }, @@ -25291,23 +23976,23 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from stars.remove method", + "description": "Schema for error response from usergroups.update method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "bad_timestamp", - "message_not_found", - "file_not_found", - "file_comment_not_found", - "channel_not_found", - "no_item_specified", - "not_starred", + "permission_denied", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -25318,8 +24003,10 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_require", + "fatal_error", + "missing_charset", + "superfluous_charset" ], "type": "string" }, @@ -25331,7 +24018,7 @@ "ok", "error" ], - "title": "stars.remove error schema", + "title": "usergroups.update error schema", "type": "object" } } @@ -25339,48 +24026,45 @@ "security": [ { "slackAuth": [ - "stars:write" + "usergroups:write" ] } ], "tags": [ - "stars" + "usergroups" ] } }, - "/team.accessLogs": { + "/usergroups.users.list": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Gets the access logs for the current team.", + "description": "List all users in a User Group", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/team.accessLogs" + "url": "https://api.slack.com/methods/usergroups.users.list" }, - "operationId": "team_accessLogs", + "operationId": "usergroups_users_list", "parameters": [ { - "in": "query", - "name": "count", - "type": "integer" - }, - { - "description": "Authentication token. Requires scope: `admin`", + "description": "Authentication token. Requires scope: `usergroups:read`", "in": "query", "name": "token", "required": true, "type": "string" }, { + "description": "Allow results that involve disabled User Groups.", "in": "query", - "name": "page", - "type": "integer" + "name": "include_disabled", + "type": "boolean" }, { - "description": "End of time range of logs to include in results (inclusive).", + "description": "The encoded ID of the User Group to update.", "in": "query", - "name": "before", + "name": "usergroup", + "required": true, "type": "string" } ], @@ -25389,133 +24073,56 @@ ], "responses": { "200": { - "description": "This response demonstrates pagination and two access log entries.", + "description": "Standard success response when used with a user token", "examples": { "application/json": { - "logins": [ - { - "count": 1, - "country": "US", - "date_first": 1422922864, - "date_last": 1422922864, - "ip": "127.0.0.1", - "isp": "BigCo ISP", - "region": "CA", - "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", - "user_id": "U45678", - "username": "alice" - }, - { - "count": 1, - "country": "US", - "date_first": 1422922493, - "date_last": 1422922493, - "ip": "127.0.0.1", - "isp": "BigCo ISP", - "region": "CA", - "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", - "user_id": "U12345", - "username": "white_rabbit" - } - ], "ok": true, - "paging": { - "count": 100, - "page": 1, - "pages": 1, - "total": 2 - } + "users": [ + "U060R4BJ4", + "W123A4BC5" + ] } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from team.accessLogs method", + "description": "Schema for successful response from usergroups.users.list method", "properties": { - "logins": { - "items": { - "additionalProperties": false, - "properties": { - "count": { - "type": "integer" - }, - "country": { - "type": "string" - }, - "date_first": { - "type": "integer" - }, - "date_last": { - "type": "integer" - }, - "ip": { - "type": "string" - }, - "isp": { - "type": "string" - }, - "region": { - "type": "string" - }, - "user_agent": { - "type": "string" - }, - "user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "username": { - "type": "string" - } - }, - "required": [ - "user_id", - "username", - "date_first", - "date_last", - "count", - "ip", - "user_agent", - "isp", - "country", - "region" - ], - "type": "object" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "paging": { - "$ref": "#/definitions/objs_paging" + "users": { + "items": { + "$ref": "#/definitions/defs_user_id" + }, + "type": "array" } }, "required": [ "ok", - "logins", - "paging" + "users" ], - "title": "team.accessLogs schema", + "title": "usergroups.users.list schema", "type": "object" } }, "default": { - "description": "A workspace must be on a paid plan to use this method, otherwise the `paid_only` error is thrown:", + "description": "Standard failure response when used with an invalid token", "examples": { "application/json": { - "error": "paid_only", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from team.accessLogs method", + "description": "Schema for error response from usergroups.users.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "paid_only", - "over_pagination_limit", "not_authed", "invalid_auth", "account_inactive", @@ -25523,6 +24130,7 @@ "no_permission", "org_login_required", "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -25533,8 +24141,10 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_require", + "fatal_error", + "missing_charset", + "superfluous_charset" ], "type": "string" }, @@ -25546,7 +24156,7 @@ "ok", "error" ], - "title": "team.accessLogs error schema", + "title": "usergroups.users.list error schema", "type": "object" } } @@ -25554,38 +24164,54 @@ "security": [ { "slackAuth": [ - "admin" + "usergroups:read" ] } ], "tags": [ - "team" + "usergroups.users", + "usergroups" ] } }, - "/team.billableInfo": { - "get": { + "/usergroups.users.update": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Gets billable users information for the current team.", + "description": "Update the list of users for a User Group", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/team.billableInfo" + "url": "https://api.slack.com/methods/usergroups.users.update" }, - "operationId": "team_billableInfo", + "operationId": "usergroups_users_update", "parameters": [ { - "description": "Authentication token. Requires scope: `admin`", - "in": "query", + "description": "Authentication token. Requires scope: `usergroups:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "A user to retrieve the billable information for. Defaults to all users.", - "in": "query", - "name": "user", + "description": "Include the number of users in the User Group.", + "in": "formData", + "name": "include_count", + "type": "boolean" + }, + { + "description": "The encoded ID of the User Group to update.", + "in": "formData", + "name": "usergroup", + "required": true, + "type": "string" + }, + { + "description": "A comma separated string of encoded user IDs that represent the entire list of users for the User Group.", + "in": "formData", + "name": "users", + "required": true, "type": "string" } ], @@ -25597,26 +24223,50 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true + "ok": true, + "usergroup": { + "auto_type": null, + "created_by": "U060R4BJ4", + "date_create": 1447096577, + "date_delete": 0, + "date_update": 1447102109, + "deleted_by": null, + "description": "Marketing gurus, PR experts and product advocates.", + "handle": "marketing-team", + "id": "S0616NG6M", + "is_external": false, + "is_usergroup": true, + "name": "Marketing Team", + "prefs": { + "channels": [], + "groups": [] + }, + "team_id": "T060R4BHN", + "updated_by": "U060R4BJ4", + "user_count": 1, + "users": [ + "U060R4BJ4", + "U060RNRCZ" + ] + } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from team.billableInfo method", + "description": "Schema for successful response from usergroups.users.update method", "properties": { - "billable_info": { - "additionalProperties": false, - "type": "object" - }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "usergroup": { + "$ref": "#/definitions/objs_subteam" } }, "required": [ "ok", - "billable_info" + "usergroup" ], - "title": "team.billableInfo schema", + "title": "usergroups.users.update schema", "type": "object" } }, @@ -25630,11 +24280,15 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from team.billableInfo method", + "description": "Schema for error response from usergroups.users.update method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "user_not_found", + "permission_denied", "not_authed", "invalid_auth", "account_inactive", @@ -25642,6 +24296,7 @@ "no_permission", "org_login_required", "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -25652,8 +24307,10 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_require", + "fatal_error", + "missing_charset", + "superfluous_charset" ], "type": "string" }, @@ -25665,7 +24322,7 @@ "ok", "error" ], - "title": "team.billableInfo error schema", + "title": "usergroups.users.update error schema", "type": "object" } } @@ -25673,38 +24330,62 @@ "security": [ { "slackAuth": [ - "admin" + "usergroups:write" ] } ], "tags": [ - "team" + "usergroups.users", + "usergroups" ] } }, - "/team.info": { + "/users.conversations": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Gets information about the current team.", + "description": "List conversations the calling user may access.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/team.info" + "url": "https://api.slack.com/methods/users.conversations" }, - "operationId": "team_info", + "operationId": "users_conversations", "parameters": [ { - "description": "Authentication token. Requires scope: `team:read`", + "description": "Authentication token. Requires scope: `conversations:read`", "in": "query", "name": "token", - "required": true, "type": "string" }, { - "description": "Team to get info on, if omitted, will return information about the current team. Will only return team that the authenticated token is allowed to see through external shared channels", + "description": "Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership.", "in": "query", - "name": "team", + "name": "user", + "type": "string" + }, + { + "description": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", + "in": "query", + "name": "types", + "type": "string" + }, + { + "description": "Set to `true` to exclude archived channels from the list", + "in": "query", + "name": "exclude_archived", + "type": "boolean" + }, + { + "description": "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 no larger than 1000.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -25713,45 +24394,111 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response with only public channels. Note how `num_members` and `is_member` are not returned like typical `conversations` objects.", "examples": { "application/json": { - "ok": true, - "team": { - "domain": "example", - "email_domain": "example.com", - "enterprise_id": "E1234A12AB", - "enterprise_name": "Umbrella Corporation", - "icon": { - "image_102": "https://...", - "image_132": "https://...", - "image_34": "https://...", - "image_44": "https://...", - "image_68": "https://...", - "image_88": "https://...", - "image_default": true + "channels": [ + { + "created": 1449252889, + "creator": "U012A3CDE", + "id": "C012AB3CD", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": true, + "is_group": false, + "is_im": false, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "name": "general", + "name_normalized": "general", + "pending_shared": [], + "previous_names": [], + "purpose": { + "creator": "", + "last_set": 0, + "value": "This channel is for team-wide communication and announcements. All team members are in this channel." + }, + "topic": { + "creator": "", + "last_set": 0, + "value": "Company-wide announcements and work-based matters" + }, + "unlinked": 0 }, - "id": "T12345", - "name": "My Team" + { + "created": 1449252889, + "creator": "U061F7AUR", + "id": "C061EG9T2", + "is_archived": false, + "is_channel": true, + "is_ext_shared": false, + "is_general": false, + "is_group": false, + "is_im": false, + "is_mpim": false, + "is_org_shared": false, + "is_pending_ext_shared": false, + "is_private": false, + "is_shared": false, + "name": "random", + "name_normalized": "random", + "pending_shared": [], + "previous_names": [], + "purpose": { + "creator": "", + "last_set": 0, + "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." + }, + "topic": { + "creator": "", + "last_set": 0, + "value": "Non-work banter and water cooler conversation" + }, + "unlinked": 0 + } + ], + "ok": true, + "response_metadata": { + "next_cursor": "dGVhbTpDMDYxRkE1UEI=" } } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from team.info method", + "additionalProperties": true, + "description": "Schema for successful response from users.conversations method. Returned conversation objects do not include `num_members` or `is_member`", "properties": { + "channels": { + "items": { + "$ref": "#/definitions/objs_conversation" + }, + "type": "array", + "uniqueItems": true + }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "team": { - "$ref": "#/definitions/objs_team" + "response_metadata": { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string" + } + }, + "required": [ + "next_cursor" + ], + "type": "object" } }, "required": [ "ok", - "team" + "channels" ], - "title": "team.info schema", + "title": "users.conversations success schema", "type": "object" } }, @@ -25765,10 +24512,19 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from team.info method", + "description": "Schema for error response from users.conversations method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", + "invalid_types", + "invalid_cursor", + "invalid_limit", "not_authed", "invalid_auth", "account_inactive", @@ -25797,7 +24553,7 @@ "ok", "error" ], - "title": "team.info error schema", + "title": "users.conversations error schema", "type": "object" } } @@ -25805,67 +24561,36 @@ "security": [ { "slackAuth": [ - "team:read" + "channels:read", + "groups:read", + "im:read", + "mpim:read" ] } ], "tags": [ - "team" + "users" ] } }, - "/team.integrationLogs": { - "get": { + "/users.deletePhoto": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Gets the integration logs for the current team.", + "description": "Delete the user profile photo", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/team.integrationLogs" + "url": "https://api.slack.com/methods/users.deletePhoto" }, - "operationId": "team_integrationLogs", + "operationId": "users_deletePhoto", "parameters": [ { - "in": "query", - "name": "count", - "type": "integer" - }, - { - "description": "Filter logs with this change type. Defaults to all logs.", - "in": "query", - "name": "change_type", - "type": "string" - }, - { - "description": "Filter logs to this Slack app. Defaults to all logs.", - "in": "query", - "name": "app_id", - "type": "integer" - }, - { - "description": "Authentication token. Requires scope: `admin`", - "in": "query", + "description": "Authentication token. Requires scope: `users.profile:write`", + "in": "formData", "name": "token", "required": true, "type": "string" - }, - { - "description": "Filter logs generated by this user\u2019s actions. Defaults to all logs.", - "in": "query", - "name": "user", - "type": "string" - }, - { - "description": "Filter logs to this service. Defaults to all logs.", - "in": "query", - "name": "service_id", - "type": "integer" - }, - { - "in": "query", - "name": "page", - "type": "string" } ], "produces": [ @@ -25881,74 +24606,16 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from team.integrationLogs method", + "description": "Schema for successful response from users.deletePhoto method", "properties": { - "logs": { - "items": { - "additionalProperties": false, - "properties": { - "admin_app_id": { - "$ref": "#/definitions/defs_app_id" - }, - "app_id": { - "$ref": "#/definitions/defs_app_id" - }, - "app_type": { - "type": "string" - }, - "change_type": { - "type": "string" - }, - "channel": { - "$ref": "#/definitions/defs_channel" - }, - "date": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "service_id": { - "type": "string" - }, - "service_type": { - "type": "string" - }, - "user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "user_name": { - "type": "string" - } - }, - "required": [ - "user_id", - "user_name", - "date", - "change_type", - "app_type", - "app_id", - "scope" - ], - "type": "object" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "paging": { - "$ref": "#/definitions/objs_paging" } }, "required": [ - "ok", - "logs", - "paging" + "ok" ], - "title": "team.integrationLogs schema", + "title": "users.deletePhoto schema", "type": "object" } }, @@ -25962,8 +24629,12 @@ }, "schema": { "additionalProperties": false, - "description": "Schema for error response from team.integrationLogs method", + "description": "Schema for error response from users.deletePhoto method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -25996,7 +24667,7 @@ "ok", "error" ], - "title": "team.integrationLogs error schema", + "title": "users.deletePhoto error schema", "type": "object" } } @@ -26004,38 +24675,38 @@ "security": [ { "slackAuth": [ - "admin" + "users.profile:write" ] } ], "tags": [ - "team" + "users" ] } }, - "/team.profile.get": { + "/users.getPresence": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve a team's profile.", + "description": "Gets user presence information.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/team.profile.get" + "url": "https://api.slack.com/methods/users.getPresence" }, - "operationId": "team_profile_get", + "operationId": "users_getPresence", "parameters": [ { - "description": "Authentication token. Requires scope: `users.profile:read`", + "description": "Authentication token. Requires scope: `users:read`", "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "Filter by visibility.", + "description": "User to get presence info on. Defaults to the authed user.", "in": "query", - "name": "visibility", + "name": "user", "type": "string" } ], @@ -26044,107 +24715,44 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "When requesting information for a different user, this method just returns the current presence (either `active` or `away`).", "examples": { "application/json": { "ok": true, - "profile": { - "fields": [ - { - "hint": "Enter the extension to reach your desk", - "id": "Xf06054AAA", - "is_hidden": 1, - "label": "Phone extension", - "options": null, - "ordering": 0, - "possible_values": null, - "type": "text" - }, - { - "hint": "When you were born", - "id": "Xf06054BBB", - "label": "Date of birth", - "options": null, - "ordering": 1, - "possible_values": null, - "type": "date" - }, - { - "hint": "Enter a link to your Facebook profile", - "id": "Xf06054CCC", - "label": "Facebook", - "options": null, - "ordering": 2, - "possible_values": null, - "type": "link" - }, - { - "hint": "Hogwarts, obviously", - "id": "Xf06054DDD", - "label": "House", - "options": null, - "ordering": 3, - "possible_values": [ - "Gryffindor", - "Hufflepuff", - "Ravenclaw", - "Slytherin" - ], - "type": "options_list" - }, - { - "hint": "Office location (LDAP)", - "id": "Xf06054EEE", - "label": "Location", - "options": { - "is_protected": 1 - }, - "ordering": 4, - "possible_values": null, - "type": "text" - }, - { - "hint": "The boss", - "id": "Xf06054FFF", - "label": "Manager", - "options": null, - "ordering": 5, - "possible_values": null, - "type": "user" - } - ] - } + "presence": "active" } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from team.profile.get method", + "additionalProperties": true, + "description": "Generated from users.getPresence with shasum e7251aec575d8863f9e0eb38663ae9dc26655f65", "properties": { + "auto_away": { + "type": "boolean" + }, + "connection_count": { + "type": "integer" + }, + "last_activity": { + "type": "integer" + }, + "manual_away": { + "type": "boolean" + }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "profile": { - "additionalProperties": false, - "properties": { - "fields": { - "items": { - "$ref": "#/definitions/objs_team_profile_field" - }, - "type": "array", - "uniqueItems": true - } - }, - "required": [ - "fields" - ], - "type": "object" + "online": { + "type": "boolean" + }, + "presence": { + "type": "string" } }, "required": [ "ok", - "profile" + "presence" ], - "title": "team.profile.get success schema", + "title": "API method: users.getPresence", "type": "object" } }, @@ -26157,28 +24765,12 @@ } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from team.profile.get method", + "additionalProperties": { + "type": "object" + }, + "description": "Schema for error response users.getPresence method", "properties": { "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "no_permission", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_typ", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeou", - "upgrade_required" - ], "type": "string" }, "ok": { @@ -26189,7 +24781,7 @@ "ok", "error" ], - "title": "team.profile.get error schema", + "title": "users.counts error schema", "type": "object" } } @@ -26197,65 +24789,31 @@ "security": [ { "slackAuth": [ - "users.profile:read" + "users:read" ] } ], "tags": [ - "team.profile", - "team" + "users" ] } }, - "/usergroups.create": { - "post": { + "/users.identity": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Create a User Group", + "description": "Get a user's identity.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/usergroups.create" + "url": "https://api.slack.com/methods/users.identity" }, - "operationId": "usergroups_create", + "operationId": "users_identity", "parameters": [ { - "description": "A mention handle. Must be unique among channels, users and User Groups.", - "in": "formData", - "name": "handle", - "type": "string" - }, - { - "description": "A short description of the User Group.", - "in": "formData", - "name": "description", - "type": "string" - }, - { - "description": "A comma separated string of encoded channel IDs for which the User Group uses as a default.", - "in": "formData", - "name": "channels", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `usergroups:write`", - "in": "header", + "description": "Authentication token. Requires scope: `identity.basic`", + "in": "query", "name": "token", - "required": true, - "type": "string" - }, - { - "description": "Include the number of users in each User Group.", - "in": "formData", - "name": "include_count", - "type": "boolean" - }, - { - "description": "A name for the User Group. Must be unique among User Groups.", - "in": "formData", - "name": "name", - "required": true, "type": "string" } ], @@ -26264,1509 +24822,17 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "You will receive at a minimum the following information:", "examples": { "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from usergroups.create method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "usergroup": { - "$ref": "#/definitions/objs_subteam" - } - }, - "required": [ - "ok", - "usergroup" - ], - "title": "usergroups.create schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from usergroups.create method", - "properties": { - "error": { - "enum": [ - "permission_denied", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "usergroups.create error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "usergroups:write" - ] - } - ], - "tags": [ - "usergroups" - ] - } - }, - "/usergroups.disable": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ], - "description": "Disable an existing User Group", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/usergroups.disable" - }, - "operationId": "usergroups_disable", - "parameters": [ - { - "description": "Authentication token. Requires scope: `usergroups:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "Include the number of users in the User Group.", - "in": "formData", - "name": "include_count", - "type": "boolean" - }, - { - "description": "The encoded ID of the User Group to disable.", - "in": "formData", - "name": "usergroup", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from usergroups.disable method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "usergroup": { - "$ref": "#/definitions/objs_subteam" - } - }, - "required": [ - "ok", - "usergroup" - ], - "title": "usergroups.disable schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from usergroups.disable method", - "properties": { - "error": { - "enum": [ - "permission_denied", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "usergroups.disable error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "usergroups:write" - ] - } - ], - "tags": [ - "usergroups" - ] - } - }, - "/usergroups.enable": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ], - "description": "Enable a User Group", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/usergroups.enable" - }, - "operationId": "usergroups_enable", - "parameters": [ - { - "description": "Authentication token. Requires scope: `usergroups:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "Include the number of users in the User Group.", - "in": "formData", - "name": "include_count", - "type": "boolean" - }, - { - "description": "The encoded ID of the User Group to enable.", - "in": "formData", - "name": "usergroup", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from usergroups.enable method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "usergroup": { - "$ref": "#/definitions/objs_subteam" - } - }, - "required": [ - "ok", - "usergroup" - ], - "title": "usergroups.enable schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from usergroups.enable method", - "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_require", - "fatal_error", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "usergroups.enable error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "usergroups:write" - ] - } - ], - "tags": [ - "usergroups" - ] - } - }, - "/usergroups.list": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "List all User Groups for a team", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/usergroups.list" - }, - "operationId": "usergroups_list", - "parameters": [ - { - "description": "Include the list of users for each User Group.", - "in": "query", - "name": "include_users", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `usergroups:read`", - "in": "query", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "Include the number of users in each User Group.", - "in": "query", - "name": "include_count", - "type": "boolean" - }, - { - "description": "Include disabled User Groups.", - "in": "query", - "name": "include_disabled", - "type": "boolean" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true, - "usergroups": [ - { - "auto_type": "admin", - "created_by": "USLACKBOT", - "date_create": 1446598059, - "date_delete": 0, - "date_update": 1446670362, - "deleted_by": null, - "description": "A group of all Administrators on your team.", - "handle": "admins", - "id": "S0614TZR7", - "is_external": false, - "is_usergroup": true, - "name": "Team Admins", - "prefs": { - "channels": [], - "groups": [] - }, - "team_id": "T060RNRCH", - "updated_by": "U060RNRCZ", - "user_count": "2" - }, - { - "auto_type": "owner", - "created_by": "USLACKBOT", - "date_create": 1446678371, - "date_delete": 0, - "date_update": 1446678371, - "deleted_by": null, - "description": "A group of all Owners on your team.", - "handle": "owners", - "id": "S06158AV7", - "is_external": false, - "is_usergroup": true, - "name": "Team Owners", - "prefs": { - "channels": [], - "groups": [] - }, - "team_id": "T060RNRCH", - "updated_by": "USLACKBOT", - "user_count": "1" - }, - { - "auto_type": null, - "created_by": "U060RNRCZ", - "date_create": 1446746793, - "date_delete": 1446748865, - "date_update": 1446747767, - "deleted_by": null, - "description": "Marketing gurus, PR experts and product advocates.", - "handle": "marketing-team", - "id": "S0615G0KT", - "is_external": false, - "is_usergroup": true, - "name": "Marketing Team", - "prefs": { - "channels": [], - "groups": [] - }, - "team_id": "T060RNRCH", - "updated_by": "U060RNRCZ", - "user_count": "0" - } - ] - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from usergroups.list method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "usergroups": { - "items": { - "$ref": "#/definitions/objs_subteam" - }, - "type": "array" - } - }, - "required": [ - "ok", - "usergroups" - ], - "title": "usergroups.list schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from usergroups.list method", - "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_require", - "fatal_error", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "usergroups.list error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "usergroups:read" - ] - } - ], - "tags": [ - "usergroups" - ] - } - }, - "/usergroups.update": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ], - "description": "Update an existing User Group", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/usergroups.update" - }, - "operationId": "usergroups_update", - "parameters": [ - { - "description": "A mention handle. Must be unique among channels, users and User Groups.", - "in": "formData", - "name": "handle", - "type": "string" - }, - { - "description": "A short description of the User Group.", - "in": "formData", - "name": "description", - "type": "string" - }, - { - "description": "A comma separated string of encoded channel IDs for which the User Group uses as a default.", - "in": "formData", - "name": "channels", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `usergroups:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "Include the number of users in the User Group.", - "in": "formData", - "name": "include_count", - "type": "boolean" - }, - { - "description": "The encoded ID of the User Group to update.", - "in": "formData", - "name": "usergroup", - "required": true, - "type": "string" - }, - { - "description": "A name for the User Group. Must be unique among User Groups.", - "in": "formData", - "name": "name", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true, - "usergroup": { - "auto_type": null, - "created_by": "U060R4BJ4", - "date_create": 1447096577, - "date_delete": 0, - "date_update": 1447102109, - "deleted_by": null, - "description": "Marketing gurus, PR experts and product advocates.", - "handle": "marketing-team", - "id": "S0616NG6M", - "is_external": false, - "is_usergroup": true, - "name": "Marketing Team", - "prefs": { - "channels": [], - "groups": [] - }, - "team_id": "T060R4BHN", - "updated_by": "U060R4BJ4", - "user_count": 1, - "users": [ - "U060R4BJ4", - "U060RNRCZ" - ] - } - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from usergroups.update method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "usergroup": { - "$ref": "#/definitions/objs_subteam" - } - }, - "required": [ - "ok", - "usergroup" - ], - "title": "usergroups.update schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from usergroups.update method", - "properties": { - "error": { - "enum": [ - "permission_denied", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_require", - "fatal_error", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "usergroups.update error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "usergroups:write" - ] - } - ], - "tags": [ - "usergroups" - ] - } - }, - "/usergroups.users.list": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "List all users in a User Group", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/usergroups.users.list" - }, - "operationId": "usergroups_users_list", - "parameters": [ - { - "description": "Authentication token. Requires scope: `usergroups:read`", - "in": "query", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "Allow results that involve disabled User Groups.", - "in": "query", - "name": "include_disabled", - "type": "boolean" - }, - { - "description": "The encoded ID of the User Group to update.", - "in": "query", - "name": "usergroup", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Standard success response when used with a user token", - "examples": { - "application/json": { - "ok": true, - "users": [ - "U060R4BJ4", - "W123A4BC5" - ] - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from usergroups.users.list method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "users": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "type": "array" - } - }, - "required": [ - "ok", - "users" - ], - "title": "usergroups.users.list schema", - "type": "object" - } - }, - "default": { - "description": "Standard failure response when used with an invalid token", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from usergroups.users.list method", - "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_require", - "fatal_error", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "usergroups.users.list error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "usergroups:read" - ] - } - ], - "tags": [ - "usergroups.users", - "usergroups" - ] - } - }, - "/usergroups.users.update": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ], - "description": "Update the list of users for a User Group", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/usergroups.users.update" - }, - "operationId": "usergroups_users_update", - "parameters": [ - { - "description": "A comma separated string of encoded user IDs that represent the entire list of users for the User Group.", - "in": "formData", - "name": "users", - "required": true, - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `usergroups:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "Include the number of users in the User Group.", - "in": "formData", - "name": "include_count", - "type": "boolean" - }, - { - "description": "The encoded ID of the User Group to update.", - "in": "formData", - "name": "usergroup", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true, - "usergroup": { - "auto_type": null, - "created_by": "U060R4BJ4", - "date_create": 1447096577, - "date_delete": 0, - "date_update": 1447102109, - "deleted_by": null, - "description": "Marketing gurus, PR experts and product advocates.", - "handle": "marketing-team", - "id": "S0616NG6M", - "is_external": false, - "is_usergroup": true, - "name": "Marketing Team", - "prefs": { - "channels": [], - "groups": [] - }, - "team_id": "T060R4BHN", - "updated_by": "U060R4BJ4", - "user_count": 1, - "users": [ - "U060R4BJ4", - "U060RNRCZ" - ] - } - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from usergroups.users.update method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "usergroup": { - "$ref": "#/definitions/objs_subteam" - } - }, - "required": [ - "ok", - "usergroup" - ], - "title": "usergroups.users.update schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from usergroups.users.update method", - "properties": { - "error": { - "enum": [ - "permission_denied", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_require", - "fatal_error", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "usergroups.users.update error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "usergroups:write" - ] - } - ], - "tags": [ - "usergroups.users", - "usergroups" - ] - } - }, - "/users.conversations": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "List conversations the calling user may access.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/users.conversations" - }, - "operationId": "users_conversations", - "parameters": [ - { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `conversations:read`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "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 no larger than 1000.", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership.", - "in": "query", - "name": "user", - "type": "string" - }, - { - "description": "Set to `true` to exclude archived channels from the list", - "in": "query", - "name": "exclude_archived", - "type": "boolean" - }, - { - "description": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", - "in": "query", - "name": "types", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response with only public channels. Note how `num_members` and `is_member` are not returned like typical `conversations` objects.", - "examples": { - "application/json": { - "channels": [ - { - "created": 1449252889, - "creator": "U012A3CDE", - "id": "C012AB3CD", - "is_archived": false, - "is_channel": true, - "is_ext_shared": false, - "is_general": true, - "is_group": false, - "is_im": false, - "is_mpim": false, - "is_org_shared": false, - "is_pending_ext_shared": false, - "is_private": false, - "is_shared": false, - "name": "general", - "name_normalized": "general", - "pending_shared": [], - "previous_names": [], - "purpose": { - "creator": "", - "last_set": 0, - "value": "This channel is for team-wide communication and announcements. All team members are in this channel." - }, - "topic": { - "creator": "", - "last_set": 0, - "value": "Company-wide announcements and work-based matters" - }, - "unlinked": 0 - }, - { - "created": 1449252889, - "creator": "U061F7AUR", - "id": "C061EG9T2", - "is_archived": false, - "is_channel": true, - "is_ext_shared": false, - "is_general": false, - "is_group": false, - "is_im": false, - "is_mpim": false, - "is_org_shared": false, - "is_pending_ext_shared": false, - "is_private": false, - "is_shared": false, - "name": "random", - "name_normalized": "random", - "pending_shared": [], - "previous_names": [], - "purpose": { - "creator": "", - "last_set": 0, - "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." - }, - "topic": { - "creator": "", - "last_set": 0, - "value": "Non-work banter and water cooler conversation" - }, - "unlinked": 0 - } - ], - "ok": true, - "response_metadata": { - "next_cursor": "dGVhbTpDMDYxRkE1UEI=" - } - } - }, - "schema": { - "additionalProperties": true, - "description": "Schema for successful response from users.conversations method. Returned conversation objects do not include `num_members` or `is_member`", - "properties": { - "channels": { - "items": { - "$ref": "#/definitions/objs_conversation" - }, - "type": "array", - "uniqueItems": true - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "additionalProperties": false, - "properties": { - "next_cursor": { - "type": "string" - } - }, - "required": [ - "next_cursor" - ], - "type": "object" - } - }, - "required": [ - "ok", - "channels" - ], - "title": "users.conversations success schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from users.conversations method", - "properties": { - "error": { - "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", - "invalid_types", - "invalid_cursor", - "invalid_limit", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "users.conversations error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "channels:read", - "groups:read", - "im:read", - "mpim:read" - ] - } - ], - "tags": [ - "users" - ] - } - }, - "/users.deletePhoto": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Delete the user profile photo", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/users.deletePhoto" - }, - "operationId": "users_deletePhoto", - "parameters": [ - { - "description": "Authentication token. Requires scope: `users.profile:write`", - "in": "formData", - "name": "token", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from users.deletePhoto method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "users.deletePhoto schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": false, - "description": "Schema for error response from users.deletePhoto method", - "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "users.deletePhoto error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "users.profile:write" - ] - } - ], - "tags": [ - "users" - ] - } - }, - "/users.getPresence": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Gets user presence information.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/users.getPresence" - }, - "operationId": "users_getPresence", - "parameters": [ - { - "description": "Authentication token. Requires scope: `users:read`", - "in": "query", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "User to get presence info on. Defaults to the authed user.", - "in": "query", - "name": "user", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "When requesting information for a different user, this method just returns the current presence (either `active` or `away`).", - "examples": { - "application/json": { - "ok": true, - "presence": "active" - } - }, - "schema": { - "additionalProperties": true, - "description": "Generated from users.getPresence with shasum e7251aec575d8863f9e0eb38663ae9dc26655f65", - "properties": { - "auto_away": { - "type": "boolean" - }, - "connection_count": { - "type": "integer" - }, - "last_activity": { - "type": "integer" - }, - "manual_away": { - "type": "boolean" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "online": { - "type": "boolean" - }, - "presence": { - "type": "string" - } - }, - "required": [ - "ok", - "presence" - ], - "title": "API method: users.getPresence", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "examples": { - "application/json": { - "error": "invalid_auth", - "ok": false - } - }, - "schema": { - "additionalProperties": { - "type": "object" - }, - "description": "Schema for error response users.getPresence method", - "properties": { - "error": { - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "users.counts error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "users:read" - ] - } - ], - "tags": [ - "users" - ] - } - }, - "/users.identity": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Get a user's identity.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/users.identity" - }, - "operationId": "users_identity", - "parameters": [ - { - "description": "Authentication token. Requires scope: `identity.basic`", - "in": "query", - "name": "token", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "You will receive at a minimum the following information:", - "examples": { - "application/json": { - "ok": true, - "team": { - "id": "T0G9PQBBK" - }, - "user": { - "id": "U0G9QF9C6", - "name": "Sonny Whether" - } + "ok": true, + "team": { + "id": "T0G9PQBBK" + }, + "user": { + "id": "U0G9QF9C6", + "name": "Sonny Whether" + } } }, "schema": { @@ -27841,8 +24907,76 @@ "format": "email", "type": "string" }, - "id": { - "$ref": "#/definitions/defs_user_id" + "id": { + "$ref": "#/definitions/defs_user_id" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name", + "id", + "email" + ], + "type": "object" + } + }, + "required": [ + "ok", + "user", + "team" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Schema for 'identity.basic,identity.avatar' scopes", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "team": { + "additionalProperties": false, + "properties": { + "id": { + "$ref": "#/definitions/defs_team" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "user": { + "additionalProperties": false, + "properties": { + "id": { + "$ref": "#/definitions/defs_user_id" + }, + "image_192": { + "format": "url", + "type": "string" + }, + "image_24": { + "format": "url", + "type": "string" + }, + "image_32": { + "format": "url", + "type": "string" + }, + "image_48": { + "format": "url", + "type": "string" + }, + "image_512": { + "format": "url", + "type": "string" + }, + "image_72": { + "format": "url", + "type": "string" }, "name": { "type": "string" @@ -27851,7 +24985,12 @@ "required": [ "name", "id", - "email" + "image_24", + "image_32", + "image_48", + "image_72", + "image_192", + "image_512" ], "type": "object" } @@ -27865,7 +25004,7 @@ }, { "additionalProperties": false, - "description": "Schema for 'identity.basic,identity.avatar' scopes", + "description": "Schema for 'identity.basic,identity.team' scopes", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -27873,58 +25012,75 @@ "team": { "additionalProperties": false, "properties": { + "domain": { + "type": "string" + }, "id": { "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "user": { - "additionalProperties": false, - "properties": { - "id": { - "$ref": "#/definitions/defs_user_id" }, - "image_192": { + "image_102": { "format": "url", "type": "string" }, - "image_24": { + "image_132": { "format": "url", "type": "string" }, - "image_32": { + "image_230": { "format": "url", "type": "string" }, - "image_48": { + "image_34": { "format": "url", "type": "string" }, - "image_512": { + "image_44": { "format": "url", "type": "string" }, - "image_72": { + "image_68": { + "format": "url", + "type": "string" + }, + "image_88": { "format": "url", "type": "string" }, + "image_default": { + "type": "boolean" + }, "name": { "type": "string" } }, "required": [ - "name", "id", - "image_24", - "image_32", - "image_48", - "image_72", - "image_192", - "image_512" + "name", + "domain", + "image_34", + "image_44", + "image_68", + "image_88", + "image_102", + "image_132", + "image_230", + "image_default" + ], + "type": "object" + }, + "user": { + "additionalProperties": false, + "properties": { + "id": { + "$ref": "#/definitions/defs_user_id" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name", + "id" ], "type": "object" } @@ -27934,123 +25090,424 @@ "user", "team" ], - "type": "object" + "type": "object" + } + ], + "title": "users.identity schema" + } + }, + "default": { + "description": "Typical error response", + "examples": { + "application/json": { + "error": "account_inactive", + "ok": false + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for error response from users.identity method", + "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "fatal_error" + ], + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" + } + }, + "required": [ + "ok", + "error" + ], + "title": "users.identity error schema", + "type": "object" + } + } + }, + "security": [ + { + "slackAuth": [ + "identity.basic" + ] + } + ], + "tags": [ + "users" + ] + } + }, + "/users.info": { + "get": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "description": "Gets information about a user.", + "externalDocs": { + "description": "API method documentation", + "url": "https://api.slack.com/methods/users.info" + }, + "operationId": "users_info", + "parameters": [ + { + "description": "Authentication token. Requires scope: `users:read`", + "in": "query", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "Set this to `true` to receive the locale for this user. Defaults to `false`", + "in": "query", + "name": "include_locale", + "type": "boolean" + }, + { + "description": "User to get info on", + "in": "query", + "name": "user", + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response", + "examples": { + "application/json": { + "ok": true, + "user": { + "color": "9f69e7", + "deleted": false, + "has_2fa": false, + "id": "W012A3CDE", + "is_admin": true, + "is_app_user": false, + "is_bot": false, + "is_owner": false, + "is_primary_owner": false, + "is_restricted": false, + "is_ultra_restricted": false, + "name": "spengler", + "profile": { + "avatar_hash": "ge3b51ca72de", + "display_name": "spengler", + "display_name_normalized": "spengler", + "email": "spengler@ghostbusters.example.com", + "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_original": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "real_name": "Egon Spengler", + "real_name_normalized": "Egon Spengler", + "status_emoji": ":books:", + "status_text": "Print is dead", + "team": "T012AB3C4" + }, + "real_name": "Egon Spengler", + "team_id": "T012AB3C4", + "tz": "America/Los_Angeles", + "tz_label": "Pacific Daylight Time", + "tz_offset": -25200, + "updated": 1502138686 + } + } + }, + "schema": { + "additionalProperties": true, + "description": "Schema for successful response from users.info method", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "user": { + "$ref": "#/definitions/objs_user" + } + }, + "required": [ + "ok", + "user" + ], + "title": "users.info success schema", + "type": "object" + } + }, + "default": { + "description": "Typical error response", + "examples": { + "application/json": { + "error": "user_not_found", + "ok": false + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for error response from users.info method", + "properties": { + "callstack": { + "type": "string" + }, + "error": { + "enum": [ + "user_not_found", + "user_not_visible", + "not_authed", + "invalid_auth", + "account_inactive", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required" + ], + "type": "string" }, - { - "additionalProperties": false, - "description": "Schema for 'identity.basic,identity.team' scopes", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" + "ok": { + "$ref": "#/definitions/defs_ok_false" + } + }, + "required": [ + "ok", + "error" + ], + "title": "users.info error schema", + "type": "object" + } + } + }, + "security": [ + { + "slackAuth": [ + "users:read" + ] + } + ], + "tags": [ + "users" + ] + } + }, + "/users.list": { + "get": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "description": "Lists all users in a Slack team.", + "externalDocs": { + "description": "API method documentation", + "url": "https://api.slack.com/methods/users.list" + }, + "operationId": "users_list", + "parameters": [ + { + "description": "Authentication token. Requires scope: `users:read`", + "in": "query", + "name": "token", + "type": "string" + }, + { + "description": "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.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", + "type": "string" + }, + { + "description": "Set this to `true` to receive the locale for users. Defaults to `false`", + "in": "query", + "name": "include_locale", + "type": "boolean" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response", + "examples": { + "application/json": { + "cache_ts": 1498777272, + "members": [ + { + "color": "9f69e7", + "deleted": false, + "has_2fa": false, + "id": "W012A3CDE", + "is_admin": true, + "is_app_user": false, + "is_bot": false, + "is_owner": false, + "is_primary_owner": false, + "is_restricted": false, + "is_ultra_restricted": false, + "name": "spengler", + "profile": { + "avatar_hash": "ge3b51ca72de", + "display_name": "spengler", + "display_name_normalized": "spengler", + "email": "spengler@ghostbusters.example.com", + "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "real_name": "Egon Spengler", + "real_name_normalized": "Egon Spengler", + "status_emoji": ":books:", + "status_text": "Print is dead", + "team": "T012AB3C4" }, - "team": { - "additionalProperties": false, - "properties": { - "domain": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/defs_team" - }, - "image_102": { - "format": "url", - "type": "string" - }, - "image_132": { - "format": "url", - "type": "string" - }, - "image_230": { - "format": "url", - "type": "string" - }, - "image_34": { - "format": "url", - "type": "string" - }, - "image_44": { - "format": "url", - "type": "string" - }, - "image_68": { - "format": "url", - "type": "string" - }, - "image_88": { - "format": "url", - "type": "string" - }, - "image_default": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "domain", - "image_34", - "image_44", - "image_68", - "image_88", - "image_102", - "image_132", - "image_230", - "image_default" - ], - "type": "object" + "real_name": "spengler", + "team_id": "T012AB3C4", + "tz": "America/Los_Angeles", + "tz_label": "Pacific Daylight Time", + "tz_offset": -25200, + "updated": 1502138686 + }, + { + "color": "9f69e7", + "deleted": false, + "has_2fa": false, + "id": "W07QCRPA4", + "is_admin": true, + "is_bot": false, + "is_owner": false, + "is_primary_owner": false, + "is_restricted": false, + "is_ultra_restricted": false, + "name": "glinda", + "profile": { + "avatar_hash": "8fbdd10b41c6", + "display_name": "Glinda the Fairly Good", + "display_name_normalized": "Glinda the Fairly Good", + "email": "glenda@south.oz.coven", + "first_name": "Glinda", + "image_1024": "https://a.slack-edge.com...png", + "image_192": "https://a.slack-edge.com...png", + "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_512": "https://a.slack-edge.com...png", + "image_72": "https://a.slack-edge.com...png", + "image_original": "https://a.slack-edge.com...png", + "last_name": "Southgood", + "phone": "", + "real_name": "Glinda Southgood", + "real_name_normalized": "Glinda Southgood", + "skype": "", + "title": "Glinda the Good" }, - "user": { - "additionalProperties": false, - "properties": { - "id": { - "$ref": "#/definitions/defs_user_id" - }, - "name": { - "type": "string" - } - }, - "required": [ - "name", - "id" - ], - "type": "object" - } + "real_name": "Glinda Southgood", + "team_id": "T0G9PQBBK", + "tz": "America/Los_Angeles", + "tz_label": "Pacific Daylight Time", + "tz_offset": -25200, + "updated": 1480527098 + } + ], + "ok": true, + "response_metadata": { + "next_cursor": "dXNlcjpVMEc5V0ZYTlo=" + } + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for successful response from users.list method", + "properties": { + "cache_ts": { + "type": "integer" + }, + "members": { + "items": { + "$ref": "#/definitions/objs_user" }, - "required": [ - "ok", - "user", - "team" - ], - "type": "object" + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "response_metadata": { + "$ref": "#/definitions/objs_response_metadata" } + }, + "required": [ + "ok", + "members", + "cache_ts" ], - "title": "users.identity schema" + "title": "users.list schema", + "type": "object" } }, "default": { "description": "Typical error response", "examples": { "application/json": { - "error": "account_inactive", + "error": "invalid_cursor", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from users.identity method", + "description": "Schema for error response from users.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "limit_required", + "invalid_cursor", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", - "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -28074,7 +25531,7 @@ "ok", "error" ], - "title": "users.identity error schema", + "title": "users.list error schema", "type": "object" } } @@ -28082,7 +25539,7 @@ "security": [ { "slackAuth": [ - "identity.basic" + "users:read" ] } ], @@ -28091,36 +25548,31 @@ ] } }, - "/users.info": { + "/users.lookupByEmail": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Gets information about a user.", + "description": "Find a user with an email address.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/users.info" + "url": "https://api.slack.com/methods/users.lookupByEmail" }, - "operationId": "users_info", + "operationId": "users_lookupByEmail", "parameters": [ { - "description": "Authentication token. Requires scope: `users:read`", + "description": "Authentication token. Requires scope: `users:read.email`", "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "User to get info on", + "description": "An email address belonging to a user in the workspace", "in": "query", - "name": "user", + "name": "email", + "required": true, "type": "string" - }, - { - "description": "Set this to `true` to receive the locale for this user. Defaults to `false`", - "in": "query", - "name": "include_locale", - "type": "boolean" } ], "produces": [ @@ -28156,7 +25608,6 @@ "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_original": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", "real_name": "Egon Spengler", "real_name_normalized": "Egon Spengler", "status_emoji": ":books:", @@ -28174,7 +25625,7 @@ }, "schema": { "additionalProperties": true, - "description": "Schema for successful response from users.info method", + "description": "Schema for successful response from users.lookupByEmail method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -28187,7 +25638,7 @@ "ok", "user" ], - "title": "users.info success schema", + "title": "users.lookupByEmail success schema", "type": "object" } }, @@ -28195,21 +25646,26 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "user_not_found", + "error": "users_not_found", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from users.info method", + "description": "Schema for error response from users.lookupByEmail method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "user_not_found", - "user_not_visible", + "users_not_found", + "enterprise_is_restricted", "not_authed", "invalid_auth", "account_inactive", + "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -28220,7 +25676,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -28232,7 +25689,7 @@ "ok", "error" ], - "title": "users.info error schema", + "title": "users.lookupByEmail error schema", "type": "object" } } @@ -28240,7 +25697,7 @@ "security": [ { "slackAuth": [ - "users:read" + "users:read.email" ] } ], @@ -28249,41 +25706,197 @@ ] } }, - "/users.list": { + "/users.profile.get": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Lists all users in a Slack team.", + "description": "Retrieves a user's profile information.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/users.list" + "url": "https://api.slack.com/methods/users.profile.get" + }, + "operationId": "users_profile_get", + "parameters": [ + { + "description": "Authentication token. Requires scope: `users.profile:read`", + "in": "query", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "Include labels for each ID in custom profile fields", + "in": "query", + "name": "include_labels", + "type": "boolean" + }, + { + "description": "User to retrieve profile info for", + "in": "query", + "name": "user", + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response", + "examples": { + "application/json": { + "ok": true, + "profile": { + "avatar_hash": "ge3b51ca72de", + "display_name": "spengler", + "display_name_normalized": "spengler", + "email": "spengler@ghostbusters.example.com", + "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_original": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "real_name": "Egon Spengler", + "real_name_normalized": "Egon Spengler", + "status_emoji": ":books:", + "status_expiration": 0, + "status_text": "Print is dead", + "team": "T012AB3C4" + } + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for successful response from users.profile.get method", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "profile": { + "$ref": "#/definitions/objs_user_profile" + } + }, + "required": [ + "ok", + "profile" + ], + "title": "users.profile.get schema", + "type": "object" + } + }, + "default": { + "description": "Typical error response", + "examples": { + "application/json": { + "error": "user_not_found", + "ok": false + } + }, + "schema": { + "additionalProperties": false, + "description": "Schema for error response from users.profile.get method", + "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "user_not_found", + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "fatal_error" + ], + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" + } + }, + "required": [ + "ok", + "error" + ], + "title": "users.profile.get error schema", + "type": "object" + } + } + }, + "security": [ + { + "slackAuth": [ + "users.profile:read" + ] + } + ], + "tags": [ + "users.profile", + "users" + ] + } + }, + "/users.profile.set": { + "post": { + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ], + "description": "Set the profile information for a user.", + "externalDocs": { + "description": "API method documentation", + "url": "https://api.slack.com/methods/users.profile.set" }, - "operationId": "users_list", + "operationId": "users_profile_set", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `users.profile:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `users:read`", - "in": "query", - "name": "token", + "description": "Name of a single key to set. Usable only if `profile` is not passed.", + "in": "formData", + "name": "name", "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "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.", + "in": "formData", + "name": "profile", + "type": "string" }, { - "description": "Set this to `true` to receive the locale for users. Defaults to `false`", - "in": "query", - "name": "include_locale", - "type": "boolean" + "description": "ID of user to change. This argument may only be specified by team admins on paid teams.", + "in": "formData", + "name": "user", + "type": "string" + }, + { + "description": "Value to set a single key to. Usable only if `profile` is not passed.", + "in": "formData", + "name": "value", + "type": "string" } ], "produces": [ @@ -28294,120 +25907,51 @@ "description": "Typical success response", "examples": { "application/json": { - "cache_ts": 1498777272, - "members": [ - { - "color": "9f69e7", - "deleted": false, - "has_2fa": false, - "id": "W012A3CDE", - "is_admin": true, - "is_app_user": false, - "is_bot": false, - "is_owner": false, - "is_primary_owner": false, - "is_restricted": false, - "is_ultra_restricted": false, - "name": "spengler", - "profile": { - "avatar_hash": "ge3b51ca72de", - "display_name": "spengler", - "display_name_normalized": "spengler", - "email": "spengler@ghostbusters.example.com", - "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "real_name": "Egon Spengler", - "real_name_normalized": "Egon Spengler", - "status_emoji": ":books:", - "status_text": "Print is dead", - "team": "T012AB3C4" - }, - "real_name": "spengler", - "team_id": "T012AB3C4", - "tz": "America/Los_Angeles", - "tz_label": "Pacific Daylight Time", - "tz_offset": -25200, - "updated": 1502138686 - }, - { - "color": "9f69e7", - "deleted": false, - "has_2fa": false, - "id": "W07QCRPA4", - "is_admin": true, - "is_bot": false, - "is_owner": false, - "is_primary_owner": false, - "is_restricted": false, - "is_ultra_restricted": false, - "name": "glinda", - "profile": { - "avatar_hash": "8fbdd10b41c6", - "display_name": "Glinda the Fairly Good", - "display_name_normalized": "Glinda the Fairly Good", - "email": "glenda@south.oz.coven", - "first_name": "Glinda", - "image_1024": "https://a.slack-edge.com...png", - "image_192": "https://a.slack-edge.com...png", - "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_512": "https://a.slack-edge.com...png", - "image_72": "https://a.slack-edge.com...png", - "image_original": "https://a.slack-edge.com...png", - "last_name": "Southgood", - "phone": "", - "real_name": "Glinda Southgood", - "real_name_normalized": "Glinda Southgood", - "skype": "", - "title": "Glinda the Good" - }, - "real_name": "Glinda Southgood", - "team_id": "T0G9PQBBK", - "tz": "America/Los_Angeles", - "tz_label": "Pacific Daylight Time", - "tz_offset": -25200, - "updated": 1480527098 - } - ], "ok": true, - "response_metadata": { - "next_cursor": "dXNlcjpVMEc5V0ZYTlo=" + "profile": { + "avatar_hash": "ge3b51ca72de", + "display_name": "spengler", + "display_name_normalized": "spengler", + "email": "spengler@ghostbusters.example.com", + "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", + "real_name": "Egon Spengler", + "real_name_normalized": "Egon Spengler", + "status_emoji": ":books:", + "status_expiration": 0, + "status_text": "Print is dead", + "team": "T012AB3C4" } } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from users.list method", + "description": "Schema for successful response from users.profile.set method", "properties": { - "cache_ts": { - "type": "integer" - }, - "members": { - "items": { - "$ref": "#/definitions/objs_user" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true + "email_pending": { + "format": "email", + "type": "string" }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" + "profile": { + "$ref": "#/definitions/objs_user_profile" + }, + "username": { + "type": "string" } }, "required": [ "ok", - "members", - "cache_ts" + "username", + "profile" ], - "title": "users.list schema", + "title": "users.profile.set schema", "type": "object" } }, @@ -28415,22 +25959,33 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_cursor", + "error": "invalid_profile", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from users.list method", + "description": "Schema for error response from users.profile.set method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "limit_required", - "invalid_cursor", + "reserved_name", + "invalid_profile", + "profile_set_failed", + "not_admin", + "not_app_admin", + "cannot_update_admin_user", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", "no_permission", + "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -28454,7 +26009,7 @@ "ok", "error" ], - "title": "users.list error schema", + "title": "users.profile.set error schema", "type": "object" } } @@ -28462,104 +26017,60 @@ "security": [ { "slackAuth": [ - "users:read" + "users.profile:write" ] } ], "tags": [ + "users.profile", "users" ] } }, - "/users.lookupByEmail": { - "get": { + "/users.setActive": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Find a user with an email address.", + "description": "Marked a user as active. Deprecated and non-functional.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/users.lookupByEmail" + "url": "https://api.slack.com/methods/users.setActive" }, - "operationId": "users_lookupByEmail", + "operationId": "users_setActive", "parameters": [ { - "description": "Authentication token. Requires scope: `users:read.email`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "An email address belonging to a user in the workspace", - "in": "query", - "name": "email", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "examples": { - "application/json": { - "ok": true, - "user": { - "color": "9f69e7", - "deleted": false, - "has_2fa": false, - "id": "W012A3CDE", - "is_admin": true, - "is_app_user": false, - "is_bot": false, - "is_owner": false, - "is_primary_owner": false, - "is_restricted": false, - "is_ultra_restricted": false, - "name": "spengler", - "profile": { - "avatar_hash": "ge3b51ca72de", - "display_name": "spengler", - "display_name_normalized": "spengler", - "email": "spengler@ghostbusters.example.com", - "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "real_name": "Egon Spengler", - "real_name_normalized": "Egon Spengler", - "status_emoji": ":books:", - "status_text": "Print is dead", - "team": "T012AB3C4" - }, - "real_name": "Egon Spengler", - "team_id": "T012AB3C4", - "tz": "America/Los_Angeles", - "tz_label": "Pacific Daylight Time", - "tz_offset": -25200, - "updated": 1502138686 - } + "description": "Authentication token. Requires scope: `users:write`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response", + "examples": { + "application/json": { + "ok": true } }, "schema": { - "additionalProperties": true, - "description": "Schema for successful response from users.lookupByEmail method", + "additionalProperties": false, + "description": "Schema for successful response from users.setActive method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "user": { - "$ref": "#/definitions/objs_user" } }, "required": [ - "ok", - "user" + "ok" ], - "title": "users.lookupByEmail success schema", + "title": "users.setActive schema", "type": "object" } }, @@ -28567,34 +26078,38 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "users_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from users.lookupByEmail method", + "description": "Schema for error response from users.setActive method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "users_not_found", - "enterprise_is_restricted", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", "no_permission", + "org_login_required", + "ekm_access_denied", + "missing_scope", + "invalid_arguments", "invalid_arg_name", - "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", "team_added_to_org", - "invalid_json", - "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "fatal_error", + "internal_error" ], "type": "string" }, @@ -28606,7 +26121,7 @@ "ok", "error" ], - "title": "users.lookupByEmail error schema", + "title": "users.setActive error schema", "type": "object" } } @@ -28614,7 +26129,7 @@ "security": [ { "slackAuth": [ - "users:read.email" + "users:write" ] } ], @@ -28623,34 +26138,47 @@ ] } }, - "/users.profile.get": { - "get": { + "/users.setPhoto": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieves a user's profile information.", + "description": "Set the user profile photo", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/users.profile.get" + "url": "https://api.slack.com/methods/users.setPhoto" }, - "operationId": "users_profile_get", + "operationId": "users_setPhoto", "parameters": [ { - "description": "Authentication token. Requires scope: `users.profile:read`", - "in": "query", + "description": "Authentication token. Requires scope: `users.profile:write`", + "in": "formData", "name": "token", + "required": true, "type": "string" }, { - "description": "Include labels for each ID in custom profile fields", - "in": "query", - "name": "include_labels", - "type": "boolean" + "description": "Width/height of crop box (always square)", + "in": "formData", + "name": "crop_w", + "type": "string" }, { - "description": "User to retrieve profile info for", - "in": "query", - "name": "user", + "description": "X coordinate of top-left corner of crop box", + "in": "formData", + "name": "crop_x", + "type": "string" + }, + { + "description": "Y coordinate of top-left corner of crop box", + "in": "formData", + "name": "crop_y", + "type": "string" + }, + { + "description": "File contents via `multipart/form-data`.", + "in": "formData", + "name": "image", "type": "string" } ], @@ -28662,44 +26190,75 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "profile": { - "avatar_hash": "ge3b51ca72de", - "display_name": "spengler", - "display_name_normalized": "spengler", - "email": "spengler@ghostbusters.example.com", - "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_original": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "real_name": "Egon Spengler", - "real_name_normalized": "Egon Spengler", - "status_emoji": ":books:", - "status_expiration": 0, - "status_text": "Print is dead", - "team": "T012AB3C4" - } + "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from users.profile.get method", + "description": "Schema for successful response from users.setPhoto method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" }, "profile": { - "$ref": "#/definitions/objs_user_profile" + "additionalProperties": false, + "properties": { + "avatar_hash": { + "pattern": "^[0-9a-f]{12}$", + "type": "string" + }, + "image_1024": { + "format": "uri", + "type": "string" + }, + "image_192": { + "format": "uri", + "type": "string" + }, + "image_24": { + "format": "uri", + "type": "string" + }, + "image_32": { + "format": "uri", + "type": "string" + }, + "image_48": { + "format": "uri", + "type": "string" + }, + "image_512": { + "format": "uri", + "type": "string" + }, + "image_72": { + "format": "uri", + "type": "string" + }, + "image_original": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "image_24", + "image_32", + "image_48", + "image_72", + "image_192", + "image_512", + "image_1024", + "image_original", + "avatar_hash" + ], + "type": "object" } }, "required": [ "ok", "profile" ], - "title": "users.profile.get schema", + "title": "users.setPhoto schema", "type": "object" } }, @@ -28707,17 +26266,32 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "user_not_found", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from users.profile.get method", + "description": "Schema for error response from users.setPhoto method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "debug_step": { + "description": "possibly DEV/QA only", + "type": "string" + }, + "dims": { + "description": "possibly DEV/QA only", + "type": "string" + }, "error": { "enum": [ - "user_not_found", + "bad_image", + "too_large", + "too_many_frames", + "not_found", "not_authed", "invalid_auth", "account_inactive", @@ -28742,13 +26316,17 @@ }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "time_ident": { + "description": "possibly DEV/QA only", + "type": "integer" } }, "required": [ "ok", "error" ], - "title": "users.profile.get error schema", + "title": "users.setPhoto error schema", "type": "object" } } @@ -28756,57 +26334,40 @@ "security": [ { "slackAuth": [ - "users.profile:read" + "users.profile:write" ] } ], "tags": [ - "users.profile", "users" ] } }, - "/users.profile.set": { + "/users.setPresence": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Set the profile information for a user.", + "description": "Manually sets user presence.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/users.profile.set" + "url": "https://api.slack.com/methods/users.setPresence" }, - "operationId": "users_profile_set", + "operationId": "users_setPresence", "parameters": [ { - "description": "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.", - "in": "formData", - "name": "profile", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `users.profile:write`", + "description": "Authentication token. Requires scope: `users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "ID of user to change. This argument may only be specified by team admins on paid teams.", - "in": "formData", - "name": "user", - "type": "string" - }, - { - "description": "Value to set a single key to. Usable only if `profile` is not passed.", - "in": "formData", - "name": "value", - "type": "string" - }, - { - "description": "Name of a single key to set. Usable only if `profile` is not passed.", + "description": "Either `auto` or `away`", "in": "formData", - "name": "name", + "name": "presence", + "required": true, "type": "string" } ], @@ -28818,47 +26379,21 @@ "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "profile": { - "avatar_hash": "ge3b51ca72de", - "display_name": "spengler", - "display_name_normalized": "spengler", - "email": "spengler@ghostbusters.example.com", - "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg", - "real_name": "Egon Spengler", - "real_name_normalized": "Egon Spengler", - "status_emoji": ":books:", - "status_expiration": 0, - "status_text": "Print is dead", - "team": "T012AB3C4" - } + "ok": true } }, "schema": { "additionalProperties": false, - "description": "Schema for successful response from users.profile.set method", + "description": "Schema for successful response from users.setPresence method", "properties": { "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "profile": { - "$ref": "#/definitions/objs_user_profile" - }, - "username": { - "type": "string" + "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "username", - "profile" + "ok" ], - "title": "users.profile.set schema", + "title": "users.setPresence schema", "type": "object" } }, @@ -28866,29 +26401,27 @@ "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_profile", + "error": "invalid_auth", "ok": false } }, "schema": { "additionalProperties": false, - "description": "Schema for error response from users.profile.set method", + "description": "Schema for error response from users.setPresence method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "reserved_name", - "invalid_profile", - "profile_set_failed", - "not_admin", - "not_app_admin", - "cannot_update_admin_user", + "invalid_presence", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", - "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -28912,7 +26445,7 @@ "ok", "error" ], - "title": "users.profile.set error schema", + "title": "users.setPresence error schema", "type": "object" } } @@ -28920,35 +26453,48 @@ "security": [ { "slackAuth": [ - "users.profile:write" + "users:write" ] } ], "tags": [ - "users.profile", "users" ] } }, - "/users.setActive": { - "post": { + "/views.open": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Marked a user as active. Deprecated and non-functional.", + "description": "Open a view for a user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/users.setActive" + "url": "https://api.slack.com/methods/views.open" }, - "operationId": "users_setActive", + "operationId": "views_open", "parameters": [ { - "description": "Authentication token. Requires scope: `users:write`", + "description": "Authentication token. Requires scope: `none`", "in": "header", "name": "token", "required": true, "type": "string" + }, + { + "description": "Exchange a trigger to post to the user.", + "in": "query", + "name": "trigger_id", + "required": true, + "type": "string" + }, + { + "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "in": "query", + "name": "view", + "required": true, + "type": "string" } ], "produces": [ @@ -28956,10 +26502,51 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response includes the opened view payload.", "examples": { "application/json": { - "ok": true + "ok": true, + "view": { + "app_id": "AA4928AQ", + "blocks": [ + { + "block_id": "a_block_id", + "element": { + "action_id": "an_action_id", + "type": "plain_text_input" + }, + "label": { + "emoji": true, + "text": "A simple label", + "type": "plain_text" + }, + "optional": false, + "type": "input" + } + ], + "bot_id": "BA13894H", + "callback_id": "identify_your_modals", + "clear_on_close": false, + "external_id": "", + "hash": "156772938.1827394", + "id": "VMHU10V25", + "notify_on_close": false, + "private_metadata": "Shh it is a secret", + "root_view_id": "VMHU10V25", + "state": { + "values": {} + }, + "submit": { + "text": "Create", + "type": "plain_text" + }, + "team_id": "T8N4K1JN", + "title": { + "text": "Quite a plain modal", + "type": "plain_text" + }, + "type": "modal" + } } }, "schema": { @@ -28978,11 +26565,16 @@ } }, "default": { - "description": "Typical error response", + "description": "Typical error response, before getting to any possible validation errors.", "examples": { "application/json": { - "error": "invalid_auth", - "ok": false + "error": "invalid_arguments", + "ok": false, + "response_metadata": { + "messages": [ + "invalid `trigger_id`" + ] + } } }, "schema": { @@ -29004,56 +26596,54 @@ "security": [ { "slackAuth": [ - "users:write" + "none" ] } ], "tags": [ - "users" + "views" ] } }, - "/users.setPhoto": { - "post": { + "/views.publish": { + "get": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Set the user profile photo", + "description": "Publish a static view for a User.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/users.setPhoto" + "url": "https://api.slack.com/methods/views.publish" }, - "operationId": "users_setPhoto", + "operationId": "views_publish", "parameters": [ { - "description": "File contents via `multipart/form-data`.", - "in": "formData", - "name": "image", + "description": "Authentication token. Requires scope: `none`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Width/height of crop box (always square)", - "in": "formData", - "name": "crop_w", - "type": "integer" - }, - { - "description": "Authentication token. Requires scope: `users.profile:write`", - "in": "formData", - "name": "token", + "description": "`id` of the user you want publish a view to.", + "in": "query", + "name": "user_id", + "required": true, "type": "string" }, { - "description": "Y coordinate of top-left corner of crop box", - "in": "formData", - "name": "crop_y", - "type": "integer" + "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "in": "query", + "name": "view", + "required": true, + "type": "string" }, { - "description": "X coordinate of top-left corner of crop box", - "in": "formData", - "name": "crop_x", - "type": "integer" + "description": "A string that represents view state to protect against possible race conditions.", + "in": "query", + "name": "hash", + "type": "string" } ], "produces": [ @@ -29061,142 +26651,83 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response includes the published view payload.", "examples": { "application/json": { - "ok": true + "ok": true, + "view": { + "app_id": "AA4928AQ", + "blocks": [ + { + "block_id": "2WGp9", + "text": { + "text": "A simple section with some sample sentence.", + "type": "mrkdwn", + "verbatim": false + }, + "type": "section" + } + ], + "bot_id": "BA13894H", + "callback_id": "identify_your_home_tab", + "clear_on_close": false, + "close": null, + "external_id": "", + "hash": "156772938.1827394", + "id": "VMHU10V25", + "notify_on_close": false, + "previous_view_id": null, + "private_metadata": "Shh it is a secret", + "root_view_id": "VMHU10V25", + "state": { + "values": {} + }, + "submit": null, + "team_id": "T8N4K1JN", + "type": "home" + } } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from users.setPhoto method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "profile": { - "additionalProperties": false, - "properties": { - "avatar_hash": { - "pattern": "^[0-9a-f]{12}$", - "type": "string" - }, - "image_1024": { - "format": "uri", - "type": "string" - }, - "image_192": { - "format": "uri", - "type": "string" - }, - "image_24": { - "format": "uri", - "type": "string" - }, - "image_32": { - "format": "uri", - "type": "string" - }, - "image_48": { - "format": "uri", - "type": "string" - }, - "image_512": { - "format": "uri", - "type": "string" - }, - "image_72": { - "format": "uri", - "type": "string" - }, - "image_original": { - "format": "uri", - "type": "string" - } - }, - "required": [ - "image_24", - "image_32", - "image_48", - "image_72", - "image_192", - "image_512", - "image_1024", - "image_original", - "avatar_hash" - ], - "type": "object" + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "profile" + "ok" ], - "title": "users.setPhoto schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response, before getting to any possible validation errors.", "examples": { "application/json": { - "error": "invalid_auth", - "ok": false + "error": "invalid_arguments", + "ok": false, + "response_metadata": { + "messages": [ + "invalid `user_id`" + ] + } } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from users.setPhoto method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "debug_step": { - "description": "possibly DEV/QA only", - "type": "string" - }, - "dims": { - "description": "possibly DEV/QA only", - "type": "string" - }, - "error": { - "enum": [ - "bad_image", - "too_large", - "too_many_frames", - "not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "time_ident": { - "description": "possibly DEV/QA only", - "type": "integer" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "users.setPhoto error schema", + "title": "Default error template", "type": "object" } } @@ -29204,39 +26735,46 @@ "security": [ { "slackAuth": [ - "users.profile:write" + "none" ] } ], "tags": [ - "users" + "views" ] } }, - "/users.setPresence": { - "post": { + "/views.push": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Manually sets user presence.", + "description": "Push a view onto the stack of a root view.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/users.setPresence" + "url": "https://api.slack.com/methods/views.push" }, - "operationId": "users_setPresence", + "operationId": "views_push", "parameters": [ { - "description": "Authentication token. Requires scope: `users:write`", + "description": "Authentication token. Requires scope: `none`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Either `auto` or `away`", - "in": "formData", - "name": "presence", + "description": "Exchange a trigger to post to the user.", + "in": "query", + "name": "trigger_id", + "required": true, + "type": "string" + }, + { + "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "in": "query", + "name": "view", "required": true, "type": "string" } @@ -29246,15 +26784,62 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response includes the pushed view payload.", "examples": { "application/json": { - "ok": true + "ok": true, + "view": { + "app_id": "AAD3351BQ", + "blocks": [ + { + "block_id": "edit_details", + "element": { + "action_id": "detail_input", + "type": "plain_text_input" + }, + "label": { + "text": "Edit details", + "type": "plain_text" + }, + "type": "input" + } + ], + "bot_id": "BADF7A34H", + "callback_id": "view_4", + "clear_on_close": true, + "close": { + "emoji": true, + "text": "Back", + "type": "plain_text" + }, + "external_id": "", + "hash": "1569362015.55b5e41b", + "id": "VNM522E2U", + "notify_on_close": false, + "previous_view_id": null, + "private_metadata": "", + "root_view_id": "VNN729E3U", + "state": { + "values": {} + }, + "submit": { + "emoji": true, + "text": "Save", + "type": "plain_text" + }, + "team_id": "T9M4RL1JM", + "title": { + "emoji": true, + "text": "Pushed Modal", + "type": "plain_text" + }, + "type": "modal" + } } }, "schema": { - "additionalProperties": false, - "description": "Schema for successful response from users.setPresence method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -29263,55 +26848,35 @@ "required": [ "ok" ], - "title": "users.setPresence schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response.", "examples": { "application/json": { - "error": "invalid_auth", - "ok": false + "error": "invalid_arguments", + "ok": false, + "response_metadata": { + "messages": [ + "missing required field: title" + ] + } } }, "schema": { - "additionalProperties": false, - "description": "Schema for error response from users.setPresence method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_presence", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "users.setPresence error schema", + "title": "Default error template", "type": "object" } } @@ -29319,27 +26884,27 @@ "security": [ { "slackAuth": [ - "users:write" + "none" ] } ], "tags": [ - "users" + "views" ] } }, - "/views.open": { + "/views.update": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Open a view for a user.", + "description": "Update an existing view.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/views.open" + "url": "https://api.slack.com/methods/views.update" }, - "operationId": "views_open", + "operationId": "views_update", "parameters": [ { "description": "Authentication token. Requires scope: `none`", @@ -29349,17 +26914,27 @@ "type": "string" }, { - "description": "Exchange a trigger to post to the user.", + "description": "A unique identifier of the view to be updated. Either `view_id` or `external_id` is required.", "in": "query", - "name": "trigger_id", - "required": true, + "name": "view_id", "type": "string" }, { - "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "description": "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.", + "in": "query", + "name": "external_id", + "type": "string" + }, + { + "description": "A [view object](/reference/surfaces/views). This must be a JSON-encoded string.", "in": "query", "name": "view", - "required": true, + "type": "string" + }, + { + "description": "A string that represents view state to protect against possible race conditions.", + "in": "query", + "name": "hash", "type": "string" } ], @@ -29368,47 +26943,54 @@ ], "responses": { "200": { - "description": "Typical success response includes the opened view payload.", + "description": "Typical success response includes the updated view payload.", "examples": { "application/json": { "ok": true, "view": { - "app_id": "AA4928AQ", + "app_id": "AAD3351BQ", "blocks": [ { - "block_id": "a_block_id", - "element": { - "action_id": "an_action_id", - "type": "plain_text_input" + "accessory": { + "action_id": "button_4", + "text": { + "text": "Click me", + "type": "plain_text" + }, + "type": "button" }, - "label": { + "block_id": "s_block", + "text": { "emoji": true, - "text": "A simple label", + "text": "I am but an updated modal", "type": "plain_text" }, - "optional": false, - "type": "input" + "type": "section" } - ], - "bot_id": "BA13894H", - "callback_id": "identify_your_modals", - "clear_on_close": false, + ], + "bot_id": "BADF7A34H", + "callback_id": "view_2", + "clear_on_close": true, + "close": { + "emoji": true, + "text": "Close", + "type": "plain_text" + }, "external_id": "", - "hash": "156772938.1827394", - "id": "VMHU10V25", + "hash": "1569262015.55b5e41b", + "id": "VNM522E2U", "notify_on_close": false, - "private_metadata": "Shh it is a secret", - "root_view_id": "VMHU10V25", + "previous_view_id": null, + "private_metadata": "", + "root_view_id": "VNN729E3U", "state": { "values": {} }, - "submit": { - "text": "Create", - "type": "plain_text" - }, - "team_id": "T8N4K1JN", + "submit": null, + "team_id": "T9M4RL1JM", "title": { - "text": "Quite a plain modal", + "emoji": true, + "text": "Updated Modal", "type": "plain_text" }, "type": "modal" @@ -29431,16 +27013,11 @@ } }, "default": { - "description": "Typical error response, before getting to any possible validation errors.", + "description": "Typical error response.", "examples": { "application/json": { - "error": "invalid_arguments", - "ok": false, - "response_metadata": { - "messages": [ - "invalid `trigger_id`" - ] - } + "error": "not_found", + "ok": false } }, "schema": { @@ -29471,44 +27048,37 @@ ] } }, - "/views.publish": { + "/workflows.stepCompleted": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Publish a static view for a User.", + "description": "Indicate that an app's step in a workflow completed execution.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/views.publish" + "url": "https://api.slack.com/methods/workflows.stepCompleted" }, - "operationId": "views_publish", + "operationId": "workflows_stepCompleted", "parameters": [ { - "description": "A string that represents view state to protect against possible race conditions.", - "in": "query", - "name": "hash", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `none`", + "description": "Authentication token. Requires scope: `workflow.steps:execute`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "`id` of the user you want publish a view to.", + "description": "Context identifier that maps to the correct workflow step execution.", "in": "query", - "name": "user_id", + "name": "workflow_step_execute_id", "required": true, "type": "string" }, { - "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "description": "Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workflows/workflow_step#output) array from your `workflow_step` object.", "in": "query", - "name": "view", - "required": true, + "name": "outputs", "type": "string" } ], @@ -29517,41 +27087,10 @@ ], "responses": { "200": { - "description": "Typical success response includes the published view payload.", + "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "view": { - "app_id": "AA4928AQ", - "blocks": [ - { - "block_id": "2WGp9", - "text": { - "text": "A simple section with some sample sentence.", - "type": "mrkdwn", - "verbatim": false - }, - "type": "section" - } - ], - "bot_id": "BA13894H", - "callback_id": "identify_your_home_tab", - "clear_on_close": false, - "close": null, - "external_id": "", - "hash": "156772938.1827394", - "id": "VMHU10V25", - "notify_on_close": false, - "previous_view_id": null, - "private_metadata": "Shh it is a secret", - "root_view_id": "VMHU10V25", - "state": { - "values": {} - }, - "submit": null, - "team_id": "T8N4K1JN", - "type": "home" - } + "ok": true } }, "schema": { @@ -29570,16 +27109,11 @@ } }, "default": { - "description": "Typical error response, before getting to any possible validation errors.", + "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_arguments", - "ok": false, - "response_metadata": { - "messages": [ - "invalid `user_id`" - ] - } + "error": "invalid_auth", + "ok": false } }, "schema": { @@ -29601,46 +27135,46 @@ "security": [ { "slackAuth": [ - "none" + "workflow.steps:execute" ] } ], "tags": [ - "views" + "workflows" ] } }, - "/views.push": { + "/workflows.stepFailed": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Push a view onto the stack of a root view.", + "description": "Indicate that an app's step in a workflow failed to execute.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/views.push" + "url": "https://api.slack.com/methods/workflows.stepFailed" }, - "operationId": "views_push", + "operationId": "workflows_stepFailed", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", + "description": "Authentication token. Requires scope: `workflow.steps:execute`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Exchange a trigger to post to the user.", + "description": "Context identifier that maps to the correct workflow step execution.", "in": "query", - "name": "trigger_id", + "name": "workflow_step_execute_id", "required": true, "type": "string" }, { - "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "description": "A JSON-based object with a `message` property that should contain a human readable error message.", "in": "query", - "name": "view", + "name": "error", "required": true, "type": "string" } @@ -29650,57 +27184,10 @@ ], "responses": { "200": { - "description": "Typical success response includes the pushed view payload.", + "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "view": { - "app_id": "AAD3351BQ", - "blocks": [ - { - "block_id": "edit_details", - "element": { - "action_id": "detail_input", - "label": { - "text": "Edit details", - "type": "plain_text" - }, - "type": "plain_text_input" - }, - "type": "input" - } - ], - "bot_id": "BADF7A34H", - "callback_id": "view_4", - "clear_on_close": true, - "close": { - "emoji": true, - "text": "Back", - "type": "plain_text" - }, - "external_id": "", - "hash": "1569362015.55b5e41b", - "id": "VNM522E2U", - "notify_on_close": false, - "previous_view_id": null, - "private_metadata": "", - "root_view_id": "VNN729E3U", - "state": { - "values": {} - }, - "submit": { - "emoji": true, - "text": "Save", - "type": "plain_text" - }, - "team_id": "T9M4RL1JM", - "title": { - "emoji": true, - "text": "Pushed Modal", - "type": "plain_text" - }, - "type": "modal" - } + "ok": true } }, "schema": { @@ -29719,16 +27206,11 @@ } }, "default": { - "description": "Typical error response.", + "description": "Typical error response", "examples": { "application/json": { - "error": "invalid_arguments", - "ok": false, - "response_metadata": { - "messages": [ - "missing required field: title" - ] - } + "error": "invalid_auth", + "ok": false } }, "schema": { @@ -29750,57 +27232,64 @@ "security": [ { "slackAuth": [ - "none" + "workflow.steps:execute" ] } ], "tags": [ - "views" + "workflows" ] } }, - "/views.update": { + "/workflows.updateStep": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Update an existing view.", + "description": "Update the configuration for a workflow extension step.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/views.update" + "url": "https://api.slack.com/methods/workflows.updateStep" }, - "operationId": "views_update", + "operationId": "workflows_updateStep", "parameters": [ { - "description": "A string that represents view state to protect against possible race conditions.", + "description": "Authentication token. Requires scope: `workflow.steps:execute`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`.", "in": "query", - "name": "hash", + "name": "workflow_step_edit_id", + "required": true, "type": "string" }, { - "description": "A unique identifier of the view to be updated. Either `view_id` or `external_id` is required.", + "description": "A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. **Please note**: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. [Read more about variables in workflow steps here](/workflows/steps#variables).", "in": "query", - "name": "view_id", + "name": "inputs", "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "header", - "name": "token", - "required": true, + "description": "An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.", + "in": "query", + "name": "outputs", "type": "string" }, { - "description": "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.", + "description": "An optional field that can be used to override the step name that is shown in the Workflow Builder.", "in": "query", - "name": "external_id", + "name": "step_name", "type": "string" }, { - "description": "A [view payload](/reference/surfaces/views) This must be a JSON-encoded string.", + "description": "An optional field that can be used to override app image that is shown in the Workflow Builder.", "in": "query", - "name": "view", + "name": "step_image_url", "type": "string" } ], @@ -29809,58 +27298,10 @@ ], "responses": { "200": { - "description": "Typical success response includes the updated view payload.", + "description": "Typical success response", "examples": { "application/json": { - "ok": true, - "view": { - "app_id": "AAD3351BQ", - "blocks": [ - { - "accessory": { - "action_id": "button_4", - "text": { - "text": "Click me", - "type": "plain_text" - }, - "type": "button" - }, - "block_id": "s_block", - "text": { - "emoji": true, - "text": "I am but an updated modal", - "type": "plain_text" - }, - "type": "section" - } - ], - "bot_id": "BADF7A34H", - "callback_id": "view_2", - "clear_on_close": true, - "close": { - "emoji": true, - "text": "Close", - "type": "plain_text" - }, - "external_id": "", - "hash": "1569262015.55b5e41b", - "id": "VNM522E2U", - "notify_on_close": false, - "previous_view_id": null, - "private_metadata": "", - "root_view_id": "VNN729E3U", - "state": { - "values": {} - }, - "submit": null, - "team_id": "T9M4RL1JM", - "title": { - "emoji": true, - "text": "Updated Modal", - "type": "plain_text" - }, - "type": "modal" - } + "ok": true } }, "schema": { @@ -29879,10 +27320,10 @@ } }, "default": { - "description": "Typical error response.", + "description": "Typical error response", "examples": { "application/json": { - "error": "not_found", + "error": "invalid_auth", "ok": false } }, @@ -29905,12 +27346,12 @@ "security": [ { "slackAuth": [ - "none" + "workflow.steps:execute" ] } ], "tags": [ - "views" + "workflows" ] } } @@ -29926,20 +27367,27 @@ "admin": "admin", "admin.apps:read": "admin.apps:read", "admin.apps:write": "admin.apps:write", + "admin.conversations:read": "admin.conversations:read", "admin.conversations:write": "admin.conversations:write", "admin.invites:read": "admin.invites:read", "admin.invites:write": "admin.invites:write", "admin.teams:read": "admin.teams:read", "admin.teams:write": "admin.teams:write", + "admin.usergroups:read": "admin.usergroups:read", + "admin.usergroups:write": "admin.usergroups:write", "admin.users:read": "admin.users:read", "admin.users:write": "admin.users:write", + "authorizations:read": "authorizations:read", "bot": "Bot user scope", + "calls:read": "calls:read", + "calls:write": "calls:write", "channels:history": "channels:history", + "channels:manage": "channels:manage", "channels:read": "channels:read", "channels:write": "channels:write", "chat:write": "chat:write", "chat:write:bot": "Author messages as a bot", - "chat:write:user": "chat:write:user", + "chat:write:user": "Author messages as a user", "conversations:history": "conversations:history", "conversations:read": "conversations:read", "conversations:write": "conversations:write", @@ -29981,7 +27429,8 @@ "users.profile:write": "users.profile:write", "users:read": "users:read", "users:read.email": "users:read.email", - "users:write": "users:write" + "users:write": "users:write", + "workflow.steps:execute": "workflow.steps:execute" }, "tokenUrl": "https://slack.com/api/oauth.access", "type": "oauth2" diff --git a/web-api/slack_web_openapi_v2_without_examples.json b/web-api/slack_web_openapi_v2_without_examples.json index ce4a2df..f7b1aff 100644 --- a/web-api/slack_web_openapi_v2_without_examples.json +++ b/web-api/slack_web_openapi_v2_without_examples.json @@ -62,7 +62,7 @@ "type": "string" }, "defs_enterprise_user_id": { - "pattern": "^[W][A-Z0-9]{8,}$", + "pattern": "^[WU][A-Z0-9]{8,}$", "title": "Enterprise User ID", "type": "string" }, @@ -90,6 +90,11 @@ "title": "default success response", "type": "boolean" }, + "defs_optional_app_id": { + "pattern": "^(A[A-Z0-9]{1,})?$", + "title": "App ID or empty string", + "type": "string" + }, "defs_pinned_info": { "additionalProperties": false, "title": "Info for a pinned item", @@ -465,10 +470,6 @@ "enterprise_id": { "$ref": "#/definitions/defs_enterprise_id" }, - "external_connections": { - "additionalProperties": false, - "type": "object" - }, "has_pins": { "type": "boolean" }, @@ -1188,7 +1189,6 @@ "items": { "$ref": "#/definitions/defs_team" }, - "minItems": 1, "type": "array", "uniqueItems": true } @@ -1203,6 +1203,37 @@ ], "type": "object" }, + "objs_external_org_migrations": { + "properties": { + "current": { + "items": { + "properties": { + "date_started": { + "type": "integer" + }, + "team_id": { + "type": "string" + } + }, + "required": [ + "team_id", + "date_started" + ], + "type": "object" + }, + "type": "array" + }, + "date_updated": { + "type": "integer" + } + }, + "required": [ + "date_updated", + "current" + ], + "title": "External Org Migrations", + "type": "object" + }, "objs_file": { "additionalProperties": false, "properties": { @@ -1461,141 +1492,6 @@ "title": "file object", "type": "object" }, - "objs_group": { - "additionalProperties": false, - "properties": { - "created": { - "type": "integer" - }, - "creator": { - "$ref": "#/definitions/defs_user_id" - }, - "id": { - "$ref": "#/definitions/defs_group_id" - }, - "is_archived": { - "type": "boolean" - }, - "is_deleted": { - "type": "boolean" - }, - "is_group": { - "type": "boolean" - }, - "is_moved": { - "type": "integer" - }, - "is_mpim": { - "type": "boolean" - }, - "is_open": { - "type": "boolean" - }, - "is_pending_ext_shared": { - "type": "boolean" - }, - "is_read_only": { - "type": "boolean" - }, - "is_thread_only": { - "type": "boolean" - }, - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest": { - "items": [ - { - "$ref": "#/definitions/objs_message" - }, - { - "type": "null" - } - ] - }, - "members": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, - "name": { - "type": "string" - }, - "name_normalized": { - "type": "string" - }, - "num_members": { - "type": "integer" - }, - "parent_group": { - "$ref": "#/definitions/defs_group_id" - }, - "priority": { - "type": "number" - }, - "purpose": { - "additionalProperties": false, - "properties": { - "creator": { - "$ref": "#/definitions/defs_topic_purpose_creator" - }, - "last_set": { - "type": "integer" - }, - "value": { - "type": "string" - } - }, - "required": [ - "value", - "creator", - "last_set" - ], - "type": "object" - }, - "topic": { - "additionalProperties": false, - "properties": { - "creator": { - "$ref": "#/definitions/defs_topic_purpose_creator" - }, - "last_set": { - "type": "integer" - }, - "value": { - "type": "string" - } - }, - "required": [ - "value", - "creator", - "last_set" - ], - "type": "object" - }, - "unread_count": { - "type": "integer" - }, - "unread_count_display": { - "type": "integer" - } - }, - "required": [ - "id", - "name", - "is_group", - "created", - "creator", - "name_normalized", - "topic", - "purpose" - ], - "title": "Group object", - "type": "object" - }, "objs_icon": { "properties": { "image_102": { @@ -1625,57 +1521,6 @@ }, "type": "object" }, - "objs_im": { - "additionalProperties": false, - "properties": { - "created": { - "type": "integer" - }, - "id": { - "$ref": "#/definitions/defs_dm_id" - }, - "is_app_home": { - "type": "boolean" - }, - "is_archived": { - "type": "boolean" - }, - "is_ext_shared": { - "type": "boolean" - }, - "is_frozen": { - "type": "boolean" - }, - "is_im": { - "type": "boolean" - }, - "is_org_shared": { - "type": "boolean" - }, - "is_shared": { - "type": "boolean" - }, - "is_user_deleted": { - "type": "boolean" - }, - "priority": { - "type": "number" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "id", - "is_im", - "is_org_shared", - "user", - "created", - "is_user_deleted" - ], - "title": "IM Object", - "type": "object" - }, "objs_message": { "additionalProperties": false, "properties": { @@ -1753,6 +1598,10 @@ "properties": { "emoji": { "type": "string" + }, + "image_64": { + "format": "uri", + "type": "string" } }, "type": "object" @@ -1900,6 +1749,21 @@ "title": "paging object", "type": "object" }, + "objs_primary_owner": { + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "id", + "email" + ], + "type": "object" + }, "objs_reaction": { "additionalProperties": true, "properties": { @@ -1998,52 +1862,115 @@ "type": "object" }, "objs_response_metadata": { - "additionalProperties": false, - "properties": { - "next_cursor": { - "type": "string" - } - }, - "required": [ - "next_cursor" - ], - "title": "new paging style", - "type": "object" - }, - "objs_scopes": { - "items": { - "title": "Named OAuth scopes", - "type": "string", - "x-examples": [ - "chat:write", - "im:history", - "im:read" - ] - }, - "type": "array" - }, - "objs_subteam": { - "additionalProperties": false, - "properties": { - "auto_provision": { - "type": "boolean" - }, - "auto_type": { - "items": [ - { - "type": "null" - }, - { - "enum": [ - "owner", - "admin" - ], + "items": [ + { + "additionalProperties": false, + "properties": { + "next_cursor": { "type": "string" } - ] - }, - "created_by": { - "$ref": "#/definitions/defs_user_id" + }, + "required": [ + "next_cursor" + ], + "title": "new paging style", + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "messages": { + "items": { + "type": "string" + }, + "type": "array" + }, + "warnings": { + "items": { + "enum": [ + "method_deprecated" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "messages", + "warnings" + ], + "title": "deprecation_warning", + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "messages": { + "items": { + "type": "string" + }, + "type": "array" + }, + "next_cursor": { + "type": "string" + }, + "warnings": { + "items": { + "enum": [ + "method_deprecated" + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "messages", + "warnings", + "next_cursor" + ], + "title": "deprecation_warning and paging style together", + "type": "object" + } + ] + }, + "objs_scopes": { + "items": { + "title": "Named OAuth scopes", + "type": "string", + "x-examples": [ + "chat:write", + "im:history", + "im:read" + ] + }, + "type": "array" + }, + "objs_subteam": { + "additionalProperties": false, + "properties": { + "auto_provision": { + "type": "boolean" + }, + "auto_type": { + "items": [ + { + "type": "null" + }, + { + "enum": [ + "owner", + "admin" + ], + "type": "string" + } + ] + }, + "channel_count": { + "type": "integer" + }, + "created_by": { + "$ref": "#/definitions/defs_user_id" }, "date_create": { "type": "integer" @@ -2169,10 +2096,20 @@ "type": "boolean" }, "description": { - "type": "string" + "type": [ + "null", + "string" + ] }, "discoverable": { - "type": "string" + "items": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, "domain": { "type": "string" @@ -2186,6 +2123,9 @@ "enterprise_name": { "$ref": "#/definitions/defs_enterprise_name" }, + "external_org_migrations": { + "$ref": "#/definitions/objs_external_org_migrations" + }, "has_compliance_export": { "type": "boolean" }, @@ -2193,7 +2133,7 @@ "$ref": "#/definitions/objs_icon" }, "id": { - "$ref": "#/definitions/defs_team" + "$ref": "#/definitions/defs_workspace_id" }, "is_assigned": { "type": "boolean" @@ -2201,9 +2141,15 @@ "is_enterprise": { "type": "integer" }, + "is_over_storage_limit": { + "type": "boolean" + }, "limit_ts": { "type": "integer" }, + "locale": { + "type": "string" + }, "messages_count": { "type": "integer" }, @@ -2219,6 +2165,9 @@ "over_storage_limit": { "type": "boolean" }, + "pay_prod_cur": { + "type": "string" + }, "plan": { "enum": [ "", @@ -2228,6 +2177,23 @@ "enterprise" ], "type": "string" + }, + "primary_owner": { + "$ref": "#/definitions/objs_primary_owner" + }, + "sso_provider": { + "properties": { + "label": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" } }, "required": [ @@ -2244,7 +2210,10 @@ "additionalProperties": false, "properties": { "field_name": { - "type": "string" + "type": [ + "null", + "string" + ] }, "hint": { "type": "string" @@ -2260,10 +2229,14 @@ "type": "string" }, "options": { - "items": { - "type": "string" - }, - "type": "array" + "items": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/objs_team_profile_field_option" + } + ] }, "ordering": { "type": "number" @@ -2272,7 +2245,10 @@ "items": { "type": "string" }, - "type": "array" + "type": [ + "null", + "array" + ] }, "type": { "enum": [ @@ -2291,11 +2267,40 @@ "ordering", "label", "hint", - "type", - "options" + "type" ], "type": "object" }, + "objs_team_profile_field_option": { + "additionalProperties": false, + "properties": { + "is_custom": { + "type": [ + "null", + "boolean" + ] + }, + "is_multiple_entry": { + "type": [ + "null", + "boolean" + ] + }, + "is_protected": { + "type": [ + "null", + "boolean" + ] + }, + "is_scim": { + "type": [ + "null", + "boolean" + ] + } + }, + "type": "object" + }, "objs_user": { "items": [ { @@ -2330,6 +2335,9 @@ "is_external": { "type": "boolean" }, + "is_forgotten": { + "type": "boolean" + }, "is_invited_user": { "type": "boolean" }, @@ -2342,6 +2350,9 @@ "is_restricted": { "type": "boolean" }, + "is_stranger": { + "type": "boolean" + }, "is_ultra_restricted": { "type": "boolean" }, @@ -2361,10 +2372,10 @@ "type": "string" }, "team": { - "$ref": "#/definitions/defs_team" + "$ref": "#/definitions/defs_workspace_id" }, "team_id": { - "$ref": "#/definitions/defs_team" + "$ref": "#/definitions/defs_workspace_id" }, "team_profile": { "additionalProperties": false, @@ -2409,7 +2420,6 @@ "required": [ "id", "name", - "deleted", "profile", "is_bot", "updated", @@ -2423,7 +2433,7 @@ "properties": { "color": { "description": "refercing to bug: https://jira.tinyspeck.com/browse/EVALUE-1559", - "pattern": "^$", + "pattern": "^([a-fA-F0-9]{6})?$", "type": "string" }, "deleted": { @@ -2450,6 +2460,9 @@ "is_external": { "type": "boolean" }, + "is_forgotten": { + "type": "boolean" + }, "is_owner": { "type": "boolean" }, @@ -2459,6 +2472,9 @@ "is_restricted": { "type": "boolean" }, + "is_stranger": { + "type": "boolean" + }, "is_ultra_restricted": { "type": "boolean" }, @@ -2478,7 +2494,7 @@ "type": "string" }, "team_id": { - "$ref": "#/definitions/defs_team" + "$ref": "#/definitions/defs_workspace_id" }, "team_profile": { "additionalProperties": false, @@ -2531,10 +2547,7 @@ "required": [ "id", "name", - "deleted", "profile", - "is_restricted", - "is_ultra_restricted", "is_bot", "updated", "is_app_user" @@ -2550,7 +2563,7 @@ "type": "boolean" }, "api_app_id": { - "$ref": "#/definitions/defs_app_id" + "$ref": "#/definitions/defs_optional_app_id" }, "avatar_hash": { "type": "string" @@ -2566,7 +2579,10 @@ }, "email": { "format": "email", - "type": "string" + "type": [ + "null", + "string" + ] }, "fields": { "items": { @@ -2579,55 +2595,121 @@ ] }, "first_name": { - "type": "string" + "type": [ + "null", + "string" + ] }, "guest_expiration_ts": { - "type": "integer" + "type": [ + "null", + "integer" + ] }, "guest_invited_by": { - "type": "string" + "type": [ + "null", + "string" + ] }, "image_1024": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_192": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_24": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_32": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_48": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_512": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_72": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] }, "image_original": { "format": "uri", - "type": "string" + "type": [ + "null", + "string" + ] + }, + "is_app_user": { + "type": "boolean" }, "is_custom_image": { "type": "boolean" }, - "last_name": { + "is_restricted": { + "type": [ + "null", + "boolean" + ] + }, + "is_ultra_restricted": { + "type": [ + "null", + "boolean" + ] + }, + "last_avatar_image_hash": { "type": "string" }, + "last_name": { + "type": [ + "null", + "string" + ] + }, + "memberships_count": { + "type": "integer" + }, + "name": { + "type": [ + "null", + "string" + ] + }, "phone": { "type": "string" }, + "pronouns": { + "type": "string" + }, "real_name": { "type": "string" }, @@ -2637,6 +2719,18 @@ "skype": { "type": "string" }, + "status_default_emoji": { + "type": "string" + }, + "status_default_text": { + "type": "string" + }, + "status_default_text_canonical": { + "type": [ + "null", + "string" + ] + }, "status_emoji": { "type": "string" }, @@ -2647,16 +2741,28 @@ "type": "string" }, "status_text_canonical": { - "type": "string" - }, - "team": { - "$ref": "#/definitions/defs_workspace_id" + "type": [ + "null", + "string" + ] }, - "teams": { + "team": { "$ref": "#/definitions/defs_workspace_id" }, "title": { "type": "string" + }, + "updated": { + "type": "integer" + }, + "user_id": { + "type": "string" + }, + "username": { + "type": [ + "null", + "string" + ] } }, "required": [ @@ -2664,7 +2770,13 @@ "display_name", "avatar_hash", "real_name_normalized", - "display_name_normalized" + "display_name_normalized", + "title", + "phone", + "skype", + "status_text", + "status_emoji", + "fields" ], "title": "User profile object", "type": "object" @@ -2682,7 +2794,10 @@ "type": "string" }, "first_name": { - "type": "string" + "type": [ + "string", + "null" + ] }, "image_72": { "format": "uri", @@ -2733,7 +2848,7 @@ }, "description": "One way to interact with the Slack platform is its HTTP RPC-based Web API, a collection of methods requiring OAuth 2.0-based user, bot, or workspace tokens blessed with related OAuth scopes.", "title": "Slack Web API", - "version": "1.5.0" + "version": "1.7.0" }, "paths": { "/admin.apps.approve": { @@ -2749,11 +2864,6 @@ }, "operationId": "admin_apps_approve", "parameters": [ - { - "in": "formData", - "name": "team_id", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:write`", "in": "header", @@ -2772,6 +2882,11 @@ "in": "formData", "name": "request_id", "type": "string" + }, + { + "in": "formData", + "name": "team_id", + "type": "string" } ], "produces": [ @@ -2838,12 +2953,6 @@ }, "operationId": "admin_apps_approved_list", "parameters": [ - { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", - "in": "query", - "name": "cursor", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:read`", "in": "query", @@ -2857,6 +2966,12 @@ "name": "limit", "type": "integer" }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "in": "query", + "name": "cursor", + "type": "string" + }, { "in": "query", "name": "team_id", @@ -2932,12 +3047,6 @@ }, "operationId": "admin_apps_requests_list", "parameters": [ - { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", - "in": "query", - "name": "cursor", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:read`", "in": "query", @@ -2951,6 +3060,12 @@ "name": "limit", "type": "integer" }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "in": "query", + "name": "cursor", + "type": "string" + }, { "in": "query", "name": "team_id", @@ -3022,11 +3137,6 @@ }, "operationId": "admin_apps_restrict", "parameters": [ - { - "in": "formData", - "name": "team_id", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:write`", "in": "header", @@ -3045,6 +3155,11 @@ "in": "formData", "name": "request_id", "type": "string" + }, + { + "in": "formData", + "name": "team_id", + "type": "string" } ], "produces": [ @@ -3111,12 +3226,6 @@ }, "operationId": "admin_apps_restricted_list", "parameters": [ - { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", - "in": "query", - "name": "cursor", - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.apps:read`", "in": "query", @@ -3130,6 +3239,12 @@ "name": "limit", "type": "integer" }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "in": "query", + "name": "cursor", + "type": "string" + }, { "in": "query", "name": "team_id", @@ -3193,26 +3308,19 @@ ] } }, - "/admin.conversations.setTeams": { + "/admin.conversations.archive": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Set the workspaces in an Enterprise grid org that connect to a channel.", + "description": "Archive a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.conversations.setTeams" + "url": "https://api.slack.com/methods/admin.conversations.archive" }, - "operationId": "admin_conversations_setTeams", + "operationId": "admin_conversations_archive", "parameters": [ - { - "description": "The encoded `channel_id` to add or remove to workspaces.", - "in": "formData", - "name": "channel_id", - "required": true, - "type": "string" - }, { "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "header", @@ -3221,21 +3329,10 @@ "type": "string" }, { - "description": "True if channel has to be converted to an org channel", - "in": "formData", - "name": "org_channel", - "type": "boolean" - }, - { - "description": "The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.", - "in": "formData", - "name": "team_id", - "type": "string" - }, - { - "description": "The list of workspaces to which the channel should be shared. Not required if the channel is being shared orgwide. Example: `['T1234', 'T5678']`", + "description": "The channel to archive.", "in": "formData", - "name": "target_team_ids", + "name": "channel_id", + "required": true, "type": "string" } ], @@ -3246,8 +3343,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.archive", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -3256,24 +3353,38 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.archive schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.archive", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_type_not_supported", + "default_org_wide_channel", + "already_archived", + "cant_archive_general", + "restricted_action", + "could_not_archive_channel" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.archive error schema", "type": "object" } } @@ -3291,36 +3402,30 @@ ] } }, - "/admin.emoji.add": { + "/admin.conversations.convertToPrivate": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Add an emoji.", + "description": "Convert a public channel to a private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.add" + "url": "https://api.slack.com/methods/admin.conversations.convertToPrivate" }, - "operationId": "admin_emoji_add", + "operationId": "admin_conversations_convertToPrivate", "parameters": [ { - "description": "The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.", - "in": "formData", - "name": "url", - "required": true, - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.", + "description": "The channel to convert to private.", "in": "formData", - "name": "name", + "name": "channel_id", "required": true, "type": "string" } @@ -3332,8 +3437,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.convertToPrivate", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -3342,24 +3447,39 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.convertToPrivate schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.convertToPrivate", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "restricted_action", + "name_taken", + "channel_not_found", + "channel_type_not_supported", + "default_org_wide_channel", + "method_not_supported_for_channel_type", + "could_not_convert_channel", + "external_channel_migrating" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.convertToPrivate error schema", "type": "object" } } @@ -3367,47 +3487,66 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.emoji", + "admin.conversations", "admin" ] } }, - "/admin.emoji.addAlias": { + "/admin.conversations.create": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Add an emoji alias.", + "description": "Create a public or private channel-based conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.addAlias" + "url": "https://api.slack.com/methods/admin.conversations.create" }, - "operationId": "admin_emoji_addAlias", + "operationId": "admin_conversations_create", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The name of the emoji to be aliased. Colons (`:myemoji:`) around the value are not required, although they may be included.", + "description": "Name of the public or private channel to create.", "in": "formData", "name": "name", "required": true, "type": "string" }, { - "description": "The alias of the emoji.", + "description": "Description of the public or private channel to create.", "in": "formData", - "name": "alias_for", + "name": "description", + "type": "string" + }, + { + "description": "When `true`, creates a private channel instead of a public channel", + "in": "formData", + "name": "is_private", "required": true, + "type": "boolean" + }, + { + "description": "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", + "in": "formData", + "name": "org_wide", + "type": "boolean" + }, + { + "description": "The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.", + "in": "formData", + "name": "team_id", "type": "string" } ], @@ -3418,9 +3557,12 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.create", "properties": { + "channel_id": { + "$ref": "#/definitions/defs_channel_id" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } @@ -3428,24 +3570,38 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.create schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.create", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "name_taken", + "restricted_action", + "team_not_found", + "invalid_team", + "invalid_name", + "could_not_create_channel", + "team_id_or_org_required" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.create error schema", "type": "object" } } @@ -3453,46 +3609,42 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.emoji", + "admin.conversations", "admin" ] } }, - "/admin.emoji.list": { - "get": { + "/admin.conversations.delete": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "List emoji for an Enterprise Grid organization.", + "description": "Delete a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.list" + "url": "https://api.slack.com/methods/admin.conversations.delete" }, - "operationId": "admin_emoji_list", + "operationId": "admin_conversations_delete", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The channel to delete.", + "in": "formData", + "name": "channel_id", + "required": true, + "type": "string" } ], "produces": [ @@ -3502,8 +3654,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.delete", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -3512,24 +3664,38 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.delete schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.delete", "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "channel_not_found", + "channel_type_not_supported", + "default_org_wide_channel", + "restricted_action", + "could_not_delete_channel", + "missing_scope" + ], + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" + } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.delete error schema", "type": "object" } } @@ -3537,41 +3703,48 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.emoji", + "admin.conversations", "admin" ] } }, - "/admin.emoji.remove": { + "/admin.conversations.disconnectShared": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Remove an emoji across an Enterprise Grid organization", + "description": "Disconnect a connected channel from one or more workspaces.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.remove" + "url": "https://api.slack.com/methods/admin.conversations.disconnectShared" }, - "operationId": "admin_emoji_remove", + "operationId": "admin_conversations_disconnectShared", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.", + "description": "The channel to be disconnected from some workspaces.", "in": "formData", - "name": "name", + "name": "channel_id", "required": true, "type": "string" + }, + { + "description": "The team to be removed from the channel. Currently only a single team id can be specified.", + "in": "formData", + "name": "leaving_team_ids", + "type": "string" } ], "produces": [ @@ -3581,8 +3754,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.disconnectShared", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -3591,24 +3764,43 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.rename schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.disconnectShared", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "not_an_enterprise", + "channel_not_found", + "not_supported", + "team_not_found", + "restricted_action", + "missing_scope", + "leaving_team_not_in_channel", + "no_teams_to_disconnect", + "leaving_team_required", + "cannot_kick_team", + "cannot_kick_home_team" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.disconnectShared error schema", "type": "object" } } @@ -3616,47 +3808,57 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.emoji", + "admin.conversations", "admin" ] } }, - "/admin.emoji.rename": { - "post": { + "/admin.conversations.ekm.listOriginalConnectedChannelInfo": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Rename an emoji.", + "description": "List all disconnected channels\u2014i.e., channels that were once connected to other workspaces and then disconnected\u2014and the corresponding original channel IDs for key revocation with EKM.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.emoji.rename" + "url": "https://api.slack.com/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo" }, - "operationId": "admin_emoji_rename", + "operationId": "admin_conversations_ekm_listOriginalConnectedChannelInfo", "parameters": [ { - "description": "The new name of the emoji.", - "in": "formData", - "name": "new_name", + "description": "Authentication token. Requires scope: `admin.conversations:read`", + "in": "query", + "name": "token", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", - "name": "token", - "required": true, + "description": "A comma-separated list of channels to filter to.", + "in": "query", + "name": "channel_ids", "type": "string" }, { - "description": "The name of the emoji to be renamed. Colons (`:myemoji:`) around the value are not required, although they may be included.", - "in": "formData", - "name": "name", - "required": true, + "description": "A comma-separated list of the workspaces to which the channels you would like returned belong.", + "in": "query", + "name": "team_ids", + "type": "string" + }, + { + "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -3702,46 +3904,40 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:read" ] } ], "tags": [ - "admin.emoji", + "admin.conversations.ekm", "admin" ] } }, - "/admin.inviteRequests.approve": { - "post": { + "/admin.conversations.getConversationPrefs": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Approve a workspace invite request.", + "description": "Get conversation preferences for a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.approve" + "url": "https://api.slack.com/methods/admin.conversations.getConversationPrefs" }, - "operationId": "admin_inviteRequests_approve", + "operationId": "admin_conversations_getConversationPrefs", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.invites:write`", + "description": "Authentication token. Requires scope: `admin.conversations:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "ID for the workspace where the invite request was made.", - "in": "formData", - "name": "team_id", - "type": "string" - }, - { - "description": "ID of the request to invite.", - "in": "formData", - "name": "invite_request_id", + "description": "The channel to get preferences for.", + "in": "query", + "name": "channel_id", "required": true, "type": "string" } @@ -3753,34 +3949,87 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.getConversationPrefs", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "prefs": { + "properties": { + "can_thread": { + "properties": { + "type": { + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "who_can_post": { + "properties": { + "type": { + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "type": "object" } }, "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.getConversationPrefs schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.getConversationPrefs", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "not_an_enterprise", + "restricted_action", + "missing_scope", + "channel_not_found", + "channel_type_not_supported", + "could_not_get_conversation_prefs" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.unarchive error schema", "type": "object" } } @@ -3788,53 +4037,54 @@ "security": [ { "slackAuth": [ - "admin.invites:write" + "admin.conversations:read" ] } ], "tags": [ - "admin.inviteRequests", + "admin.conversations", "admin" ] } }, - "/admin.inviteRequests.approved.list": { + "/admin.conversations.getTeams": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "List all approved workspace invite requests.", + "description": "Get all the workspaces a given public or private channel is connected to within this Enterprise org.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.approved.list" + "url": "https://api.slack.com/methods/admin.conversations.getTeams" }, - "operationId": "admin_inviteRequests_approved_list", + "operationId": "admin_conversations_getTeams", "parameters": [ { - "description": "Value of the `next_cursor` field sent as part of the previous API response", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.invites:read`", + "description": "Authentication token. Requires scope: `admin.conversations:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", + "description": "The channel to determine connected workspaces within the organization for.", "in": "query", - "name": "limit", - "type": "integer" + "name": "channel_id", + "required": true, + "type": "string" }, { - "description": "ID for the workspace where the invite requests were made.", + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", "in": "query", - "name": "team_id", + "name": "cursor", "type": "string" + }, + { + "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -3844,34 +4094,67 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.getTeams", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "response_metadata": { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string" + } + }, + "required": [ + "next_cursor" + ], + "type": "object" + }, + "team_ids": { + "items": { + "$ref": "#/definitions/defs_team" + }, + "type": "array" } }, "required": [ - "ok" + "ok", + "team_ids" ], - "title": "Default success template", + "title": "admin.conversations.getTeams schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.getTeams", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_type_not_supported", + "unsupported_team_type", + "restricted_action", + "could_not_get_teams", + "invalid_cursor", + "invalid_limit" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.getTeams error schema", "type": "object" } } @@ -3879,53 +4162,49 @@ "security": [ { "slackAuth": [ - "admin.invites:read" + "admin.conversations:read" ] } ], "tags": [ - "admin.inviteRequests.approved", + "admin.conversations", "admin" ] } }, - "/admin.inviteRequests.denied.list": { - "get": { + "/admin.conversations.invite": { + "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "List all denied workspace invite requests.", + "description": "Invite a user to a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.denied.list" + "url": "https://api.slack.com/methods/admin.conversations.invite" }, - "operationId": "admin_inviteRequests_denied_list", + "operationId": "admin_conversations_invite", "parameters": [ { - "description": "Value of the `next_cursor` field sent as part of the previous api response", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.invites:read`", + "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The users to invite.", + "in": "formData", + "name": "user_ids", + "required": true, + "type": "string" }, { - "description": "ID for the workspace where the invite requests were made.", - "in": "query", - "name": "team_id", - "type": "string" + "description": "The channel that the users will be invited to.", + "in": "formData", + "name": "channel_id", + "required": true, + "type": "string" } ], "produces": [ @@ -3935,8 +4214,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.invite", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -3945,7 +4224,7 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.invite schema", "type": "object" } }, @@ -3953,16 +4232,29 @@ "description": "Typical error response", "schema": { "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "description": "Schema for error response from admin.conversations.invite", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_type_not_supported", + "default_org_wide_channel", + "restricted_action", + "user_must_be_admin", + "failed_for_some_users" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.invite error schema", "type": "object" } } @@ -3970,46 +4262,46 @@ "security": [ { "slackAuth": [ - "admin.invites:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.inviteRequests.denied", + "admin.conversations", "admin" ] } }, - "/admin.inviteRequests.deny": { + "/admin.conversations.rename": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Deny a workspace invite request.", + "description": "Rename a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.deny" + "url": "https://api.slack.com/methods/admin.conversations.rename" }, - "operationId": "admin_inviteRequests_deny", + "operationId": "admin_conversations_rename", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.invites:write`", + "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "ID for the workspace where the invite request was made.", + "description": "The channel to rename.", "in": "formData", - "name": "team_id", + "name": "channel_id", + "required": true, "type": "string" }, { - "description": "ID of the request to invite.", "in": "formData", - "name": "invite_request_id", + "name": "name", "required": true, "type": "string" } @@ -4021,8 +4313,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.rename", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -4031,24 +4323,37 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.rename schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.rename", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_type_not_supported", + "restricted_action", + "could_not_rename_channel", + "default_org_wide_channel", + "name_taken" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.unarchive error schema", "type": "object" } } @@ -4056,52 +4361,53 @@ "security": [ { "slackAuth": [ - "admin.invites:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.inviteRequests", + "admin.conversations", "admin" ] } }, - "/admin.inviteRequests.list": { - "get": { + "/admin.conversations.restrictAccess.addGroup": { + "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "List all pending workspace invite requests.", + "description": "Add an allowlist of IDP groups for accessing a channel", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.inviteRequests.list" + "url": "https://api.slack.com/methods/admin.conversations.restrictAccess.addGroup" }, - "operationId": "admin_inviteRequests_list", + "operationId": "admin_conversations_restrictAccess_addGroup", "parameters": [ { - "description": "Value of the `next_cursor` field sent as part of the previous API response", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "formData", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `admin.invites:read`", - "in": "header", - "name": "token", - "required": true, + "description": "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.", + "in": "formData", + "name": "team_id", "type": "string" }, { - "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-Grid-org) ID to be an allowlist for the private channel.", + "in": "formData", + "name": "group_id", + "required": true, + "type": "string" }, { - "description": "ID for the workspace where the invite requests were made.", - "in": "query", - "name": "team_id", + "description": "The channel to link this group to.", + "in": "formData", + "name": "channel_id", + "required": true, "type": "string" } ], @@ -4147,51 +4453,45 @@ "security": [ { "slackAuth": [ - "admin.invites:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.inviteRequests", + "admin.conversations.restrictAccess", "admin" ] } }, - "/admin.teams.admins.list": { + "/admin.conversations.restrictAccess.listGroups": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "List all of the admins on a given workspace.", + "description": "List all IDP Groups linked to a channel", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.admins.list" + "url": "https://api.slack.com/methods/admin.conversations.restrictAccess.listGroups" }, - "operationId": "admin_teams_admins_list", + "operationId": "admin_conversations_restrictAccess_listGroups", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:read`", + "description": "Authentication token. Requires scope: `admin.conversations:read`", "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "The maximum number of items to return.", "in": "query", - "name": "limit", - "type": "integer" + "name": "channel_id", + "required": true, + "type": "string" }, { + "description": "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.", "in": "query", "name": "team_id", - "required": true, "type": "string" } ], @@ -4237,60 +4537,54 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:read" ] } ], "tags": [ - "admin.teams.admins", + "admin.conversations.restrictAccess", "admin" ] } }, - "/admin.teams.create": { + "/admin.conversations.restrictAccess.removeGroup": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Create an Enterprise team.", + "description": "Remove a linked IDP group linked from a private channel", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.create" + "url": "https://api.slack.com/methods/admin.conversations.restrictAccess.removeGroup" }, - "operationId": "admin_teams_create", + "operationId": "admin_conversations_restrictAccess_removeGroup", "parameters": [ { - "description": "Team domain (for example, slacksoftballteam).", + "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "formData", - "name": "team_domain", - "required": true, - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Description for the team.", + "description": "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.", "in": "formData", - "name": "team_description", + "name": "team_id", + "required": true, "type": "string" }, { - "description": "Team name (for example, Slack Softball Team).", + "description": "The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-Grid-org) ID to remove from the private channel.", "in": "formData", - "name": "team_name", + "name": "group_id", "required": true, "type": "string" }, { - "description": "Who can join the team. A team's discoverability can be `open`, `closed`, `invite_only`, or `unlisted`.", + "description": "The channel to remove the linked group from.", "in": "formData", - "name": "team_discoverability", + "name": "channel_id", + "required": true, "type": "string" } ], @@ -4336,47 +4630,77 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.teams", + "admin.conversations.restrictAccess", "admin" ] } }, - "/admin.teams.list": { + "/admin.conversations.search": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "List all teams on an Enterprise organization", + "description": "Search for public or private channels in an Enterprise organization.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.list" + "url": "https://api.slack.com/methods/admin.conversations.search" }, - "operationId": "admin_teams_list", + "operationId": "admin_conversations_search", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "description": "Authentication token. Requires scope: `admin.conversations:read`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "Comma separated string of team IDs, signifying the workspaces to search through.", "in": "query", - "name": "cursor", + "name": "team_ids", "type": "string" }, { - "description": "Authentication token. Requires scope: `admin.teams:read`", - "in": "header", - "name": "token", - "required": true, + "description": "Name of the the channel to query by.", + "in": "query", + "name": "query", "type": "string" }, { - "description": "The maximum number of items to return. Must be between 1 - 100 both inclusive.", + "description": "Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.", "in": "query", "name": "limit", "type": "integer" + }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", + "type": "string" + }, + { + "description": "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).", + "in": "query", + "name": "search_channel_types", + "type": "string" + }, + { + "description": "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 ", + "in": "query", + "name": "sort", + "type": "string" + }, + { + "description": "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)", + "in": "query", + "name": "sort_dir", + "type": "string" } ], "produces": [ @@ -4386,34 +4710,57 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.search", "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" + "channels": { + "items": { + "$ref": "#/definitions/objs_channel" + }, + "type": "array" + }, + "next_cursor": { + "type": "string" } }, "required": [ - "ok" + "channels", + "next_cursor" ], - "title": "Default success template", + "title": "admin.conversations.search schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.search", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "not_an_enterprise", + "team_not_found", + "not_allowed", + "invalid_auth", + "invalid_cursor", + "invalid_search_channel_type", + "invalid_sort", + "invalid_sort_dir" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.search error schema", "type": "object" } } @@ -4421,50 +4768,47 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:read" ] } ], "tags": [ - "admin.teams", + "admin.conversations", "admin" ] } }, - "/admin.teams.owners.list": { - "get": { + "/admin.conversations.setConversationPrefs": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "List all of the owners on a given workspace.", + "description": "Set the posting permissions for a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.owners.list" + "url": "https://api.slack.com/methods/admin.conversations.setConversationPrefs" }, - "operationId": "admin_teams_owners_list", + "operationId": "admin_conversations_setConversationPrefs", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The channel to set the prefs for", + "in": "formData", + "name": "channel_id", + "required": true, + "type": "string" }, { - "in": "query", - "name": "team_id", + "description": "The prefs for this channel in a stringified JSON format.", + "in": "formData", + "name": "prefs", "required": true, "type": "string" } @@ -4476,8 +4820,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.setConversationPrefs", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -4486,24 +4830,38 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.setConversationPrefs schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.setConversationPrefs", "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" + "error": { + "enum": [ + "feature_not_enabled", + "not_an_admin", + "channel_not_found", + "channel_type_not_supported", + "restricted_action", + "missing_scope", + "could_not_set_channel_pref", + "default_org_wide_channel" + ], + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.setConversationPrefs error schema", "type": "object" } } @@ -4511,41 +4869,60 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.teams.owners", + "admin.conversations", "admin" ] } }, - "/admin.teams.settings.info": { - "get": { + "/admin.conversations.setTeams": { + "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Fetch information about settings in a workspace", + "description": "Set the workspaces in an Enterprise grid org that connect to a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.info" + "url": "https://api.slack.com/methods/admin.conversations.setTeams" }, - "operationId": "admin_teams_settings_info", + "operationId": "admin_conversations_setTeams", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.teams:read`", + "description": "Authentication token. Requires scope: `admin.conversations:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "in": "query", - "name": "team_id", + "description": "The encoded `channel_id` to add or remove to workspaces.", + "in": "formData", + "name": "channel_id", "required": true, "type": "string" + }, + { + "description": "The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.", + "in": "formData", + "name": "team_id", + "type": "string" + }, + { + "description": "A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.", + "in": "formData", + "name": "target_team_ids", + "type": "string" + }, + { + "description": "True if channel has to be converted to an org channel", + "in": "formData", + "name": "org_channel", + "type": "boolean" } ], "produces": [ @@ -4590,46 +4967,40 @@ "security": [ { "slackAuth": [ - "admin.teams:read" + "admin.conversations:write" ] } ], "tags": [ - "admin.teams.settings", + "admin.conversations", "admin" ] } }, - "/admin.teams.settings.setDefaultChannels": { + "/admin.conversations.unarchive": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Set the default channels of a workspace.", + "description": "Unarchive a public or private channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setDefaultChannels" + "url": "https://api.slack.com/methods/admin.conversations.unarchive" }, - "operationId": "admin_teams_settings_setDefaultChannels", + "operationId": "admin_conversations_unarchive", "parameters": [ { - "description": "An array of channel IDs.", - "in": "formData", - "name": "channel_ids", - "required": true, - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.conversations:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "ID for the workspace to set the default channel for.", + "description": "The channel to unarchive.", "in": "formData", - "name": "team_id", + "name": "channel_id", "required": true, "type": "string" } @@ -4641,8 +5012,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response of admin.conversations.unarchive", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -4651,24 +5022,38 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "admin.conversations.unarchive schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from admin.conversations.unarchive", "properties": { + "error": { + "enum": [ + "feature_not_enabled", + "channel_not_found", + "channel_not_archived", + "channel_type_not_supported", + "restricted_action", + "could_not_unarchive_channel", + "default_org_wide_channel", + "missing_scope" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "admin.conversations.unarchive error schema", "type": "object" } } @@ -4676,47 +5061,46 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.conversations:write" ] } ], "tags": [ - "admin.teams.settings", + "admin.conversations", "admin" ] } }, - "/admin.teams.settings.setDescription": { + "/admin.emoji.add": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Set the description of a given workspace.", + "description": "Add an emoji.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setDescription" + "url": "https://api.slack.com/methods/admin.emoji.add" }, - "operationId": "admin_teams_settings_setDescription", + "operationId": "admin_emoji_add", "parameters": [ { "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "header", + "in": "formData", "name": "token", "required": true, "type": "string" }, { - "description": "ID for the workspace to set the description for.", + "description": "The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.", "in": "formData", - "name": "team_id", + "name": "name", "required": true, "type": "string" }, { - "description": "The new description for the workspace.", + "description": "The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.", "in": "formData", - "name": "description", + "name": "url", "required": true, "type": "string" } @@ -4768,42 +5152,41 @@ } ], "tags": [ - "admin.teams.settings", + "admin.emoji", "admin" ] } }, - "/admin.teams.settings.setDiscoverability": { + "/admin.emoji.addAlias": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "An API method that allows admins to set the discoverability of a given workspace", + "description": "Add an emoji alias.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setDiscoverability" + "url": "https://api.slack.com/methods/admin.emoji.addAlias" }, - "operationId": "admin_teams_settings_setDiscoverability", + "operationId": "admin_emoji_addAlias", "parameters": [ { "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "header", + "in": "formData", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the workspace to set discoverability on.", + "description": "The name of the emoji to be aliased. Colons (`:myemoji:`) around the value are not required, although they may be included.", "in": "formData", - "name": "team_id", + "name": "name", "required": true, "type": "string" }, { - "description": "This workspace's discovery setting. It must be set to one of `open`, `invite_only`, `closed`, or `unlisted`.", + "description": "The alias of the emoji.", "in": "formData", - "name": "discoverability", + "name": "alias_for", "required": true, "type": "string" } @@ -4855,43 +5238,41 @@ } ], "tags": [ - "admin.teams.settings", + "admin.emoji", "admin" ] } }, - "/admin.teams.settings.setIcon": { - "post": { + "/admin.emoji.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Sets the icon of a workspace.", + "description": "List emoji for an Enterprise Grid organization.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setIcon" + "url": "https://api.slack.com/methods/admin.emoji.list" }, - "operationId": "admin_teams_settings_setIcon", + "operationId": "admin_emoji_list", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `admin.teams:read`", + "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "Image URL for the icon", - "in": "formData", - "name": "image_url", - "required": true, + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page", + "in": "query", + "name": "cursor", "type": "string" }, { - "description": "ID for the workspace to set the icon for.", - "in": "formData", - "name": "team_id", - "required": true, - "type": "string" + "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -4936,45 +5317,37 @@ "security": [ { "slackAuth": [ - "admin.teams:write" + "admin.teams:read" ] } ], "tags": [ - "admin.teams.settings", + "admin.emoji", "admin" ] } }, - "/admin.teams.settings.setName": { + "/admin.emoji.remove": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Set the name of a given workspace.", + "description": "Remove an emoji across an Enterprise Grid organization", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.teams.settings.setName" + "url": "https://api.slack.com/methods/admin.emoji.remove" }, - "operationId": "admin_teams_settings_setName", + "operationId": "admin_emoji_remove", "parameters": [ { "description": "Authentication token. Requires scope: `admin.teams:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "ID for the workspace to set the name for.", "in": "formData", - "name": "team_id", + "name": "token", "required": true, "type": "string" }, { - "description": "The new name of the workspace.", + "description": "The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.", "in": "formData", "name": "name", "required": true, @@ -5028,62 +5401,43 @@ } ], "tags": [ - "admin.teams.settings", + "admin.emoji", "admin" ] } }, - "/admin.users.assign": { + "/admin.emoji.rename": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Add an Enterprise user to a workspace.", + "description": "Rename an emoji.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.assign" + "url": "https://api.slack.com/methods/admin.emoji.rename" }, - "operationId": "admin_users_assign", + "operationId": "admin_emoji_rename", "parameters": [ { - "description": "The ID of the user to add to the workspace.", + "description": "Authentication token. Requires scope: `admin.teams:write`", "in": "formData", - "name": "user_id", + "name": "token", "required": true, "type": "string" }, { - "description": "Comma separated values of channel IDs to add user in the new workspace.", - "in": "formData", - "name": "channel_ids", - "type": "string" - }, - { - "description": "The ID (`T1234`) of the workspace.", + "description": "The name of the emoji to be renamed. Colons (`:myemoji:`) around the value are not required, although they may be included.", "in": "formData", - "name": "team_id", + "name": "name", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `admin.users:write`", - "in": "header", - "name": "token", + "description": "The new name of the emoji.", + "in": "formData", + "name": "new_name", "required": true, "type": "string" - }, - { - "description": "True if user should be added to the workspace as a single-channel guest.", - "in": "formData", - "name": "is_ultra_restricted", - "type": "boolean" - }, - { - "description": "True if user should be added to the workspace as a guest.", - "in": "formData", - "name": "is_restricted", - "type": "boolean" } ], "produces": [ @@ -5128,92 +5482,48 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.teams:write" ] } ], "tags": [ - "admin.users", + "admin.emoji", "admin" ] } }, - "/admin.users.invite": { + "/admin.inviteRequests.approve": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Invite a user to a workspace.", + "description": "Approve a workspace invite request.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.invite" + "url": "https://api.slack.com/methods/admin.inviteRequests.approve" }, - "operationId": "admin_users_invite", + "operationId": "admin_inviteRequests_approve", "parameters": [ { - "description": "A comma-separated list of `channel_id`s for this user to join. At least one channel is required.", - "in": "formData", - "name": "channel_ids", - "required": true, - "type": "string" - }, - { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", - "name": "team_id", - "required": true, - "type": "string" - }, - { - "description": "Full name of the user.", - "in": "formData", - "name": "real_name", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.invites:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Is this user a single channel guest user? (default: false)", - "in": "formData", - "name": "is_ultra_restricted", - "type": "boolean" - }, - { - "description": "An optional message to send to the user in the invite email.", - "in": "formData", - "name": "custom_message", - "type": "string" - }, - { - "description": "Is this user a multi-channel guest user? (default: false)", - "in": "formData", - "name": "is_restricted", - "type": "boolean" - }, - { - "description": "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.", + "description": "ID for the workspace where the invite request was made.", "in": "formData", - "name": "guest_expiration_ts", + "name": "team_id", "type": "string" }, { - "description": "The email address of the person to invite.", + "description": "ID of the request to invite.", "in": "formData", - "name": "email", + "name": "invite_request_id", "required": true, "type": "string" - }, - { - "description": "Allow this invite to be resent in the future if a user has not signed up yet. (default: false)", - "in": "formData", - "name": "resend", - "type": "boolean" } ], "produces": [ @@ -5258,54 +5568,53 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.invites:write" ] } ], "tags": [ - "admin.users", + "admin.inviteRequests", "admin" ] } }, - "/admin.users.list": { + "/admin.inviteRequests.approved.list": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "List users on a workspace", + "description": "List all approved workspace invite requests.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.list" + "url": "https://api.slack.com/methods/admin.inviteRequests.approved.list" }, - "operationId": "admin_users_list", + "operationId": "admin_inviteRequests_approved_list", "parameters": [ { - "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `admin.users:read`", + "description": "Authentication token. Requires scope: `admin.invites:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Limit for how many users to be retrieved per page", + "description": "ID for the workspace where the invite requests were made.", "in": "query", - "name": "limit", - "type": "integer" + "name": "team_id", + "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", + "description": "Value of the `next_cursor` field sent as part of the previous API response", "in": "query", - "name": "team_id", - "required": true, + "name": "cursor", "type": "string" + }, + { + "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -5350,49 +5659,53 @@ "security": [ { "slackAuth": [ - "admin.users:read" + "admin.invites:read" ] } ], "tags": [ - "admin.users", + "admin.inviteRequests.approved", "admin" ] } }, - "/admin.users.remove": { - "post": { + "/admin.inviteRequests.denied.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Remove a user from a workspace.", + "description": "List all denied workspace invite requests.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.remove" + "url": "https://api.slack.com/methods/admin.inviteRequests.denied.list" }, - "operationId": "admin_users_remove", + "operationId": "admin_inviteRequests_denied_list", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.invites:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to remove.", - "in": "formData", - "name": "user_id", - "required": true, + "description": "ID for the workspace where the invite requests were made.", + "in": "query", + "name": "team_id", "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", - "name": "team_id", - "required": true, + "description": "Value of the `next_cursor` field sent as part of the previous api response", + "in": "query", + "name": "cursor", "type": "string" + }, + { + "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -5437,54 +5750,48 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.invites:read" ] } ], "tags": [ - "admin.users", + "admin.inviteRequests.denied", "admin" ] } }, - "/admin.users.session.reset": { + "/admin.inviteRequests.deny": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Wipes all valid sessions on all devices for a given user", + "description": "Deny a workspace invite request.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.session.reset" + "url": "https://api.slack.com/methods/admin.inviteRequests.deny" }, - "operationId": "admin_users_session_reset", + "operationId": "admin_inviteRequests_deny", "parameters": [ { - "description": "Only expire mobile sessions (default: false)", - "in": "formData", - "name": "mobile_only", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.invites:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to wipe sessions for", + "description": "ID for the workspace where the invite request was made.", "in": "formData", - "name": "user_id", - "required": true, + "name": "team_id", "type": "string" }, { - "description": "Only expire web sessions (default: false)", + "description": "ID of the request to invite.", "in": "formData", - "name": "web_only", - "type": "boolean" + "name": "invite_request_id", + "required": true, + "type": "string" } ], "produces": [ @@ -5529,49 +5836,53 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.invites:write" ] } ], "tags": [ - "admin.users.session", + "admin.inviteRequests", "admin" ] } }, - "/admin.users.setAdmin": { - "post": { + "/admin.inviteRequests.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Set an existing guest, regular user, or owner to be an admin user.", + "description": "List all pending workspace invite requests.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.setAdmin" + "url": "https://api.slack.com/methods/admin.inviteRequests.list" }, - "operationId": "admin_users_setAdmin", + "operationId": "admin_inviteRequests_list", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.invites:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to designate as an admin.", - "in": "formData", - "name": "user_id", - "required": true, + "description": "ID for the workspace where the invite requests were made.", + "in": "query", + "name": "team_id", "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", - "name": "team_id", - "required": true, + "description": "Value of the `next_cursor` field sent as part of the previous API response", + "in": "query", + "name": "cursor", "type": "string" + }, + { + "description": "The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -5616,53 +5927,49 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.invites:read" ] } ], "tags": [ - "admin.users", + "admin.inviteRequests", "admin" ] } }, - "/admin.users.setExpiration": { - "post": { + "/admin.teams.admins.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Set an expiration for a guest user", + "description": "List all of the admins on a given workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.setExpiration" + "url": "https://api.slack.com/methods/admin.teams.admins.list" }, - "operationId": "admin_users_setExpiration", + "operationId": "admin_teams_admins_list", "parameters": [ { - "description": "Timestamp when guest account should be disabled.", - "in": "formData", - "name": "expiration_ts", - "required": true, - "type": "integer" - }, - { - "description": "Authentication token. Requires scope: `admin.users:write`", - "in": "header", + "description": "Authentication token. Requires scope: `admin.teams:read`", + "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to set an expiration for.", - "in": "formData", - "name": "user_id", - "required": true, + "description": "The maximum number of items to return.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", + "in": "query", "name": "team_id", "required": true, "type": "string" @@ -5710,49 +6017,61 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.teams:read" ] } ], "tags": [ - "admin.users", + "admin.teams.admins", "admin" ] } }, - "/admin.users.setOwner": { + "/admin.teams.create": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Set an existing guest, regular user, or admin user to be a workspace owner.", + "description": "Create an Enterprise team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.setOwner" + "url": "https://api.slack.com/methods/admin.teams.create" }, - "operationId": "admin_users_setOwner", + "operationId": "admin_teams_create", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.teams:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Id of the user to promote to owner.", + "description": "Team domain (for example, slacksoftballteam).", "in": "formData", - "name": "user_id", + "name": "team_domain", "required": true, "type": "string" }, { - "description": "The ID (`T1234`) of the workspace.", + "description": "Team name (for example, Slack Softball Team).", "in": "formData", - "name": "team_id", + "name": "team_name", "required": true, "type": "string" + }, + { + "description": "Description for the team.", + "in": "formData", + "name": "team_description", + "type": "string" + }, + { + "description": "Who can join the team. A team's discoverability can be `open`, `closed`, `invite_only`, or `unlisted`.", + "in": "formData", + "name": "team_discoverability", + "type": "string" } ], "produces": [ @@ -5797,48 +6116,46 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.teams:write" ] } ], "tags": [ - "admin.users", + "admin.teams", "admin" ] } }, - "/admin.users.setRegular": { - "post": { + "/admin.teams.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Set an existing guest user, admin user, or owner to be a regular user.", + "description": "List all teams on an Enterprise organization", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/admin.users.setRegular" + "url": "https://api.slack.com/methods/admin.teams.list" }, - "operationId": "admin_users_setRegular", + "operationId": "admin_teams_list", "parameters": [ { - "description": "Authentication token. Requires scope: `admin.users:write`", + "description": "Authentication token. Requires scope: `admin.teams:read`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The ID of the user to designate as a regular user.", - "in": "formData", - "name": "user_id", - "required": true, - "type": "string" + "description": "The maximum number of items to return. Must be between 1 - 100 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" }, { - "description": "The ID (`T1234`) of the workspace.", - "in": "formData", - "name": "team_id", - "required": true, + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -5884,39 +6201,51 @@ "security": [ { "slackAuth": [ - "admin.users:write" + "admin.teams:read" ] } ], "tags": [ - "admin.users", + "admin.teams", "admin" ] } }, - "/api.test": { + "/admin.teams.owners.list": { "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Checks API calling code.", + "description": "List all of the owners on a given workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/api.test" + "url": "https://api.slack.com/methods/admin.teams.owners.list" }, - "operationId": "api_test", + "operationId": "admin_teams_owners_list", "parameters": [ { - "description": "example property to return", + "description": "Authentication token. Requires scope: `admin.teams:read`", "in": "query", - "name": "foo", + "name": "token", + "required": true, "type": "string" }, { - "description": "Error response to return", "in": "query", - "name": "error", + "name": "team_id", + "required": true, + "type": "string" + }, + { + "description": "The maximum number of items to return. Must be between 1 - 1000 both inclusive.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -5925,12 +6254,10 @@ ], "responses": { "200": { - "description": "Standard success response", + "description": "Typical success response", "schema": { - "additionalProperties": { - "type": "object" - }, - "description": "Schema for successful response api.test method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -5939,30 +6266,24 @@ "required": [ "ok" ], - "title": "api.test success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Artificial error response", + "description": "Typical error response", "schema": { - "additionalProperties": { - "type": "object" - }, - "description": "Schema for error response api.test method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "api.test error schema", + "title": "Default error template", "type": "object" } } @@ -5970,31 +6291,40 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:read" ] } ], "tags": [ - "api" + "admin.teams.owners", + "admin" ] } }, - "/apps.permissions.info": { + "/admin.teams.settings.info": { "get": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Returns list of permissions this app has on a team.", + "description": "Fetch information about settings in a workspace", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.info" + "url": "https://api.slack.com/methods/admin.teams.settings.info" }, - "operationId": "apps_permissions_info", + "operationId": "admin_teams_settings_info", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.teams:read`", + "in": "header", "name": "token", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "team_id", + "required": true, "type": "string" } ], @@ -6003,145 +6333,36 @@ ], "responses": { "200": { - "description": "Standard success response when used with a user token", + "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from apps.permissions.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "info": { - "properties": { - "app_home": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "channel": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "group": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "im": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "mpim": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" - }, - "team": { - "properties": { - "resources": { - "$ref": "#/definitions/objs_resources" - }, - "scopes": { - "$ref": "#/definitions/objs_scopes" - } - }, - "required": [ - "scopes", - "resources" - ], - "type": "object" - } - }, - "required": [ - "team", - "channel", - "group", - "mpim", - "im", - "app_home" - ], - "type": "object" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "info" + "ok" ], - "title": "apps.permissions.info schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Standard failure response when used with an invalid token", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.permissions.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.permissions.info error schema", + "title": "Default error template", "type": "object" } } @@ -6149,46 +6370,46 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:read" ] } ], "tags": [ - "apps.permissions", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.request": { - "get": { + "/admin.teams.settings.setDefaultChannels": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Allows an app to request additional scopes", + "description": "Set the default channels of a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.request" + "url": "https://api.slack.com/methods/admin.teams.settings.setDefaultChannels" }, - "operationId": "apps_permissions_request", + "operationId": "admin_teams_settings_setDefaultChannels", "parameters": [ { - "description": "A comma separated list of scopes to request for", - "in": "query", - "name": "scopes", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "formData", + "name": "token", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "ID for the workspace to set the default channel for.", + "in": "formData", + "name": "team_id", "required": true, "type": "string" }, { - "description": "Token used to trigger the permissions API", - "in": "query", - "name": "trigger_id", + "description": "An array of channel IDs.", + "in": "formData", + "name": "channel_ids", "required": true, "type": "string" } @@ -6198,10 +6419,10 @@ ], "responses": { "200": { - "description": "Standard success response when used with a user token", + "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from apps.permissions.request method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -6210,53 +6431,24 @@ "required": [ "ok" ], - "title": "apps.permissions.request schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Standard failure response when trigger_id is invalid", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.permissions.request method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_trigger", - "trigger_exchanged", - "invalid_scope", - "invalid_user", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.permissions.request error schema", + "title": "Default error template", "type": "object" } } @@ -6264,46 +6456,49 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.resources.list": { - "get": { + "/admin.teams.settings.setDescription": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Returns list of resource grants this app has on a team.", + "description": "Set the description of a given workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.resources.list" + "url": "https://api.slack.com/methods/admin.teams.settings.setDescription" }, - "operationId": "apps_permissions_resources_list", + "operationId": "admin_teams_settings_setDescription", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "ID for the workspace to set the description for.", + "in": "formData", + "name": "team_id", "required": true, "type": "string" }, { - "description": "The maximum number of items to return.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The new description for the workspace.", + "in": "formData", + "name": "description", + "required": true, + "type": "string" } ], "produces": [ @@ -6311,103 +6506,36 @@ ], "responses": { "200": { - "description": "Typical successful paginated response", + "description": "Typical success response", "schema": { "additionalProperties": true, - "description": "Schema for successful response apps.permissions.resources.list method", + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "resources": { - "items": { - "properties": { - "id": { - "title": "An ID for a resource", - "type": "string", - "x-examples": [ - "T0DES3UAN", - "C0ABC1ABC" - ] - }, - "type": { - "title": "The type of resource the `id` corresponds to", - "type": "string", - "x-examples": [ - "team", - "channel", - "mpim" - ] - } - }, - "type": "object" - }, - "type": "array" - }, - "response_metadata": { - "additionalProperties": false, - "properties": { - "next_cursor": { - "type": "string", - "x-examples": [ - "dGVhbTpDMUg5UkVTR0w=" - ] - } - }, - "required": [ - "next_cursor" - ], - "type": "object" } }, "required": [ - "ok", - "resources" + "ok" ], - "title": "apps.permissions.resources.list success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.permissions.resources.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_cursor", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.permissions.resources.list error schema", + "title": "Default error template", "type": "object" } } @@ -6415,34 +6543,49 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions.resources", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.scopes.list": { - "get": { + "/admin.teams.settings.setDiscoverability": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Returns list of scopes this app has on a team.", + "description": "An API method that allows admins to set the discoverability of a given workspace", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.scopes.list" + "url": "https://api.slack.com/methods/admin.teams.settings.setDiscoverability" }, - "operationId": "apps_permissions_scopes_list", + "operationId": "admin_teams_settings_setDiscoverability", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "header", "name": "token", "required": true, "type": "string" + }, + { + "description": "The ID of the workspace to set discoverability on.", + "in": "formData", + "name": "team_id", + "required": true, + "type": "string" + }, + { + "description": "This workspace's discovery setting. It must be set to one of `open`, `invite_only`, `closed`, or `unlisted`.", + "in": "formData", + "name": "discoverability", + "required": true, + "type": "string" } ], "produces": [ @@ -6450,89 +6593,36 @@ ], "responses": { "200": { - "description": "Typical successful paginated response", + "description": "Typical success response", "schema": { "additionalProperties": true, - "description": "Schema for successful response api.permissions.scopes.list method", + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "scopes": { - "additionalProperties": true, - "properties": { - "app_home": { - "$ref": "#/definitions/objs_scopes" - }, - "channel": { - "$ref": "#/definitions/objs_scopes" - }, - "group": { - "$ref": "#/definitions/objs_scopes" - }, - "im": { - "$ref": "#/definitions/objs_scopes" - }, - "mpim": { - "$ref": "#/definitions/objs_scopes" - }, - "team": { - "$ref": "#/definitions/objs_scopes" - }, - "user": { - "$ref": "#/definitions/objs_scopes" - } - }, - "type": "object" } }, "required": [ - "ok", - "scopes" + "ok" ], - "title": "api.permissions.scopes.list success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.permissions.scopes.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.permissions.scopes.list error schema", + "title": "Default error template", "type": "object" } } @@ -6540,46 +6630,48 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions.scopes", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.users.list": { - "get": { + "/admin.teams.settings.setIcon": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Returns list of user grants and corresponding scopes this app has on a team.", + "description": "Sets the icon of a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.users.list" + "url": "https://api.slack.com/methods/admin.teams.settings.setIcon" }, - "operationId": "apps_permissions_users_list", + "operationId": "admin_teams_settings_setIcon", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "formData", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "Image URL for the icon", + "in": "formData", + "name": "image_url", "required": true, "type": "string" }, { - "description": "The maximum number of items to return.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "ID for the workspace to set the icon for.", + "in": "formData", + "name": "team_id", + "required": true, + "type": "string" } ], "produces": [ @@ -6587,7 +6679,7 @@ ], "responses": { "200": { - "description": "Typical successful paginated response", + "description": "Typical success response", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", @@ -6624,53 +6716,47 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions.users", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.permissions.users.request": { - "get": { + "/admin.teams.settings.setName": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Enables an app to trigger a permissions modal to grant an app access to a user access scope.", + "description": "Set the name of a given workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.permissions.users.request" + "url": "https://api.slack.com/methods/admin.teams.settings.setName" }, - "operationId": "apps_permissions_users_request", + "operationId": "admin_teams_settings_setName", "parameters": [ { - "description": "A comma separated list of user scopes to request for", - "in": "query", - "name": "scopes", - "required": true, - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `none`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "The user this scope is being requested for", - "in": "query", - "name": "user", + "description": "ID for the workspace to set the name for.", + "in": "formData", + "name": "team_id", "required": true, "type": "string" }, { - "description": "Token used to trigger the request", - "in": "query", - "name": "trigger_id", + "description": "The new name of the workspace.", + "in": "formData", + "name": "name", "required": true, "type": "string" } @@ -6680,7 +6766,7 @@ ], "responses": { "200": { - "description": "Standard success response when used with a user token", + "description": "Typical success response", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", @@ -6697,7 +6783,7 @@ } }, "default": { - "description": "Standard failure response when trigger_id is invalid", + "description": "Typical error response", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", @@ -6717,44 +6803,54 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "apps.permissions.users", - "apps" + "admin.teams.settings", + "admin" ] } }, - "/apps.uninstall": { - "get": { + "/admin.usergroups.addChannels": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Uninstalls your app from a workspace.", + "description": "Add one or more default channels to an IDP group.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/apps.uninstall" + "url": "https://api.slack.com/methods/admin.usergroups.addChannels" }, - "operationId": "apps_uninstall", + "operationId": "admin_usergroups_addChannels", "parameters": [ { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_secret", + "description": "Authentication token. Requires scope: `admin.usergroups:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "query", - "name": "token", + "description": "ID of the IDP group to add default channels for.", + "in": "formData", + "name": "usergroup_id", + "required": true, "type": "string" }, { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_id", + "description": "The workspace to add default channels in.", + "in": "formData", + "name": "team_id", + "type": "string" + }, + { + "description": "Comma separated string of channel IDs.", + "in": "formData", + "name": "channel_ids", + "required": true, "type": "string" } ], @@ -6765,8 +6861,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from apps.uninstall method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -6775,52 +6871,24 @@ "required": [ "ok" ], - "title": "apps.uninstall schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response if the token provided is not associated with an Org Admin or Owner", "schema": { - "additionalProperties": false, - "description": "Schema for error response from apps.uninstall method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_client_id", - "bad_client_secret", - "client_id_token_mismatch", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "apps.uninstall error schema", + "title": "Default error template", "type": "object" } } @@ -6828,40 +6896,56 @@ "security": [ { "slackAuth": [ - "none" + "admin.usergroups:write" ] } ], "tags": [ - "apps" + "admin.usergroups", + "admin" ] } }, - "/auth.revoke": { - "get": { + "/admin.usergroups.addTeams": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Revokes a token.", + "description": "Associate one or more default workspaces with an organization-wide IDP group.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/auth.revoke" + "url": "https://api.slack.com/methods/admin.usergroups.addTeams" }, - "operationId": "auth_revoke", + "operationId": "admin_usergroups_addTeams", "parameters": [ { - "description": "Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked.", - "in": "query", - "name": "test", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `none`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.teams:write`", + "in": "header", "name": "token", "required": true, "type": "string" - } + }, + { + "description": "An encoded usergroup (IDP Group) ID.", + "in": "formData", + "name": "usergroup_id", + "required": true, + "type": "string" + }, + { + "description": "A comma separated list of encoded team (workspace) IDs. Each workspace *MUST* belong to the organization associated with the token.", + "in": "formData", + "name": "team_ids", + "required": true, + "type": "string" + }, + { + "description": "When `true`, this method automatically creates new workspace accounts for the IDP group members.", + "in": "formData", + "name": "auto_provision", + "type": "boolean" + } ], "produces": [ "application/json" @@ -6870,62 +6954,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from auth.revoke method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "revoked": { - "type": "boolean" } }, "required": [ - "ok", - "revoked" + "ok" ], - "title": "auth.revoke schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from auth.revoke method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "auth.revoke error schema", + "title": "Default error template", "type": "object" } } @@ -6933,34 +6989,54 @@ "security": [ { "slackAuth": [ - "none" + "admin.teams:write" ] } ], "tags": [ - "auth" + "admin.usergroups", + "admin" ] } }, - "/auth.test": { + "/admin.usergroups.listChannels": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Checks authentication & identity.", + "description": "List the channels linked to an org-level IDP group (user group).", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/auth.test" + "url": "https://api.slack.com/methods/admin.usergroups.listChannels" }, - "operationId": "auth_test", + "operationId": "admin_usergroups_listChannels", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", + "description": "Authentication token. Requires scope: `admin.usergroups:read`", "in": "header", "name": "token", "required": true, "type": "string" + }, + { + "description": "ID of the IDP group to list default channels for.", + "in": "query", + "name": "usergroup_id", + "required": true, + "type": "string" + }, + { + "description": "ID of the the workspace.", + "in": "query", + "name": "team_id", + "type": "string" + }, + { + "description": "Flag to include or exclude the count of members per channel.", + "in": "query", + "name": "include_num_members", + "type": "boolean" } ], "produces": [ @@ -6968,79 +7044,36 @@ ], "responses": { "200": { - "description": "Standard success response when used with a user token", + "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response auth.test method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "is_enterprise_install": { - "type": "boolean" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "team": { - "type": "string" - }, - "team_id": { - "$ref": "#/definitions/defs_team" - }, - "url": { - "type": "string" - }, - "user": { - "type": "string" - }, - "user_id": { - "$ref": "#/definitions/defs_user_id" } }, "required": [ - "ok", - "url", - "team", - "user", - "team_id", - "user_id" + "ok" ], - "title": "auth.test success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Standard failure response when used with an invalid token", + "description": "Typical error response if the token provided is not associated with an Org Admin or Owner", "schema": { - "additionalProperties": false, - "description": "Schema for error response auth.test method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "token_revoked", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "auth.test error schema", + "title": "Default error template", "type": "object" } } @@ -7048,38 +7081,48 @@ "security": [ { "slackAuth": [ - "none" + "admin.usergroups:read" ] } ], "tags": [ - "auth" + "admin.usergroups", + "admin" ] } }, - "/bots.info": { - "get": { + "/admin.usergroups.removeChannels": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Gets information about a bot user.", + "description": "Remove one or more default channels from an org-level IDP group (user group).", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/bots.info" + "url": "https://api.slack.com/methods/admin.usergroups.removeChannels" }, - "operationId": "bots_info", + "operationId": "admin_usergroups_removeChannels", "parameters": [ { - "description": "Authentication token. Requires scope: `users:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.usergroups:write`", + "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Bot user to get info on", - "in": "query", - "name": "bot", + "description": "ID of the IDP Group", + "in": "formData", + "name": "usergroup_id", + "required": true, + "type": "string" + }, + { + "description": "Comma-separated string of channel IDs", + "in": "formData", + "name": "channel_ids", + "required": true, "type": "string" } ], @@ -7088,117 +7131,36 @@ ], "responses": { "200": { - "description": "When successful, returns bot info by bot ID.", + "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from bots.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "bot": { - "additionalProperties": false, - "properties": { - "app_id": { - "$ref": "#/definitions/defs_app_id" - }, - "deleted": { - "type": "boolean" - }, - "icons": { - "additionalProperties": false, - "properties": { - "image_36": { - "format": "uri", - "type": "string" - }, - "image_48": { - "format": "uri", - "type": "string" - }, - "image_72": { - "format": "uri", - "type": "string" - } - }, - "required": [ - "image_36", - "image_48", - "image_72" - ], - "type": "object" - }, - "id": { - "$ref": "#/definitions/defs_bot_id" - }, - "name": { - "type": "string" - }, - "updated": { - "type": "integer" - }, - "user_id": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "id", - "deleted", - "name", - "updated", - "app_id", - "icons" - ], - "type": "object" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "bot" + "ok" ], - "title": "bots.info schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "When no bot can be found, it returns an error.", + "description": "Typical error response if the token provided is not associated with an Org Admin or Owner", "schema": { - "additionalProperties": false, - "description": "Schema for error response from bots.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "bot_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "bots.info error schema", + "title": "Default error template", "type": "object" } } @@ -7206,38 +7168,66 @@ "security": [ { "slackAuth": [ - "users:read" + "admin.usergroups:write" ] } ], "tags": [ - "bots" + "admin.usergroups", + "admin" ] } }, - "/channels.archive": { + "/admin.users.assign": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Archives a channel.", + "description": "Add an Enterprise user to a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.archive" + "url": "https://api.slack.com/methods/admin.users.assign" }, - "operationId": "channels_archive", + "operationId": "admin_users_assign", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Channel to archive", + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "channel", + "name": "team_id", + "required": true, + "type": "string" + }, + { + "description": "The ID of the user to add to the workspace.", + "in": "formData", + "name": "user_id", + "required": true, + "type": "string" + }, + { + "description": "True if user should be added to the workspace as a guest.", + "in": "formData", + "name": "is_restricted", + "type": "boolean" + }, + { + "description": "True if user should be added to the workspace as a single-channel guest.", + "in": "formData", + "name": "is_ultra_restricted", + "type": "boolean" + }, + { + "description": "Comma separated values of channel IDs to add user in the new workspace.", + "in": "formData", + "name": "channel_ids", "type": "string" } ], @@ -7248,8 +7238,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.archive method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -7258,53 +7248,24 @@ "required": [ "ok" ], - "title": "channels.archive success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.archive method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "already_archived", - "cant_archive_general", - "restricted_action", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.archive error schema", + "title": "Default error template", "type": "object" } } @@ -7312,44 +7273,91 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.create": { + "/admin.users.invite": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Creates a channel.", + "description": "Invite a user to a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.create" + "url": "https://api.slack.com/methods/admin.users.invite" }, - "operationId": "channels_create", + "operationId": "admin_users_invite", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", + "description": "Authentication token. Requires scope: `admin.users:write`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "validate", - "type": "boolean" + "name": "team_id", + "required": true, + "type": "string" }, { - "description": "Authentication token. Requires scope: `channels:write`", - "in": "header", - "name": "token", + "description": "The email address of the person to invite.", + "in": "formData", + "name": "email", + "required": true, "type": "string" }, { - "description": "Name of channel to create", + "description": "A comma-separated list of `channel_id`s for this user to join. At least one channel is required.", "in": "formData", - "name": "name", + "name": "channel_ids", + "required": true, + "type": "string" + }, + { + "description": "An optional message to send to the user in the invite email.", + "in": "formData", + "name": "custom_message", + "type": "string" + }, + { + "description": "Full name of the user.", + "in": "formData", + "name": "real_name", + "type": "string" + }, + { + "description": "Allow this invite to be resent in the future if a user has not signed up yet. (default: false)", + "in": "formData", + "name": "resend", + "type": "boolean" + }, + { + "description": "Is this user a multi-channel guest user? (default: false)", + "in": "formData", + "name": "is_restricted", + "type": "boolean" + }, + { + "description": "Is this user a single channel guest user? (default: false)", + "in": "formData", + "name": "is_ultra_restricted", + "type": "boolean" + }, + { + "description": "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.", + "in": "formData", + "name": "guest_expiration_ts", "type": "string" } ], @@ -7358,73 +7366,36 @@ ], "responses": { "200": { - "description": "Typical success response resulting in a new channel", + "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.create method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.create error schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Example error response when an invalid name is provided", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.create method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "name_taken", - "restricted_action", - "no_channel", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "invalid_name", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.create error schema", + "title": "Default error template", "type": "object" } } @@ -7432,68 +7403,54 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.history": { + "/admin.users.list": { "get": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Fetches history of messages and events from a channel.", + "description": "List users on a workspace", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.history" + "url": "https://api.slack.com/methods/admin.users.list" }, - "operationId": "channels_history", + "operationId": "admin_users_list", "parameters": [ { - "description": "Number of messages to return, between 1 and 1000.", - "in": "query", - "name": "count", - "type": "integer" - }, - { - "description": "Include `unread_count_display` in the output?", - "in": "query", - "name": "unreads", - "type": "boolean" - }, - { - "description": "Include messages with latest or oldest timestamp in results.", - "in": "query", - "name": "inclusive", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `channels:history`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.users:read`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Start of time range of messages to include in results.", + "description": "The ID (`T1234`) of the workspace.", "in": "query", - "name": "oldest", - "type": "number" + "name": "team_id", + "required": true, + "type": "string" }, { - "description": "Channel to fetch history for.", + "description": "Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.", "in": "query", - "name": "channel", + "name": "cursor", "type": "string" }, { - "description": "End of time range of messages to include in results.", + "description": "Limit for how many users to be retrieved per page", "in": "query", - "name": "latest", - "type": "number" + "name": "limit", + "type": "integer" } ], "produces": [ @@ -7501,89 +7458,36 @@ ], "responses": { "200": { - "description": "Typical success response containing the channel's history", + "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.history method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "has_more": { - "type": "boolean" - }, - "is_limited": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages", - "has_more", - "channel_actions_ts", - "channel_actions_count" + "ok" ], - "title": "channels.history success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Error response when the specified channel cannot be found", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.history method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.history error schema", + "title": "Default error template", "type": "object" } } @@ -7591,43 +7495,48 @@ "security": [ { "slackAuth": [ - "channels:history" + "admin.users:read" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.info": { - "get": { + "/admin.users.remove": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Gets information about a channel.", + "description": "Remove a user from a workspace.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.info" + "url": "https://api.slack.com/methods/admin.users.remove" }, - "operationId": "channels_info", + "operationId": "admin_users_remove", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.users:write`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Set this to `true` to receive the locale for this channel. Defaults to `false`", - "in": "query", - "name": "include_locale", - "type": "boolean" + "description": "The ID (`T1234`) of the workspace.", + "in": "formData", + "name": "team_id", + "required": true, + "type": "string" }, { - "description": "Channel to get info on", - "in": "query", - "name": "channel", + "description": "The ID of the user to remove.", + "in": "formData", + "name": "user_id", + "required": true, "type": "string" } ], @@ -7638,61 +7547,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.info success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Error response when the specified channel cannot be found", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.info method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.info error schema", + "title": "Default error template", "type": "object" } } @@ -7700,45 +7582,48 @@ "security": [ { "slackAuth": [ - "channels:read" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.invite": { + "/admin.users.session.invalidate": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Invites a user to a channel.", + "description": "Invalidate a single session for a user by session_id", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.invite" + "url": "https://api.slack.com/methods/admin.users.session.invalidate" }, - "operationId": "channels_invite", + "operationId": "admin_users_session_invalidate", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "User to invite to channel.", + "description": "ID of the team that the session belongs to", "in": "formData", - "name": "user", + "name": "team_id", + "required": true, "type": "string" }, { - "description": "Channel to invite user to.", "in": "formData", - "name": "channel", - "type": "string" + "name": "session_id", + "required": true, + "type": "integer" } ], "produces": [ @@ -7748,72 +7633,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.invite method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.invite error schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "A somewhat typical error response", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.invite method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "user_not_found", - "cant_invite_self", - "not_in_channel", - "already_in_channel", - "is_archived", - "cant_invite", - "too_many_users", - "ura_max_channels", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.invite error schema", + "title": "Default error template", "type": "object" } } @@ -7821,45 +7668,54 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users.session", + "admin" ] } }, - "/channels.join": { + "/admin.users.session.reset": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Joins a channel, creating it if needed.", + "description": "Wipes all valid sessions on all devices for a given user", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.join" + "url": "https://api.slack.com/methods/admin.users.session.reset" }, - "operationId": "channels_join", + "operationId": "admin_users_session_reset", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", - "in": "formData", - "name": "validate", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Name of channel to join", + "description": "The ID of the user to wipe sessions for", "in": "formData", - "name": "name", + "name": "user_id", + "required": true, "type": "string" + }, + { + "description": "Only expire mobile sessions (default: false)", + "in": "formData", + "name": "mobile_only", + "type": "boolean" + }, + { + "description": "Only expire web sessions (default: false)", + "in": "formData", + "name": "web_only", + "type": "boolean" } ], "produces": [ @@ -7869,77 +7725,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.join method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "already_in_channel": { - "type": "boolean" - }, - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.join schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.join method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "name_taken", - "restricted_action", - "no_channel", - "is_archived", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "invalid_name", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.join error schema", + "title": "Default error template", "type": "object" } } @@ -7947,44 +7760,48 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users.session", + "admin" ] } }, - "/channels.kick": { + "/admin.users.setAdmin": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Removes a user from a channel.", + "description": "Set an existing guest, regular user, or owner to be an admin user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.kick" + "url": "https://api.slack.com/methods/admin.users.setAdmin" }, - "operationId": "channels_kick", + "operationId": "admin_users_setAdmin", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "User to remove from channel.", + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "user", + "name": "team_id", + "required": true, "type": "string" }, { - "description": "Channel to remove user from.", + "description": "The ID of the user to designate as an admin.", "in": "formData", - "name": "channel", + "name": "user_id", + "required": true, "type": "string" } ], @@ -7995,8 +7812,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.kick method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -8005,56 +7822,24 @@ "required": [ "ok" ], - "title": "channels.kick schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.kick method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "user_not_found", - "cant_kick_self", - "not_in_channel", - "cant_kick_from_general", - "restricted_action", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.kick error schema", + "title": "Default error template", "type": "object" } } @@ -8062,39 +7847,56 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.leave": { + "/admin.users.setExpiration": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Leaves a channel.", + "description": "Set an expiration for a guest user", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.leave" + "url": "https://api.slack.com/methods/admin.users.setExpiration" }, - "operationId": "channels_leave", + "operationId": "admin_users_setExpiration", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Channel to leave", + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "channel", + "name": "team_id", + "required": true, + "type": "string" + }, + { + "description": "The ID of the user to set an expiration for.", + "in": "formData", + "name": "user_id", + "required": true, "type": "string" + }, + { + "description": "Timestamp when guest account should be disabled.", + "in": "formData", + "name": "expiration_ts", + "required": true, + "type": "integer" } ], "produces": [ @@ -8104,8 +7906,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.leave method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -8114,54 +7916,24 @@ "required": [ "ok" ], - "title": "channels.leave schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.leave method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "is_archived", - "cant_leave_general", - "cant_leave_mandatory_shared_channel", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.leave error schema", + "title": "Default error template", "type": "object" } } @@ -8169,56 +7941,49 @@ "security": [ { "slackAuth": [ - "channels:write" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.list": { - "get": { + "/admin.users.setOwner": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Lists all channels in a Slack team.", + "description": "Set an existing guest, regular user, or admin user to be a workspace owner.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.list" + "url": "https://api.slack.com/methods/admin.users.setOwner" }, - "operationId": "channels_list", + "operationId": "admin_users_setOwner", "parameters": [ { - "description": "Exclude the `members` collection from each `channel`", - "in": "query", - "name": "exclude_members", - "type": "boolean" - }, - { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `channels:read`", - "in": "query", + "description": "Authentication token. Requires scope: `admin.users:write`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "The ID (`T1234`) of the workspace.", + "in": "formData", + "name": "team_id", + "required": true, + "type": "string" }, { - "description": "Exclude archived channels from the list", - "in": "query", - "name": "exclude_archived", - "type": "boolean" + "description": "Id of the user to promote to owner.", + "in": "formData", + "name": "user_id", + "required": true, + "type": "string" } ], "produces": [ @@ -8226,68 +7991,36 @@ ], "responses": { "200": { - "description": "Typical cursored success response", + "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channels": { - "items": { - "$ref": "#/definitions/objs_channel" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" } }, "required": [ - "ok", - "channels" + "ok" ], - "title": "channels.list success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "limit_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.list error schema", + "title": "Default error template", "type": "object" } } @@ -8295,44 +8028,48 @@ "security": [ { "slackAuth": [ - "channels:read" + "admin.users:write" ] } ], "tags": [ - "channels" + "admin.users", + "admin" ] } }, - "/channels.mark": { + "/admin.users.setRegular": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Sets the read cursor in a channel.", + "description": "Set an existing guest user, admin user, or owner to be a regular user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.mark" + "url": "https://api.slack.com/methods/admin.users.setRegular" }, - "operationId": "channels_mark", + "operationId": "admin_users_setRegular", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `admin.users:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Timestamp of the most recently seen message.", + "description": "The ID (`T1234`) of the workspace.", "in": "formData", - "name": "ts", - "type": "number" + "name": "team_id", + "required": true, + "type": "string" }, { - "description": "Channel to set reading cursor in.", + "description": "The ID of the user to designate as a regular user.", "in": "formData", - "name": "channel", + "name": "user_id", + "required": true, "type": "string" } ], @@ -8343,8 +8080,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response channels.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -8353,35 +8090,99 @@ "required": [ "ok" ], - "title": "channels.mark success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response channels.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_false" + } + }, + "required": [ + "ok" + ], + "title": "Default error template", + "type": "object" + } + } + }, + "security": [ + { + "slackAuth": [ + "admin.users:write" + ] + } + ], + "tags": [ + "admin.users", + "admin" + ] + } + }, + "/api.test": { + "get": { + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ], + "description": "Checks API calling code.", + "externalDocs": { + "description": "API method documentation", + "url": "https://api.slack.com/methods/api.test" + }, + "operationId": "api_test", + "parameters": [ + { + "description": "Error response to return", + "in": "query", + "name": "error", + "type": "string" + }, + { + "description": "example property to return", + "in": "query", + "name": "foo", + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Standard success response", + "schema": { + "additionalProperties": { + "type": "object" + }, + "description": "Schema for successful response api.test method", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok" + ], + "title": "api.test success schema", + "type": "object" + } + }, + "default": { + "description": "Artificial error response", + "schema": { + "additionalProperties": { + "type": "object" + }, + "description": "Schema for error response api.test method", "properties": { "error": { - "enum": [ - "channel_not_found", - "invalid_timestamp", - "not_in_channel", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], "type": "string" }, "ok": { @@ -8392,7 +8193,7 @@ "ok", "error" ], - "title": "channels.mark error schema", + "title": "api.test error schema", "type": "object" } } @@ -8400,51 +8201,50 @@ "security": [ { "slackAuth": [ - "channels:write" + "none" ] } ], "tags": [ - "channels" + "api" ] } }, - "/channels.rename": { - "post": { + "/apps.event.authorizations.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Renames a channel.", + "description": "Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.rename" + "url": "https://api.slack.com/methods/apps.event.authorizations.list" }, - "operationId": "channels_rename", + "operationId": "apps_event_authorizations_list", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", - "in": "formData", - "name": "validate", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `authorizations:read`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "New name for channel.", - "in": "formData", - "name": "name", + "in": "query", + "name": "event_context", + "required": true, "type": "string" }, { - "description": "Channel to rename", - "in": "formData", - "name": "channel", + "in": "query", + "name": "cursor", "type": "string" + }, + { + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -8454,73 +8254,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.rename method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/objs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "channels.rename schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from channels.rename method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "not_in_channel", - "not_authorized", - "invalid_name", - "name_taken", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "channels.rename error schema", + "title": "Default error template", "type": "object" } } @@ -8528,44 +8289,33 @@ "security": [ { "slackAuth": [ - "channels:write" + "authorizations:read" ] } ], "tags": [ - "channels" + "apps.event.authorizations", + "apps" ] } }, - "/channels.replies": { + "/apps.permissions.info": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve a thread of messages posted to a channel", + "description": "Returns list of permissions this app has on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.replies" + "url": "https://api.slack.com/methods/apps.permissions.info" }, - "operationId": "channels_replies", + "operationId": "apps_permissions_info", "parameters": [ { - "description": "Unique identifier of a thread's parent message", - "in": "query", - "name": "thread_ts", - "type": "number" - }, - { - "description": "Authentication token. Requires scope: `channels:history`", + "description": "Authentication token. Requires scope: `none`", "in": "query", "name": "token", "type": "string" - }, - { - "description": "Channel to fetch thread from", - "in": "query", - "name": "channel", - "type": "string" } ], "produces": [ @@ -8573,134 +8323,93 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Standard success response when used with a user token", "schema": { "additionalProperties": false, - "description": "Schema for successful response from channels.replies method", + "description": "Schema for successful response from apps.permissions.info method", "properties": { - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest_reply": { - "$ref": "#/definitions/defs_ts" - }, - "reply_count": { - "type": "integer" - }, - "reply_users": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "type": "array", - "uniqueItems": true - }, - "reply_users_count": { - "type": "integer" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "subscribed": { - "type": "boolean" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "unread_count": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } + "info": { + "properties": { + "app_home": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "reply_count", - "subscribed", - "ts" - ], - "type": "object" + "scopes": { + "$ref": "#/definitions/objs_scopes" + } }, - { - "additionalProperties": false, - "properties": { - "is_starred": { - "type": "boolean" - }, - "parent_user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } + "type": "object" + }, + "channel": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "parent_user_id", - "ts" - ], - "type": "object" - } - ] + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" + }, + "group": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" + }, + "im": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" + }, + "mpim": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" + }, + "team": { + "properties": { + "resources": { + "$ref": "#/definitions/objs_resources" + }, + "scopes": { + "$ref": "#/definitions/objs_scopes" + } + }, + "required": [ + "scopes", + "resources" + ], + "type": "object" + } }, - "type": "array" + "required": [ + "team", + "channel", + "group", + "mpim", + "im", + "app_home" + ], + "type": "object" }, "ok": { "$ref": "#/definitions/defs_ok_true" @@ -8708,29 +8417,31 @@ }, "required": [ "ok", - "messages", - "has_more" + "info" ], - "title": "channels.replies schema", + "title": "apps.permissions.info schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Standard failure response when used with an invalid token", "schema": { "additionalProperties": false, - "description": "Schema for error response from channels.replies method", + "description": "Schema for error response from apps.permissions.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "thread_not_found", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -8754,7 +8465,7 @@ "ok", "error" ], - "title": "channels.replies error schema", + "title": "apps.permissions.info error schema", "type": "object" } } @@ -8762,52 +8473,46 @@ "security": [ { "slackAuth": [ - "channels:history" + "none" ] } ], "tags": [ - "channels" + "apps.permissions", + "apps" ] } }, - "/channels.setPurpose": { - "post": { + "/apps.permissions.request": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the purpose for a channel.", + "description": "Allows an app to request additional scopes", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.setPurpose" + "url": "https://api.slack.com/methods/apps.permissions.request" }, - "operationId": "channels_setPurpose", + "operationId": "apps_permissions_request", "parameters": [ { - "description": "if it is true, treat this like a message and not an unescaped thing", - "in": "formData", - "name": "name_tagging", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `channels:write`", - "in": "header", + "description": "Authentication token. Requires scope: `none`", + "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "The new purpose", - "in": "formData", - "name": "purpose", + "description": "A comma separated list of scopes to request for", + "in": "query", + "name": "scopes", "required": true, "type": "string" }, { - "description": "Channel to set the purpose of", - "in": "formData", - "name": "channel", + "description": "Token used to trigger the permissions API", + "in": "query", + "name": "trigger_id", "required": true, "type": "string" } @@ -8817,45 +8522,45 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Standard success response when used with a user token", "schema": { "additionalProperties": false, - "description": "Schema for successful response from channels.setPurpose method", + "description": "Schema for successful response from apps.permissions.request method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "purpose": { - "type": "string" } }, "required": [ - "ok", - "purpose" + "ok" ], - "title": "channels.setPurpose schema", + "title": "apps.permissions.request schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Standard failure response when trigger_id is invalid", "schema": { "additionalProperties": false, - "description": "Schema for error response from channels.setPurpose method", + "description": "Schema for error response from apps.permissions.request method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_in_channel", - "is_archived", - "too_long", - "user_is_restricted", + "invalid_trigger", + "trigger_exchanged", + "invalid_scope", + "invalid_user", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -8879,7 +8584,7 @@ "ok", "error" ], - "title": "channels.setPurpose error schema", + "title": "apps.permissions.request error schema", "type": "object" } } @@ -8887,48 +8592,46 @@ "security": [ { "slackAuth": [ - "channels:write" + "none" ] } ], "tags": [ - "channels" + "apps.permissions", + "apps" ] } }, - "/channels.setTopic": { - "post": { + "/apps.permissions.resources.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the topic for a channel.", + "description": "Returns list of resource grants this app has on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.setTopic" + "url": "https://api.slack.com/methods/apps.permissions.resources.list" }, - "operationId": "channels_setTopic", + "operationId": "apps_permissions_resources_list", "parameters": [ { - "description": "The new topic", - "in": "formData", - "name": "topic", + "description": "Authentication token. Requires scope: `none`", + "in": "query", + "name": "token", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `channels:write`", - "in": "header", - "name": "token", - "required": true, + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" }, { - "description": "Channel to set the topic of", - "in": "formData", - "name": "channel", - "required": true, - "type": "string" + "description": "The maximum number of items to return.", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -8936,23 +8639,60 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical successful paginated response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.setTopic method", + "additionalProperties": true, + "description": "Schema for successful response apps.permissions.resources.list method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" }, - "topic": { - "type": "string" + "resources": { + "items": { + "properties": { + "id": { + "title": "An ID for a resource", + "type": "string", + "x-examples": [ + "T0DES3UAN", + "C0ABC1ABC" + ] + }, + "type": { + "title": "The type of resource the `id` corresponds to", + "type": "string", + "x-examples": [ + "team", + "channel", + "mpim" + ] + } + }, + "type": "object" + }, + "type": "array" + }, + "response_metadata": { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string", + "x-examples": [ + "dGVhbTpDMUg5UkVTR0w=" + ] + } + }, + "required": [ + "next_cursor" + ], + "type": "object" } }, "required": [ - "topic", - "ok" + "ok", + "resources" ], - "title": "channels.setTopic schema", + "title": "apps.permissions.resources.list success schema", "type": "object" } }, @@ -8960,21 +8700,22 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from channels.setTopic method", + "description": "Schema for error response from apps.permissions.resources.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_in_channel", - "is_archived", - "too_long", - "user_is_restricted", + "invalid_cursor", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -8998,7 +8739,7 @@ "ok", "error" ], - "title": "channels.setTopic error schema", + "title": "apps.permissions.resources.list error schema", "type": "object" } } @@ -9006,41 +8747,34 @@ "security": [ { "slackAuth": [ - "channels:write" + "none" ] } ], "tags": [ - "channels" + "apps.permissions.resources", + "apps" ] } }, - "/channels.unarchive": { - "post": { + "/apps.permissions.scopes.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Unarchives a channel.", + "description": "Returns list of scopes this app has on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/channels.unarchive" + "url": "https://api.slack.com/methods/apps.permissions.scopes.list" }, - "operationId": "channels_unarchive", + "operationId": "apps_permissions_scopes_list", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", - "in": "header", + "description": "Authentication token. Requires scope: `none`", + "in": "query", "name": "token", "required": true, "type": "string" - }, - { - "description": "Channel to unarchive", - "in": "formData", - "name": "channel", - "required": true, - "type": "string" } ], "produces": [ @@ -9048,19 +8782,47 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical successful paginated response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from channels.unarchive method", + "additionalProperties": true, + "description": "Schema for successful response api.permissions.scopes.list method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "scopes": { + "additionalProperties": true, + "properties": { + "app_home": { + "$ref": "#/definitions/objs_scopes" + }, + "channel": { + "$ref": "#/definitions/objs_scopes" + }, + "group": { + "$ref": "#/definitions/objs_scopes" + }, + "im": { + "$ref": "#/definitions/objs_scopes" + }, + "mpim": { + "$ref": "#/definitions/objs_scopes" + }, + "team": { + "$ref": "#/definitions/objs_scopes" + }, + "user": { + "$ref": "#/definitions/objs_scopes" + } + }, + "type": "object" } }, "required": [ - "ok" + "ok", + "scopes" ], - "title": "channels.unarchive schema", + "title": "api.permissions.scopes.list success schema", "type": "object" } }, @@ -9068,12 +8830,14 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from channels.unarchive method", + "description": "Schema for error response from apps.permissions.scopes.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_archived", "not_authed", "invalid_auth", "account_inactive", @@ -9081,7 +8845,6 @@ "no_permission", "org_login_required", "user_is_bot", - "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -9105,7 +8868,7 @@ "ok", "error" ], - "title": "channels.unarchive error schema", + "title": "apps.permissions.scopes.list error schema", "type": "object" } } @@ -9113,51 +8876,46 @@ "security": [ { "slackAuth": [ - "channels:write" + "none" ] } ], "tags": [ - "channels" + "apps.permissions.scopes", + "apps" ] } }, - "/chat.delete": { - "post": { + "/apps.permissions.users.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Deletes a message.", + "description": "Returns list of user grants and corresponding scopes this app has on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.delete" + "url": "https://api.slack.com/methods/apps.permissions.users.list" }, - "operationId": "chat_delete", + "operationId": "apps_permissions_users_list", "parameters": [ { - "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", - "in": "formData", - "name": "as_user", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", - "in": "header", + "description": "Authentication token. Requires scope: `none`", + "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "Timestamp of the message to be deleted.", - "in": "formData", - "name": "ts", - "type": "number" + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", + "type": "string" }, { - "description": "Channel containing the message to be deleted.", - "in": "formData", - "name": "channel", - "type": "string" + "description": "The maximum number of items to return.", + "in": "query", + "name": "limit", + "type": "integer" } ], "produces": [ @@ -9165,71 +8923,36 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical successful paginated response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response of chat.delete method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "ts": { - "$ref": "#/definitions/defs_ts" } }, "required": [ - "ok", - "channel", - "ts" + "ok" ], - "title": "chat.delete success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from chat.delete method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "message_not_found", - "channel_not_found", - "cant_delete_message", - "compliance_exports_prevent_deletion", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.delete error schema", + "title": "Default error template", "type": "object" } } @@ -9237,54 +8960,137 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "none" ] } ], "tags": [ - "chat" + "apps.permissions.users", + "apps" ] } }, - "/chat.deleteScheduledMessage": { - "post": { + "/apps.permissions.users.request": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Deletes a pending scheduled message from the queue.", + "description": "Enables an app to trigger a permissions modal to grant an app access to a user access scope.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.deleteScheduledMessage" + "url": "https://api.slack.com/methods/apps.permissions.users.request" }, - "operationId": "chat_deleteScheduledMessage", + "operationId": "apps_permissions_users_request", "parameters": [ { - "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", - "in": "formData", - "name": "as_user", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", - "in": "header", + "description": "Authentication token. Requires scope: `none`", + "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "The channel the scheduled_message is posting to", - "in": "formData", - "name": "channel", + "description": "A comma separated list of user scopes to request for", + "in": "query", + "name": "scopes", "required": true, "type": "string" }, { - "description": "`scheduled_message_id` returned from call to chat.scheduleMessage", - "in": "formData", - "name": "scheduled_message_id", - "required": true, + "description": "Token used to trigger the request", + "in": "query", + "name": "trigger_id", + "required": true, + "type": "string" + }, + { + "description": "The user this scope is being requested for", + "in": "query", + "name": "user", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Standard success response when used with a user token", + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok" + ], + "title": "Default success template", + "type": "object" + } + }, + "default": { + "description": "Standard failure response when trigger_id is invalid", + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_false" + } + }, + "required": [ + "ok" + ], + "title": "Default error template", + "type": "object" + } + } + }, + "security": [ + { + "slackAuth": [ + "none" + ] + } + ], + "tags": [ + "apps.permissions.users", + "apps" + ] + } + }, + "/apps.uninstall": { + "get": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "description": "Uninstalls your app from a workspace.", + "externalDocs": { + "description": "API method documentation", + "url": "https://api.slack.com/methods/apps.uninstall" + }, + "operationId": "apps_uninstall", + "parameters": [ + { + "description": "Authentication token. Requires scope: `none`", + "in": "query", + "name": "token", + "type": "string" + }, + { + "description": "Issued when you created your application.", + "in": "query", + "name": "client_id", + "type": "string" + }, + { + "description": "Issued when you created your application.", + "in": "query", + "name": "client_secret", "type": "string" } ], @@ -9296,7 +9102,7 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from chat.deleteScheduledMessage method", + "description": "Schema for successful response from apps.uninstall method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -9305,31 +9111,34 @@ "required": [ "ok" ], - "title": "chat.deleteScheduledMessage schema", + "title": "apps.uninstall schema", "type": "object" } }, "default": { - "description": "Typical error response if no message is found", + "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from chat.deleteScheduledMessage method", + "description": "Schema for error response from apps.uninstall method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "invalid_scheduled_message_id", - "channel_not_found", - "bad_token", + "invalid_client_id", + "bad_client_secret", + "client_id_token_mismatch", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", - "ekm_access_denied", - "missing_scope", - "invalid_arguments", + "user_is_bot", "invalid_arg_name", + "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", @@ -9351,7 +9160,7 @@ "ok", "error" ], - "title": "chat.deleteScheduledMessage error schema", + "title": "apps.uninstall error schema", "type": "object" } } @@ -9359,27 +9168,26 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "none" ] } ], "tags": [ - "chat" + "apps" ] } }, - "/chat.getPermalink": { + "/auth.revoke": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve a permalink URL for a specific extant message", + "description": "Revokes a token.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.getPermalink" + "url": "https://api.slack.com/methods/auth.revoke" }, - "operationId": "chat_getPermalink", + "operationId": "auth_revoke", "parameters": [ { "description": "Authentication token. Requires scope: `none`", @@ -9389,18 +9197,10 @@ "type": "string" }, { - "description": "A message's `ts` value, uniquely identifying it within a channel", - "in": "query", - "name": "message_ts", - "required": true, - "type": "string" - }, - { - "description": "The ID of the conversation or channel containing the message", + "description": "Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked.", "in": "query", - "name": "channel", - "required": true, - "type": "string" + "name": "test", + "type": "boolean" } ], "produces": [ @@ -9408,41 +9208,38 @@ ], "responses": { "200": { - "description": "Standard success response", + "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response chat.getPermalink", + "description": "Schema for successful response from auth.revoke method", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "permalink": { - "format": "uri", - "type": "string" + "revoked": { + "type": "boolean" } }, "required": [ "ok", - "channel", - "permalink" + "revoked" ], - "title": "chat.getPermalink success schema", + "title": "auth.revoke schema", "type": "object" } }, "default": { - "description": "Error response when channel cannot be found", + "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from chat.getPermalink method", + "description": "Schema for error response from auth.revoke method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "message_not_found", "not_authed", "invalid_auth", "account_inactive", @@ -9472,7 +9269,7 @@ "ok", "error" ], - "title": "chat.getPermalink error schema", + "title": "auth.revoke error schema", "type": "object" } } @@ -9485,39 +9282,28 @@ } ], "tags": [ - "chat" + "auth" ] } }, - "/chat.meMessage": { - "post": { + "/auth.test": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Share a me message into a channel.", + "description": "Checks authentication & identity.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.meMessage" + "url": "https://api.slack.com/methods/auth.test" }, - "operationId": "chat_meMessage", + "operationId": "auth_test", "parameters": [ { - "description": "Text of the message to send.", - "in": "formData", - "name": "text", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `chat:write:user`", + "description": "Authentication token. Requires scope: `none`", "in": "header", "name": "token", - "type": "string" - }, - { - "description": "Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.", - "in": "formData", - "name": "channel", + "required": true, "type": "string" } ], @@ -9526,60 +9312,74 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Standard success response when used with a user token", "schema": { "additionalProperties": false, - "description": "Schema for successful response from chat.meMessage method", + "description": "Schema for successful response auth.test method", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" + "bot_id": { + "$ref": "#/definitions/defs_bot_id" + }, + "is_enterprise_install": { + "type": "boolean" }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "ts": { - "$ref": "#/definitions/defs_ts" + "team": { + "type": "string" + }, + "team_id": { + "$ref": "#/definitions/defs_team" + }, + "url": { + "type": "string" + }, + "user": { + "type": "string" + }, + "user_id": { + "$ref": "#/definitions/defs_user_id" } }, "required": [ - "ok" + "ok", + "url", + "team", + "user", + "team_id", + "user_id" ], - "title": "chat.meMessage schema", + "title": "auth.test success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Standard failure response when used with an invalid token", "schema": { "additionalProperties": false, - "description": "Schema for error response from chat.meMessage method", + "description": "Schema for error response auth.test method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_in_channel", - "is_archived", - "msg_too_long", - "no_text", - "rate_limited", "not_authed", "invalid_auth", - "account_inactive", "token_revoked", - "no_permission", - "org_login_required", + "account_inactive", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, @@ -9591,7 +9391,7 @@ "ok", "error" ], - "title": "chat.meMessage error schema", + "title": "auth.test error schema", "type": "object" } } @@ -9599,107 +9399,38 @@ "security": [ { "slackAuth": [ - "chat:write:user" + "none" ] } ], "tags": [ - "chat" + "auth" ] } }, - "/chat.postEphemeral": { - "post": { + "/bots.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sends an ephemeral message to a user in a channel.", + "description": "Gets information about a bot user.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.postEphemeral" + "url": "https://api.slack.com/methods/bots.info" }, - "operationId": "chat_postEphemeral", + "operationId": "bots_info", "parameters": [ { - "description": "Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", - "in": "formData", - "name": "username", - "type": "string" - }, - { - "description": "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.", - "in": "formData", - "name": "thread_ts", - "type": "string" - }, - { - "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", - "in": "formData", - "name": "blocks", - "type": "string" - }, - { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", - "in": "formData", - "name": "attachments", - "type": "string" - }, - { - "description": "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.", - "in": "formData", - "name": "as_user", - "type": "boolean" - }, - { - "description": "Find and link channel names and usernames.", - "in": "formData", - "name": "link_names", - "type": "boolean" - }, - { - "description": "Change how messages are treated. Defaults to `none`. See [below](#formatting).", - "in": "formData", - "name": "parse", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", - "in": "header", + "description": "Authentication token. Requires scope: `users:read`", + "in": "query", "name": "token", "required": true, "type": "string" }, { - "description": "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.", - "in": "formData", - "name": "text", - "type": "string" - }, - { - "description": "`id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument.", - "in": "formData", - "name": "user", - "required": true, - "type": "string" - }, - { - "description": "Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below.", - "in": "formData", - "name": "icon_emoji", - "type": "string" - }, - { - "description": "URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", - "in": "formData", - "name": "icon_url", - "type": "string" - }, - { - "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.", - "in": "formData", - "name": "channel", - "required": true, + "description": "Bot user to get info on", + "in": "query", + "name": "bot", "type": "string" } ], @@ -9708,13 +9439,65 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "When successful, returns bot info by bot ID.", "schema": { "additionalProperties": false, - "description": "Schema for successful response from chat.postEphemeral method", + "description": "Schema for successful response from bots.info method", "properties": { - "message_ts": { - "$ref": "#/definitions/defs_ts" + "bot": { + "additionalProperties": false, + "properties": { + "app_id": { + "$ref": "#/definitions/defs_app_id" + }, + "deleted": { + "type": "boolean" + }, + "icons": { + "additionalProperties": false, + "properties": { + "image_36": { + "format": "uri", + "type": "string" + }, + "image_48": { + "format": "uri", + "type": "string" + }, + "image_72": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "image_36", + "image_48", + "image_72" + ], + "type": "object" + }, + "id": { + "$ref": "#/definitions/defs_bot_id" + }, + "name": { + "type": "string" + }, + "updated": { + "type": "integer" + }, + "user_id": { + "$ref": "#/definitions/defs_user_id" + } + }, + "required": [ + "id", + "deleted", + "name", + "updated", + "app_id", + "icons" + ], + "type": "object" }, "ok": { "$ref": "#/definitions/defs_ok_true" @@ -9722,27 +9505,25 @@ }, "required": [ "ok", - "message_ts" + "bot" ], - "title": "chat.postEphemeral success schema", + "title": "bots.info schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "When no bot can be found, it returns an error.", "schema": { "additionalProperties": false, - "description": "Schema for error response from chat.postEphemeral method", + "description": "Schema for error response from bots.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "is_archived", - "msg_too_long", - "no_text", - "restricted_action", - "too_many_attachments", - "user_not_in_channel", + "bot_not_found", "not_authed", "invalid_auth", "account_inactive", @@ -9772,7 +9553,7 @@ "ok", "error" ], - "title": "chat.postEphemeral error schema", + "title": "bots.info error schema", "type": "object" } } @@ -9780,125 +9561,83 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "users:read" ] } ], "tags": [ - "chat" + "bots" ] } }, - "/chat.postMessage": { + "/calls.add": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Sends a message to a channel.", + "description": "Registers a new Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.postMessage" + "url": "https://api.slack.com/methods/calls.add" }, - "operationId": "chat_postMessage", + "operationId": "calls_add", "parameters": [ { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", - "in": "formData", - "name": "attachments", - "type": "string" - }, - { - "description": "Pass true to enable unfurling of primarily text-based content.", - "in": "formData", - "name": "unfurl_links", - "type": "boolean" - }, - { - "description": "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.", - "in": "formData", - "name": "text", + "description": "Authentication token. Requires scope: `calls:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Pass false to disable unfurling of media content.", - "in": "formData", - "name": "unfurl_media", - "type": "boolean" - }, - { - "description": "Change how messages are treated. Defaults to `none`. See [below](#formatting).", + "description": "An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.", "in": "formData", - "name": "parse", + "name": "external_unique_id", + "required": true, "type": "string" }, { - "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.", + "description": "An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.", "in": "formData", - "name": "as_user", + "name": "external_display_id", "type": "string" }, { - "description": "Disable Slack markup parsing by setting to `false`. Enabled by default.", - "in": "formData", - "name": "mrkdwn", - "type": "boolean" - }, - { - "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", + "description": "The URL required for a client to join the Call.", "in": "formData", - "name": "channel", + "name": "join_url", "required": true, "type": "string" }, { - "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", - "in": "formData", - "name": "blocks", - "type": "string" - }, - { - "description": "Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below.", + "description": "When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.", "in": "formData", - "name": "icon_emoji", + "name": "desktop_app_join_url", "type": "string" }, { - "description": "Find and link channel names and usernames.", - "in": "formData", - "name": "link_names", - "type": "boolean" - }, - { - "description": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", + "description": "Call start time in UTC UNIX timestamp format", "in": "formData", - "name": "reply_broadcast", - "type": "boolean" + "name": "date_start", + "type": "integer" }, { - "description": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", + "description": "The name of the Call.", "in": "formData", - "name": "thread_ts", + "name": "title", "type": "string" }, { - "description": "Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "description": "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.", "in": "formData", - "name": "username", + "name": "created_by", "type": "string" }, { - "description": "Authentication token. Requires scope: `chat:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - }, - { - "description": "URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "description": "The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/calls#users).", "in": "formData", - "name": "icon_url", + "name": "users", "type": "string" } ], @@ -9909,68 +9648,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response of chat.postMessage method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, - "message": { - "$ref": "#/definitions/objs_message" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "ts": { - "$ref": "#/definitions/defs_ts" } }, "required": [ - "ok", - "channel", - "ts", - "message" + "ok" ], - "title": "chat.postMessage success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response if too many attachments are included", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response chat.postMessage method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "not_in_channel", - "is_archived", - "msg_too_long", - "no_text", - "too_many_attachments", - "rate_limited", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.postMessage error schema", + "title": "Default error template", "type": "object" } } @@ -9978,106 +9683,47 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "calls:write" ] } ], "tags": [ - "chat" + "calls" ] } }, - "/chat.scheduleMessage": { + "/calls.end": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Schedules a message to be sent to a channel.", + "description": "Ends a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.scheduleMessage" + "url": "https://api.slack.com/methods/calls.end" }, - "operationId": "chat_scheduleMessage", + "operationId": "calls_end", "parameters": [ { - "description": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", - "in": "formData", - "name": "thread_ts", - "type": "number" - }, - { - "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", - "in": "formData", - "name": "blocks", - "type": "string" - }, - { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", - "in": "formData", - "name": "attachments", - "type": "string" - }, - { - "description": "Pass true to enable unfurling of primarily text-based content.", - "in": "formData", - "name": "unfurl_links", - "type": "boolean" - }, - { - "description": "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.", - "in": "formData", - "name": "text", - "type": "string" - }, - { - "description": "Find and link channel names and usernames.", - "in": "formData", - "name": "link_names", - "type": "boolean" - }, - { - "description": "Pass false to disable unfurling of media content.", - "in": "formData", - "name": "unfurl_media", - "type": "boolean" - }, - { - "description": "Change how messages are treated. Defaults to `none`. See [chat.postMessage](chat.postMessage#formatting).", - "in": "formData", - "name": "parse", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", + "description": "Authentication token. Requires scope: `calls:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [chat.postMessage](chat.postMessage#authorship).", - "in": "formData", - "name": "as_user", - "type": "boolean" - }, - { - "description": "Unix EPOCH timestamp of time in future to send the message.", - "in": "formData", - "name": "post_at", - "type": "string" - }, - { - "description": "Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", + "description": "`id` returned when registering the call using the [`calls.add`](/methods/calls.add) method.", "in": "formData", - "name": "channel", + "name": "id", + "required": true, "type": "string" }, { - "description": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", + "description": "Call duration in seconds", "in": "formData", - "name": "reply_broadcast", - "type": "boolean" + "name": "duration", + "type": "integer" } ], "produces": [ @@ -10087,124 +9733,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response of chat.scheduleMessage method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "$ref": "#/definitions/defs_channel" - }, - "message": { - "additionalProperties": false, - "properties": { - "bot_id": { - "$ref": "#/definitions/defs_bot_id" - }, - "bot_profile": { - "$ref": "#/definitions/objs_bot_profile" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "username": { - "type": "string" - } - }, - "required": [ - "type", - "text", - "bot_id", - "user", - "team" - ], - "type": "object" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "post_at": { - "pattern": "^\\d{10}$", - "type": "integer" - }, - "scheduled_message_id": { - "pattern": "^[Q][A-Z0-9]{8,}$", - "title": "Scheduled Message ID", - "type": "string" } }, "required": [ - "ok", - "channel", - "post_at", - "scheduled_message_id", - "message" + "ok" ], - "title": "chat.scheduleMessage success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response if the `post_at` is invalid (ex. in the past or too far into the future)", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response chat.scheduleMessage method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_time", - "time_in_past", - "time_too_far", - "channel_not_found", - "not_in_channel", - "is_archived", - "msg_too_long", - "no_text", - "restricted_action", - "restricted_action_read_only_channel", - "restricted_action_thread_only_channel", - "restricted_action_non_threadable_channel", - "too_many_attachments", - "rate_limited", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "ekm_access_denied", - "missing_scope", - "invalid_arguments", - "invalid_arg_name", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.scheduleMessage error schema", + "title": "Default error template", "type": "object" } } @@ -10212,64 +9768,41 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "calls:write" ] } ], "tags": [ - "chat" + "calls" ] } }, - "/chat.scheduledMessages.list": { + "/calls.info": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Returns a list of scheduled messages.", + "description": "Returns information about a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.scheduledMessages.list" + "url": "https://api.slack.com/methods/calls.info" }, - "operationId": "chat_scheduledMessages_list", + "operationId": "calls_info", "parameters": [ { - "description": "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.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `none`", + "description": "Authentication token. Requires scope: `calls:read`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "Maximum number of original entries to return.", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "A UNIX timestamp of the oldest value in the time range", + "description": "`id` of the Call returned by the [`calls.add`](/methods/calls.add) method.", "in": "query", - "name": "oldest", - "type": "number" - }, - { - "description": "The channel of the scheduled messages", - "in": "query", - "name": "channel", + "name": "id", + "required": true, "type": "string" - }, - { - "description": "A UNIX timestamp of the latest value in the time range", - "in": "query", - "name": "latest", - "type": "number" } ], "produces": [ @@ -10279,108 +9812,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from chat.scheduledMessages.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "additionalProperties": false, - "properties": { - "next_cursor": { - "type": "string" - } - }, - "required": [ - "next_cursor" - ], - "type": "object" - }, - "scheduled_messages": { - "items": { - "additionalProperties": false, - "properties": { - "channel_id": { - "$ref": "#/definitions/defs_channel_id" - }, - "date_created": { - "pattern": "^\\d{10}$", - "type": "integer" - }, - "id": { - "pattern": "^[Q][A-Z0-9]{8,}$", - "type": "string" - }, - "post_at": { - "pattern": "^\\d{10}$", - "type": "integer" - }, - "text": { - "type": "string" - } - }, - "required": [ - "id", - "channel_id", - "post_at", - "date_created" - ], - "type": "object" - }, - "type": "array" } }, "required": [ - "ok", - "scheduled_messages", - "response_metadata" + "ok" ], - "title": "chat.scheduledMessages.list schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response if the channel passed is invalid", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from chat.scheduledMessages.list method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_channel", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "ekm_access_denied", - "missing_scope", - "invalid_arguments", - "invalid_arg_name", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.scheduledMessages.list error schema", + "title": "Default error template", "type": "object" } } @@ -10388,71 +9847,46 @@ "security": [ { "slackAuth": [ - "none" + "calls:read" ] } ], "tags": [ - "chat.scheduledMessages", - "chat" + "calls" ] } }, - "/chat.unfurl": { + "/calls.participants.add": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Provide custom unfurl behavior for user-posted URLs", + "description": "Registers new participants added to a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.unfurl" + "url": "https://api.slack.com/methods/calls.participants.add" }, - "operationId": "chat_unfurl", + "operationId": "calls_participants_add", "parameters": [ { - "description": "Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior", - "in": "formData", - "name": "user_auth_message", - "type": "string" - }, - { - "description": "Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain", - "in": "formData", - "name": "user_auth_required", - "type": "boolean" - }, - { - "description": "URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.", - "in": "formData", - "name": "unfurls", - "type": "string" - }, - { - "description": "Timestamp of the message to add unfurl behavior to.", - "in": "formData", - "name": "ts", + "description": "Authentication token. Requires scope: `calls:write`", + "in": "header", + "name": "token", "required": true, "type": "string" }, { - "description": "Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.", + "description": "`id` returned by the [`calls.add`](/methods/calls.add) method.", "in": "formData", - "name": "user_auth_url", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `links:write`", - "in": "header", - "name": "token", + "name": "id", "required": true, "type": "string" }, { - "description": "Channel ID of the message", + "description": "The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/calls#users).", "in": "formData", - "name": "channel", + "name": "users", "required": true, "type": "string" } @@ -10462,10 +9896,10 @@ ], "responses": { "200": { - "description": "Typical, minimal success response", + "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from chat.unfurl method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -10474,53 +9908,24 @@ "required": [ "ok" ], - "title": "chat.unfurl success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from chat.unfurl method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "cannot_unfurl_url", - "cannot_find_service", - "missing_unfurls", - "cannot_prompt", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.unfurl error schema", + "title": "Default error template", "type": "object" } } @@ -10528,82 +9933,47 @@ "security": [ { "slackAuth": [ - "links:write" + "calls:write" ] } ], "tags": [ - "chat" + "calls.participants", + "calls" ] } }, - "/chat.update": { + "/calls.participants.remove": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Updates a message.", + "description": "Registers participants removed from a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/chat.update" + "url": "https://api.slack.com/methods/calls.participants.remove" }, - "operationId": "chat_update", + "operationId": "calls_participants_remove", "parameters": [ { - "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", - "in": "formData", - "name": "blocks", - "type": "string" - }, - { - "description": "A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting `text`.", - "in": "formData", - "name": "attachments", - "type": "string" - }, - { - "description": "Pass true to update the message as the authed user. [Bot users](/bot-users) in this context are considered authed users.", - "in": "formData", - "name": "as_user", - "type": "string" - }, - { - "description": "Timestamp of the message to be updated.", - "in": "formData", - "name": "ts", - "required": true, - "type": "string" - }, - { - "description": "Change how messages are treated. Defaults to `client`, unlike `chat.postMessage`. Accepts either `none` or `full`. See [below](#formatting).", - "in": "formData", - "name": "parse", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `chat:write`", + "description": "Authentication token. Requires scope: `calls:write`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "New text for the message, using the [default formatting rules](/docs/formatting). It's not required when presenting `attachments`.", - "in": "formData", - "name": "text", - "type": "string" - }, - { - "description": "Find and link channel names and usernames. Defaults to `none`. See [below](#formatting).", + "description": "`id` returned by the [`calls.add`](/methods/calls.add) method.", "in": "formData", - "name": "link_names", + "name": "id", + "required": true, "type": "string" }, { - "description": "Channel containing the message to be updated.", + "description": "The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/calls#users).", "in": "formData", - "name": "channel", + "name": "users", "required": true, "type": "string" } @@ -10615,99 +9985,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response of chat.update method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "channel": { - "type": "string" - }, - "message": { - "properties": { - "attachments": { - "items": { - "type": "object" - }, - "type": "array" - }, - "blocks": { - "$ref": "#/definitions/blocks" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "title": "Message object", - "type": "object" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "text": { - "type": "string" - }, - "ts": { - "type": "string" } }, "required": [ - "ok", - "channel", - "ts", - "text", - "message" + "ok" ], - "title": "chat.update success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response chat.update method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "message_not_found", - "cant_update_message", - "channel_not_found", - "edit_window_closed", - "msg_too_long", - "too_many_attachments", - "rate_limited", - "no_text", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "request_timeout", - "invalid_json", - "json_not_object", - "upgrade_required", - "fatal_error", - "is_inactive" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "chat.update error schema", + "title": "Default error template", "type": "object" } } @@ -10715,39 +10020,59 @@ "security": [ { "slackAuth": [ - "chat:write:user", - "chat:write:bot" + "calls:write" ] } ], "tags": [ - "chat" + "calls.participants", + "calls" ] } }, - "/conversations.archive": { + "/calls.update": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Archives a conversation.", + "description": "Updates information about a Call.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.archive" + "url": "https://api.slack.com/methods/calls.update" }, - "operationId": "conversations_archive", + "operationId": "calls_update", "parameters": [ { - "description": "Authentication token. Requires scope: `conversations:write`", + "description": "Authentication token. Requires scope: `calls:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "ID of conversation to archive", + "description": "`id` returned by the [`calls.add`](/methods/calls.add) method.", "in": "formData", - "name": "channel", + "name": "id", + "required": true, + "type": "string" + }, + { + "description": "The name of the Call.", + "in": "formData", + "name": "title", + "type": "string" + }, + { + "description": "The URL required for a client to join the Call.", + "in": "formData", + "name": "join_url", + "type": "string" + }, + { + "description": "When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.", + "in": "formData", + "name": "desktop_app_join_url", "type": "string" } ], @@ -10758,8 +10083,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response conversations.archive method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -10768,62 +10093,24 @@ "required": [ "ok" ], - "title": "conversations.archive success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from conversations.archive method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", - "not_supported", - "channel_not_found", - "already_archived", - "cant_archive_general", - "restricted_action", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "conversations.archive error schema", + "title": "Default error template", "type": "object" } } @@ -10831,42 +10118,51 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "calls:write" ] } ], "tags": [ - "conversations" + "calls" ] } }, - "/conversations.close": { + "/chat.delete": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Closes a direct message or multi-person direct message.", + "description": "Deletes a message.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.close" + "url": "https://api.slack.com/methods/chat.delete" }, - "operationId": "conversations_close", + "operationId": "chat_delete", "parameters": [ { - "description": "Authentication token. Requires scope: `conversations:write`", + "description": "Authentication token. Requires scope: `chat:write`", "in": "header", "name": "token", "type": "string" }, { - "description": "Conversation to close.", + "description": "Timestamp of the message to be deleted.", + "in": "formData", + "name": "ts", + "type": "number" + }, + { + "description": "Channel containing the message to be deleted.", "in": "formData", "name": "channel", "type": "string" + }, + { + "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", + "in": "formData", + "name": "as_user", + "type": "boolean" } ], "produces": [ @@ -10877,22 +10173,24 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response conversations.close method", + "description": "Schema for successful response of chat.delete method", "properties": { - "already_closed": { - "type": "boolean" - }, - "no_op": { - "type": "boolean" + "channel": { + "$ref": "#/definitions/defs_channel" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "ts": { + "$ref": "#/definitions/defs_ts" } }, "required": [ - "ok" + "ok", + "channel", + "ts" ], - "title": "conversations.close success schema", + "title": "chat.delete success schema", "type": "object" } }, @@ -10900,17 +10198,23 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.close method", + "description": "Schema for error response from chat.delete method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", + "message_not_found", "channel_not_found", - "user_does_not_own_channel", - "missing_scope", + "cant_delete_message", + "compliance_exports_prevent_deletion", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -10921,25 +10225,20 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.close error schema", + "title": "chat.delete error schema", "type": "object" } } @@ -10947,54 +10246,55 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.create": { + "/chat.deleteScheduledMessage": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Initiates a public or private channel-based conversation", + "description": "Deletes a pending scheduled message from the queue.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.create" + "url": "https://api.slack.com/methods/chat.deleteScheduledMessage" }, - "operationId": "conversations_create", + "operationId": "chat_deleteScheduledMessage", "parameters": [ { - "description": "Name of the public or private channel to create", - "in": "formData", - "name": "name", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `conversations:write`", + "description": "Authentication token. Requires scope: `chat:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "**Required** for workspace apps. A list of between 1 and 30 human users that will be added to the newly-created conversation. This argument has no effect when used by classic Slack apps.", + "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.", "in": "formData", - "name": "user_ids", + "name": "as_user", + "type": "boolean" + }, + { + "description": "The channel the scheduled_message is posting to", + "in": "formData", + "name": "channel", + "required": true, "type": "string" }, { - "description": "Create a private channel instead of a public one", + "description": "`scheduled_message_id` returned from call to chat.scheduleMessage", "in": "formData", - "name": "is_private", - "type": "boolean" + "name": "scheduled_message_id", + "required": true, + "type": "string" } ], "produces": [ @@ -11002,54 +10302,47 @@ ], "responses": { "200": { - "description": "If successful, the command returns a rather stark [conversation object](/types/conversation)", + "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response conversations.create method", + "description": "Schema for successful response from chat.deleteScheduledMessage method", "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "conversations.create success schema", + "title": "chat.deleteScheduledMessage schema", "type": "object" } }, "default": { - "description": "Typical error response when name already in use", + "description": "Typical error response if no message is found", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.create method", + "description": "Schema for error response from chat.deleteScheduledMessage method", "properties": { - "detail": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", "type": "string" }, "error": { "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", - "name_taken", - "restricted_action", - "no_channel", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "invalid_name", + "invalid_scheduled_message_id", + "channel_not_found", + "bad_token", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_restricted", + "token_revoked", + "no_permission", + "org_login_required", + "ekm_access_denied", + "missing_scope", + "invalid_arguments", "invalid_arg_name", - "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", @@ -11058,25 +10351,20 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.create error schema", + "title": "chat.deleteScheduledMessage error schema", "type": "object" } } @@ -11084,71 +10372,48 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.history": { + "/chat.getPermalink": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Fetches a conversation's history of messages and events.", + "description": "Retrieve a permalink URL for a specific extant message", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.history" + "url": "https://api.slack.com/methods/chat.getPermalink" }, - "operationId": "conversations_history", + "operationId": "chat_getPermalink", "parameters": [ { - "description": "Include messages with latest or oldest timestamp in results only when either timestamp is specified.", - "in": "query", - "name": "inclusive", - "type": "boolean" - }, - { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `conversations:history`", + "description": "Authentication token. Requires scope: `none`", "in": "query", "name": "token", + "required": true, "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "Start of time range of messages to include in results.", - "in": "query", - "name": "oldest", - "type": "number" - }, - { - "description": "Conversation ID to fetch history for.", + "description": "The ID of the conversation or channel containing the message", "in": "query", "name": "channel", + "required": true, "type": "string" }, { - "description": "End of time range of messages to include in results.", + "description": "A message's `ts` value, uniquely identifying it within a channel", "in": "query", - "name": "latest", - "type": "number" + "name": "message_ts", + "required": true, + "type": "string" } ], "produces": [ @@ -11156,97 +10421,75 @@ ], "responses": { "200": { - "description": "Typical success response containing a channel's messages", + "description": "Standard success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.history method", + "description": "Schema for successful response chat.getPermalink", "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true + "channel": { + "$ref": "#/definitions/defs_channel" }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "pin_count": { - "type": "integer" + "permalink": { + "format": "uri", + "type": "string" } }, "required": [ "ok", - "messages", - "has_more", - "pin_count", - "channel_actions_ts", - "channel_actions_count" + "channel", + "permalink" ], - "title": "conversations.history success schema", + "title": "chat.getPermalink success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Error response when channel cannot be found", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.history method", + "description": "Schema for error response from chat.getPermalink method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "missing_scope", "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", + "message_not_found", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.history error schema", + "title": "chat.getPermalink error schema", "type": "object" } } @@ -11254,53 +10497,45 @@ "security": [ { "slackAuth": [ - "channels:history", - "groups:history", - "im:history", - "mpim:history" + "none" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.info": { - "get": { + "/chat.meMessage": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieve information about a conversation.", + "description": "Share a me message into a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.info" + "url": "https://api.slack.com/methods/chat.meMessage" }, - "operationId": "conversations_info", + "operationId": "chat_meMessage", "parameters": [ { - "description": "Set to `true` to include the member count for the specified conversation. Defaults to `false`", - "in": "query", - "name": "include_num_members", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `conversations:read`", - "in": "query", + "description": "Authentication token. Requires scope: `chat:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "Conversation ID to learn more about", - "in": "query", + "description": "Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.", + "in": "formData", "name": "channel", "type": "string" }, { - "description": "Set this to `true` to receive the locale for this conversation. Defaults to `false`", - "in": "query", - "name": "include_locale", - "type": "boolean" + "description": "Text of the message to send.", + "in": "formData", + "name": "text", + "type": "string" } ], "produces": [ @@ -11308,68 +10543,76 @@ ], "responses": { "200": { - "description": "Typical success response for a public channel. (Also, a response from a private channel and a multi-party IM is very similar to this example.)", + "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response conversations.info", + "description": "Schema for successful response from chat.meMessage method", "properties": { "channel": { - "$ref": "#/definitions/objs_conversation" + "$ref": "#/definitions/defs_channel" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "ts": { + "$ref": "#/definitions/defs_ts" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "conversations.info success schema", + "title": "chat.meMessage schema", "type": "object" } }, "default": { - "description": "Typical error response when a channel cannot be found", + "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.info method", + "description": "Schema for error response from chat.meMessage method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "missing_scope", "channel_not_found", - "team_added_to_org", + "not_in_channel", + "is_archived", + "msg_too_long", + "no_text", + "rate_limited", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.info error schema", + "title": "chat.meMessage error schema", "type": "object" } } @@ -11377,47 +10620,108 @@ "security": [ { "slackAuth": [ - "channels:read", - "groups:read", - "im:read", - "mpim:read" - ] + "chat:write:user", + "chat:write:bot" + ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.invite": { + "/chat.postEphemeral": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Invites users to a channel.", + "description": "Sends an ephemeral message to a user in a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.invite" + "url": "https://api.slack.com/methods/chat.postEphemeral" }, - "operationId": "conversations_invite", + "operationId": "chat_postEphemeral", "parameters": [ { - "description": "A comma separated list of user IDs. Up to 1000 users may be listed.", + "description": "Authentication token. Requires scope: `chat:write`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "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.", "in": "formData", - "name": "users", + "name": "as_user", + "type": "boolean" + }, + { + "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "in": "formData", + "name": "attachments", "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:write`", - "in": "header", - "name": "token", + "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "in": "formData", + "name": "blocks", "type": "string" }, { - "description": "The ID of the public or private channel to invite user(s) to.", + "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.", "in": "formData", "name": "channel", + "required": true, + "type": "string" + }, + { + "description": "Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "icon_emoji", + "type": "string" + }, + { + "description": "URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "icon_url", + "type": "string" + }, + { + "description": "Find and link channel names and usernames.", + "in": "formData", + "name": "link_names", + "type": "boolean" + }, + { + "description": "Change how messages are treated. Defaults to `none`. See [below](#formatting).", + "in": "formData", + "name": "parse", + "type": "string" + }, + { + "description": "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.", + "in": "formData", + "name": "text", + "type": "string" + }, + { + "description": "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.", + "in": "formData", + "name": "thread_ts", + "type": "string" + }, + { + "description": "`id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument.", + "in": "formData", + "name": "user", + "required": true, + "type": "string" + }, + { + "description": "Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "username", "type": "string" } ], @@ -11426,13 +10730,13 @@ ], "responses": { "200": { - "description": "Typical success response when an invitation is extended", + "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.invite method", + "description": "Schema for successful response from chat.postEphemeral method", "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" + "message_ts": { + "$ref": "#/definitions/defs_ts" }, "ok": { "$ref": "#/definitions/defs_ok_true" @@ -11440,126 +10744,61 @@ }, "required": [ "ok", - "channel" + "message_ts" ], - "title": "conversations.invite error schema", + "title": "chat.postEphemeral success schema", "type": "object" } }, "default": { - "description": "Typical error response when an invite is attempted on a conversation type that does not support it", + "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.invite method", + "description": "Schema for error response from chat.postEphemeral method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", "channel_not_found", - "user_not_found", - "no_user", - "cant_invite_self", - "not_in_channel", - "already_in_channel", "is_archived", - "cant_invite", - "too_many_users", - "ura_max_channels", + "msg_too_long", + "no_text", + "restricted_action", + "too_many_attachments", + "user_not_in_channel", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", + "token_revoked", + "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" + "fatal_error" ], "type": "string" }, - "errors": { - "items": { - "additionalProperties": false, - "properties": { - "error": { - "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", - "channel_not_found", - "user_not_found", - "no_user", - "cant_invite_self", - "not_in_channel", - "already_in_channel", - "is_archived", - "cant_invite", - "too_many_users", - "ura_max_channels", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "ok", - "error" - ], - "type": "object" - }, - "minItems": 1, - "title": "errors is returned when an error associates an user", - "type": "array", - "uniqueItems": true - }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "conversations.invite error schema", + "title": "chat.postEphemeral error schema", "type": "object" } } @@ -11567,180 +10806,125 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.join": { + "/chat.postMessage": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Joins an existing conversation.", + "description": "Sends a message to a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.join" + "url": "https://api.slack.com/methods/chat.postMessage" }, - "operationId": "conversations_join", + "operationId": "chat_postMessage", "parameters": [ { - "description": "Authentication token. Requires scope: `channels:write`", + "description": "Authentication token. Requires scope: `chat:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "ID of conversation to join", + "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.", + "in": "formData", + "name": "as_user", + "type": "string" + }, + { + "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "in": "formData", + "name": "attachments", + "type": "string" + }, + { + "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "in": "formData", + "name": "blocks", + "type": "string" + }, + { + "description": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", "in": "formData", "name": "channel", + "required": true, "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from conversations.join method", - "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "properties": { - "warnings": { - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - } - }, - "title": "Response metadata", - "type": "object" - }, - "warning": { - "type": "string" - } - }, - "required": [ - "ok", - "channel" - ], - "title": "conversations.join success schema", - "type": "object" - } }, - "default": { - "description": "Typical error response if the conversation is archived and cannot be joined", - "schema": { - "additionalProperties": false, - "description": "Schema for error response from conversations.join method", - "properties": { - "error": { - "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", - "channel_not_found", - "is_archived", - "not_authed", - "invalid_auth", - "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" - ], - "type": "string" - }, - "needed": { - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" - } - }, - "required": [ - "ok", - "error" - ], - "title": "conversations.join error schema", - "type": "object" - } - } - }, - "security": [ { - "slackAuth": [ - "channels:write" - ] - } - ], - "tags": [ - "conversations" - ] - } - }, - "/conversations.kick": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ], - "description": "Removes a user from a conversation.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.kick" - }, - "operationId": "conversations_kick", - "parameters": [ + "description": "Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "icon_emoji", + "type": "string" + }, { - "description": "Authentication token. Requires scope: `conversations:write`", - "in": "header", - "name": "token", + "description": "URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "icon_url", "type": "string" }, { - "description": "User ID to be removed.", + "description": "Find and link channel names and usernames.", "in": "formData", - "name": "user", + "name": "link_names", + "type": "boolean" + }, + { + "description": "Disable Slack markup parsing by setting to `false`. Enabled by default.", + "in": "formData", + "name": "mrkdwn", + "type": "boolean" + }, + { + "description": "Change how messages are treated. Defaults to `none`. See [below](#formatting).", + "in": "formData", + "name": "parse", "type": "string" }, { - "description": "ID of conversation to remove user from.", + "description": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", "in": "formData", - "name": "channel", + "name": "reply_broadcast", + "type": "boolean" + }, + { + "description": "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.", + "in": "formData", + "name": "text", + "type": "string" + }, + { + "description": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", + "in": "formData", + "name": "thread_ts", + "type": "string" + }, + { + "description": "Pass true to enable unfurling of primarily text-based content.", + "in": "formData", + "name": "unfurl_links", + "type": "boolean" + }, + { + "description": "Pass false to disable unfurling of media content.", + "in": "formData", + "name": "unfurl_media", + "type": "boolean" + }, + { + "description": "Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.", + "in": "formData", + "name": "username", "type": "string" } ], @@ -11752,68 +10936,71 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response conversations.kick method", + "description": "Schema for successful response of chat.postMessage method", "properties": { + "channel": { + "$ref": "#/definitions/defs_channel" + }, + "message": { + "$ref": "#/definitions/objs_message" + }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "ts": { + "$ref": "#/definitions/defs_ts" } }, "required": [ - "ok" + "ok", + "channel", + "ts", + "message" ], - "title": "conversations.kick success schema", + "title": "chat.postMessage success schema", "type": "object" } }, "default": { - "description": "Typical error response when you attempt to kick yourself from a channel", + "description": "Typical error response if too many attachments are included", "schema": { "additionalProperties": false, - "description": "Schema for error response conversations.kick method", + "description": "Schema for error response chat.postMessage method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", - "missing_scope", "channel_not_found", - "user_not_found", - "cant_kick_self", "not_in_channel", - "cant_kick_from_general", - "restricted_action", + "is_archived", + "msg_too_long", + "no_text", + "too_many_attachments", + "rate_limited", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" + "missing_post_type" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.kick error schema", + "title": "chat.postMessage error schema", "type": "object" } } @@ -11821,122 +11008,237 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.leave": { + "/chat.scheduleMessage": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Leaves a conversation.", + "description": "Schedules a message to be sent to a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.leave" + "url": "https://api.slack.com/methods/chat.scheduleMessage" }, - "operationId": "conversations_leave", + "operationId": "chat_scheduleMessage", "parameters": [ { - "description": "Authentication token. Requires scope: `conversations:write`", + "description": "Authentication token. Requires scope: `chat:write`", "in": "header", "name": "token", "type": "string" }, { - "description": "Conversation to leave", + "description": "Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.", "in": "formData", "name": "channel", "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from conversations.leave method", - "properties": { - "not_in_channel": { - "enum": [ - true - ], - "type": "boolean" - }, - "ok": { + }, + { + "description": "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.", + "in": "formData", + "name": "text", + "type": "string" + }, + { + "description": "Unix EPOCH timestamp of time in future to send the message.", + "in": "formData", + "name": "post_at", + "type": "string" + }, + { + "description": "Change how messages are treated. Defaults to `none`. See [chat.postMessage](chat.postMessage#formatting).", + "in": "formData", + "name": "parse", + "type": "string" + }, + { + "description": "Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [chat.postMessage](chat.postMessage#authorship).", + "in": "formData", + "name": "as_user", + "type": "boolean" + }, + { + "description": "Find and link channel names and usernames.", + "in": "formData", + "name": "link_names", + "type": "boolean" + }, + { + "description": "A JSON-based array of structured attachments, presented as a URL-encoded string.", + "in": "formData", + "name": "attachments", + "type": "string" + }, + { + "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.", + "in": "formData", + "name": "blocks", + "type": "string" + }, + { + "description": "Pass true to enable unfurling of primarily text-based content.", + "in": "formData", + "name": "unfurl_links", + "type": "boolean" + }, + { + "description": "Pass false to disable unfurling of media content.", + "in": "formData", + "name": "unfurl_media", + "type": "boolean" + }, + { + "description": "Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.", + "in": "formData", + "name": "thread_ts", + "type": "number" + }, + { + "description": "Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`.", + "in": "formData", + "name": "reply_broadcast", + "type": "boolean" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response", + "schema": { + "additionalProperties": false, + "description": "Schema for successful response of chat.scheduleMessage method", + "properties": { + "channel": { + "$ref": "#/definitions/defs_channel" + }, + "message": { + "additionalProperties": false, + "properties": { + "bot_id": { + "$ref": "#/definitions/defs_bot_id" + }, + "bot_profile": { + "$ref": "#/definitions/objs_bot_profile" + }, + "team": { + "$ref": "#/definitions/defs_team" + }, + "text": { + "type": "string" + }, + "type": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + }, + "username": { + "type": "string" + } + }, + "required": [ + "type", + "text", + "bot_id", + "user", + "team" + ], + "type": "object" + }, + "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "post_at": { + "pattern": "^\\d{10}$", + "type": "integer" + }, + "scheduled_message_id": { + "pattern": "^[Q][A-Z0-9]{8,}$", + "title": "Scheduled Message ID", + "type": "string" } }, "required": [ - "ok" + "ok", + "channel", + "post_at", + "scheduled_message_id", + "message" ], - "title": "conversations.leave success schema", + "title": "chat.scheduleMessage success schema", "type": "object" } }, "default": { - "description": "Typical error response when attempting to leave a workspace's \"general\" channel", + "description": "Typical error response if the `post_at` is invalid (ex. in the past or too far into the future)", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.leave method", + "description": "Schema for error response chat.scheduleMessage method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", - "last_member", - "missing_scope", + "invalid_time", + "time_in_past", + "time_too_far", "channel_not_found", + "not_in_channel", "is_archived", - "cant_leave_general", + "msg_too_long", + "no_text", + "restricted_action", + "restricted_action_read_only_channel", + "restricted_action_thread_only_channel", + "restricted_action_non_threadable_channel", + "too_many_attachments", + "rate_limited", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", + "token_revoked", + "no_permission", + "org_login_required", + "ekm_access_denied", + "missing_scope", + "invalid_arguments", "invalid_arg_name", - "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.leave error schema", + "title": "chat.scheduleMessage error schema", "type": "object" } } @@ -11944,58 +11246,63 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.list": { + "/chat.scheduledMessages.list": { "get": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Lists all channels in a Slack team.", + "description": "Returns a list of scheduled messages.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.list" + "url": "https://api.slack.com/methods/chat.scheduledMessages.list" }, - "operationId": "conversations_list", + "operationId": "chat_scheduledMessages_list", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `none`", + "in": "header", + "name": "token", "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:read`", + "description": "The channel of the scheduled messages", "in": "query", - "name": "token", + "name": "channel", "type": "string" }, { - "description": "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 no larger than 1000.", + "description": "A UNIX timestamp of the latest value in the time range", "in": "query", - "name": "limit", - "type": "integer" + "name": "latest", + "type": "number" }, { - "description": "Set to `true` to exclude archived channels from the list", + "description": "A UNIX timestamp of the oldest value in the time range", "in": "query", - "name": "exclude_archived", - "type": "boolean" + "name": "oldest", + "type": "number" }, { - "description": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", + "description": "Maximum number of original entries to return.", "in": "query", - "name": "types", + "name": "limit", + "type": "integer" + }, + { + "description": "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.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -12004,18 +11311,11 @@ ], "responses": { "200": { - "description": "Typical success response with only public channels", + "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.list method", + "description": "Schema for successful response from chat.scheduledMessages.list method", "properties": { - "channels": { - "items": { - "$ref": "#/definitions/objs_conversation" - }, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" }, @@ -12030,56 +11330,95 @@ "next_cursor" ], "type": "object" - } - }, - "required": [ - "ok", - "channels" - ], - "title": "conversations.list success schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": false, - "description": "Schema for error response from conversations.list method", - "properties": { + }, + "scheduled_messages": { + "items": { + "additionalProperties": false, + "properties": { + "channel_id": { + "$ref": "#/definitions/defs_channel_id" + }, + "date_created": { + "pattern": "^\\d{10}$", + "type": "integer" + }, + "id": { + "pattern": "^[Q][A-Z0-9]{8,}$", + "type": "string" + }, + "post_at": { + "pattern": "^\\d{10}$", + "type": "integer" + }, + "text": { + "type": "string" + } + }, + "required": [ + "id", + "channel_id", + "post_at", + "date_created" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "ok", + "scheduled_messages", + "response_metadata" + ], + "title": "chat.scheduledMessages.list schema", + "type": "object" + } + }, + "default": { + "description": "Typical error response if the channel passed is invalid", + "schema": { + "additionalProperties": false, + "description": "Schema for error response from chat.scheduledMessages.list method", + "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "missing_scope", + "invalid_channel", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "ekm_access_denied", + "missing_scope", + "invalid_arguments", "invalid_arg_name", - "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "conversations.list error schema", + "title": "chat.scheduledMessages.list error schema", "type": "object" } } @@ -12087,52 +11426,72 @@ "security": [ { "slackAuth": [ - "channels:read", - "groups:read", - "im:read", - "mpim:read" + "none" ] } ], "tags": [ - "conversations" + "chat.scheduledMessages", + "chat" ] } }, - "/conversations.members": { - "get": { + "/chat.unfurl": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieve members of a conversation.", + "description": "Provide custom unfurl behavior for user-posted URLs", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.members" + "url": "https://api.slack.com/methods/chat.unfurl" }, - "operationId": "conversations_members", + "operationId": "chat_unfurl", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", + "description": "Authentication token. Requires scope: `links:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:read`", - "in": "query", - "name": "token", + "description": "Channel ID of the message", + "in": "formData", + "name": "channel", + "required": true, "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "Timestamp of the message to add unfurl behavior to.", + "in": "formData", + "name": "ts", + "required": true, + "type": "string" }, { - "description": "ID of the conversation to retrieve members for", - "in": "query", - "name": "channel", + "description": "URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.", + "in": "formData", + "name": "unfurls", + "type": "string" + }, + { + "description": "Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior", + "in": "formData", + "name": "user_auth_message", + "type": "string" + }, + { + "description": "Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain", + "in": "formData", + "name": "user_auth_required", + "type": "boolean" + }, + { + "description": "Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.", + "in": "formData", + "name": "user_auth_url", "type": "string" } ], @@ -12141,59 +11500,45 @@ ], "responses": { "200": { - "description": "Typical paginated success response", + "description": "Typical, minimal success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response conversations.members method", + "description": "Schema for successful response from chat.unfurl method", "properties": { - "members": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "additionalProperties": false, - "properties": { - "next_cursor": { - "type": "string" - } - }, - "required": [ - "next_cursor" - ], - "type": "object" } }, "required": [ - "ok", - "members", - "response_metadata" + "ok" ], - "title": "conversations.members success schema", + "title": "chat.unfurl success schema", "type": "object" } }, "default": { - "description": "Typical error response when an invalid cursor is provided", + "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response conversations.members method", + "description": "Schema for error response from chat.unfurl method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "invalid_limit", - "invalid_cursor", - "fetch_members_failed", + "cannot_unfurl_url", + "cannot_find_service", + "missing_unfurls", + "cannot_prompt", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -12204,7 +11549,8 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -12216,7 +11562,7 @@ "ok", "error" ], - "title": "conversations.members error schema", + "title": "chat.unfurl error schema", "type": "object" } } @@ -12224,53 +11570,83 @@ "security": [ { "slackAuth": [ - "channels:read", - "groups:read", - "im:read", - "mpim:read" + "links:write" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.open": { + "/chat.update": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Opens or resumes a direct message or multi-person direct message.", + "description": "Updates a message.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.open" + "url": "https://api.slack.com/methods/chat.update" }, - "operationId": "conversations_open", + "operationId": "chat_update", "parameters": [ { - "description": "Boolean, indicates you want the full IM channel definition in the response.", + "description": "Authentication token. Requires scope: `chat:write`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "Pass true to update the message as the authed user. [Bot users](/bot-users) in this context are considered authed users.", "in": "formData", - "name": "return_im", - "type": "boolean" + "name": "as_user", + "type": "string" }, { - "description": "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`.", + "description": "A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting `text`. If you don't include this field, the message's previous `attachments` will be retained. To remove previous `attachments`, include an empty array for this field.", "in": "formData", - "name": "users", + "name": "attachments", "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:write`", - "in": "header", - "name": "token", + "description": "A JSON-based array of [structured blocks](/block-kit/building), presented as a URL-encoded string. If you don't include this field, the message's previous `blocks` will be retained. To remove previous `blocks`, include an empty array for this field.", + "in": "formData", + "name": "blocks", "type": "string" }, { - "description": "Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.", + "description": "Channel containing the message to be updated.", "in": "formData", "name": "channel", + "required": true, + "type": "string" + }, + { + "description": "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`.", + "in": "formData", + "name": "link_names", + "type": "string" + }, + { + "description": "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`.", + "in": "formData", + "name": "parse", + "type": "string" + }, + { + "description": "New text for the message, using the [default formatting rules](/reference/surfaces/formatting). It's not required when presenting `blocks` or `attachments`.", + "in": "formData", + "name": "text", + "type": "string" + }, + { + "description": "Timestamp of the message to be updated.", + "in": "formData", + "name": "ts", + "required": true, "type": "string" } ], @@ -12282,66 +11658,50 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.open method when opening channels, ims, mpims", + "description": "Schema for successful response of chat.update method", "properties": { - "already_open": { - "type": "boolean" - }, "channel": { - "items": [ - { - "$ref": "#/definitions/objs_conversation" - }, - { - "additionalProperties": false, - "properties": { - "created": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/defs_dm_id" - }, - "is_im": { - "type": "boolean" - }, - "is_open": { - "type": "boolean" - }, - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest": { - "$ref": "#/definitions/objs_message" - }, - "unread_count": { - "type": "number" - }, - "unread_count_display": { - "type": "number" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } + "type": "string" + }, + "message": { + "properties": { + "attachments": { + "items": { + "type": "object" }, - "required": [ - "id" - ], + "type": "array" + }, + "blocks": { "type": "object" + }, + "text": { + "type": "string" } - ] - }, - "no_op": { - "type": "boolean" + }, + "required": [ + "text" + ], + "title": "Message object", + "type": "object" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "text": { + "type": "string" + }, + "ts": { + "type": "string" } }, "required": [ "ok", - "channel" + "channel", + "ts", + "text", + "message" ], - "title": "conversations.open success schema", + "title": "chat.update success schema", "type": "object" } }, @@ -12349,32 +11709,39 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.open method", + "description": "Schema for error response chat.update method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", - "user_not_found", - "user_not_visible", - "user_disabled", - "users_list_not_supplied", - "not_enough_users", - "too_many_users", + "message_not_found", + "cant_update_message", + "channel_not_found", + "edit_window_closed", + "msg_too_long", + "too_many_attachments", + "rate_limited", + "no_text", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", + "request_timeout", "invalid_json", "json_not_object", - "request_timeout", "upgrade_required", - "channel_not_found" + "fatal_error", + "is_inactive" ], "type": "string" }, @@ -12386,7 +11753,7 @@ "ok", "error" ], - "title": "conversations.open error schema", + "title": "chat.update error schema", "type": "object" } } @@ -12394,30 +11761,28 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "chat:write:user", + "chat:write:bot" ] } ], "tags": [ - "conversations" + "chat" ] } }, - "/conversations.rename": { + "/conversations.archive": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Renames a conversation.", + "description": "Archives a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.rename" + "url": "https://api.slack.com/methods/conversations.archive" }, - "operationId": "conversations_rename", + "operationId": "conversations_archive", "parameters": [ { "description": "Authentication token. Requires scope: `conversations:write`", @@ -12426,13 +11791,7 @@ "type": "string" }, { - "description": "New name for conversation.", - "in": "formData", - "name": "name", - "type": "string" - }, - { - "description": "ID of conversation to rename", + "description": "ID of conversation to archive", "in": "formData", "name": "channel", "type": "string" @@ -12446,46 +11805,44 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.rename method", + "description": "Schema for successful response conversations.archive method", "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "conversations.rename success schema", + "title": "conversations.archive success schema", "type": "object" } }, "default": { - "description": "Typical error response when the calling user is not a member of the conversation", + "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.rename method", + "description": "Schema for error response from conversations.archive method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "user_is_restricted", "method_not_supported_for_channel_type", "missing_scope", + "not_supported", "channel_not_found", - "not_in_channel", - "not_authorized", - "invalid_name", - "name_taken", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", + "already_archived", + "cant_archive_general", + "restricted_action", "not_authed", "invalid_auth", "account_inactive", + "user_is_bot", + "user_is_restricted", + "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -12495,7 +11852,10 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "team_added_to_org", + "missing_charset", + "superfluous_charset" ], "type": "string" }, @@ -12513,7 +11873,7 @@ "ok", "error" ], - "title": "conversations.rename error schema", + "title": "conversations.archive error schema", "type": "object" } } @@ -12533,65 +11893,30 @@ ] } }, - "/conversations.replies": { - "get": { + "/conversations.close": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Retrieve a thread of messages posted to a conversation", + "description": "Closes a direct message or multi-person direct message.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.replies" + "url": "https://api.slack.com/methods/conversations.close" }, - "operationId": "conversations_replies", + "operationId": "conversations_close", "parameters": [ { - "description": "Include messages with latest or oldest timestamp in results only when either timestamp is specified.", - "in": "query", - "name": "inclusive", - "type": "boolean" - }, - { - "description": "Unique identifier of a thread's parent message.", - "in": "query", - "name": "ts", - "type": "number" - }, - { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `conversations:history`", - "in": "query", + "description": "Authentication token. Requires scope: `conversations:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "Start of time range of messages to include in results.", - "in": "query", - "name": "oldest", - "type": "number" - }, - { - "description": "Conversation ID to fetch thread from.", - "in": "query", + "description": "Conversation to close.", + "in": "formData", "name": "channel", "type": "string" - }, - { - "description": "End of time range of messages to include in results.", - "in": "query", - "name": "latest", - "type": "number" } ], "produces": [ @@ -12602,141 +11927,22 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.replies method", + "description": "Schema for successful response conversations.close method", "properties": { - "has_more": { + "already_closed": { "type": "boolean" }, - "messages": { - "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest_reply": { - "$ref": "#/definitions/defs_ts" - }, - "reply_count": { - "type": "integer" - }, - "reply_users": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "type": "array", - "uniqueItems": true - }, - "reply_users_count": { - "type": "integer" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "subscribed": { - "type": "boolean" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "unread_count": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "reply_count", - "subscribed", - "ts" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "is_starred": { - "type": "boolean" - }, - "parent_user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "parent_user_id", - "ts" - ], - "type": "object" - } - ] - }, - "type": "array" + "no_op": { + "type": "boolean" }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages" + "ok" ], - "title": "conversations.replies success schema", + "title": "conversations.close success schema", "type": "object" } }, @@ -12744,13 +11950,18 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.replies method", + "description": "Schema for error response from conversations.close method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "missing_scope", + "method_not_supported_for_channel_type", "channel_not_found", - "thread_not_found", + "user_does_not_own_channel", + "missing_scope", "not_authed", "invalid_auth", "account_inactive", @@ -12782,7 +11993,7 @@ "ok", "error" ], - "title": "conversations.replies error schema", + "title": "conversations.close error schema", "type": "object" } } @@ -12790,10 +12001,10 @@ "security": [ { "slackAuth": [ - "channels:history", - "groups:history", - "im:history", - "mpim:history" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], @@ -12802,18 +12013,18 @@ ] } }, - "/conversations.setPurpose": { + "/conversations.create": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Sets the purpose for a conversation.", + "description": "Initiates a public or private channel-based conversation", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.setPurpose" + "url": "https://api.slack.com/methods/conversations.create" }, - "operationId": "conversations_setPurpose", + "operationId": "conversations_create", "parameters": [ { "description": "Authentication token. Requires scope: `conversations:write`", @@ -12822,16 +12033,16 @@ "type": "string" }, { - "description": "A new, specialer purpose", + "description": "Name of the public or private channel to create", "in": "formData", - "name": "purpose", + "name": "name", "type": "string" }, { - "description": "Conversation to set the purpose of", + "description": "Create a private channel instead of a public one", "in": "formData", - "name": "channel", - "type": "string" + "name": "is_private", + "type": "boolean" } ], "produces": [ @@ -12839,10 +12050,10 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "If successful, the command returns a rather stark [conversation object](/types/conversation)", "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.setPurpose method", + "description": "Schema for successful response conversations.create method", "properties": { "channel": { "$ref": "#/definitions/objs_conversation" @@ -12855,28 +12066,40 @@ "ok", "channel" ], - "title": "conversations.setPurpose success schema", + "title": "conversations.create success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when name already in use", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.setPurpose method", + "description": "Schema for error response from conversations.create method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "detail": { + "type": "string" + }, "error": { "enum": [ "method_not_supported_for_channel_type", "missing_scope", - "channel_not_found", - "not_in_channel", - "is_archived", - "too_long", - "user_is_restricted", + "name_taken", + "restricted_action", + "no_channel", + "invalid_name_required", + "invalid_name_punctuation", + "invalid_name_maxlength", + "invalid_name_specials", + "invalid_name", "not_authed", "invalid_auth", "account_inactive", + "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -12905,7 +12128,7 @@ "ok", "error" ], - "title": "conversations.setPurpose error schema", + "title": "conversations.create error schema", "type": "object" } } @@ -12925,35 +12148,58 @@ ] } }, - "/conversations.setTopic": { - "post": { + "/conversations.history": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the topic for a conversation.", + "description": "Fetches a conversation's history of messages and events.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.setTopic" + "url": "https://api.slack.com/methods/conversations.history" }, - "operationId": "conversations_setTopic", + "operationId": "conversations_history", "parameters": [ { - "description": "The new topic string. Does not support formatting or linkification.", - "in": "formData", - "name": "topic", + "description": "Authentication token. Requires scope: `conversations:history`", + "in": "query", + "name": "token", "type": "string" }, { - "description": "Authentication token. Requires scope: `conversations:write`", - "in": "header", - "name": "token", + "description": "Conversation ID to fetch history for.", + "in": "query", + "name": "channel", "type": "string" }, { - "description": "Conversation to set the topic of", - "in": "formData", - "name": "channel", + "description": "End of time range of messages to include in results.", + "in": "query", + "name": "latest", + "type": "number" + }, + { + "description": "Start of time range of messages to include in results.", + "in": "query", + "name": "oldest", + "type": "number" + }, + { + "description": "Include messages with latest or oldest timestamp in results only when either timestamp is specified.", + "in": "query", + "name": "inclusive", + "type": "boolean" + }, + { + "description": "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.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -12962,23 +12208,51 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response containing a channel's messages", "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.setTopic method", + "description": "Schema for successful response from conversations.history method", "properties": { - "channel": { - "$ref": "#/definitions/objs_conversation" + "channel_actions_count": { + "type": "integer" + }, + "channel_actions_ts": { + "items": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "has_more": { + "type": "boolean" + }, + "messages": { + "items": { + "$ref": "#/definitions/objs_message" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "pin_count": { + "type": "integer" } }, "required": [ "ok", - "channel" + "messages", + "has_more", + "pin_count", + "channel_actions_ts", + "channel_actions_count" ], - "title": "conversations.setTopic success schema", + "title": "conversations.history success schema", "type": "object" } }, @@ -12986,17 +12260,18 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.setTopic method", + "description": "Schema for error response from conversations.history method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", "missing_scope", "channel_not_found", - "not_in_channel", - "is_archived", - "too_long", - "user_is_restricted", + "invalid_ts_latest", + "invalid_ts_oldest", "not_authed", "invalid_auth", "account_inactive", @@ -13006,7 +12281,6 @@ "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", @@ -13028,7 +12302,7 @@ "ok", "error" ], - "title": "conversations.setTopic error schema", + "title": "conversations.history error schema", "type": "object" } } @@ -13036,10 +12310,10 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "channels:history", + "groups:history", + "im:history", + "mpim:history" ] } ], @@ -13048,30 +12322,41 @@ ] } }, - "/conversations.unarchive": { - "post": { + "/conversations.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Reverses conversation archival.", + "description": "Retrieve information about a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/conversations.unarchive" + "url": "https://api.slack.com/methods/conversations.info" }, - "operationId": "conversations_unarchive", + "operationId": "conversations_info", "parameters": [ { - "description": "Authentication token. Requires scope: `conversations:write`", - "in": "header", + "description": "Authentication token. Requires scope: `conversations:read`", + "in": "query", "name": "token", "type": "string" }, { - "description": "ID of conversation to unarchive", - "in": "formData", + "description": "Conversation ID to learn more about", + "in": "query", "name": "channel", "type": "string" + }, + { + "description": "Set this to `true` to receive the locale for this conversation. Defaults to `false`", + "in": "query", + "name": "include_locale", + "type": "boolean" + }, + { + "description": "Set to `true` to include the member count for the specified conversation. Defaults to `false`", + "in": "query", + "name": "include_num_members", + "type": "boolean" } ], "produces": [ @@ -13079,40 +12364,44 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response for a public channel. (Also, a response from a private channel and a multi-party IM is very similar to this example.)", "schema": { "additionalProperties": false, - "description": "Schema for successful response from conversations.unarchive method", + "description": "Schema for successful response conversations.info", "properties": { + "channel": { + "$ref": "#/definitions/objs_conversation" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "channel" ], - "title": "conversations.unarchive success schema", + "title": "conversations.info success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when a channel cannot be found", "schema": { "additionalProperties": false, - "description": "Schema for error response from conversations.unarchive method", + "description": "Schema for error response from conversations.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "method_not_supported_for_channel_type", "missing_scope", "channel_not_found", - "not_archived", + "team_added_to_org", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_restricted", - "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -13122,10 +12411,7 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "team_added_to_org", - "missing_charset", - "superfluous_charset" + "upgrade_required" ], "type": "string" }, @@ -13143,7 +12429,7 @@ "ok", "error" ], - "title": "conversations.unarchive error schema", + "title": "conversations.info error schema", "type": "object" } } @@ -13151,10 +12437,10 @@ "security": [ { "slackAuth": [ - "channels:write", - "groups:write", - "im:write", - "mpim:write" + "channels:read", + "groups:read", + "im:read", + "mpim:read" ] } ], @@ -13163,38 +12449,35 @@ ] } }, - "/dialog.open": { - "get": { + "/conversations.invite": { + "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Open a dialog with a user", + "description": "Invites users to a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/dialog.open" + "url": "https://api.slack.com/methods/conversations.invite" }, - "operationId": "dialog_open", + "operationId": "conversations_invite", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", - "required": true, "type": "string" }, { - "description": "Exchange a trigger to post to the user.", - "in": "query", - "name": "trigger_id", - "required": true, + "description": "The ID of the public or private channel to invite user(s) to.", + "in": "formData", + "name": "channel", "type": "string" }, { - "description": "The dialog definition. This must be a JSON-encoded string.", - "in": "query", - "name": "dialog", - "required": true, + "description": "A comma separated list of user IDs. Up to 1000 users may be listed.", + "in": "formData", + "name": "users", "type": "string" } ], @@ -13203,69 +12486,144 @@ ], "responses": { "200": { - "description": "Typical success response is quite minimal.", + "description": "Typical success response when an invitation is extended", "schema": { "additionalProperties": false, - "description": "Schema for successful response from dialog.open method", + "description": "Schema for successful response from conversations.invite method", "properties": { + "channel": { + "$ref": "#/definitions/objs_conversation" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "channel" ], - "title": "dialog.open schema", + "title": "conversations.invite error schema", "type": "object" } }, "default": { - "description": "Typical error response, before getting to any possible validation errors.", + "description": "Typical error response when an invite is attempted on a conversation type that does not support it", "schema": { "additionalProperties": false, - "description": "Schema for error response from dialog.open method", + "description": "Schema for error response from conversations.invite method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "validation_errors", - "missing_trigger", - "missing_dialog", - "trigger_exchanged", - "trigger_expired", - "invalid_trigger", - "app_missing_action_url", - "cannot_create_dialog", - "failed_sending_dialog", + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "user_not_found", + "no_user", + "cant_invite_self", + "not_in_channel", + "already_in_channel", + "is_archived", + "cant_invite", + "too_many_users", + "ura_max_channels", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", + "user_is_bot", + "user_is_restricted", + "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "fatal_error" + "team_added_to_org", + "missing_charset", + "superfluous_charset" ], "type": "string" }, + "errors": { + "items": { + "additionalProperties": false, + "properties": { + "error": { + "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "user_not_found", + "no_user", + "cant_invite_self", + "not_in_channel", + "already_in_channel", + "is_archived", + "cant_invite", + "too_many_users", + "ura_max_channels", + "not_authed", + "invalid_auth", + "account_inactive", + "user_is_bot", + "user_is_restricted", + "user_is_ultra_restricted", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "team_added_to_org", + "missing_charset", + "superfluous_charset" + ], + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + } + }, + "required": [ + "ok", + "error" + ], + "type": "object" + }, + "minItems": 1, + "title": "errors is returned when an error associates an user", + "type": "array", + "uniqueItems": true + }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "dialog.open error schema", + "title": "conversations.invite error schema", "type": "object" } } @@ -13273,1673 +12631,41 @@ "security": [ { "slackAuth": [ - "none" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "dialog" + "conversations" ] } }, - "/dnd.endDnd": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ], - "description": "Ends the current user's Do Not Disturb session immediately.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.endDnd" - }, - "operationId": "dnd_endDnd", - "parameters": [ - { - "description": "Authentication token. Requires scope: `dnd:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from dnd.endDnd method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "dnd.endDnd schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": false, - "description": "Schema for error response from dnd.endDnd method", - "properties": { - "error": { - "enum": [ - "unknown_error", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "dnd.endDnd error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "dnd:write" - ] - } - ], - "tags": [ - "dnd" - ] - } - }, - "/dnd.endSnooze": { + "/conversations.join": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Ends the current user's snooze mode immediately.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.endSnooze" - }, - "operationId": "dnd_endSnooze", - "parameters": [ - { - "description": "Authentication token. Requires scope: `dnd:write`", - "in": "header", - "name": "token", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from dnd.endSnooze method", - "properties": { - "dnd_enabled": { - "type": "boolean" - }, - "next_dnd_end_ts": { - "type": "integer" - }, - "next_dnd_start_ts": { - "type": "integer" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "snooze_enabled": { - "type": "boolean" - } - }, - "required": [ - "ok", - "dnd_enabled", - "next_dnd_start_ts", - "next_dnd_end_ts", - "snooze_enabled" - ], - "title": "dnd.endSnooze schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": false, - "description": "Schema for error response from dnd.endSnooze method", - "properties": { - "error": { - "enum": [ - "snooze_not_active", - "snooze_end_failed", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "dnd.endSnooze error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "dnd:write" - ] - } - ], - "tags": [ - "dnd" - ] - } - }, - "/dnd.info": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Retrieves a user's current Do Not Disturb status.", + "description": "Joins an existing conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.info" + "url": "https://api.slack.com/methods/conversations.join" }, - "operationId": "dnd_info", - "parameters": [ - { - "description": "Authentication token. Requires scope: `dnd:read`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "User to fetch status for (defaults to current user)", - "in": "query", - "name": "user", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from dnd.info method", - "properties": { - "dnd_enabled": { - "type": "boolean" - }, - "next_dnd_end_ts": { - "type": "integer" - }, - "next_dnd_start_ts": { - "type": "integer" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "snooze_enabled": { - "type": "boolean" - }, - "snooze_endtime": { - "type": "integer" - }, - "snooze_remaining": { - "type": "integer" - } - }, - "required": [ - "ok", - "dnd_enabled", - "next_dnd_start_ts", - "next_dnd_end_ts", - "snooze_enabled", - "snooze_endtime", - "snooze_remaining" - ], - "title": "dnd.info schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": false, - "description": "Schema for error response from dnd.info method", - "properties": { - "error": { - "enum": [ - "user_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "dnd.info error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "dnd:read" - ] - } - ], - "tags": [ - "dnd" - ] - } - }, - "/dnd.setSnooze": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Turns on Do Not Disturb mode for the current user, or changes its duration.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.setSnooze" - }, - "operationId": "dnd_setSnooze", - "parameters": [ - { - "description": "Number of minutes, from now, to snooze until.", - "in": "formData", - "name": "num_minutes", - "required": true, - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `dnd:write`", - "in": "formData", - "name": "token", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from dnd.setSnooze method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "snooze_enabled": { - "type": "boolean" - }, - "snooze_endtime": { - "type": "integer" - }, - "snooze_remaining": { - "type": "integer" - } - }, - "required": [ - "ok", - "snooze_enabled", - "snooze_endtime", - "snooze_remaining" - ], - "title": "dnd.setSnooze schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": false, - "description": "Schema for error response from dnd.setSnooze method", - "properties": { - "error": { - "enum": [ - "missing_duration", - "snooze_failed", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "too_long", - "fatal_error" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "dnd.setSnooze error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "dnd:write" - ] - } - ], - "tags": [ - "dnd" - ] - } - }, - "/dnd.teamInfo": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Retrieves the Do Not Disturb status for up to 50 users on a team.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/dnd.teamInfo" - }, - "operationId": "dnd_teamInfo", - "parameters": [ - { - "description": "Authentication token. Requires scope: `dnd:read`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "Comma-separated list of users to fetch Do Not Disturb status for", - "in": "query", - "name": "users", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from dnd.teamInfo method", - "properties": { - "cached": { - "type": "boolean" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "users": { - "additionalProperties": false, - "type": "object" - } - }, - "required": [ - "ok", - "users" - ], - "title": "dnd.teamInfo success schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": false, - "description": "Schema for error response from dnd.teamInfo method", - "properties": { - "error": { - "enum": [ - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, - "needed": { - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" - } - }, - "required": [ - "ok", - "error" - ], - "title": "dnd.teamInfo error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "dnd:read" - ] - } - ], - "tags": [ - "dnd" - ] - } - }, - "/emoji.list": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Lists custom emoji for a team.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/emoji.list" - }, - "operationId": "emoji_list", - "parameters": [ - { - "description": "Authentication token. Requires scope: `emoji:read`", - "in": "query", - "name": "token", - "required": true, - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "emoji:read" - ] - } - ], - "tags": [ - "emoji" - ] - } - }, - "/files.comments.delete": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ], - "description": "Deletes an existing comment on a file.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.comments.delete" - }, - "operationId": "files_comments_delete", - "parameters": [ - { - "description": "Authentication token. Requires scope: `files:write:user`", - "in": "header", - "name": "token", - "type": "string" - }, - { - "description": "The comment to delete.", - "in": "formData", - "name": "id", - "type": "string" - }, - { - "description": "File to delete a comment from.", - "in": "formData", - "name": "file", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Standard success response is very simple", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response files.comments.delete method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "files.comments.delete schema", - "type": "object" - } - }, - "default": { - "description": "Standard failure response when used with an invalid token", - "schema": { - "additionalProperties": false, - "description": "Schema for error response files.comments.delete method", - "properties": { - "error": { - "enum": [ - "cant_delete", - "comment_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "files.comments.delete error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "files:write:user" - ] - } - ], - "tags": [ - "files.comments", - "files" - ] - } - }, - "/files.delete": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ], - "description": "Deletes a file.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.delete" - }, - "operationId": "files_delete", - "parameters": [ - { - "description": "Authentication token. Requires scope: `files:write:user`", - "in": "header", - "name": "token", - "type": "string" - }, - { - "description": "ID of file to delete.", - "in": "formData", - "name": "file", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response files.delete method", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "files.delete schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": false, - "description": "Schema for error response files.delete method", - "properties": { - "error": { - "enum": [ - "file_not_found", - "file_deleted", - "cant_delete_file", - "not_authed", - "invalid_auth", - "account_inactive", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "files.delete error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "files:write:user" - ] - } - ], - "tags": [ - "files" - ] - } - }, - "/files.info": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Gets information about a team file.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.info" - }, - "operationId": "files_info", - "parameters": [ - { - "in": "query", - "name": "count", - "type": "string" - }, - { - "description": "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](/docs/pagination) for more details.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `files:read`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "Specify a file by providing its ID.", - "in": "query", - "name": "file", - "type": "string" - }, - { - "in": "query", - "name": "page", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from files.info method", - "properties": { - "comments": { - "$ref": "#/definitions/objs_comments" - }, - "content_html": { - "type": "null" - }, - "editor": { - "$ref": "#/definitions/defs_user_id" - }, - "file": { - "$ref": "#/definitions/objs_file" - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "paging": { - "$ref": "#/definitions/objs_paging" - }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" - } - }, - "required": [ - "ok", - "file", - "comments" - ], - "title": "files.info schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": false, - "description": "Schema for error response from files.info method", - "properties": { - "error": { - "enum": [ - "file_not_found", - "file_deleted", - "timezone_count_failed", - "not_authed", - "invalid_auth", - "account_inactive", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "files.info error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "files:read" - ] - } - ], - "tags": [ - "files" - ] - } - }, - "/files.list": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Lists & filters team files.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.list" - }, - "operationId": "files_list", - "parameters": [ - { - "in": "query", - "name": "count", - "type": "string" - }, - { - "description": "Filter files appearing in a specific channel, indicated by its ID.", - "in": "query", - "name": "channel", - "type": "string" - }, - { - "description": "Filter files created before this timestamp (inclusive).", - "in": "query", - "name": "ts_to", - "type": "number" - }, - { - "description": "Filter files created after this timestamp (inclusive).", - "in": "query", - "name": "ts_from", - "type": "number" - }, - { - "description": "Authentication token. Requires scope: `files:read`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "Filter files created by a single user.", - "in": "query", - "name": "user", - "type": "string" - }, - { - "description": "Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.", - "in": "query", - "name": "show_files_hidden_by_limit", - "type": "boolean" - }, - { - "in": "query", - "name": "page", - "type": "string" - }, - { - "description": "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.", - "in": "query", - "name": "types", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from files.list method", - "properties": { - "files": { - "items": { - "$ref": "#/definitions/objs_file" - }, - "minItems": 0, - "type": "array", - "uniqueItems": true - }, - "ok": { - "$ref": "#/definitions/defs_ok_true" - }, - "paging": { - "$ref": "#/definitions/objs_paging" - } - }, - "required": [ - "ok", - "files", - "paging" - ], - "title": "files.list schema", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": false, - "description": "Schema for error response from files.list method", - "properties": { - "error": { - "enum": [ - "user_not_found", - "unknown_type", - "not_authed", - "invalid_auth", - "account_inactive", - "no_permission", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok", - "error" - ], - "title": "files.list error schema", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "files:read" - ] - } - ], - "tags": [ - "files" - ] - } - }, - "/files.remote.add": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Adds a file from a remote service", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.add" - }, - "operationId": "files_remote_add", - "parameters": [ - { - "description": "Title of the file being shared.", - "in": "formData", - "name": "title", - "type": "string" - }, - { - "description": "type of file", - "in": "formData", - "name": "filetype", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `remote_files:write`", - "in": "formData", - "name": "token", - "type": "string" - }, - { - "description": "A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.", - "in": "formData", - "name": "indexable_file_contents", - "type": "string" - }, - { - "description": "Preview of the document via `multipart/form-data`.", - "in": "formData", - "name": "preview_image", - "type": "string" - }, - { - "description": "Creator defined GUID for the file.", - "in": "formData", - "name": "external_id", - "type": "string" - }, - { - "description": "URL of the remote file.", - "in": "formData", - "name": "external_url", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "remote_files:write" - ] - } - ], - "tags": [ - "files.remote", - "files" - ] - } - }, - "/files.remote.info": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Retrieve information about a remote file added to Slack", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.info" - }, - "operationId": "files_remote_info", - "parameters": [ - { - "description": "Authentication token. Requires scope: `remote_files:read`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "Creator defined GUID for the file.", - "in": "query", - "name": "external_id", - "type": "string" - }, - { - "description": "Specify a file by providing its ID.", - "in": "query", - "name": "file", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "remote_files:read" - ] - } - ], - "tags": [ - "files.remote", - "files" - ] - } - }, - "/files.remote.list": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Retrieve information about a remote file added to Slack", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.list" - }, - "operationId": "files_remote_list", - "parameters": [ - { - "description": "Filter files created before this timestamp (inclusive).", - "in": "query", - "name": "ts_to", - "type": "number" - }, - { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Filter files created after this timestamp (inclusive).", - "in": "query", - "name": "ts_from", - "type": "number" - }, - { - "description": "Authentication token. Requires scope: `remote_files:read`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "The maximum number of items to return.", - "in": "query", - "name": "limit", - "type": "integer" - }, - { - "description": "Filter files appearing in a specific channel, indicated by its ID.", - "in": "query", - "name": "channel", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "remote_files:read" - ] - } - ], - "tags": [ - "files.remote", - "files" - ] - } - }, - "/files.remote.remove": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Remove a remote file.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.remove" - }, - "operationId": "files_remote_remove", - "parameters": [ - { - "description": "Authentication token. Requires scope: `remote_files:write`", - "in": "formData", - "name": "token", - "type": "string" - }, - { - "description": "Creator defined GUID for the file.", - "in": "formData", - "name": "external_id", - "type": "string" - }, - { - "description": "Specify a file by providing its ID.", - "in": "formData", - "name": "file", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "remote_files:write" - ] - } - ], - "tags": [ - "files.remote", - "files" - ] - } - }, - "/files.remote.share": { - "get": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Share a remote file into a channel.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.share" - }, - "operationId": "files_remote_share", - "parameters": [ - { - "description": "Comma-separated list of channel IDs where the file will be shared.", - "in": "query", - "name": "channels", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `remote_files:share`", - "in": "query", - "name": "token", - "type": "string" - }, - { - "description": "Creator defined GUID for the file.", - "in": "query", - "name": "external_id", - "type": "string" - }, - { - "description": "Specify a file by providing its ID.", - "in": "query", - "name": "file", - "type": "string" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_true" - } - }, - "required": [ - "ok" - ], - "title": "Default success template", - "type": "object" - } - }, - "default": { - "description": "Typical error response", - "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", - "properties": { - "ok": { - "$ref": "#/definitions/defs_ok_false" - } - }, - "required": [ - "ok" - ], - "title": "Default error template", - "type": "object" - } - } - }, - "security": [ - { - "slackAuth": [ - "remote_files:share" - ] - } - ], - "tags": [ - "files.remote", - "files" - ] - } - }, - "/files.remote.update": { - "post": { - "consumes": [ - "application/x-www-form-urlencoded" - ], - "description": "Updates an existing remote file.", - "externalDocs": { - "description": "API method documentation", - "url": "https://api.slack.com/methods/files.remote.update" - }, - "operationId": "files_remote_update", - "parameters": [ - { - "description": "Title of the file being shared.", - "in": "formData", - "name": "title", - "type": "string" - }, - { - "description": "type of file", - "in": "formData", - "name": "filetype", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `remote_files:write`", - "in": "formData", - "name": "token", - "type": "string" - }, - { - "description": "Specify a file by providing its ID.", - "in": "formData", - "name": "file", - "type": "string" - }, - { - "description": "File containing contents that can be used to improve searchability for the remote file.", - "in": "formData", - "name": "indexable_file_contents", - "type": "string" - }, - { - "description": "Preview of the document via `multipart/form-data`.", - "in": "formData", - "name": "preview_image", - "type": "string" - }, - { - "description": "Creator defined GUID for the file.", - "in": "formData", - "name": "external_id", + "operationId": "conversations_join", + "parameters": [ + { + "description": "Authentication token. Requires scope: `channels:write`", + "in": "header", + "name": "token", "type": "string" }, { - "description": "URL of the remote file.", + "description": "ID of conversation to join", "in": "formData", - "name": "external_url", + "name": "channel", "type": "string" } ], @@ -14950,34 +12676,94 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from conversations.join method", "properties": { + "channel": { + "$ref": "#/definitions/objs_conversation" + }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "response_metadata": { + "properties": { + "warnings": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + } + }, + "title": "Response metadata", + "type": "object" + }, + "warning": { + "type": "string" } }, "required": [ - "ok" + "ok", + "channel" ], - "title": "Default success template", + "title": "conversations.join success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response if the conversation is archived and cannot be joined", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from conversations.join method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "is_archived", + "not_authed", + "invalid_auth", + "account_inactive", + "user_is_bot", + "user_is_restricted", + "user_is_ultra_restricted", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "team_added_to_org", + "missing_charset", + "superfluous_charset" + ], + "type": "string" + }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "conversations.join error schema", "type": "object" } } @@ -14985,39 +12771,44 @@ "security": [ { "slackAuth": [ - "remote_files:write" + "channels:write" ] } ], "tags": [ - "files.remote", - "files" + "conversations" ] } }, - "/files.revokePublicURL": { + "/conversations.kick": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Revokes public/external sharing access for a file", + "description": "Removes a user from a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.revokePublicURL" + "url": "https://api.slack.com/methods/conversations.kick" }, - "operationId": "files_revokePublicURL", + "operationId": "conversations_kick", "parameters": [ { - "description": "Authentication token. Requires scope: `files:write:user`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", "type": "string" }, { - "description": "File to revoke", + "description": "ID of conversation to remove user from.", "in": "formData", - "name": "file", + "name": "channel", + "type": "string" + }, + { + "description": "User ID to be removed.", + "in": "formData", + "name": "user", "type": "string" } ], @@ -15029,38 +12820,42 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from files.revokePublicURL method", + "description": "Schema for successful response conversations.kick method", "properties": { - "file": { - "$ref": "#/definitions/objs_file" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "file" + "ok" ], - "title": "files.revokePublicURL schema", + "title": "conversations.kick success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when you attempt to kick yourself from a channel", "schema": { "additionalProperties": false, - "description": "Schema for error response from files.revokePublicURL method", + "description": "Schema for error response conversations.kick method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "file_not_found", + "method_not_supported_for_channel_type", + "missing_scope", + "channel_not_found", + "user_not_found", + "cant_kick_self", + "not_in_channel", + "cant_kick_from_general", + "restricted_action", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", "user_is_bot", "user_is_restricted", "invalid_arg_name", @@ -15069,24 +12864,28 @@ "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "files.revokePublicURL error schema", + "title": "conversations.kick error schema", "type": "object" } } @@ -15094,38 +12893,41 @@ "security": [ { "slackAuth": [ - "files:write:user" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "files" + "conversations" ] } }, - "/files.sharedPublicURL": { + "/conversations.leave": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Enables a file for public/external sharing.", + "description": "Leaves a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.sharedPublicURL" + "url": "https://api.slack.com/methods/conversations.leave" }, - "operationId": "files_sharedPublicURL", + "operationId": "conversations_leave", "parameters": [ { - "description": "Authentication token. Requires scope: `files:write:user`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", "type": "string" }, { - "description": "File to share", + "description": "Conversation to leave", "in": "formData", - "name": "file", + "name": "channel", "type": "string" } ], @@ -15137,65 +12939,80 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from files.sharedPublicURL method", + "description": "Schema for successful response from conversations.leave method", "properties": { - "file": { - "$ref": "#/definitions/objs_file" + "not_in_channel": { + "enum": [ + true + ], + "type": "boolean" }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "file" + "ok" ], - "title": "files.sharedPublicURL schema", + "title": "conversations.leave success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when attempting to leave a workspace's \"general\" channel", "schema": { "additionalProperties": false, - "description": "Schema for error response from files.sharedPublicURL method", + "description": "Schema for error response from conversations.leave method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "file_not_found", - "not_allowed", + "method_not_supported_for_channel_type", + "last_member", + "missing_scope", + "channel_not_found", + "is_archived", + "cant_leave_general", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", "user_is_bot", "user_is_restricted", + "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "fatal_error" + "team_added_to_org", + "missing_charset", + "superfluous_charset" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "files.sharedPublicURL error schema", + "title": "conversations.leave error schema", "type": "object" } } @@ -15203,80 +13020,59 @@ "security": [ { "slackAuth": [ - "files:write:user" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "files" + "conversations" ] } }, - "/files.upload": { - "post": { + "/conversations.list": { + "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Uploads or creates a file.", + "description": "Lists all channels in a Slack team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/files.upload" + "url": "https://api.slack.com/methods/conversations.list" }, - "operationId": "files_upload", + "operationId": "conversations_list", "parameters": [ { - "description": "Comma-separated list of channel names or IDs where the file will be shared.", - "in": "formData", - "name": "channels", - "type": "string" - }, - { - "description": "Title of file.", - "in": "formData", - "name": "title", - "type": "string" - }, - { - "description": "The message text introducing the file in specified `channels`.", - "in": "formData", - "name": "initial_comment", - "type": "string" - }, - { - "description": "A [file type](/types/file#file_types) identifier.", - "in": "formData", - "name": "filetype", + "description": "Authentication token. Requires scope: `conversations:read`", + "in": "query", + "name": "token", "type": "string" }, { - "description": "Filename of file.", - "in": "formData", - "name": "filename", - "type": "string" + "description": "Set to `true` to exclude archived channels from the list", + "in": "query", + "name": "exclude_archived", + "type": "boolean" }, { - "description": "File contents via a POST variable. If omitting this parameter, you must provide a `file`.", - "in": "formData", - "name": "content", + "description": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", + "in": "query", + "name": "types", "type": "string" }, { - "description": "Authentication token. Requires scope: `files:write:user`", - "in": "formData", - "name": "token", - "type": "string" + "description": "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 no larger than 1000.", + "in": "query", + "name": "limit", + "type": "integer" }, { - "description": "File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`.", - "in": "formData", - "name": "file", + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" - }, - { - "description": "Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead.", - "in": "formData", - "name": "thread_ts", - "type": "number" } ], "produces": [ @@ -15284,23 +13080,39 @@ ], "responses": { "200": { - "description": "Success response after uploading a file to a channel with an initial message", + "description": "Typical success response with only public channels", "schema": { "additionalProperties": false, - "description": "Schema for successful response files.upload method", + "description": "Schema for successful response from conversations.list method", "properties": { - "file": { - "$ref": "#/definitions/objs_file" + "channels": { + "items": { + "$ref": "#/definitions/objs_conversation" + }, + "type": "array", + "uniqueItems": true }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "response_metadata": { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string" + } + }, + "required": [ + "next_cursor" + ], + "type": "object" } }, "required": [ "ok", - "file" + "channels" ], - "title": "files.upload schema", + "title": "conversations.list success schema", "type": "object" } }, @@ -15308,26 +13120,24 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response files.upload method", + "description": "Schema for error response from conversations.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "posting_to_general_channel_denied", - "invalid_channel", - "file_uploads_disabled", - "file_uploads_except_images_disabled", - "storage_limit_reached", + "missing_scope", "not_authed", "invalid_auth", "account_inactive", - "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", @@ -15335,15 +13145,21 @@ ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "files.upload error schema", + "title": "conversations.list error schema", "type": "object" } } @@ -15351,39 +13167,48 @@ "security": [ { "slackAuth": [ - "files:write:user" + "channels:read", + "groups:read", + "im:read", + "mpim:read" ] } ], "tags": [ - "files" + "conversations" ] } }, - "/groups.archive": { + "/conversations.mark": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Archives a private channel.", + "description": "Sets the read cursor in a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.archive" + "url": "https://api.slack.com/methods/conversations.mark" }, - "operationId": "groups_archive", + "operationId": "conversations_mark", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", "type": "string" }, { - "description": "Private channel to archive", + "description": "Channel or conversation to set the read cursor for.", "in": "formData", "name": "channel", "type": "string" + }, + { + "description": "Unique identifier of message you want marked as most recently seen in this conversation.", + "in": "formData", + "name": "ts", + "type": "number" } ], "produces": [ @@ -15394,7 +13219,7 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.archive method", + "description": "Schema for successful response conversations.mark method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -15403,7 +13228,7 @@ "required": [ "ok" ], - "title": "groups.archive schema", + "title": "conversations.mark success schema", "type": "object" } }, @@ -15411,46 +13236,51 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.archive method", + "description": "Schema for error response from conversations.mark method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", "channel_not_found", - "already_archived", - "group_contains_others", - "restricted_action", + "invalid_timestamp", + "not_in_channel", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "fatal_error" + "not_allowed_token_type" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "groups.archive error schema", + "title": "conversations.mark error schema", "type": "object" } } @@ -15458,44 +13288,52 @@ "security": [ { "slackAuth": [ - "groups:write" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "groups" + "conversations" ] } }, - "/groups.create": { - "post": { + "/conversations.members": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Creates a private channel.", + "description": "Retrieve members of a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.create" + "url": "https://api.slack.com/methods/conversations.members" }, - "operationId": "groups_create", + "operationId": "conversations_members", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", - "in": "formData", - "name": "validate", - "type": "boolean" + "description": "Authentication token. Requires scope: `conversations:read`", + "in": "query", + "name": "token", + "type": "string" }, { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", - "name": "token", + "description": "ID of the conversation to retrieve members for", + "in": "query", + "name": "channel", "type": "string" }, { - "description": "Name of private channel to create", - "in": "formData", - "name": "name", + "description": "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.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -15504,47 +13342,63 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical paginated success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response groups.create method", + "description": "Schema for successful response conversations.members method", "properties": { - "group": { - "$ref": "#/definitions/objs_group" + "members": { + "items": { + "$ref": "#/definitions/defs_user_id" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "response_metadata": { + "additionalProperties": false, + "properties": { + "next_cursor": { + "type": "string" + } + }, + "required": [ + "next_cursor" + ], + "type": "object" } }, "required": [ "ok", - "group" + "members", + "response_metadata" ], - "title": "groups.create success schema", + "title": "conversations.members success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when an invalid cursor is provided", "schema": { "additionalProperties": false, - "description": "Schema for error response groups.create method", + "description": "Schema for error response conversations.members method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "no_channel", - "restricted_action", - "name_taken", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", - "invalid_name", + "channel_not_found", + "invalid_limit", + "invalid_cursor", + "fetch_members_failed", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -15567,7 +13421,7 @@ "ok", "error" ], - "title": "groups.create error schema", + "title": "conversations.members error schema", "type": "object" } } @@ -15575,38 +13429,54 @@ "security": [ { "slackAuth": [ - "groups:write" + "channels:read", + "groups:read", + "im:read", + "mpim:read" ] } ], "tags": [ - "groups" + "conversations" ] } }, - "/groups.createChild": { + "/conversations.open": { "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Clones and archives a private channel.", + "description": "Opens or resumes a direct message or multi-person direct message.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.createChild" + "url": "https://api.slack.com/methods/conversations.open" }, - "operationId": "groups_createChild", + "operationId": "conversations_open", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "formData", + "description": "Authentication token. Requires scope: `conversations:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "Private channel to clone and archive.", + "description": "Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.", "in": "formData", "name": "channel", "type": "string" + }, + { + "description": "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`.", + "in": "formData", + "name": "users", + "type": "string" + }, + { + "description": "Boolean, indicates you want the full IM channel definition in the response.", + "in": "formData", + "name": "return_im", + "type": "boolean" } ], "produces": [ @@ -15617,10 +13487,56 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.createChild method", + "description": "Schema for successful response from conversations.open method when opening channels, ims, mpims", "properties": { - "group": { - "$ref": "#/definitions/objs_group" + "already_open": { + "type": "boolean" + }, + "channel": { + "items": [ + { + "$ref": "#/definitions/objs_conversation" + }, + { + "additionalProperties": false, + "properties": { + "created": { + "type": "string" + }, + "id": { + "$ref": "#/definitions/defs_dm_id" + }, + "is_im": { + "type": "boolean" + }, + "is_open": { + "type": "boolean" + }, + "last_read": { + "$ref": "#/definitions/defs_ts" + }, + "latest": { + "$ref": "#/definitions/objs_message" + }, + "unread_count": { + "type": "number" + }, + "unread_count_display": { + "type": "number" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + } + }, + "required": [ + "id" + ], + "type": "object" + } + ] + }, + "no_op": { + "type": "boolean" }, "ok": { "$ref": "#/definitions/defs_ok_true" @@ -15628,9 +13544,9 @@ }, "required": [ "ok", - "group" + "channel" ], - "title": "groups.createChild schema", + "title": "conversations.open success schema", "type": "object" } }, @@ -15638,21 +13554,25 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.createChild method", + "description": "Schema for error response from conversations.open method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "already_archived", - "restricted_action", + "method_not_supported_for_channel_type", + "user_not_found", + "user_not_visible", + "user_disabled", + "users_list_not_supplied", + "not_enough_users", + "too_many_users", + "invalid_user_combination", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -15664,7 +13584,7 @@ "json_not_object", "request_timeout", "upgrade_required", - "fatal_error" + "channel_not_found" ], "type": "string" }, @@ -15676,7 +13596,7 @@ "ok", "error" ], - "title": "groups.createChild error schema", + "title": "conversations.open error schema", "type": "object" } } @@ -15684,68 +13604,48 @@ "security": [ { "slackAuth": [ - "groups:write" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "groups" + "conversations" ] } }, - "/groups.history": { - "get": { + "/conversations.rename": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Fetches history of messages and events from a private channel.", + "description": "Renames a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.history" + "url": "https://api.slack.com/methods/conversations.rename" }, - "operationId": "groups_history", + "operationId": "conversations_rename", "parameters": [ { - "description": "Number of messages to return, between 1 and 1000.", - "in": "query", - "name": "count", - "type": "integer" - }, - { - "description": "Include `unread_count_display` in the output?", - "in": "query", - "name": "unreads", - "type": "boolean" - }, - { - "description": "Include messages with latest or oldest timestamp in results.", - "in": "query", - "name": "inclusive", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `groups:history`", - "in": "query", + "description": "Authentication token. Requires scope: `conversations:write`", + "in": "header", "name": "token", "type": "string" }, { - "description": "Start of time range of messages to include in results.", - "in": "query", - "name": "oldest", - "type": "number" - }, - { - "description": "Private channel to fetch history for.", - "in": "query", + "description": "ID of conversation to rename", + "in": "formData", "name": "channel", "type": "string" }, { - "description": "End of time range of messages to include in results.", - "in": "query", - "name": "latest", - "type": "number" + "description": "New name for conversation.", + "in": "formData", + "name": "name", + "type": "string" } ], "produces": [ @@ -15756,31 +13656,10 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response groups.history method", + "description": "Schema for successful response from conversations.rename method", "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true + "channel": { + "$ref": "#/definitions/objs_conversation" }, "ok": { "$ref": "#/definitions/defs_ok_true" @@ -15788,55 +13667,67 @@ }, "required": [ "ok", - "messages", - "has_more", - "channel_actions_ts", - "channel_actions_count" + "channel" ], - "title": "groups.history success schema", + "title": "conversations.rename success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when the calling user is not a member of the conversation", "schema": { "additionalProperties": false, - "description": "Schema for error response groups.history method", + "description": "Schema for error response from conversations.rename method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "user_is_restricted", + "method_not_supported_for_channel_type", + "missing_scope", "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", + "not_in_channel", + "not_authorized", + "invalid_name", + "name_taken", + "invalid_name_required", + "invalid_name_punctuation", + "invalid_name_maxlength", + "invalid_name_specials", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "ekm_access_denied", - "missing_scope", - "invalid_arguments", "invalid_arg_name", + "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", + "invalid_json", + "json_not_object", "request_timeout", - "fatal_error" + "upgrade_required" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "groups.history error schema", + "title": "conversations.rename error schema", "type": "object" } } @@ -15844,43 +13735,76 @@ "security": [ { "slackAuth": [ - "groups:history" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "groups" + "conversations" ] } }, - "/groups.info": { + "/conversations.replies": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Gets information about a private channel.", + "description": "Retrieve a thread of messages posted to a conversation", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.info" + "url": "https://api.slack.com/methods/conversations.replies" }, - "operationId": "groups_info", + "operationId": "conversations_replies", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:read`", + "description": "Authentication token. Requires scope: `conversations:history`", "in": "query", "name": "token", "type": "string" }, { - "description": "Set this to `true` to receive the locale for this group. Defaults to `false`", + "description": "Conversation ID to fetch thread from.", "in": "query", - "name": "include_locale", + "name": "channel", + "type": "string" + }, + { + "description": "Unique identifier of a thread's parent message. `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.", + "in": "query", + "name": "ts", + "type": "number" + }, + { + "description": "End of time range of messages to include in results.", + "in": "query", + "name": "latest", + "type": "number" + }, + { + "description": "Start of time range of messages to include in results.", + "in": "query", + "name": "oldest", + "type": "number" + }, + { + "description": "Include messages with latest or oldest timestamp in results only when either timestamp is specified.", + "in": "query", + "name": "inclusive", "type": "boolean" }, { - "description": "Private channel to get info on", + "description": "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.", "in": "query", - "name": "channel", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -15892,10 +13816,131 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response groups.info method", + "description": "Schema for successful response from conversations.replies method", "properties": { - "group": { - "$ref": "#/definitions/objs_group" + "has_more": { + "type": "boolean" + }, + "messages": { + "items": { + "items": [ + { + "additionalProperties": false, + "properties": { + "last_read": { + "$ref": "#/definitions/defs_ts" + }, + "latest_reply": { + "$ref": "#/definitions/defs_ts" + }, + "reply_count": { + "type": "integer" + }, + "reply_users": { + "items": { + "$ref": "#/definitions/defs_user_id" + }, + "type": "array", + "uniqueItems": true + }, + "reply_users_count": { + "type": "integer" + }, + "source_team": { + "$ref": "#/definitions/defs_team" + }, + "subscribed": { + "type": "boolean" + }, + "team": { + "$ref": "#/definitions/defs_team" + }, + "text": { + "type": "string" + }, + "thread_ts": { + "$ref": "#/definitions/defs_ts" + }, + "ts": { + "$ref": "#/definitions/defs_ts" + }, + "type": { + "type": "string" + }, + "unread_count": { + "type": "integer" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + }, + "user_profile": { + "$ref": "#/definitions/objs_user_profile_short" + }, + "user_team": { + "$ref": "#/definitions/defs_team" + } + }, + "required": [ + "type", + "user", + "text", + "thread_ts", + "reply_count", + "subscribed", + "ts" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "is_starred": { + "type": "boolean" + }, + "parent_user_id": { + "$ref": "#/definitions/defs_user_id" + }, + "source_team": { + "$ref": "#/definitions/defs_team" + }, + "team": { + "$ref": "#/definitions/defs_team" + }, + "text": { + "type": "string" + }, + "thread_ts": { + "$ref": "#/definitions/defs_ts" + }, + "ts": { + "$ref": "#/definitions/defs_ts" + }, + "type": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/defs_user_id" + }, + "user_profile": { + "$ref": "#/definitions/objs_user_profile_short" + }, + "user_team": { + "$ref": "#/definitions/defs_team" + } + }, + "required": [ + "type", + "user", + "text", + "thread_ts", + "parent_user_id", + "ts" + ], + "type": "object" + } + ] + }, + "type": "array" }, "ok": { "$ref": "#/definitions/defs_ok_true" @@ -15903,9 +13948,9 @@ }, "required": [ "ok", - "group" + "messages" ], - "title": "groups.info success schema", + "title": "conversations.replies success schema", "type": "object" } }, @@ -15913,11 +13958,17 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response groups.info method", + "description": "Schema for error response from conversations.replies method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "missing_scope", "channel_not_found", + "thread_not_found", "not_authed", "invalid_auth", "account_inactive", @@ -15931,20 +13982,25 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "invalid_for_external_shared_channel" + "upgrade_required" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "groups.info error schema", + "title": "conversations.replies error schema", "type": "object" } } @@ -15952,44 +14008,47 @@ "security": [ { "slackAuth": [ - "groups:read" + "channels:history", + "groups:history", + "im:history", + "mpim:history" ] } ], "tags": [ - "groups" + "conversations" ] } }, - "/groups.invite": { + "/conversations.setPurpose": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Invites a user to a private channel.", + "description": "Sets the purpose for a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.invite" + "url": "https://api.slack.com/methods/conversations.setPurpose" }, - "operationId": "groups_invite", + "operationId": "conversations_setPurpose", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", "type": "string" }, { - "description": "User to invite.", + "description": "Conversation to set the purpose of", "in": "formData", - "name": "user", + "name": "channel", "type": "string" }, { - "description": "Private channel to invite user to.", + "description": "A new, specialer purpose", "in": "formData", - "name": "channel", + "name": "purpose", "type": "string" } ], @@ -16001,10 +14060,10 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response groups.invite method", + "description": "Schema for successful response from conversations.setPurpose method", "properties": { - "group": { - "$ref": "#/definitions/objs_group" + "channel": { + "$ref": "#/definitions/objs_conversation" }, "ok": { "$ref": "#/definitions/defs_ok_true" @@ -16012,9 +14071,9 @@ }, "required": [ "ok", - "group" + "channel" ], - "title": "groups.invite success schema", + "title": "conversations.setPurpose success schema", "type": "object" } }, @@ -16022,21 +14081,24 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response groups.invite method", + "description": "Schema for error response from conversations.setPurpose method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", "channel_not_found", - "user_not_found", - "cant_invite_self", + "not_in_channel", "is_archived", - "cant_invite", - "ura_max_channels", + "too_long", + "user_is_restricted", "not_authed", "invalid_auth", "account_inactive", - "user_is_bot", - "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -16051,15 +14113,21 @@ ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "groups.invite error schema", + "title": "conversations.setPurpose error schema", "type": "object" } } @@ -16067,47 +14135,47 @@ "security": [ { "slackAuth": [ - "groups:write" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "groups" + "conversations" ] } }, - "/groups.kick": { + "/conversations.setTopic": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Removes a user from a private channel.", + "description": "Sets the topic for a conversation.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.kick" + "url": "https://api.slack.com/methods/conversations.setTopic" }, - "operationId": "groups_kick", + "operationId": "conversations_setTopic", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", - "required": true, "type": "string" }, { - "description": "User to remove from private channel.", + "description": "Conversation to set the topic of", "in": "formData", - "name": "user", - "required": true, + "name": "channel", "type": "string" }, { - "description": "Private channel to remove user from.", + "description": "The new topic string. Does not support formatting or linkification.", "in": "formData", - "name": "channel", - "required": true, + "name": "topic", "type": "string" } ], @@ -16119,16 +14187,20 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.kick method", + "description": "Schema for successful response from conversations.setTopic method", "properties": { + "channel": { + "$ref": "#/definitions/objs_conversation" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "channel" ], - "title": "groups.kick schema", + "title": "conversations.setTopic success schema", "type": "object" } }, @@ -16136,23 +14208,24 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.kick method", + "description": "Schema for error response from conversations.setTopic method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", "channel_not_found", - "user_not_found", - "cant_kick_self", - "not_in_group", - "restricted_action", + "not_in_channel", + "is_archived", + "too_long", + "user_is_restricted", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -16163,20 +14236,25 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "groups.kick error schema", + "title": "conversations.setTopic error schema", "type": "object" } } @@ -16184,40 +14262,41 @@ "security": [ { "slackAuth": [ - "groups:write" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "groups" + "conversations" ] } }, - "/groups.leave": { + "/conversations.unarchive": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Leaves a private channel.", + "description": "Reverses conversation archival.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.leave" + "url": "https://api.slack.com/methods/conversations.unarchive" }, - "operationId": "groups_leave", + "operationId": "conversations_unarchive", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `conversations:write`", "in": "header", "name": "token", - "required": true, "type": "string" }, { - "description": "Private channel to leave", + "description": "ID of conversation to unarchive", "in": "formData", "name": "channel", - "required": true, "type": "string" } ], @@ -16229,7 +14308,7 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.leave method", + "description": "Schema for successful response from conversations.unarchive method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -16238,7 +14317,7 @@ "required": [ "ok" ], - "title": "groups.leave schema", + "title": "conversations.unarchive success schema", "type": "object" } }, @@ -16246,19 +14325,23 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.leave method", + "description": "Schema for error response from conversations.unarchive method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "method_not_supported_for_channel_type", + "missing_scope", "channel_not_found", - "is_archived", + "not_archived", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", "user_is_bot", + "user_is_restricted", "user_is_ultra_restricted", "invalid_arg_name", "invalid_array_arg", @@ -16266,24 +14349,31 @@ "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", "upgrade_required", - "fatal_error" + "team_added_to_org", + "missing_charset", + "superfluous_charset" ], "type": "string" }, + "needed": { + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" + }, + "provided": { + "type": "string" } }, "required": [ "ok", "error" ], - "title": "groups.leave error schema", + "title": "conversations.unarchive error schema", "type": "object" } } @@ -16291,56 +14381,51 @@ "security": [ { "slackAuth": [ - "groups:write" + "channels:write", + "groups:write", + "im:write", + "mpim:write" ] } ], "tags": [ - "groups" + "conversations" ] } }, - "/groups.list": { + "/dialog.open": { "get": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Lists private channels that the calling user has access to.", + "description": "Open a dialog with a user", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.list" + "url": "https://api.slack.com/methods/dialog.open" }, - "operationId": "groups_list", + "operationId": "dialog_open", "parameters": [ { - "description": "Exclude the `members` from each `group`", - "in": "query", - "name": "exclude_members", - "type": "boolean" - }, - { - "description": "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](/docs/pagination) for more details.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `groups:read`", - "in": "query", + "description": "Authentication token. Requires scope: `none`", + "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "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.", + "description": "The dialog definition. This must be a JSON-encoded string.", "in": "query", - "name": "limit", - "type": "integer" + "name": "dialog", + "required": true, + "type": "string" }, { - "description": "Don't return archived private channels.", + "description": "Exchange a trigger to post to the user.", "in": "query", - "name": "exclude_archived", - "type": "boolean" + "name": "trigger_id", + "required": true, + "type": "string" } ], "produces": [ @@ -16348,55 +14433,61 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response is quite minimal.", "schema": { "additionalProperties": false, - "description": "Schema for successful response groups.list method", + "description": "Schema for successful response from dialog.open method", "properties": { - "groups": { - "items": { - "$ref": "#/definitions/objs_group" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" } }, "required": [ - "ok", - "groups" + "ok" ], - "title": "groups.list success schema", + "title": "dialog.open schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response, before getting to any possible validation errors.", "schema": { "additionalProperties": false, - "description": "Schema for error response groups.list method", + "description": "Schema for error response from dialog.open method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "validation_errors", + "missing_trigger", + "missing_dialog", + "trigger_exchanged", + "trigger_expired", + "invalid_trigger", + "app_missing_action_url", + "cannot_create_dialog", + "failed_sending_dialog", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -16408,7 +14499,7 @@ "ok", "error" ], - "title": "groups.list error schema", + "title": "dialog.open error schema", "type": "object" } } @@ -16416,44 +14507,33 @@ "security": [ { "slackAuth": [ - "groups:read" + "none" ] } ], "tags": [ - "groups" + "dialog" ] } }, - "/groups.mark": { + "/dnd.endDnd": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Sets the read cursor in a private channel.", + "description": "Ends the current user's Do Not Disturb session immediately.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.mark" + "url": "https://api.slack.com/methods/dnd.endDnd" }, - "operationId": "groups_mark", + "operationId": "dnd_endDnd", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `dnd:write`", "in": "header", "name": "token", - "type": "string" - }, - { - "description": "Timestamp of the most recently seen message.", - "in": "formData", - "name": "ts", - "type": "number" - }, - { - "description": "Private channel to set reading cursor in.", - "in": "formData", - "name": "channel", + "required": true, "type": "string" } ], @@ -16465,7 +14545,7 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.mark method", + "description": "Schema for successful response from dnd.endDnd method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -16474,7 +14554,7 @@ "required": [ "ok" ], - "title": "groups.mark success schema", + "title": "dnd.endDnd schema", "type": "object" } }, @@ -16482,25 +14562,34 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.mark method", + "description": "Schema for error response from dnd.endDnd method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "invalid_timestamp", + "unknown_error", "not_authed", "invalid_auth", "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required" + "upgrade_required", + "fatal_error" ], "type": "string" }, @@ -16512,7 +14601,7 @@ "ok", "error" ], - "title": "groups.mark error schema", + "title": "dnd.endDnd error schema", "type": "object" } } @@ -16520,38 +14609,33 @@ "security": [ { "slackAuth": [ - "groups:write" + "dnd:write" ] } ], "tags": [ - "groups" + "dnd" ] } }, - "/groups.open": { + "/dnd.endSnooze": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Opens a private channel.", + "description": "Ends the current user's snooze mode immediately.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.open" + "url": "https://api.slack.com/methods/dnd.endSnooze" }, - "operationId": "groups_open", + "operationId": "dnd_endSnooze", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `dnd:write`", "in": "header", "name": "token", - "type": "string" - }, - { - "description": "Private channel to open.", - "in": "formData", - "name": "channel", + "required": true, "type": "string" } ], @@ -16563,16 +14647,32 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.open method", + "description": "Schema for successful response from dnd.endSnooze method", "properties": { + "dnd_enabled": { + "type": "boolean" + }, + "next_dnd_end_ts": { + "type": "integer" + }, + "next_dnd_start_ts": { + "type": "integer" + }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "snooze_enabled": { + "type": "boolean" } }, "required": [ - "ok" + "ok", + "dnd_enabled", + "next_dnd_start_ts", + "next_dnd_end_ts", + "snooze_enabled" ], - "title": "groups.open schema", + "title": "dnd.endSnooze schema", "type": "object" } }, @@ -16580,17 +14680,23 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.open method", + "description": "Schema for error response from dnd.endSnooze method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", + "snooze_not_active", + "snooze_end_failed", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -16614,7 +14720,7 @@ "ok", "error" ], - "title": "groups.open error schema", + "title": "dnd.endSnooze error schema", "type": "object" } } @@ -16622,50 +14728,37 @@ "security": [ { "slackAuth": [ - "groups:write" + "dnd:write" ] } ], "tags": [ - "groups" + "dnd" ] } }, - "/groups.rename": { - "post": { + "/dnd.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Renames a private channel.", + "description": "Retrieves a user's current Do Not Disturb status.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.rename" + "url": "https://api.slack.com/methods/dnd.info" }, - "operationId": "groups_rename", + "operationId": "dnd_info", "parameters": [ { - "description": "Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria.", - "in": "formData", - "name": "validate", - "type": "boolean" - }, - { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", + "description": "Authentication token. Requires scope: `dnd:read`", + "in": "query", "name": "token", "type": "string" }, { - "description": "New name for private channel.", - "in": "formData", - "name": "name", - "type": "string" - }, - { - "description": "Private channel to rename", - "in": "formData", - "name": "channel", + "description": "User to fetch status for (defaults to current user)", + "in": "query", + "name": "user", "type": "string" } ], @@ -16677,20 +14770,37 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.rename method", + "description": "Schema for successful response from dnd.info method", "properties": { - "channel": { - "$ref": "#/definitions/objs_group" + "dnd_enabled": { + "type": "boolean" + }, + "next_dnd_end_ts": { + "type": "integer" + }, + "next_dnd_start_ts": { + "type": "integer" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "snooze_enabled": { + "type": "boolean" + }, + "snooze_endtime": { + "type": "integer" + }, + "snooze_remaining": { + "type": "integer" } }, "required": [ "ok", - "channel" + "dnd_enabled", + "next_dnd_start_ts", + "next_dnd_end_ts" ], - "title": "groups.rename schema", + "title": "dnd.info schema", "type": "object" } }, @@ -16698,25 +14808,21 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.rename method", + "description": "Schema for error response from dnd.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "invalid_name", - "name_taken", - "invalid_name_required", - "invalid_name_punctuation", - "invalid_name_maxlength", - "invalid_name_specials", + "user_not_found", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", - "user_is_bot", - "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -16740,7 +14846,7 @@ "ok", "error" ], - "title": "groups.rename error schema", + "title": "dnd.info error schema", "type": "object" } } @@ -16748,43 +14854,39 @@ "security": [ { "slackAuth": [ - "groups:write" + "dnd:read" ] } ], "tags": [ - "groups" + "dnd" ] } }, - "/groups.replies": { - "get": { + "/dnd.setSnooze": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve a thread of messages posted to a private channel", + "description": "Turns on Do Not Disturb mode for the current user, or changes its duration.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.replies" + "url": "https://api.slack.com/methods/dnd.setSnooze" }, - "operationId": "groups_replies", + "operationId": "dnd_setSnooze", "parameters": [ { - "description": "Unique identifier of a thread's parent message", - "in": "query", - "name": "thread_ts", - "type": "number" - }, - { - "description": "Authentication token. Requires scope: `groups:history`", - "in": "query", + "description": "Authentication token. Requires scope: `dnd:write`", + "in": "formData", "name": "token", + "required": true, "type": "string" }, { - "description": "Private channel to fetch thread from", - "in": "query", - "name": "channel", + "description": "Number of minutes, from now, to snooze until.", + "in": "formData", + "name": "num_minutes", + "required": true, "type": "string" } ], @@ -16796,28 +14898,28 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.replies method", + "description": "Schema for successful response from dnd.setSnooze method", "properties": { - "has_more": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + }, + "snooze_enabled": { "type": "boolean" }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true + "snooze_endtime": { + "type": "integer" }, - "ok": { - "$ref": "#/definitions/defs_ok_true" + "snooze_remaining": { + "type": "integer" } }, "required": [ "ok", - "messages" + "snooze_enabled", + "snooze_endtime", + "snooze_remaining" ], - "title": "groups.replies schema", + "title": "dnd.setSnooze schema", "type": "object" } }, @@ -16825,12 +14927,16 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.replies method", + "description": "Schema for error response from dnd.setSnooze method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "thread_not_found", + "missing_duration", + "snooze_failed", "not_authed", "invalid_auth", "account_inactive", @@ -16849,6 +14955,7 @@ "json_not_object", "request_timeout", "upgrade_required", + "too_long", "fatal_error" ], "type": "string" @@ -16861,7 +14968,7 @@ "ok", "error" ], - "title": "groups.replies error schema", + "title": "dnd.setSnooze error schema", "type": "object" } } @@ -16869,44 +14976,37 @@ "security": [ { "slackAuth": [ - "groups:history" + "dnd:write" ] } ], "tags": [ - "groups" + "dnd" ] } }, - "/groups.setPurpose": { - "post": { + "/dnd.teamInfo": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the purpose for a private channel.", + "description": "Retrieves the Do Not Disturb status for up to 50 users on a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.setPurpose" + "url": "https://api.slack.com/methods/dnd.teamInfo" }, - "operationId": "groups_setPurpose", - "parameters": [ - { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", - "name": "token", - "type": "string" - }, + "operationId": "dnd_teamInfo", + "parameters": [ { - "description": "The new purpose", - "in": "formData", - "name": "purpose", + "description": "Authentication token. Requires scope: `dnd:read`", + "in": "query", + "name": "token", "type": "string" }, { - "description": "Private channel to set the purpose of", - "in": "formData", - "name": "channel", + "description": "Comma-separated list of users to fetch Do Not Disturb status for", + "in": "query", + "name": "users", "type": "string" } ], @@ -16917,66 +15017,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from groups.setPurpose method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "purpose": { - "type": "string" } }, "required": [ - "ok", - "purpose" + "ok" ], - "title": "groups.setPurpose schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from groups.setPurpose method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "is_archived", - "too_long", - "user_is_restricted", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.setPurpose error schema", + "title": "Default error template", "type": "object" } } @@ -16984,44 +15052,32 @@ "security": [ { "slackAuth": [ - "groups:write" + "dnd:read" ] } ], "tags": [ - "groups" + "dnd" ] } }, - "/groups.setTopic": { - "post": { + "/emoji.list": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the topic for a private channel.", + "description": "Lists custom emoji for a team.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.setTopic" + "url": "https://api.slack.com/methods/emoji.list" }, - "operationId": "groups_setTopic", + "operationId": "emoji_list", "parameters": [ { - "description": "The new topic", - "in": "formData", - "name": "topic", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `groups:write`", - "in": "header", + "description": "Authentication token. Requires scope: `emoji:read`", + "in": "query", "name": "token", - "type": "string" - }, - { - "description": "Private channel to set the topic of", - "in": "formData", - "name": "channel", + "required": true, "type": "string" } ], @@ -17032,66 +15088,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from groups.setTopic method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "topic": { - "type": "string" } }, "required": [ - "ok", - "topic" + "ok" ], - "title": "groups.setTopic schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from groups.setTopic method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "is_archived", - "too_long", - "user_is_restricted", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "groups.setTopic error schema", + "title": "Default error template", "type": "object" } } @@ -17099,38 +15123,44 @@ "security": [ { "slackAuth": [ - "groups:write" + "emoji:read" ] } ], "tags": [ - "groups" + "emoji" ] } }, - "/groups.unarchive": { + "/files.comments.delete": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Unarchives a private channel.", + "description": "Deletes an existing comment on a file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/groups.unarchive" + "url": "https://api.slack.com/methods/files.comments.delete" }, - "operationId": "groups_unarchive", + "operationId": "files_comments_delete", "parameters": [ { - "description": "Authentication token. Requires scope: `groups:write`", + "description": "Authentication token. Requires scope: `files:write:user`", "in": "header", "name": "token", "type": "string" }, { - "description": "Private channel to unarchive", + "description": "File to delete a comment from.", "in": "formData", - "name": "channel", + "name": "file", + "type": "string" + }, + { + "description": "The comment to delete.", + "in": "formData", + "name": "id", "type": "string" } ], @@ -17139,10 +15169,10 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Standard success response is very simple", "schema": { "additionalProperties": false, - "description": "Schema for successful response from groups.unarchive method", + "description": "Schema for successful response files.comments.delete method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -17151,40 +15181,38 @@ "required": [ "ok" ], - "title": "groups.unarchive schema", + "title": "files.comments.delete schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Standard failure response when used with an invalid token", "schema": { "additionalProperties": false, - "description": "Schema for error response from groups.unarchive method", + "description": "Schema for error response files.comments.delete method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "not_archived", + "cant_delete", + "comment_not_found", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", - "user_is_bot", - "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", - "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, @@ -17196,7 +15224,7 @@ "ok", "error" ], - "title": "groups.unarchive error schema", + "title": "files.comments.delete error schema", "type": "object" } } @@ -17204,40 +15232,39 @@ "security": [ { "slackAuth": [ - "groups:write" + "files:write:user" ] } ], "tags": [ - "groups" + "files.comments", + "files" ] } }, - "/im.close": { + "/files.delete": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Close a direct message channel.", + "description": "Deletes a file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.close" + "url": "https://api.slack.com/methods/files.delete" }, - "operationId": "im_close", + "operationId": "files_delete", "parameters": [ { - "description": "Authentication token. Requires scope: `im:write`", + "description": "Authentication token. Requires scope: `files:write:user`", "in": "header", "name": "token", - "required": true, "type": "string" }, { - "description": "Direct message channel to close.", + "description": "ID of file to delete.", "in": "formData", - "name": "channel", - "required": true, + "name": "file", "type": "string" } ], @@ -17249,14 +15276,8 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from im.close method", + "description": "Schema for successful response files.delete method", "properties": { - "already_closed": { - "type": "boolean" - }, - "no_op": { - "type": "boolean" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } @@ -17264,7 +15285,7 @@ "required": [ "ok" ], - "title": "im.close schema", + "title": "files.delete schema", "type": "object" } }, @@ -17272,18 +15293,21 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from im.close method", + "description": "Schema for error response files.delete method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "user_does_not_own_channel", + "file_not_found", + "file_deleted", + "cant_delete_file", "not_authed", "invalid_auth", "account_inactive", - "token_revoked", "no_permission", - "org_login_required", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -17294,8 +15318,7 @@ "invalid_json", "json_not_object", "request_timeout", - "upgrade_required", - "fatal_error" + "upgrade_required" ], "type": "string" }, @@ -17307,7 +15330,7 @@ "ok", "error" ], - "title": "im.close error schema", + "title": "files.delete error schema", "type": "object" } } @@ -17315,68 +15338,60 @@ "security": [ { "slackAuth": [ - "im:write" + "files:write:user" ] } ], "tags": [ - "im" + "files" ] } }, - "/im.history": { + "/files.info": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Fetches history of messages and events from direct message channel.", + "description": "Gets information about a file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.history" + "url": "https://api.slack.com/methods/files.info" }, - "operationId": "im_history", + "operationId": "files_info", "parameters": [ { - "description": "Number of messages to return, between 1 and 1000.", + "description": "Authentication token. Requires scope: `files:read`", "in": "query", - "name": "count", - "type": "integer" + "name": "token", + "type": "string" }, { - "description": "Include `unread_count_display` in the output?", + "description": "Specify a file by providing its ID.", "in": "query", - "name": "unreads", - "type": "boolean" + "name": "file", + "type": "string" }, { - "description": "Include messages with latest or oldest timestamp in results.", "in": "query", - "name": "inclusive", - "type": "boolean" + "name": "count", + "type": "string" }, { - "description": "Authentication token. Requires scope: `im:history`", "in": "query", - "name": "token", + "name": "page", "type": "string" }, { - "description": "Start of time range of messages to include in results.", + "description": "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.", "in": "query", - "name": "oldest", - "type": "number" + "name": "limit", + "type": "integer" }, { - "description": "Direct message channel to fetch history for.", + "description": "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](/docs/pagination) for more details.", "in": "query", - "name": "channel", + "name": "cursor", "type": "string" - }, - { - "description": "End of time range of messages to include in results.", - "in": "query", - "name": "latest", - "type": "number" } ], "produces": [ @@ -17387,44 +15402,36 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from im.history method", + "description": "Schema for successful response from files.info method", "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "has_more": { - "type": "boolean" + "comments": { + "$ref": "#/definitions/objs_comments" }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true + "content_html": { + "type": "null" + }, + "editor": { + "$ref": "#/definitions/defs_user_id" + }, + "file": { + "$ref": "#/definitions/objs_file" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "paging": { + "$ref": "#/definitions/objs_paging" + }, + "response_metadata": { + "$ref": "#/definitions/objs_response_metadata" } }, "required": [ "ok", - "messages", - "has_more", - "channel_actions_ts", - "channel_actions_count" + "file", + "comments" ], - "title": "im.history success schema", + "title": "files.info schema", "type": "object" } }, @@ -17432,22 +15439,28 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from im.history method", + "description": "Schema for error response from files.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", + "file_not_found", + "file_deleted", + "timezone_count_failed", "not_authed", "invalid_auth", "account_inactive", + "no_permission", "invalid_arg_name", "invalid_array_arg", "invalid_charset", "invalid_form_data", "invalid_post_type", "missing_post_type", + "team_added_to_org", "invalid_json", "json_not_object", "request_timeout", @@ -17455,21 +15468,15 @@ ], "type": "string" }, - "needed": { - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "provided": { - "type": "string" } }, "required": [ "ok", "error" ], - "title": "im.history error schema", + "title": "files.info error schema", "type": "object" } } @@ -17477,44 +15484,78 @@ "security": [ { "slackAuth": [ - "im:history" + "files:read" ] } ], "tags": [ - "im" + "files" ] } }, - "/im.list": { + "/files.list": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Lists direct message channels for the calling user.", + "description": "List for a team, in a channel, or from a user with applied filters.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.list" + "url": "https://api.slack.com/methods/files.list" }, - "operationId": "im_list", + "operationId": "files_list", "parameters": [ { - "description": "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](/docs/pagination) for more detail.", + "description": "Authentication token. Requires scope: `files:read`", "in": "query", - "name": "cursor", + "name": "token", "type": "string" }, { - "description": "Authentication token. Requires scope: `im:read`", + "description": "Filter files created by a single user.", "in": "query", - "name": "token", + "name": "user", "type": "string" }, { - "description": "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.", + "description": "Filter files appearing in a specific channel, indicated by its ID.", "in": "query", - "name": "limit", - "type": "integer" + "name": "channel", + "type": "string" + }, + { + "description": "Filter files created after this timestamp (inclusive).", + "in": "query", + "name": "ts_from", + "type": "number" + }, + { + "description": "Filter files created before this timestamp (inclusive).", + "in": "query", + "name": "ts_to", + "type": "number" + }, + { + "description": "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.", + "in": "query", + "name": "types", + "type": "string" + }, + { + "in": "query", + "name": "count", + "type": "string" + }, + { + "in": "query", + "name": "page", + "type": "string" + }, + { + "description": "Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.", + "in": "query", + "name": "show_files_hidden_by_limit", + "type": "boolean" } ], "produces": [ @@ -17525,27 +15566,29 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response im.list method", + "description": "Schema for successful response from files.list method", "properties": { - "ims": { + "files": { "items": { - "$ref": "#/definitions/objs_im" + "$ref": "#/definitions/objs_file" }, + "minItems": 0, "type": "array", "uniqueItems": true }, "ok": { "$ref": "#/definitions/defs_ok_true" }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" + "paging": { + "$ref": "#/definitions/objs_paging" } }, "required": [ "ok", - "ims" + "files", + "paging" ], - "title": "im.list success schema", + "title": "files.list schema", "type": "object" } }, @@ -17553,15 +15596,21 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from im.list method", + "description": "Schema for error response from files.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "invalid_cursor", + "user_not_found", + "unknown_type", "not_authed", "invalid_auth", "account_inactive", "no_permission", + "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -17584,7 +15633,7 @@ "ok", "error" ], - "title": "im.list error schema", + "title": "files.list error schema", "type": "object" } } @@ -17592,47 +15641,67 @@ "security": [ { "slackAuth": [ - "im:read" + "files:read" ] } ], "tags": [ - "im" + "files" ] } }, - "/im.mark": { + "/files.remote.add": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Sets the read cursor in a direct message channel.", + "description": "Adds a file from a remote service", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.mark" + "url": "https://api.slack.com/methods/files.remote.add" }, - "operationId": "im_mark", + "operationId": "files_remote_add", "parameters": [ { - "description": "Authentication token. Requires scope: `im:write`", - "in": "header", + "description": "Authentication token. Requires scope: `remote_files:write`", + "in": "formData", "name": "token", - "required": true, "type": "string" }, { - "description": "Direct message channel to set reading cursor in.", + "description": "Creator defined GUID for the file.", "in": "formData", - "name": "channel", - "required": true, + "name": "external_id", "type": "string" }, { - "description": "Timestamp of the most recently seen message.", + "description": "Title of the file being shared.", "in": "formData", - "name": "ts", - "required": true, + "name": "title", + "type": "string" + }, + { + "description": "type of file", + "in": "formData", + "name": "filetype", + "type": "string" + }, + { + "description": "URL of the remote file.", + "in": "formData", + "name": "external_url", + "type": "string" + }, + { + "description": "Preview of the document via `multipart/form-data`.", + "in": "formData", + "name": "preview_image", + "type": "string" + }, + { + "description": "A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.", + "in": "formData", + "name": "indexable_file_contents", "type": "string" } ], @@ -17643,8 +15712,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response im.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -17653,46 +15722,24 @@ "required": [ "ok" ], - "title": "im.mark success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response im.mark method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "invalid_timestamp", - "not_in_channel", - "not_authed", - "invalid_auth", - "account_inactive", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "im.mark error schema", + "title": "Default error template", "type": "object" } } @@ -17700,155 +15747,82 @@ "security": [ { "slackAuth": [ - "im:write" + "remote_files:write" ] } ], "tags": [ - "im" + "files.remote", + "files" ] } }, - "/im.open": { - "post": { + "/files.remote.info": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Opens a direct message channel.", + "description": "Retrieve information about a remote file added to Slack", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.open" + "url": "https://api.slack.com/methods/files.remote.info" }, - "operationId": "im_open", + "operationId": "files_remote_info", "parameters": [ { - "description": "Authentication token. Requires scope: `im:write`", - "in": "header", + "description": "Authentication token. Requires scope: `remote_files:read`", + "in": "query", "name": "token", "type": "string" }, { - "description": "Boolean, indicates you want the full IM channel definition in the response.", - "in": "formData", - "name": "return_im", - "type": "boolean" - }, - { - "description": "User to open a direct message channel with.", - "in": "formData", - "name": "user", - "type": "string" - }, - { - "description": "Set this to `true` to receive the locale for this im. Defaults to `false`", - "in": "formData", - "name": "include_locale", - "type": "boolean" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from im.open method", - "properties": { - "already_open": { - "type": "boolean" - }, - "channel": { - "additionalProperties": false, - "properties": { - "created": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/defs_dm_id" - }, - "is_im": { - "type": "boolean" - }, - "is_open": { - "type": "boolean" - }, - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest": { - "$ref": "#/definitions/objs_message" - }, - "unread_count": { - "type": "number" - }, - "unread_count_display": { - "type": "number" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "no_op": { - "type": "boolean" - }, + "description": "Specify a file by providing its ID.", + "in": "query", + "name": "file", + "type": "string" + }, + { + "description": "Creator defined GUID for the file.", + "in": "query", + "name": "external_id", + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response", + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "channel" + "ok" ], - "title": "im.open success schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from im.open method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "user_not_found", - "user_not_visible", - "user_disabled", - "not_authed", - "invalid_auth", - "account_inactive", - "no_permission", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "im.open error schema", + "title": "Default error template", "type": "object" } } @@ -17856,43 +15830,62 @@ "security": [ { "slackAuth": [ - "im:write" + "remote_files:read" ] } ], "tags": [ - "im" + "files.remote", + "files" ] } }, - "/im.replies": { + "/files.remote.list": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve a thread of messages posted to a direct message conversation", + "description": "Retrieve information about a remote file added to Slack", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/im.replies" + "url": "https://api.slack.com/methods/files.remote.list" }, - "operationId": "im_replies", + "operationId": "files_remote_list", "parameters": [ { - "description": "Unique identifier of a thread's parent message", + "description": "Authentication token. Requires scope: `remote_files:read`", "in": "query", - "name": "thread_ts", - "type": "number" + "name": "token", + "type": "string" }, { - "description": "Authentication token. Requires scope: `im:history`", + "description": "Filter files appearing in a specific channel, indicated by its ID.", "in": "query", - "name": "token", + "name": "channel", "type": "string" }, { - "description": "Direct message channel to fetch thread from", + "description": "Filter files created after this timestamp (inclusive).", "in": "query", - "name": "channel", + "name": "ts_from", + "type": "number" + }, + { + "description": "Filter files created before this timestamp (inclusive).", + "in": "query", + "name": "ts_to", + "type": "number" + }, + { + "description": "The maximum number of items to return.", + "in": "query", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -17903,186 +15896,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from im.replies method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest_reply": { - "$ref": "#/definitions/defs_ts" - }, - "reply_count": { - "type": "integer" - }, - "reply_users": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "type": "array", - "uniqueItems": true - }, - "reply_users_count": { - "type": "integer" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "subscribed": { - "type": "boolean" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "unread_count": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "reply_count", - "subscribed", - "ts" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "is_starred": { - "type": "boolean" - }, - "parent_user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "parent_user_id", - "ts" - ], - "type": "object" - } - ] - }, - "type": "array" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages", - "has_more" + "ok" ], - "title": "im.replies schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from im.replies method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "thread_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "im.replies error schema", + "title": "Default error template", "type": "object" } } @@ -18090,45 +15931,44 @@ "security": [ { "slackAuth": [ - "im:history" + "remote_files:read" ] } ], "tags": [ - "im" + "files.remote", + "files" ] } }, - "/migration.exchange": { - "get": { + "/files.remote.remove": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "For Enterprise Grid workspaces, map local user IDs to global user IDs", + "description": "Remove a remote file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/migration.exchange" + "url": "https://api.slack.com/methods/files.remote.remove" }, - "operationId": "migration_exchange", + "operationId": "files_remote_remove", "parameters": [ { - "description": "Authentication token. Requires scope: `tokens.basic`", - "in": "query", + "description": "Authentication token. Requires scope: `remote_files:write`", + "in": "formData", "name": "token", - "required": true, "type": "string" }, { - "description": "Specify `true` to convert `W` global user IDs to workspace-specific `U` IDs. Defaults to `false`.", - "in": "query", - "name": "to_old", - "type": "boolean" + "description": "Specify a file by providing its ID.", + "in": "formData", + "name": "file", + "type": "string" }, { - "description": "A comma-separated list of user ids, up to 400 per request", - "in": "query", - "name": "users", - "required": true, + "description": "Creator defined GUID for the file.", + "in": "formData", + "name": "external_id", "type": "string" } ], @@ -18137,83 +15977,36 @@ ], "responses": { "200": { - "description": "Typical success response when mappings exist for the specified user IDs", + "description": "Typical success response", "schema": { "additionalProperties": true, - "description": "Schema for successful response from migration.exchange method", + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "enterprise_id": { - "title": "The enterprise grid organization ID containing the workspace/team.", - "type": "string" - }, - "invalid_user_ids": { - "items": { - "type": "string" - }, - "title": "A list of User IDs that cannot be mapped or found", - "type": "array" - }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "team_id": { - "$ref": "#/definitions/defs_team" - }, - "user_id_map": { - "additionalProperties": true, - "title": "A mapping of provided user IDs with mapped user IDs", - "type": "object" } }, "required": [ - "ok", - "team_id", - "enterprise_id" + "ok" ], - "title": "migration.exchange success schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response when there are no mappings to provide", + "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from migration.exchange method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "not_enterprise_team", - "too_many_users", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "migration.exchange error schema", + "title": "Default error template", "type": "object" } } @@ -18221,40 +16014,50 @@ "security": [ { "slackAuth": [ - "tokens.basic" + "remote_files:write" ] } ], "tags": [ - "migration" + "files.remote", + "files" ] } }, - "/mpim.close": { - "post": { + "/files.remote.share": { + "get": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "Closes a multiparty direct message channel.", + "description": "Share a remote file into a channel.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.close" + "url": "https://api.slack.com/methods/files.remote.share" }, - "operationId": "mpim_close", + "operationId": "files_remote_share", "parameters": [ { - "description": "Authentication token. Requires scope: `mpim:write`", - "in": "header", + "description": "Authentication token. Requires scope: `remote_files:share`", + "in": "query", "name": "token", - "required": true, "type": "string" }, { - "description": "MPIM to close.", - "in": "formData", - "name": "channel", - "required": true, + "description": "Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.", + "in": "query", + "name": "file", + "type": "string" + }, + { + "description": "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.", + "in": "query", + "name": "external_id", + "type": "string" + }, + { + "description": "Comma-separated list of channel IDs where the file will be shared.", + "in": "query", + "name": "channels", "type": "string" } ], @@ -18265,8 +16068,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from mpim.close method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -18275,49 +16078,24 @@ "required": [ "ok" ], - "title": "mpim.close schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from mpim.close method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "mpim.close error schema", + "title": "Default error template", "type": "object" } } @@ -18325,160 +16103,112 @@ "security": [ { "slackAuth": [ - "mpim:write" + "remote_files:share" ] } ], "tags": [ - "mpim" + "files.remote", + "files" ] } }, - "/mpim.history": { - "get": { + "/files.remote.update": { + "post": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Fetches history of messages and events from a multiparty direct message.", + "description": "Updates an existing remote file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.history" + "url": "https://api.slack.com/methods/files.remote.update" }, - "operationId": "mpim_history", + "operationId": "files_remote_update", "parameters": [ { - "description": "Number of messages to return, between 1 and 1000.", - "in": "query", - "name": "count", - "type": "integer" + "description": "Authentication token. Requires scope: `remote_files:write`", + "in": "formData", + "name": "token", + "type": "string" }, { - "description": "Include `unread_count_display` in the output?", - "in": "query", - "name": "unreads", - "type": "boolean" + "description": "Specify a file by providing its ID.", + "in": "formData", + "name": "file", + "type": "string" }, { - "description": "Include messages with latest or oldest timestamp in results.", - "in": "query", - "name": "inclusive", - "type": "boolean" + "description": "Creator defined GUID for the file.", + "in": "formData", + "name": "external_id", + "type": "string" }, { - "description": "Authentication token. Requires scope: `mpim:history`", - "in": "query", - "name": "token", + "description": "Title of the file being shared.", + "in": "formData", + "name": "title", "type": "string" }, { - "description": "Start of time range of messages to include in results.", - "in": "query", - "name": "oldest", - "type": "number" + "description": "type of file", + "in": "formData", + "name": "filetype", + "type": "string" }, { - "description": "Multiparty direct message to fetch history for.", - "in": "query", - "name": "channel", + "description": "URL of the remote file.", + "in": "formData", + "name": "external_url", "type": "string" }, { - "description": "End of time range of messages to include in results.", - "in": "query", - "name": "latest", - "type": "number" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Typical success response", - "schema": { - "additionalProperties": false, - "description": "Schema for successful response from mpim.history method", - "properties": { - "channel_actions_count": { - "type": "integer" - }, - "channel_actions_ts": { - "items": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "has_more": { - "type": "boolean" - }, - "messages": { - "items": { - "$ref": "#/definitions/objs_message" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true - }, + "description": "Preview of the document via `multipart/form-data`.", + "in": "formData", + "name": "preview_image", + "type": "string" + }, + { + "description": "File containing contents that can be used to improve searchability for the remote file.", + "in": "formData", + "name": "indexable_file_contents", + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response", + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "messages", - "has_more", - "channel_actions_ts", - "channel_actions_count" + "ok" ], - "title": "mpim.history schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from mpim.history method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "channel_not_found", - "invalid_ts_latest", - "invalid_ts_oldest", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "mpim.history error schema", + "title": "Default error template", "type": "object" } } @@ -18486,44 +16216,40 @@ "security": [ { "slackAuth": [ - "mpim:history" + "remote_files:write" ] } ], "tags": [ - "mpim" + "files.remote", + "files" ] } }, - "/mpim.list": { - "get": { + "/files.revokePublicURL": { + "post": { "consumes": [ - "application/x-www-form-urlencoded" + "application/x-www-form-urlencoded", + "application/json" ], - "description": "Lists multiparty direct message channels for the calling user.", + "description": "Revokes public/external sharing access for a file", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.list" + "url": "https://api.slack.com/methods/files.revokePublicURL" }, - "operationId": "mpim_list", + "operationId": "files_revokePublicURL", "parameters": [ { - "description": "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](/docs/pagination) for more details.", - "in": "query", - "name": "cursor", - "type": "string" - }, - { - "description": "Authentication token. Requires scope: `mpim:read`", - "in": "query", + "description": "Authentication token. Requires scope: `files:write:user`", + "in": "header", "name": "token", "type": "string" }, { - "description": "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.", - "in": "query", - "name": "limit", - "type": "integer" + "description": "File to revoke", + "in": "formData", + "name": "file", + "type": "string" } ], "produces": [ @@ -18534,28 +16260,20 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from mpim.list method", + "description": "Schema for successful response from files.revokePublicURL method", "properties": { - "groups": { - "items": { - "$ref": "#/definitions/objs_group" - }, - "minItems": 1, - "type": "array", - "uniqueItems": true + "file": { + "$ref": "#/definitions/objs_file" }, "ok": { "$ref": "#/definitions/defs_ok_true" - }, - "response_metadata": { - "$ref": "#/definitions/objs_response_metadata" } }, "required": [ "ok", - "groups" + "file" ], - "title": "mpim.list schema", + "title": "files.revokePublicURL schema", "type": "object" } }, @@ -18563,16 +16281,23 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.list method", + "description": "Schema for error response from files.revokePublicURL method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ + "file_not_found", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -18596,7 +16321,7 @@ "ok", "error" ], - "title": "mpim.list error schema", + "title": "files.revokePublicURL error schema", "type": "object" } } @@ -18604,44 +16329,38 @@ "security": [ { "slackAuth": [ - "mpim:read" + "files:write:user" ] } ], "tags": [ - "mpim" + "files" ] } }, - "/mpim.mark": { + "/files.sharedPublicURL": { "post": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Sets the read cursor in a multiparty direct message channel.", + "description": "Enables a file for public/external sharing.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.mark" + "url": "https://api.slack.com/methods/files.sharedPublicURL" }, - "operationId": "mpim_mark", + "operationId": "files_sharedPublicURL", "parameters": [ { - "description": "Authentication token. Requires scope: `mpim:write`", + "description": "Authentication token. Requires scope: `files:write:user`", "in": "header", "name": "token", "type": "string" }, { - "description": "Timestamp of the most recently seen message.", - "in": "formData", - "name": "ts", - "type": "number" - }, - { - "description": "multiparty direct message channel to set reading cursor in.", + "description": "File to share", "in": "formData", - "name": "channel", + "name": "file", "type": "string" } ], @@ -18653,16 +16372,20 @@ "description": "Typical success response", "schema": { "additionalProperties": false, - "description": "Schema for successful response from mpim.mark method", + "description": "Schema for successful response from files.sharedPublicURL method", "properties": { + "file": { + "$ref": "#/definitions/objs_file" + }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok" + "ok", + "file" ], - "title": "mpim.mark schema", + "title": "files.sharedPublicURL schema", "type": "object" } }, @@ -18670,18 +16393,24 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.mark method", + "description": "Schema for error response from files.sharedPublicURL method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "invalid_timestamp", + "file_not_found", + "not_allowed", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", + "user_is_bot", + "user_is_restricted", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -18705,7 +16434,7 @@ "ok", "error" ], - "title": "mpim.mark error schema", + "title": "files.sharedPublicURL error schema", "type": "object" } } @@ -18713,39 +16442,80 @@ "security": [ { "slackAuth": [ - "mpim:write" + "files:write:user" ] } ], "tags": [ - "mpim" + "files" ] } }, - "/mpim.open": { + "/files.upload": { "post": { "consumes": [ - "application/x-www-form-urlencoded", - "application/json" + "application/x-www-form-urlencoded" ], - "description": "This method opens a multiparty direct message.", + "description": "Uploads or creates a file.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.open" + "url": "https://api.slack.com/methods/files.upload" }, - "operationId": "mpim_open", + "operationId": "files_upload", "parameters": [ { - "description": "Authentication token. Requires scope: `mpim:write`", - "in": "header", + "description": "Authentication token. Requires scope: `files:write:user`", + "in": "formData", "name": "token", "type": "string" }, { - "description": "Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned.", + "description": "File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`.", "in": "formData", - "name": "users", + "name": "file", + "type": "string" + }, + { + "description": "File contents via a POST variable. If omitting this parameter, you must provide a `file`.", + "in": "formData", + "name": "content", + "type": "string" + }, + { + "description": "A [file type](/types/file#file_types) identifier.", + "in": "formData", + "name": "filetype", + "type": "string" + }, + { + "description": "Filename of file.", + "in": "formData", + "name": "filename", + "type": "string" + }, + { + "description": "Title of file.", + "in": "formData", + "name": "title", + "type": "string" + }, + { + "description": "The message text introducing the file in specified `channels`.", + "in": "formData", + "name": "initial_comment", + "type": "string" + }, + { + "description": "Comma-separated list of channel names or IDs where the file will be shared.", + "in": "formData", + "name": "channels", "type": "string" + }, + { + "description": "Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead.", + "in": "formData", + "name": "thread_ts", + "type": "number" } ], "produces": [ @@ -18753,13 +16523,13 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Success response after uploading a file to a channel with an initial message", "schema": { "additionalProperties": false, - "description": "Schema for successful response from mpim.open method", + "description": "Schema for successful response files.upload method", "properties": { - "group": { - "$ref": "#/definitions/objs_group" + "file": { + "$ref": "#/definitions/objs_file" }, "ok": { "$ref": "#/definitions/defs_ok_true" @@ -18767,9 +16537,9 @@ }, "required": [ "ok", - "group" + "file" ], - "title": "mpim.open success schema", + "title": "files.upload schema", "type": "object" } }, @@ -18777,13 +16547,19 @@ "description": "Typical error response", "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.open method", + "description": "Schema for error response files.upload method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "users_list_not_supplied", - "not_enough_users", - "too_many_users", + "posting_to_general_channel_denied", + "invalid_channel", + "file_uploads_disabled", + "file_uploads_except_images_disabled", + "storage_limit_reached", "not_authed", "invalid_auth", "account_inactive", @@ -18810,7 +16586,7 @@ "ok", "error" ], - "title": "mpim.open error schema", + "title": "files.upload error schema", "type": "object" } } @@ -18818,44 +16594,52 @@ "security": [ { "slackAuth": [ - "mpim:write" + "files:write:user" ] } ], "tags": [ - "mpim" + "files" ] } }, - "/mpim.replies": { + "/migration.exchange": { "get": { "consumes": [ "application/x-www-form-urlencoded" ], - "description": "Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message.", + "description": "For Enterprise Grid workspaces, map local user IDs to global user IDs", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/mpim.replies" + "url": "https://api.slack.com/methods/migration.exchange" }, - "operationId": "mpim_replies", + "operationId": "migration_exchange", "parameters": [ { - "description": "Unique identifier of a thread's parent message.", + "description": "Authentication token. Requires scope: `tokens.basic`", "in": "query", - "name": "thread_ts", - "type": "number" + "name": "token", + "required": true, + "type": "string" }, { - "description": "Authentication token. Requires scope: `mpim:history`", + "description": "A comma-separated list of user ids, up to 400 per request", "in": "query", - "name": "token", + "name": "users", + "required": true, "type": "string" }, { - "description": "Multiparty direct message channel to fetch thread from.", + "description": "Specify team_id starts with `T` in case of Org Token", "in": "query", - "name": "channel", + "name": "team_id", "type": "string" + }, + { + "description": "Specify `true` to convert `W` global user IDs to workspace-specific `U` IDs. Defaults to `false`.", + "in": "query", + "name": "to_old", + "type": "boolean" } ], "produces": [ @@ -18863,165 +16647,63 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response when mappings exist for the specified user IDs", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from mpim.replies method", + "additionalProperties": true, + "description": "Schema for successful response from migration.exchange method", "properties": { - "has_more": { - "type": "boolean" + "enterprise_id": { + "title": "The enterprise grid organization ID containing the workspace/team.", + "type": "string" }, - "messages": { + "invalid_user_ids": { "items": { - "items": [ - { - "additionalProperties": false, - "properties": { - "last_read": { - "$ref": "#/definitions/defs_ts" - }, - "latest_reply": { - "$ref": "#/definitions/defs_ts" - }, - "reply_count": { - "type": "integer" - }, - "reply_users": { - "items": { - "$ref": "#/definitions/defs_user_id" - }, - "type": "array", - "uniqueItems": true - }, - "reply_users_count": { - "type": "integer" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "subscribed": { - "type": "boolean" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "unread_count": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "reply_count", - "subscribed", - "ts" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "is_starred": { - "type": "boolean" - }, - "parent_user_id": { - "$ref": "#/definitions/defs_user_id" - }, - "source_team": { - "$ref": "#/definitions/defs_team" - }, - "team": { - "$ref": "#/definitions/defs_team" - }, - "text": { - "type": "string" - }, - "thread_ts": { - "$ref": "#/definitions/defs_ts" - }, - "ts": { - "$ref": "#/definitions/defs_ts" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/definitions/defs_user_id" - }, - "user_profile": { - "$ref": "#/definitions/objs_user_profile_short" - }, - "user_team": { - "$ref": "#/definitions/defs_team" - } - }, - "required": [ - "type", - "user", - "text", - "thread_ts", - "parent_user_id", - "ts" - ], - "type": "object" - } - ] + "type": "string" }, + "title": "A list of User IDs that cannot be mapped or found", "type": "array" }, "ok": { "$ref": "#/definitions/defs_ok_true" + }, + "team_id": { + "$ref": "#/definitions/defs_team" + }, + "user_id_map": { + "additionalProperties": true, + "title": "A mapping of provided user IDs with mapped user IDs", + "type": "object" } }, "required": [ "ok", - "messages", - "has_more" + "team_id", + "enterprise_id" ], - "title": "mpim.replies schema", + "title": "migration.exchange success schema", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response when there are no mappings to provide", "schema": { "additionalProperties": false, - "description": "Schema for error response from mpim.replies method", + "description": "Schema for error response from migration.exchange method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ - "channel_not_found", - "thread_not_found", + "not_enterprise_team", + "too_many_users", "not_authed", "invalid_auth", "account_inactive", "token_revoked", "no_permission", "org_login_required", - "user_is_bot", "invalid_arg_name", "invalid_array_arg", "invalid_charset", @@ -19045,7 +16727,7 @@ "ok", "error" ], - "title": "mpim.replies error schema", + "title": "migration.exchange error schema", "type": "object" } } @@ -19053,12 +16735,12 @@ "security": [ { "slackAuth": [ - "mpim:history" + "tokens.basic" ] } ], "tags": [ - "mpim" + "migration" ] } }, @@ -19075,15 +16757,21 @@ "operationId": "oauth_access", "parameters": [ { - "description": "The `code` param returned via the OAuth callback.", + "description": "Issued when you created your application.", "in": "query", - "name": "code", + "name": "client_id", "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", + "description": "Issued when you created your application.", "in": "query", - "name": "token", + "name": "client_secret", + "type": "string" + }, + { + "description": "The `code` param returned via the OAuth callback.", + "in": "query", + "name": "code", "type": "string" }, { @@ -19097,18 +16785,6 @@ "in": "query", "name": "single_channel", "type": "boolean" - }, - { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_id", - "type": "string" - }, - { - "description": "Issued when you created your application.", - "in": "query", - "name": "client_secret", - "type": "string" } ], "produces": [ @@ -19177,25 +16853,19 @@ { "description": "Issued when you created your application.", "in": "query", - "name": "client_secret", + "name": "client_id", "type": "string" }, { - "description": "The `code` param returned via the OAuth callback.", + "description": "Issued when you created your application.", "in": "query", - "name": "code", + "name": "client_secret", "type": "string" }, { - "description": "Request the user to add your app only to a single channel.", - "in": "query", - "name": "single_channel", - "type": "boolean" - }, - { - "description": "Issued when you created your application.", + "description": "The `code` param returned via the OAuth callback.", "in": "query", - "name": "client_id", + "name": "code", "type": "string" }, { @@ -19203,6 +16873,12 @@ "in": "query", "name": "redirect_uri", "type": "string" + }, + { + "description": "Request the user to add your app only to a single channel.", + "in": "query", + "name": "single_channel", + "type": "boolean" } ], "produces": [ @@ -19271,20 +16947,20 @@ { "description": "Issued when you created your application.", "in": "query", - "name": "client_secret", + "name": "client_id", "type": "string" }, { - "description": "The `code` param returned via the OAuth callback.", + "description": "Issued when you created your application.", "in": "query", - "name": "code", - "required": true, + "name": "client_secret", "type": "string" }, { - "description": "Issued when you created your application.", + "description": "The `code` param returned via the OAuth callback.", "in": "query", - "name": "client_id", + "name": "code", + "required": true, "type": "string" }, { @@ -19359,22 +17035,24 @@ }, "operationId": "pins_add", "parameters": [ - { - "description": "Timestamp of the message to pin.", - "in": "formData", - "name": "timestamp", - "type": "number" - }, { "description": "Authentication token. Requires scope: `pins:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { "description": "Channel to pin the item in.", "in": "formData", "name": "channel", + "required": true, + "type": "string" + }, + { + "description": "Timestamp of the message to pin.", + "in": "formData", + "name": "timestamp", "type": "string" } ], @@ -19405,6 +17083,10 @@ "additionalProperties": false, "description": "Schema for error response from pins.add method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "bad_timestamp", @@ -19474,12 +17156,14 @@ "description": "Authentication token. Requires scope: `pins:read`", "in": "query", "name": "token", + "required": true, "type": "string" }, { "description": "Channel to get pinned items for.", "in": "query", "name": "channel", + "required": true, "type": "string" } ], @@ -19584,6 +17268,10 @@ "additionalProperties": false, "description": "Schema for error response from pins.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "channel_not_found", @@ -19643,34 +17331,24 @@ }, "operationId": "pins_remove", "parameters": [ - { - "description": "File comment to un-pin.", - "in": "formData", - "name": "file_comment", - "type": "string" - }, - { - "description": "Timestamp of the message to un-pin.", - "in": "formData", - "name": "timestamp", - "type": "number" - }, { "description": "Authentication token. Requires scope: `pins:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "File to un-pin.", + "description": "Channel where the item is pinned to.", "in": "formData", - "name": "file", + "name": "channel", + "required": true, "type": "string" }, { - "description": "Channel where the item is pinned to.", + "description": "Timestamp of the message to un-pin.", "in": "formData", - "name": "channel", + "name": "timestamp", "type": "string" } ], @@ -19701,6 +17379,10 @@ "additionalProperties": false, "description": "Schema for error response from pins.remove method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "bad_timestamp", @@ -19767,30 +17449,30 @@ "operationId": "reactions_add", "parameters": [ { - "description": "Timestamp of the message to add reaction to.", + "description": "Channel where the message to add reaction to was posted.", "in": "formData", - "name": "timestamp", + "name": "channel", "required": true, "type": "string" }, { - "description": "Authentication token. Requires scope: `reactions:write`", - "in": "header", - "name": "token", + "description": "Reaction (emoji) name.", + "in": "formData", + "name": "name", "required": true, "type": "string" }, { - "description": "Reaction (emoji) name.", + "description": "Timestamp of the message to add reaction to.", "in": "formData", - "name": "name", + "name": "timestamp", "required": true, "type": "string" }, { - "description": "Channel where the message to add reaction to was posted.", - "in": "formData", - "name": "channel", + "description": "Authentication token. Requires scope: `reactions:write`", + "in": "header", + "name": "token", "required": true, "type": "string" } @@ -19822,6 +17504,10 @@ "additionalProperties": false, "description": "Schema for error response from reactions.add method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "bad_timestamp", @@ -19887,40 +17573,40 @@ "operationId": "reactions_get", "parameters": [ { - "description": "If true always return the complete reaction list.", + "description": "Authentication token. Requires scope: `reactions:read`", "in": "query", - "name": "full", - "type": "boolean" + "name": "token", + "required": true, + "type": "string" }, { - "description": "File comment to get reactions for.", + "description": "Channel where the message to get reactions for was posted.", "in": "query", - "name": "file_comment", + "name": "channel", "type": "string" }, { - "description": "Timestamp of the message to get reactions for.", + "description": "File to get reactions for.", "in": "query", - "name": "timestamp", + "name": "file", "type": "string" }, { - "description": "Authentication token. Requires scope: `reactions:read`", + "description": "File comment to get reactions for.", "in": "query", - "name": "token", - "required": true, + "name": "file_comment", "type": "string" }, { - "description": "File to get reactions for.", + "description": "If true always return the complete reaction list.", "in": "query", - "name": "file", - "type": "string" + "name": "full", + "type": "boolean" }, { - "description": "Channel where the message to get reactions for was posted.", + "description": "Timestamp of the message to get reactions for.", "in": "query", - "name": "channel", + "name": "timestamp", "type": "string" } ], @@ -20018,6 +17704,10 @@ "additionalProperties": false, "description": "Schema for error response from reactions.get method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "bad_timestamp", @@ -20080,44 +17770,44 @@ "operationId": "reactions_list", "parameters": [ { + "description": "Authentication token. Requires scope: `reactions:read`", "in": "query", - "name": "count", - "type": "integer" + "name": "token", + "required": true, + "type": "string" }, { - "description": "If true always return the complete reaction list.", + "description": "Show reactions made by this user. Defaults to the authed user.", "in": "query", - "name": "full", - "type": "boolean" + "name": "user", + "type": "string" }, { - "description": "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](/docs/pagination) for more details.", + "description": "If true always return the complete reaction list.", "in": "query", - "name": "cursor", - "type": "string" + "name": "full", + "type": "boolean" }, { - "description": "Authentication token. Requires scope: `reactions:read`", "in": "query", - "name": "token", - "required": true, - "type": "string" + "name": "count", + "type": "integer" }, { - "description": "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.", "in": "query", - "name": "limit", + "name": "page", "type": "integer" }, { - "description": "Show reactions made by this user. Defaults to the authed user.", + "description": "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](/docs/pagination) for more details.", "in": "query", - "name": "user", + "name": "cursor", "type": "string" }, { + "description": "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.", "in": "query", - "name": "page", + "name": "limit", "type": "integer" } ], @@ -20227,6 +17917,10 @@ "additionalProperties": false, "description": "Schema for error response from reactions.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "user_not_found", @@ -20288,41 +17982,41 @@ "operationId": "reactions_remove", "parameters": [ { - "description": "Reaction (emoji) name.", - "in": "formData", - "name": "name", + "description": "Authentication token. Requires scope: `reactions:write`", + "in": "header", + "name": "token", "required": true, "type": "string" }, { - "description": "File comment to remove reaction from.", + "description": "Reaction (emoji) name.", "in": "formData", - "name": "file_comment", + "name": "name", + "required": true, "type": "string" }, { - "description": "Timestamp of the message to remove reaction from.", + "description": "File to remove reaction from.", "in": "formData", - "name": "timestamp", + "name": "file", "type": "string" }, { - "description": "Authentication token. Requires scope: `reactions:write`", - "in": "header", - "name": "token", - "required": true, + "description": "File comment to remove reaction from.", + "in": "formData", + "name": "file_comment", "type": "string" }, { - "description": "File to remove reaction from.", + "description": "Channel where the message to remove reaction from was posted.", "in": "formData", - "name": "file", + "name": "channel", "type": "string" }, { - "description": "Channel where the message to remove reaction from was posted.", + "description": "Timestamp of the message to remove reaction from.", "in": "formData", - "name": "channel", + "name": "timestamp", "type": "string" } ], @@ -20353,6 +18047,10 @@ "additionalProperties": false, "description": "Schema for error response from reactions.remove method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "bad_timestamp", @@ -20419,28 +18117,31 @@ }, "operationId": "reminders_add", "parameters": [ - { - "description": "The content of the reminder", - "in": "formData", - "name": "text", - "type": "string" - }, { "description": "Authentication token. Requires scope: `reminders:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "The user who will receive the reminder. If no user is specified, the reminder will go to user who created it.", + "description": "The content of the reminder", "in": "formData", - "name": "user", + "name": "text", + "required": true, "type": "string" }, { "description": "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\")", "in": "formData", "name": "time", + "required": true, + "type": "string" + }, + { + "description": "The user who will receive the reminder. If no user is specified, the reminder will go to user who created it.", + "in": "formData", + "name": "user", "type": "string" } ], @@ -20475,6 +18176,10 @@ "additionalProperties": false, "description": "Schema for error response from reminders.add method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "cannot_parse", @@ -20583,6 +18288,10 @@ "additionalProperties": false, "description": "Schema for error response from reminders.complete method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_found", @@ -20688,6 +18397,10 @@ "additionalProperties": false, "description": "Schema for error response from reminders.delete method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_found", @@ -20794,6 +18507,10 @@ "additionalProperties": false, "description": "Schema for error response from reminders.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_found", @@ -20897,6 +18614,10 @@ "additionalProperties": false, "description": "Schema for error response from reminders.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -20958,12 +18679,6 @@ }, "operationId": "rtm_connect", "parameters": [ - { - "description": "Only deliver presence events when requested by subscription. See [presence subscriptions](/docs/presence-and-status#subscriptions).", - "in": "query", - "name": "presence_sub", - "type": "boolean" - }, { "description": "Authentication token. Requires scope: `rtm:stream`", "in": "query", @@ -20976,6 +18691,12 @@ "in": "query", "name": "batch_presence_aware", "type": "boolean" + }, + { + "description": "Only deliver presence events when requested by subscription. See [presence subscriptions](/docs/presence-and-status#subscriptions).", + "in": "query", + "name": "presence_sub", + "type": "boolean" } ], "produces": [ @@ -21048,6 +18769,10 @@ "additionalProperties": false, "description": "Schema for error response from rtm.connect method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -21108,47 +18833,47 @@ "operationId": "search_messages", "parameters": [ { - "description": "Change sort direction to ascending (`asc`) or descending (`desc`).", + "description": "Authentication token. Requires scope: `search:read`", "in": "query", - "name": "sort_dir", + "name": "token", + "required": true, "type": "string" }, { - "description": "Search query.", + "description": "Pass the number of results you want per \"page\". Maximum of `100`.", "in": "query", - "name": "query", - "required": true, - "type": "string" + "name": "count", + "type": "integer" }, { - "description": "Return matches sorted by either `score` or `timestamp`.", + "description": "Pass a value of `true` to enable query highlight markers (see below).", "in": "query", - "name": "sort", - "type": "string" + "name": "highlight", + "type": "boolean" }, { - "description": "Pass the number of results you want per \"page\". Maximum of `100`.", "in": "query", - "name": "count", + "name": "page", "type": "integer" }, { - "description": "Authentication token. Requires scope: `search:read`", + "description": "Search query.", "in": "query", - "name": "token", + "name": "query", "required": true, "type": "string" }, { - "description": "Pass a value of `true` to enable query highlight markers (see below).", + "description": "Return matches sorted by either `score` or `timestamp`.", "in": "query", - "name": "highlight", - "type": "boolean" + "name": "sort", + "type": "string" }, { + "description": "Change sort direction to ascending (`asc`) or descending (`desc`).", "in": "query", - "name": "page", - "type": "integer" + "name": "sort_dir", + "type": "string" } ], "produces": [ @@ -21216,34 +18941,34 @@ "operationId": "stars_add", "parameters": [ { - "description": "File comment to add star to.", - "in": "formData", - "name": "file_comment", + "description": "Authentication token. Requires scope: `stars:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Timestamp of the message to add star to.", + "description": "Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`).", "in": "formData", - "name": "timestamp", + "name": "channel", "type": "string" }, { - "description": "Authentication token. Requires scope: `stars:write`", - "in": "header", - "name": "token", - "required": true, + "description": "File to add star to.", + "in": "formData", + "name": "file", "type": "string" }, { - "description": "File to add star to.", + "description": "File comment to add star to.", "in": "formData", - "name": "file", + "name": "file_comment", "type": "string" }, { - "description": "Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`).", + "description": "Timestamp of the message to add star to.", "in": "formData", - "name": "channel", + "name": "timestamp", "type": "string" } ], @@ -21274,6 +18999,10 @@ "additionalProperties": false, "description": "Schema for error response from stars.add method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "bad_timestamp", @@ -21341,21 +19070,26 @@ }, "operationId": "stars_list", "parameters": [ + { + "description": "Authentication token. Requires scope: `stars:read`", + "in": "query", + "name": "token", + "type": "string" + }, { "in": "query", "name": "count", "type": "string" }, { - "description": "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](/docs/pagination) for more details.", "in": "query", - "name": "cursor", + "name": "page", "type": "string" }, { - "description": "Authentication token. Requires scope: `stars:read`", + "description": "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](/docs/pagination) for more details.", "in": "query", - "name": "token", + "name": "cursor", "type": "string" }, { @@ -21363,11 +19097,6 @@ "in": "query", "name": "limit", "type": "integer" - }, - { - "in": "query", - "name": "page", - "type": "string" } ], "produces": [ @@ -21554,6 +19283,10 @@ "additionalProperties": false, "description": "Schema for error response from stars.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -21617,33 +19350,34 @@ "operationId": "stars_remove", "parameters": [ { - "description": "File comment to remove star from.", - "in": "formData", - "name": "file_comment", + "description": "Authentication token. Requires scope: `stars:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "Timestamp of the message to remove star from.", + "description": "Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`).", "in": "formData", - "name": "timestamp", - "type": "number" + "name": "channel", + "type": "string" }, { - "description": "Authentication token. Requires scope: `stars:write`", - "in": "header", - "name": "token", + "description": "File to remove star from.", + "in": "formData", + "name": "file", "type": "string" }, { - "description": "Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`).", + "description": "File comment to remove star from.", "in": "formData", - "name": "channel", + "name": "file_comment", "type": "string" }, { - "description": "File to remove star from.", + "description": "Timestamp of the message to remove star from.", "in": "formData", - "name": "file", + "name": "timestamp", "type": "string" } ], @@ -21674,6 +19408,10 @@ "additionalProperties": false, "description": "Schema for error response from stars.remove method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "bad_timestamp", @@ -21741,11 +19479,6 @@ }, "operationId": "team_accessLogs", "parameters": [ - { - "in": "query", - "name": "count", - "type": "integer" - }, { "description": "Authentication token. Requires scope: `admin`", "in": "query", @@ -21754,14 +19487,19 @@ "type": "string" }, { + "description": "End of time range of logs to include in results (inclusive).", "in": "query", - "name": "page", - "type": "integer" + "name": "before", + "type": "string" }, { - "description": "End of time range of logs to include in results (inclusive).", "in": "query", - "name": "before", + "name": "count", + "type": "string" + }, + { + "in": "query", + "name": "page", "type": "string" } ], @@ -21783,7 +19521,10 @@ "type": "integer" }, "country": { - "type": "string" + "type": [ + "string", + "null" + ] }, "date_first": { "type": "integer" @@ -21792,13 +19533,22 @@ "type": "integer" }, "ip": { - "type": "string" + "type": [ + "string", + "null" + ] }, "isp": { - "type": "string" + "type": [ + "string", + "null" + ] }, "region": { - "type": "string" + "type": [ + "string", + "null" + ] }, "user_agent": { "type": "string" @@ -21850,6 +19600,10 @@ "additionalProperties": false, "description": "Schema for error response from team.accessLogs method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "paid_only", @@ -21934,65 +19688,34 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from team.billableInfo method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { - "billable_info": { - "additionalProperties": false, - "type": "object" - }, "ok": { "$ref": "#/definitions/defs_ok_true" } }, "required": [ - "ok", - "billable_info" + "ok" ], - "title": "team.billableInfo schema", + "title": "Default success template", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": false, - "description": "Schema for error response from team.billableInfo method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "user_not_found", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "user_is_bot", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "team.billableInfo error schema", + "title": "Default error template", "type": "object" } } @@ -22066,6 +19789,10 @@ "additionalProperties": false, "description": "Schema for error response from team.info method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -22126,44 +19853,44 @@ "operationId": "team_integrationLogs", "parameters": [ { + "description": "Authentication token. Requires scope: `admin`", "in": "query", - "name": "count", - "type": "integer" + "name": "token", + "required": true, + "type": "string" }, { - "description": "Filter logs with this change type. Defaults to all logs.", + "description": "Filter logs to this Slack app. Defaults to all logs.", "in": "query", - "name": "change_type", + "name": "app_id", "type": "string" }, { - "description": "Filter logs to this Slack app. Defaults to all logs.", + "description": "Filter logs with this change type. Defaults to all logs.", "in": "query", - "name": "app_id", - "type": "integer" + "name": "change_type", + "type": "string" }, { - "description": "Authentication token. Requires scope: `admin`", "in": "query", - "name": "token", - "required": true, + "name": "count", "type": "string" }, { - "description": "Filter logs generated by this user\u2019s actions. Defaults to all logs.", "in": "query", - "name": "user", + "name": "page", "type": "string" }, { "description": "Filter logs to this service. Defaults to all logs.", "in": "query", "name": "service_id", - "type": "integer" + "type": "string" }, { + "description": "Filter logs generated by this user\u2019s actions. Defaults to all logs.", "in": "query", - "name": "page", + "name": "user", "type": "string" } ], @@ -22252,6 +19979,10 @@ "additionalProperties": false, "description": "Schema for error response from team.integrationLogs method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -22371,6 +20102,10 @@ "additionalProperties": false, "description": "Schema for error response from team.profile.get method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -22432,28 +20167,28 @@ "operationId": "usergroups_create", "parameters": [ { - "description": "A mention handle. Must be unique among channels, users and User Groups.", - "in": "formData", - "name": "handle", + "description": "Authentication token. Requires scope: `usergroups:write`", + "in": "header", + "name": "token", + "required": true, "type": "string" }, { - "description": "A short description of the User Group.", + "description": "A comma separated string of encoded channel IDs for which the User Group uses as a default.", "in": "formData", - "name": "description", + "name": "channels", "type": "string" }, { - "description": "A comma separated string of encoded channel IDs for which the User Group uses as a default.", + "description": "A short description of the User Group.", "in": "formData", - "name": "channels", + "name": "description", "type": "string" }, { - "description": "Authentication token. Requires scope: `usergroups:write`", - "in": "header", - "name": "token", - "required": true, + "description": "A mention handle. Must be unique among channels, users and User Groups.", + "in": "formData", + "name": "handle", "type": "string" }, { @@ -22501,6 +20236,10 @@ "additionalProperties": false, "description": "Schema for error response from usergroups.create method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "permission_denied", @@ -22617,6 +20356,10 @@ "additionalProperties": false, "description": "Schema for error response from usergroups.disable method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "permission_denied", @@ -22733,6 +20476,10 @@ "additionalProperties": false, "description": "Schema for error response from usergroups.enable method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -22857,6 +20604,10 @@ "additionalProperties": false, "description": "Schema for error response from usergroups.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -22998,6 +20749,10 @@ "additionalProperties": false, "description": "Schema for error response from usergroups.update method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "permission_denied", @@ -23118,6 +20873,10 @@ "additionalProperties": false, "description": "Schema for error response from usergroups.users.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -23184,13 +20943,6 @@ }, "operationId": "usergroups_users_update", "parameters": [ - { - "description": "A comma separated string of encoded user IDs that represent the entire list of users for the User Group.", - "in": "formData", - "name": "users", - "required": true, - "type": "string" - }, { "description": "Authentication token. Requires scope: `usergroups:write`", "in": "header", @@ -23210,6 +20962,13 @@ "name": "usergroup", "required": true, "type": "string" + }, + { + "description": "A comma separated string of encoded user IDs that represent the entire list of users for the User Group.", + "in": "formData", + "name": "users", + "required": true, + "type": "string" } ], "produces": [ @@ -23243,6 +21002,10 @@ "additionalProperties": false, "description": "Schema for error response from usergroups.users.update method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "permission_denied", @@ -23309,12 +21072,6 @@ }, "operationId": "users_conversations", "parameters": [ - { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", - "type": "string" - }, { "description": "Authentication token. Requires scope: `conversations:read`", "in": "query", @@ -23322,15 +21079,15 @@ "type": "string" }, { - "description": "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 no larger than 1000.", + "description": "Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership.", "in": "query", - "name": "limit", - "type": "integer" + "name": "user", + "type": "string" }, { - "description": "Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership.", + "description": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", "in": "query", - "name": "user", + "name": "types", "type": "string" }, { @@ -23340,9 +21097,15 @@ "type": "boolean" }, { - "description": "Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`", + "description": "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 no larger than 1000.", "in": "query", - "name": "types", + "name": "limit", + "type": "integer" + }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", "type": "string" } ], @@ -23393,6 +21156,10 @@ "additionalProperties": false, "description": "Schema for error response from users.conversations method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "method_not_supported_for_channel_type", @@ -23495,6 +21262,10 @@ "additionalProperties": false, "description": "Schema for error response from users.deletePhoto method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -23938,6 +21709,10 @@ "additionalProperties": false, "description": "Schema for error response from users.identity method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "not_authed", @@ -24006,17 +21781,17 @@ "required": true, "type": "string" }, - { - "description": "User to get info on", - "in": "query", - "name": "user", - "type": "string" - }, { "description": "Set this to `true` to receive the locale for this user. Defaults to `false`", "in": "query", "name": "include_locale", "type": "boolean" + }, + { + "description": "User to get info on", + "in": "query", + "name": "user", + "type": "string" } ], "produces": [ @@ -24050,6 +21825,9 @@ "additionalProperties": false, "description": "Schema for error response from users.info method", "properties": { + "callstack": { + "type": "string" + }, "error": { "enum": [ "user_not_found", @@ -24108,12 +21886,6 @@ }, "operationId": "users_list", "parameters": [ - { - "description": "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](/docs/pagination) for more detail.", - "in": "query", - "name": "cursor", - "type": "string" - }, { "description": "Authentication token. Requires scope: `users:read`", "in": "query", @@ -24121,11 +21893,17 @@ "type": "string" }, { - "description": "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.", + "description": "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.", "in": "query", "name": "limit", "type": "integer" }, + { + "description": "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](/docs/pagination) for more detail.", + "in": "query", + "name": "cursor", + "type": "string" + }, { "description": "Set this to `true` to receive the locale for users. Defaults to `false`", "in": "query", @@ -24176,6 +21954,10 @@ "additionalProperties": false, "description": "Schema for error response from users.list method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "limit_required", @@ -24240,12 +22022,14 @@ "description": "Authentication token. Requires scope: `users:read.email`", "in": "query", "name": "token", + "required": true, "type": "string" }, { "description": "An email address belonging to a user in the workspace", "in": "query", "name": "email", + "required": true, "type": "string" } ], @@ -24280,6 +22064,10 @@ "additionalProperties": false, "description": "Schema for error response from users.lookupByEmail method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "users_not_found", @@ -24344,6 +22132,7 @@ "description": "Authentication token. Requires scope: `users.profile:read`", "in": "query", "name": "token", + "required": true, "type": "string" }, { @@ -24390,6 +22179,10 @@ "additionalProperties": false, "description": "Schema for error response from users.profile.get method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "user_not_found", @@ -24454,34 +22247,35 @@ }, "operationId": "users_profile_set", "parameters": [ - { - "description": "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.", - "in": "formData", - "name": "profile", - "type": "string" - }, { "description": "Authentication token. Requires scope: `users.profile:write`", "in": "header", "name": "token", + "required": true, "type": "string" }, { - "description": "ID of user to change. This argument may only be specified by team admins on paid teams.", + "description": "Name of a single key to set. Usable only if `profile` is not passed.", "in": "formData", - "name": "user", + "name": "name", "type": "string" }, { - "description": "Value to set a single key to. Usable only if `profile` is not passed.", + "description": "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.", "in": "formData", - "name": "value", + "name": "profile", "type": "string" }, { - "description": "Name of a single key to set. Usable only if `profile` is not passed.", + "description": "ID of user to change. This argument may only be specified by team admins on paid teams.", + "in": "formData", + "name": "user", + "type": "string" + }, + { + "description": "Value to set a single key to. Usable only if `profile` is not passed.", "in": "formData", - "name": "name", + "name": "value", "type": "string" } ], @@ -24495,6 +22289,10 @@ "additionalProperties": false, "description": "Schema for successful response from users.profile.set method", "properties": { + "email_pending": { + "format": "email", + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_true" }, @@ -24520,6 +22318,10 @@ "additionalProperties": false, "description": "Schema for error response from users.profile.set method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "error": { "enum": [ "reserved_name", @@ -24604,8 +22406,8 @@ "200": { "description": "Typical success response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for successful response from users.setActive method", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -24614,24 +22416,52 @@ "required": [ "ok" ], - "title": "Default success template", + "title": "users.setActive schema", "type": "object" } }, "default": { "description": "Typical error response", "schema": { - "additionalProperties": true, - "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "additionalProperties": false, + "description": "Schema for error response from users.setActive method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "ekm_access_denied", + "missing_scope", + "invalid_arguments", + "invalid_arg_name", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "request_timeout", + "fatal_error", + "internal_error" + ], + "type": "string" + }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok" + "ok", + "error" ], - "title": "Default error template", + "title": "users.setActive error schema", "type": "object" } } @@ -24661,34 +22491,35 @@ "operationId": "users_setPhoto", "parameters": [ { - "description": "File contents via `multipart/form-data`.", + "description": "Authentication token. Requires scope: `users.profile:write`", "in": "formData", - "name": "image", + "name": "token", + "required": true, "type": "string" }, { "description": "Width/height of crop box (always square)", "in": "formData", "name": "crop_w", - "type": "integer" + "type": "string" }, { - "description": "Authentication token. Requires scope: `users.profile:write`", + "description": "X coordinate of top-left corner of crop box", "in": "formData", - "name": "token", + "name": "crop_x", "type": "string" }, { "description": "Y coordinate of top-left corner of crop box", "in": "formData", "name": "crop_y", - "type": "integer" + "type": "string" }, { - "description": "X coordinate of top-left corner of crop box", + "description": "File contents via `multipart/form-data`.", "in": "formData", - "name": "crop_x", - "type": "integer" + "name": "image", + "type": "string" } ], "produces": [ @@ -24772,6 +22603,10 @@ "additionalProperties": false, "description": "Schema for error response from users.setPhoto method", "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, "debug_step": { "description": "possibly DEV/QA only", "type": "string" @@ -24810,17 +22645,211 @@ }, "ok": { "$ref": "#/definitions/defs_ok_false" - }, - "time_ident": { - "description": "possibly DEV/QA only", - "type": "integer" + }, + "time_ident": { + "description": "possibly DEV/QA only", + "type": "integer" + } + }, + "required": [ + "ok", + "error" + ], + "title": "users.setPhoto error schema", + "type": "object" + } + } + }, + "security": [ + { + "slackAuth": [ + "users.profile:write" + ] + } + ], + "tags": [ + "users" + ] + } + }, + "/users.setPresence": { + "post": { + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ], + "description": "Manually sets user presence.", + "externalDocs": { + "description": "API method documentation", + "url": "https://api.slack.com/methods/users.setPresence" + }, + "operationId": "users_setPresence", + "parameters": [ + { + "description": "Authentication token. Requires scope: `users:write`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "Either `auto` or `away`", + "in": "formData", + "name": "presence", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response", + "schema": { + "additionalProperties": false, + "description": "Schema for successful response from users.setPresence method", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok" + ], + "title": "users.setPresence schema", + "type": "object" + } + }, + "default": { + "description": "Typical error response", + "schema": { + "additionalProperties": false, + "description": "Schema for error response from users.setPresence method", + "properties": { + "callstack": { + "description": "Note: PHP callstack is only visible in dev/qa", + "type": "string" + }, + "error": { + "enum": [ + "invalid_presence", + "not_authed", + "invalid_auth", + "account_inactive", + "token_revoked", + "no_permission", + "org_login_required", + "invalid_arg_name", + "invalid_array_arg", + "invalid_charset", + "invalid_form_data", + "invalid_post_type", + "missing_post_type", + "team_added_to_org", + "invalid_json", + "json_not_object", + "request_timeout", + "upgrade_required", + "fatal_error" + ], + "type": "string" + }, + "ok": { + "$ref": "#/definitions/defs_ok_false" + } + }, + "required": [ + "ok", + "error" + ], + "title": "users.setPresence error schema", + "type": "object" + } + } + }, + "security": [ + { + "slackAuth": [ + "users:write" + ] + } + ], + "tags": [ + "users" + ] + } + }, + "/views.open": { + "get": { + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ], + "description": "Open a view for a user.", + "externalDocs": { + "description": "API method documentation", + "url": "https://api.slack.com/methods/views.open" + }, + "operationId": "views_open", + "parameters": [ + { + "description": "Authentication token. Requires scope: `none`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "Exchange a trigger to post to the user.", + "in": "query", + "name": "trigger_id", + "required": true, + "type": "string" + }, + { + "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "in": "query", + "name": "view", + "required": true, + "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response includes the opened view payload.", + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok" + ], + "title": "Default success template", + "type": "object" + } + }, + "default": { + "description": "Typical error response, before getting to any possible validation errors.", + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "users.setPhoto error schema", + "title": "Default error template", "type": "object" } } @@ -24828,41 +22857,54 @@ "security": [ { "slackAuth": [ - "users.profile:write" + "none" ] } ], "tags": [ - "users" + "views" ] } }, - "/users.setPresence": { - "post": { + "/views.publish": { + "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Manually sets user presence.", + "description": "Publish a static view for a User.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/users.setPresence" + "url": "https://api.slack.com/methods/views.publish" }, - "operationId": "users_setPresence", + "operationId": "views_publish", "parameters": [ { - "description": "Authentication token. Requires scope: `users:write`", + "description": "Authentication token. Requires scope: `none`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Either `auto` or `away`", - "in": "formData", - "name": "presence", + "description": "`id` of the user you want publish a view to.", + "in": "query", + "name": "user_id", + "required": true, + "type": "string" + }, + { + "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "in": "query", + "name": "view", "required": true, "type": "string" + }, + { + "description": "A string that represents view state to protect against possible race conditions.", + "in": "query", + "name": "hash", + "type": "string" } ], "produces": [ @@ -24870,10 +22912,10 @@ ], "responses": { "200": { - "description": "Typical success response", + "description": "Typical success response includes the published view payload.", "schema": { - "additionalProperties": false, - "description": "Schema for successful response from users.setPresence method", + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", "properties": { "ok": { "$ref": "#/definitions/defs_ok_true" @@ -24882,49 +22924,24 @@ "required": [ "ok" ], - "title": "users.setPresence schema", + "title": "Default success template", "type": "object" } }, "default": { - "description": "Typical error response", + "description": "Typical error response, before getting to any possible validation errors.", "schema": { - "additionalProperties": false, - "description": "Schema for error response from users.setPresence method", + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", "properties": { - "error": { - "enum": [ - "invalid_presence", - "not_authed", - "invalid_auth", - "account_inactive", - "token_revoked", - "no_permission", - "org_login_required", - "invalid_arg_name", - "invalid_array_arg", - "invalid_charset", - "invalid_form_data", - "invalid_post_type", - "missing_post_type", - "team_added_to_org", - "invalid_json", - "json_not_object", - "request_timeout", - "upgrade_required", - "fatal_error" - ], - "type": "string" - }, "ok": { "$ref": "#/definitions/defs_ok_false" } }, "required": [ - "ok", - "error" + "ok" ], - "title": "users.setPresence error schema", + "title": "Default error template", "type": "object" } } @@ -24932,27 +22949,27 @@ "security": [ { "slackAuth": [ - "users:write" + "none" ] } ], "tags": [ - "users" + "views" ] } }, - "/views.open": { + "/views.push": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Open a view for a user.", + "description": "Push a view onto the stack of a root view.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/views.open" + "url": "https://api.slack.com/methods/views.push" }, - "operationId": "views_open", + "operationId": "views_push", "parameters": [ { "description": "Authentication token. Requires scope: `none`", @@ -24981,7 +22998,7 @@ ], "responses": { "200": { - "description": "Typical success response includes the opened view payload.", + "description": "Typical success response includes the pushed view payload.", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", @@ -24998,7 +23015,7 @@ } }, "default": { - "description": "Typical error response, before getting to any possible validation errors.", + "description": "Typical error response.", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", @@ -25027,44 +23044,133 @@ ] } }, - "/views.publish": { + "/views.update": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Publish a static view for a User.", + "description": "Update an existing view.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/views.publish" + "url": "https://api.slack.com/methods/views.update" }, - "operationId": "views_publish", + "operationId": "views_update", "parameters": [ + { + "description": "Authentication token. Requires scope: `none`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "A unique identifier of the view to be updated. Either `view_id` or `external_id` is required.", + "in": "query", + "name": "view_id", + "type": "string" + }, + { + "description": "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.", + "in": "query", + "name": "external_id", + "type": "string" + }, + { + "description": "A [view object](/reference/surfaces/views). This must be a JSON-encoded string.", + "in": "query", + "name": "view", + "type": "string" + }, { "description": "A string that represents view state to protect against possible race conditions.", "in": "query", "name": "hash", "type": "string" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Typical success response includes the updated view payload.", + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_true" + } + }, + "required": [ + "ok" + ], + "title": "Default success template", + "type": "object" + } }, + "default": { + "description": "Typical error response.", + "schema": { + "additionalProperties": true, + "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", + "properties": { + "ok": { + "$ref": "#/definitions/defs_ok_false" + } + }, + "required": [ + "ok" + ], + "title": "Default error template", + "type": "object" + } + } + }, + "security": [ { - "description": "Authentication token. Requires scope: `none`", + "slackAuth": [ + "none" + ] + } + ], + "tags": [ + "views" + ] + } + }, + "/workflows.stepCompleted": { + "get": { + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ], + "description": "Indicate that an app's step in a workflow completed execution.", + "externalDocs": { + "description": "API method documentation", + "url": "https://api.slack.com/methods/workflows.stepCompleted" + }, + "operationId": "workflows_stepCompleted", + "parameters": [ + { + "description": "Authentication token. Requires scope: `workflow.steps:execute`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "`id` of the user you want publish a view to.", + "description": "Context identifier that maps to the correct workflow step execution.", "in": "query", - "name": "user_id", + "name": "workflow_step_execute_id", "required": true, "type": "string" }, { - "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "description": "Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workflows/workflow_step#output) array from your `workflow_step` object.", "in": "query", - "name": "view", - "required": true, + "name": "outputs", "type": "string" } ], @@ -25073,7 +23179,7 @@ ], "responses": { "200": { - "description": "Typical success response includes the published view payload.", + "description": "Typical success response", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", @@ -25090,7 +23196,7 @@ } }, "default": { - "description": "Typical error response, before getting to any possible validation errors.", + "description": "Typical error response", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", @@ -25110,46 +23216,46 @@ "security": [ { "slackAuth": [ - "none" + "workflow.steps:execute" ] } ], "tags": [ - "views" + "workflows" ] } }, - "/views.push": { + "/workflows.stepFailed": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Push a view onto the stack of a root view.", + "description": "Indicate that an app's step in a workflow failed to execute.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/views.push" + "url": "https://api.slack.com/methods/workflows.stepFailed" }, - "operationId": "views_push", + "operationId": "workflows_stepFailed", "parameters": [ { - "description": "Authentication token. Requires scope: `none`", + "description": "Authentication token. Requires scope: `workflow.steps:execute`", "in": "header", "name": "token", "required": true, "type": "string" }, { - "description": "Exchange a trigger to post to the user.", + "description": "Context identifier that maps to the correct workflow step execution.", "in": "query", - "name": "trigger_id", + "name": "workflow_step_execute_id", "required": true, "type": "string" }, { - "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.", + "description": "A JSON-based object with a `message` property that should contain a human readable error message.", "in": "query", - "name": "view", + "name": "error", "required": true, "type": "string" } @@ -25159,7 +23265,7 @@ ], "responses": { "200": { - "description": "Typical success response includes the pushed view payload.", + "description": "Typical success response", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", @@ -25176,7 +23282,7 @@ } }, "default": { - "description": "Typical error response.", + "description": "Typical error response", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", @@ -25196,57 +23302,64 @@ "security": [ { "slackAuth": [ - "none" + "workflow.steps:execute" ] } ], "tags": [ - "views" + "workflows" ] } }, - "/views.update": { + "/workflows.updateStep": { "get": { "consumes": [ "application/x-www-form-urlencoded", "application/json" ], - "description": "Update an existing view.", + "description": "Update the configuration for a workflow extension step.", "externalDocs": { "description": "API method documentation", - "url": "https://api.slack.com/methods/views.update" + "url": "https://api.slack.com/methods/workflows.updateStep" }, - "operationId": "views_update", + "operationId": "workflows_updateStep", "parameters": [ { - "description": "A string that represents view state to protect against possible race conditions.", + "description": "Authentication token. Requires scope: `workflow.steps:execute`", + "in": "header", + "name": "token", + "required": true, + "type": "string" + }, + { + "description": "A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`.", "in": "query", - "name": "hash", + "name": "workflow_step_edit_id", + "required": true, "type": "string" }, { - "description": "A unique identifier of the view to be updated. Either `view_id` or `external_id` is required.", + "description": "A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. **Please note**: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. [Read more about variables in workflow steps here](/workflows/steps#variables).", "in": "query", - "name": "view_id", + "name": "inputs", "type": "string" }, { - "description": "Authentication token. Requires scope: `none`", - "in": "header", - "name": "token", - "required": true, + "description": "An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.", + "in": "query", + "name": "outputs", "type": "string" }, { - "description": "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.", + "description": "An optional field that can be used to override the step name that is shown in the Workflow Builder.", "in": "query", - "name": "external_id", + "name": "step_name", "type": "string" }, { - "description": "A [view payload](/reference/surfaces/views) This must be a JSON-encoded string.", + "description": "An optional field that can be used to override app image that is shown in the Workflow Builder.", "in": "query", - "name": "view", + "name": "step_image_url", "type": "string" } ], @@ -25255,7 +23368,7 @@ ], "responses": { "200": { - "description": "Typical success response includes the updated view payload.", + "description": "Typical success response", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.", @@ -25272,7 +23385,7 @@ } }, "default": { - "description": "Typical error response.", + "description": "Typical error response", "schema": { "additionalProperties": true, "description": "This method either only returns a brief _not OK_ response or a verbose schema is not available for this method.", @@ -25292,12 +23405,12 @@ "security": [ { "slackAuth": [ - "none" + "workflow.steps:execute" ] } ], "tags": [ - "views" + "workflows" ] } } @@ -25313,20 +23426,27 @@ "admin": "admin", "admin.apps:read": "admin.apps:read", "admin.apps:write": "admin.apps:write", + "admin.conversations:read": "admin.conversations:read", "admin.conversations:write": "admin.conversations:write", "admin.invites:read": "admin.invites:read", "admin.invites:write": "admin.invites:write", "admin.teams:read": "admin.teams:read", "admin.teams:write": "admin.teams:write", + "admin.usergroups:read": "admin.usergroups:read", + "admin.usergroups:write": "admin.usergroups:write", "admin.users:read": "admin.users:read", "admin.users:write": "admin.users:write", + "authorizations:read": "authorizations:read", "bot": "Bot user scope", + "calls:read": "calls:read", + "calls:write": "calls:write", "channels:history": "channels:history", + "channels:manage": "channels:manage", "channels:read": "channels:read", "channels:write": "channels:write", "chat:write": "chat:write", "chat:write:bot": "Author messages as a bot", - "chat:write:user": "chat:write:user", + "chat:write:user": "Author messages as a user", "conversations:history": "conversations:history", "conversations:read": "conversations:read", "conversations:write": "conversations:write", @@ -25368,7 +23488,8 @@ "users.profile:write": "users.profile:write", "users:read": "users:read", "users:read.email": "users:read.email", - "users:write": "users:write" + "users:write": "users:write", + "workflow.steps:execute": "workflow.steps:execute" }, "tokenUrl": "https://slack.com/api/oauth.access", "type": "oauth2"