### Install Slack CLI Source: https://docs.slack.dev/reference/methods/admin.inviterequests.approved.list Installs the Slack command-line tool for developing Slack apps. ```bash curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash ``` -------------------------------- ### Example Title for Canvas Source: https://docs.slack.dev/reference/methods/conversations.canvases.create Example of a title for a newly created channel canvas. ```string The Coolest Title Ever ``` -------------------------------- ### Example User IDs Source: https://docs.slack.dev/reference/methods/admin.functions.permissions.set An example array of user IDs to specify for 'named_entities' visibility. ```json ["U00000001", "U00000002", "U00000003"] ``` -------------------------------- ### API Response Example Source: https://docs.slack.dev/reference/methods/admin.inviteRequests.list This is an example of a successful response when listing invite requests. ```json { "ok": true, "invite_requests": [ { "id": "Ir558ULC1J", "email": "foobar@example.com", "date_created":1619700970, "requester_ids": [ "U558ULC10" ], "channel_ids": [ "C558ULC19", "C558ULC0W" ], "invite_type": "full_member", "real_name":null, "date_expire":null, "request_reason":null } ], "response_metadata": { "next_cursor": "ZGF0ZV9jcmVhdGU6MTYxOTcwMDk3MA==" } } ``` -------------------------------- ### JSON POST Body Example Source: https://docs.slack.dev/reference/methods/usergroups.users.update Example of how to format the 'users' argument as a JSON array in a POST body. ```json "users": [ "U0130R122E8", "U0133AHT0M8" ] ``` -------------------------------- ### Function Execution Payload Example Source: https://docs.slack.dev/reference/methods/admin.apps.activities.list Example of the payload structure for a 'function_execution_started' event type. ```json "payload": { "function_name": "Reverse", "function_type": "app" } ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/team.integrationlogs Example of how to make an HTTP GET request to the team.integrationLogs API endpoint. ```http GET https://slack.com/api/team.integrationLogs ``` -------------------------------- ### Example Output Object Source: https://docs.slack.dev/reference/methods/functions.completesuccess An example of the output object that conforms to the defined output parameters schema. This object should be passed to the functions.completeSuccess method. ```json { "customer_id": "U0BPQUNTA" } ``` -------------------------------- ### Slack CLI Example Source: https://docs.slack.dev/reference/methods/oauth.v2.exchange How to use the Slack CLI to exchange a legacy token. ```bash slack api oauth.v2.exchange ``` -------------------------------- ### API Response Example Source: https://docs.slack.dev/reference/methods/admin.inviteRequests.denied.list This is an example of a successful response when listing denied invite requests. It includes details about each request and who denied it. ```json { "ok": true, "denied_requests": [ { "invite_request": { "id": "Ir0P0Z6SKD", "email": "example1@slack-corp.com", "date_created": 1569863763, "requester_ids": [ "W0GBAEJKD" ], "channel_ids": [ "C0GU730DQ", "C0U9WES0Y" ], "is_restricted": false, "is_ultra_restricted": false, "real_name": "Example", "date_expire": null, "request_reason": null }, "denied_by": { "actor_type": "app", "actor_id": "A00" } }, { "invite_request": { "id": "Ir0GL738RY", "email": "example2@slack-corp.com", "date_created": 1564016487, "requester_ids": [ "W0GAAFJKD" ], "channel_ids": [ "G06LHQYCS", "G0BMCEY2W", "C0GLJ30DQ", "C0U9RQS0Y" ], "is_restricted": false, "is_ultra_restricted": false, "real_name": "seesijkdswsss", "date_expire": null, "request_reason": null }, "denied_by": { "actor_type": "user", "actor_id": "W0GAAUJKD" } } ], "response_metadata": { "next_cursor": "ZGF0ZV9jcmVhdGU6MTU2MTc0Nzc2Ng==" } } ``` -------------------------------- ### URL-encoded POST Body Example Source: https://docs.slack.dev/reference/methods/usergroups.users.update Example of how to format the 'users' argument as a URL-encoded string in a POST body. ```text users=U0130R122E8%2C%20U0133AHT0M8 ``` -------------------------------- ### Slack CLI Usage Source: https://docs.slack.dev/reference/methods/team.integrationlogs Example of how to use the team.integrationLogs method with the Slack CLI. ```bash slack api team.integrationLogs ``` -------------------------------- ### Metadata Object Example Source: https://docs.slack.dev/reference/methods/entity.presentDetails An example of the structure for the metadata object, used to provide flexpane information for Work Objects. ```json { "entity_type": "slack#/entities/file", "url": "https://miro.com/app/board/XYZ=/", "external_ref": { "id": "XYZ=" }, "entity_payload": { "attributes": { "title": { "text": "GTM Project Capybara" }, "display_type": "Miro Board", "product_name": "Miro" }, "fields": { "created_by": { "value": "Platform Integrations", "type": "string" }, "preview": { "alt_text": "Miro Board image", "image_url": "https://miro.com/app/images/application/icons/XYZ/540x540/board_icon_5.png?etag=XYZ" }, "last_modified_by": { "value": "Platform Integrations", "type": "string" }, "date_created": { "value": 1742923321 }, "date_updated": { "value": 1742923333 }, "file_size": { "value": "NA" }, "mime_type": { "value": "Miro" } }, "display_order": ["created_by", "last_modified_by", "date_created", "date_updated", "file_size", "mime_type", "preview"] } } ``` -------------------------------- ### admin.apps.approve Source: https://docs.slack.dev/reference/methods?family=admin Approve an app for installation on a workspace. ```APIDOC ## admin.apps.approve ### Description Approve an app for installation on a workspace. ### Method POST (Assumed) ### Endpoint /admin.apps.approve ### Parameters #### Request Body - **app_id** (string) - Required - The ID of the app to approve. - **team_id** (string) - Required - The ID of the workspace to approve the app for. ### Response #### Success Response (200) - **approved** (boolean) - Indicates if the app was successfully approved. ``` -------------------------------- ### HTTP GET Request for rtm.start Source: https://docs.slack.dev/reference/methods/rtm.start This is the basic HTTP GET request format to call the rtm.start API method. ```http GET https://slack.com/api/rtm.start ``` -------------------------------- ### Example Request Body Source: https://docs.slack.dev/reference/methods/workflows.featured.list An example JSON payload for the workflows.featured.list API request, specifying channel IDs. ```json { "channel_ids": [ "C012345678", "C987654321" ] } ``` -------------------------------- ### Sample Request Data Source: https://docs.slack.dev/reference/methods/slackLists.download.get Provides an example of the data structure for a request to the slackLists.download.get method. ```json { "token": "***", "list_id": "F1234567", "job_id": "LeF1234567"} ``` -------------------------------- ### JavaScript Client (WebClient) Source: https://docs.slack.dev/reference/methods/team.integrationlogs Example of calling the team.integrationLogs method using the WebClient in JavaScript. ```javascript app.client.team.integrationLogs ``` -------------------------------- ### Slack CLI Usage Source: https://docs.slack.dev/reference/methods/files.sharedpublicurl Example of how to use the `files.sharedPublicURL` method via the Slack CLI. ```bash slack api files.sharedPublicURL ``` -------------------------------- ### Bolt for Java Example Source: https://docs.slack.dev/reference/methods/oauth.v2.exchange Using Bolt for Java to exchange a legacy token. ```java app.client().oauthV2Exchange ``` -------------------------------- ### Create New Slack Project Source: https://docs.slack.dev/reference/methods/admin.inviterequests.approved.list Sets up a new Bolt project from a starter template using the Slack CLI. ```bash slack create ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/admin.conversations.restrictaccess.addgroup Example of how to make an HTTP GET request to the admin.conversations.restrictAccess.addGroup API endpoint. ```http GET https://slack.com/api/admin.conversations.restrictAccess.addGroup ``` -------------------------------- ### Bolt for Python Example Source: https://docs.slack.dev/reference/methods/oauth.v2.exchange Using Bolt for Python to exchange a legacy token. ```python app.client.oauth_v2_exchange ``` -------------------------------- ### Response Echoing Arguments with api.test Source: https://docs.slack.dev/reference/methods/api.test An example response from api.test when arguments are passed, such as foo=bar. ```json { "ok": true, "args": { "foo": "bar" }} ``` -------------------------------- ### Slack CLI Command for rtm.start Source: https://docs.slack.dev/reference/methods/rtm.start This command demonstrates how to invoke the rtm.start method using the Slack Command Line Interface. ```bash slack api rtm.start ``` -------------------------------- ### Slack CLI Usage Source: https://docs.slack.dev/reference/methods/admin.conversations.restrictaccess.addgroup Example of how to use the admin.conversations.restrictAccess.addGroup method via the Slack CLI. ```bash slack api admin.conversations.restrictAccess.addGroup ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/migration.exchange The basic HTTP GET endpoint for the migration.exchange method. ```http GET https://slack.com/api/migration.exchange ``` -------------------------------- ### slackLists.download.start Source: https://docs.slack.dev/reference/methods?family=lists Initiates a job to export List contents. ```APIDOC ## slackLists.download.start ### Description Initiate a job to export List contents. ### Method POST (Assumed, as it starts a process) ### Endpoint /lists.download.start (Assumed) ### Parameters #### Request Body - **list_id** (string) - Required - The ID of the list to export. ### Response #### Success Response (200) - **job_id** (string) - The ID of the initiated export job. - **ok** (boolean) - Indicates if the operation was successful. #### Response Example { "job_id": "JOB789XYZ", "ok": true } ``` -------------------------------- ### Slack CLI for reactions.get Source: https://docs.slack.dev/reference/methods/reactions.get Use the Slack CLI to call the reactions.get method. ```bash slack api reactions.get ``` -------------------------------- ### Slack CLI Usage Source: https://docs.slack.dev/reference/methods/apps.connections.open How to call the apps.connections.open method using the Slack CLI. ```bash slack api apps.connections.open ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/emoji.list The basic HTTP GET request to the emoji.list API endpoint. ```http GET https://slack.com/api/emoji.list ``` -------------------------------- ### HTTP GET Request for admin.analytics.getFile Source: https://docs.slack.dev/reference/methods/admin.analytics.getfile This is the base HTTP GET endpoint for the `admin.analytics.getFile` method. ```http GET https://slack.com/api/admin.analytics.getFile ``` -------------------------------- ### Slack CLI for slackLists.download.get Source: https://docs.slack.dev/reference/methods/slacklists.download.get This is the command-line interface command for the `slackLists.download.get` method. It's useful for scripting and automation. ```bash slack api slackLists.download.get ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/admin.apps.requests.list The base URL for making GET requests to the admin.apps.requests.list method. ```http GET https://slack.com/api/admin.apps.requests.list ``` -------------------------------- ### JavaScript Client for slackLists.download.get Source: https://docs.slack.dev/reference/methods/slacklists.download.get This is how you call the `slackLists.download.get` method using the Slack JavaScript client. Ensure the client is properly initialized. ```javascript app.client.slackLists.download.get ``` -------------------------------- ### Slack CLI for assistant.search.info Source: https://docs.slack.dev/reference/methods/assistant.search.info Execute the assistant.search.info method using the Slack Command Line Interface. ```bash slack api assistant.search.info ``` -------------------------------- ### Error Response Example Source: https://docs.slack.dev/reference/methods/migration.exchange An example of an error response when the migration.exchange method is called on a non-enterprise team. ```json { "ok": false, "error": "not_enterprise_team" } ``` -------------------------------- ### Example Markdown Document Content Source: https://docs.slack.dev/reference/methods/conversations.canvases.create Example of document content using markdown for a channel canvas. ```json {"type": "markdown", "markdown": "> channel canvas!"} ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/team.profile.get The base URL for making a GET request to the team.profile.get API method. ```http GET https://slack.com/api/team.profile.get ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/admin.teams.admins.list The base URL for making a GET request to the admin.teams.admins.list API endpoint. ```http GET https://slack.com/api/admin.teams.admins.list ``` -------------------------------- ### Slack CLI for pins.list Source: https://docs.slack.dev/reference/methods/pins.list Use the Slack CLI to list items pinned to a channel. ```bash slack api pins.list ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/admin.barriers.list The basic HTTP GET request to retrieve all information barriers for an organization. ```http GET https://slack.com/api/admin.barriers.list ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/admin.conversations.restrictAccess.addGroup The base URL for making a GET request to the admin.conversations.restrictAccess.addGroup API endpoint. ```http GET https://slack.com/api/admin.conversations.restrictAccess.addGroup ``` -------------------------------- ### Slack CLI Source: https://docs.slack.dev/reference/methods/admin.apps.approved.list Execute the admin.apps.approved.list method using the Slack CLI. ```bash slack api admin.apps.approved.list ``` -------------------------------- ### slackLists.create Source: https://docs.slack.dev/reference/methods?family=lists Creates a new List. ```APIDOC ## slackLists.create ### Description Create a List. ### Method POST (Assumed, as it creates a resource) ### Endpoint /lists.create (Assumed) ### Parameters #### Request Body - **name** (string) - Required - The name of the list. - **description** (string) - Optional - A description for the list. ### Response #### Success Response (200) - **list_id** (string) - The ID of the newly created list. - **ok** (boolean) - Indicates if the operation was successful. #### Response Example { "list_id": "L12345ABC", "ok": true } ``` -------------------------------- ### HTTP GET Request for team.externalTeams.list Source: https://docs.slack.dev/reference/methods/team.externalTeams.list This is the base HTTP GET request format for the team.externalTeams.list API method. ```http GET https://slack.com/api/team.externalTeams.list ``` -------------------------------- ### HTTP GET Request for reactions.get Source: https://docs.slack.dev/reference/methods/reactions.get This is the base HTTP endpoint for making a GET request to the reactions.get method. ```http GET https://slack.com/api/reactions.get ``` -------------------------------- ### Slack CLI Usage Source: https://docs.slack.dev/reference/methods/apps.activities.list Execute the apps.activities.list method using the Slack Command Line Interface. ```bash slack api apps.activities.list ``` -------------------------------- ### HTTP GET Request for reminders.info Source: https://docs.slack.dev/reference/methods/reminders.info This is the base URL for making a GET request to the reminders.info API endpoint. ```http GET https://slack.com/api/reminders.info ``` -------------------------------- ### Slack CLI Usage Source: https://docs.slack.dev/reference/methods/entity.presentDetails Command to call the entity.presentDetails method using the Slack CLI. ```bash slack api entity.presentDetails ``` -------------------------------- ### Slack CLI Usage Source: https://docs.slack.dev/reference/methods/admin.apps.activities.list How to call the admin.apps.activities.list method using the Slack CLI. ```bash slack api admin.apps.activities.list ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/admin.teams.owners.list Make an HTTP GET request to the admin.teams.owners.list endpoint to retrieve owner IDs. ```http GET https://slack.com/api/admin.teams.owners.list ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/admin.analytics.messages.metadata This is the base URL for making an HTTP GET request to the admin.analytics.messages.metadata API endpoint. ```http GET https://slack.com/api/admin.analytics.messages.metadata ``` -------------------------------- ### Slack CLI Source: https://docs.slack.dev/reference/methods/apps.event.authorizations.list Execute the apps.event.authorizations.list method using the Slack CLI. ```bash slack api apps.event.authorizations.list ``` -------------------------------- ### Successful Negotiation (Multiple Scopes, Bot Token, Incoming Webhook) Source: https://docs.slack.dev/reference/methods/oauth.access Example response for a successful negotiation requesting multiple scopes, a bot user token, and an incoming webhook. ```json { "access_token": "xoxp-XXXXXXXX-XXXXXXXX-XXXXX", "scope": "incoming-webhook,commands,bot", "team_name": "Team Installing Your Hook", "team_id": "TXXXXXXXXX", "enterprise_id": null, "incoming_webhook": { "url": "https://hooks.slack.com/TXXXXX/BXXXXX/XXXXXXXXXX", "channel": "#channel-it-will-post-to", "configuration_url": "https://teamname.slack.com/services/BXXXXX" }, "bot": { "bot_user_id": "UTTTTTTTTTTR", "bot_access_token": "xoxb-XXXXXXXXXXXX-TTTTTTTTTTTTTT" } } ``` -------------------------------- ### Successful User Token Negotiation (Single Scope) Source: https://docs.slack.dev/reference/methods/oauth.access Example response when successfully negotiating a user token for a single scope. ```json { "access_token": "xoxp-XXXXXXXX-XXXXXXXX-XXXXX", "scope": "groups:write", "team_name": "Wyld Stallyns LLC", "team_id": "TXXXXXXXXX", "enterprise_id": null } ``` -------------------------------- ### HTTP GET Request for Search Messages Source: https://docs.slack.dev/reference/methods/search.messages This is the basic HTTP GET request structure for calling the search.messages API method. ```http GET https://slack.com/api/search.messages ``` -------------------------------- ### Typical Error Response for slackLists.download.get Source: https://docs.slack.dev/reference/methods/slacklists.download.get This is an example of an error response from the `slackLists.download.get` method. The `ok` field will be false, and an `error` field will indicate the issue. ```json { "ok": false, "error": "list_not_found" } ``` -------------------------------- ### Bots.info HTTP GET Request Source: https://docs.slack.dev/reference/methods/bots.info This is the basic HTTP GET endpoint for the bots.info method. Ensure your token has the required scopes. ```http GET https://slack.com/api/bots.info ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/admin.apps.approved.list Use this endpoint to list approved apps for an organization or workspace via an HTTP GET request. ```http GET https://slack.com/api/admin.apps.approved.list ``` -------------------------------- ### Successful Response Example Source: https://docs.slack.dev/reference/methods/functions.distributions.permissions.set A successful API call returns 'ok: true' along with the permission type and granted users. ```json { "ok": true, "permission_type": "app_collaborators", "users": [ { "user_id": "U01565LTEBD", "username": "joe_smith", "email": "joesmith@salesforce.com" } ] } ``` -------------------------------- ### Example: Renaming a Canvas Source: https://docs.slack.dev/reference/methods/canvases.edit This example demonstrates how to rename a canvas using the 'rename' operation and 'title_content'. The 'rename' operation does not require a 'section_id'. ```json { "canvas_id": "F1234ABCD", "changes": [ { "operation": "rename", "title_content": { "type": "markdown", "markdown": "Project Status :white_check_mark:" } } ] } ``` -------------------------------- ### HTTP GET Request for admin.emoji.addAlias Source: https://docs.slack.dev/reference/methods/admin.emoji.addalias This snippet shows the base URL for making an HTTP GET request to the admin.emoji.addAlias API endpoint. ```http GET https://slack.com/api/admin.emoji.addAlias ``` -------------------------------- ### Slack CLI Command for dialog.open Source: https://docs.slack.dev/reference/methods/dialog.open Use the Slack CLI to open a dialog. Ensure you have the Slack CLI installed and configured. ```bash slack api dialog.open ``` -------------------------------- ### Slack CLI Usage Source: https://docs.slack.dev/reference/methods/functions.workflows.steps.list How to call the `functions.workflows.steps.list` method using the Slack CLI. ```bash slack api functions.workflows.steps.list ``` -------------------------------- ### HTTP GET Request Source: https://docs.slack.dev/reference/methods/admin.apps.restricted.list This is the basic HTTP GET request to list restricted apps. Ensure your token is included in the Authorization header. ```http GET https://slack.com/api/admin.apps.restricted.list ``` -------------------------------- ### Example JSON Payload for Blocks Validation Source: https://docs.slack.dev/reference/methods/blocks.validate This example demonstrates the structure of a JSON payload containing a simple 'section' block for validation. Ensure the payload is correctly JSON-encoded. ```json [ { "type": "section", "text": { "type": "plain_text", "text": "Hello world" } } ] ``` -------------------------------- ### Slack CLI Usage Source: https://docs.slack.dev/reference/methods/team.preferences.list Execute the team.preferences.list method using the Slack CLI. ```bash slack api team.preferences.list ``` -------------------------------- ### Slack CLI for admin.apps.config.lookup Source: https://docs.slack.dev/reference/methods/admin.apps.config.lookup Use this command in the Slack CLI to look up app configurations. ```bash slack api admin.apps.config.lookup ``` -------------------------------- ### Member Analytics Response Example Source: https://docs.slack.dev/reference/methods/admin.analytics.getfile Example lines of JSON data found in a decompressed member analytics file. Each line represents a different user with various activity metrics. ```json {"enterprise_id":"E5UBAR8CH","date":"2020-10-05","user_id":"W0POSID23ID","email_address":"rbrautigan@example.org","is_guest":false,"is_billable_seat":false,"is_active":false,"is_active_ios":false,"is_active_android":false,"is_active_desktop":false,"reactions_added_count":0,"messages_posted_count":0,"channel_messages_posted_count":0,"files_added_count":0,"is_active_apps":true,"is_active_workflows":true,"is_active_slack_connect":true,"total_calls_count":15,"slack_calls_count":12,"slack_huddles_count":3,"search_count":223,"date_claimed":1584810430} ``` ```json {"enterprise_id":"E5UBAR8CH","date":"2020-10-05","user_id":"W1ZOSID3ZI2","email_address":"gstein@example.org","is_guest":false,"is_billable_seat":true,"is_active":true,"is_active_ios":false,"is_active_android":false,"is_active_desktop":true,"reactions_added_count":23,"messages_posted_count":123,"channel_messages_posted_count":23,"files_added_count":3,"is_active_apps":false,"is_active_workflows":true,"is_active_slack_connect":false,"total_calls_count":10,"slack_calls_count":4,"slack_huddles_count":5,"search_count":1001,"date_claimed":1584810520} ``` ```json {"enterprise_id":"E5UBAR8CH","date":"2020-10-05","user_id":"W3DOSZD23IP","email_address":"obutler@example.org","is_guest":false,"is_billable_seat":true,"is_active":true,"is_active_ios":true,"is_active_android":false,"is_active_desktop":false,"reactions_added_count":521,"messages_posted_count":5,"channel_messages_posted_count":5,"files_added_count":0,"is_active_apps":true,"is_active_workflows":true,"is_active_slack_connect":false,"total_calls_count":3,"slack_calls_count":3,"slack_huddles_count":0,"search_count":32,"date_claimed":1584810510} ``` -------------------------------- ### Example JSON Payload for Message Validation Source: https://docs.slack.dev/reference/methods/blocks.validate This example shows a JSON payload for validating a complete message, including its 'blocks' array. Provide only one of `blocks`, `view`, or `message` in your request. ```json { "blocks": [ { "type": "section", "text": { "type": "plain_text", "text": "Hello world" } } ] } ``` -------------------------------- ### Slack CLI Command for developer.apps.owners.list Source: https://docs.slack.dev/reference/methods/developer.apps.owners.list Execute the developer.apps.owners.list method using the Slack CLI. ```bash slack api developer.apps.owners.list ``` -------------------------------- ### Update Start Date via Custom Field ID Source: https://docs.slack.dev/reference/methods/users.profile.set Alternatively, update the start date by providing the custom field ID obtained from 'team.profile.get'. This method also updates the 'start_date' field. ```json { "profile": { "fields": { "Xf0123ABC456": { "value": "2022-10-22" } }, "user": "U123ABC456" } ``` -------------------------------- ### Example JSON Payload for View Validation Source: https://docs.slack.dev/reference/methods/blocks.validate This example illustrates a JSON payload for validating a modal view. The payload includes the view type and its blocks. Remember to provide only one of `blocks`, `view`, or `message`. ```json { "type": "modal", "title": { "type": "plain_text", "text": "My Modal" }, "blocks": [ { "type": "section", "text": { "type": "plain_text", "text": "Hello" } } ] } ```