/slack-api-specs

Open API specifications for platform products by Slack

MIT LicenseMIT

slack-api-specs

This repository contains API specifications of Slack platform features and APIs.

You'll find OpenAPI specs for the Slack Web API and AsyncAPI specs for the Events API.

Read more about our open specification strategy in this announcement.

Specification menu

We continue to refine and expand schema and example coverage throughout all of our specifications.

How the specs are made

We use a combination of internal metadata, custom scripting, and old fashioned writing-by-hand to produce these specifications. They don't always tell the whole truth and are subject to author and operator error. They are really useful though.

Pull requests

Because our specifications are artifacts of an incredible machine, we cannot accept pull requests for this repo. Please file issues with suggestions or bugs with the spec itself. Feedback about the APIs or features the specs describe should be directed to Slack's developer support team.

Recent changes

Now we'll recount the major changes found in each new release of our specifications.

Using with external tools

Postman

It's possible to use slack_web_openapi_v2.json to generate a Postman Collection, but you must first modify the spec to be technically and factually invalid unfortunately.

Add a top-level "openapi": "3.0" attribute near where "swagger": "2.0" is defined. While openapi isn't a valid attribute for OpenAPI 2.0 schemas, and if it were, the version should be 2.0. Being wrong this way instructs Postman to do continue importing as a collection.

Postman doesn't pick up the defined hostname and path https://slack.com/api that precedes all Web API methods (for example, https://slack.com/api/chat.postMessage) as the {{baseUrl}} variable for the collection.

Populate {{baseUrl}} by first hovering over your collection in the navigation bar click on the action menu that appears. Then, select "Edit". A modal will appear. Click into the rightmost section, Variables which should have a green dot next to it. In the Initial Value column next to baseUrl, enter https://slack.com/api and then click Reset All. Once you see that both the initial and current values have been set, click update and your imported collection will properly use "https://slack.com/api" as its base domain.