Skip to content

Instantly share code, notes, and snippets.

@renatorib
Last active October 13, 2023 17:17
Show Gist options
  • Save renatorib/1fb1a9bd71435b41bee602d15bc56899 to your computer and use it in GitHub Desktop.
Save renatorib/1fb1a9bd71435b41bee602d15bc56899 to your computer and use it in GitHub Desktop.
Slack Block Kit Json Schema

Slack Block Kit Json Schema

Open schema raw file

Schema extracted from https://a.slack-edge.com/bv1-6-8cacda2/block-kit-builder.93ca53691de7cf9d4417.min.js
Probably the url/bundle will change every deploy so you might want to go https://api.slack.com/tools/block-kit-builder, open devtools and search for that file (block-kit-builder) in source tab. Pass some unminify tool and search for "JSON Schema".

PS1: Some block/element types simply does not work, idk why.
PS2: If you want to explore easily, copy the code and paste to the devtools console.


json schema by @lawrencegripper

@lawrencegripper
Copy link

TLDR: With some manual effort and the typescript type information I generated the schema. Here it is for others to use.. Note: It validates an array of blocks for input.

 [
    {
	    "type": "header",
	    "text": {
		    "type": "plain_text",
		    "text": "Pipeline Deployment of Heaven Started 🧵 👇",
		    "emoji": true
	    }
		}
]

Full details here: slackapi/slack-api-specs#18 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment