API & Webhook
Developer Docs
Slashwork is built on top of a rich GraphQL API. Our mobile native apps and web app are both written on top of the same API that we offer up to users. This means that anything the app can do, you can do via the API.
We're still building out the API documentation with examples and how-to guides. What you'll find here are the basic steps required to get an Application Access Token and get content posted into Slashwork. More coming soon!
Step 1
Create a stream
Slashwork supports API access as yourself or as an application. You can create posts, send chat messages, create groups -- literally every action available in the application.
In many cases you will want to create posts or stream entries as an application rather than as yourself. So, here we walk you through creating a stream with an application that posts content into it.
Step 2
Load the Streams list
A Stream in Slashwork is very similar to a Slack channel. However, Streams are focused on automation messages: server logs, errors, deployments, etc.. You can use a stream to post time series events into Slashwork from other sources.
Click "Create a stream" in the top right of the UI.
Step 3
Create a new stream
A Stream is identical to a Group in terms of data model. The big difference is how it is rendering in Slashwork. Streams have a compact UI designed for high information density.
Give your Stream a name here. In the example, we create a Stream called "Deploys".
Step 4
Create a new application
While you can post into a Group, Chat, or Stream using your personal session token if you like, we find most people want to post automated messaging with a bot or agent. Here, we create an application that will have a name and a profile photo. The messages we created using the Application's access token will appear to have been sent by this Application.
Step 5
Name your application
Give your Application a meaningful name. This name will be shown as the Application's name in the UI alongside any content created using the Application's access token. You can change this later as well as edit the Applications profile photo.
Step 6
Copy your application's access token
Now copy the access token for your new application. Once created, you can never retrieve your access token again. You can however revoke the token and create a new one if you need to do so.
Step 7
Open GraphiQL
On every instance, there is a GraphiQL playground. GraphiQL is a tool created by the GraphQL foundation to make it very easy to build GraphQL queries and mutations.
Our GraphQL API has full introspection built in, which makes it very easy to built integrations. GraphiQL is a helpful UI on top of this API.
Specify your bearer token
GraphiQL allows you to setup the Authorization: Bearer HTTP header so that you can use GraphiQL as your Application.
Side note: You can also use GraphiQL without specifying a bearer token, in which case it will use your session cookie and act as you.
Find the GraphQL Explorer
Built into GraphiQL is a GraphQL Explorer that pulls in all the introspection data from the Slashwork API. It gives you a nice UI for navigating the content of the API, building queries, and reading the inline documentation.
We'll use it to build our first GraphQL mutation for creating a post in a Stream.
Select "Add new Mutation" in the dropdown
GraphiQL gives you the ability to do queries, mutations, or subscriptions. To create a new post, select Add new Mutation.
Select the createPost mutation
In the left panel, scroll to the createPost mutation. GraphiQL will display all of the parameters of the input to this mutation. It also shows the fields on the resulting object that you can return.
Copy the Stream's group ID
To create a post in a specific group, stream, or chat, you'll need the ID. You can find this in the URL of the group, stream or chat. Copying everything from the forward slash to the end.
Paste in the Stream's group ID
In the groupId field of the mutation, paste the ID you selected in the previous step. It might be seem strange that a stream has a group ID. This isn't an accident. In Slashwork, groups, streams, and chats are just different interfaces onto a single core data model. This design choice enables advanced functionality like converting a chat into a group, or vice versa.
Add some content to the Stream post
Slashwork's message format is based on the open source Lexical project (https://lexical.dev/docs/api/). While Lexical is very powerful, it's also quite cumbersome for simple messages. To make developers' lives easier, we offer a markdown field on the createPost mutation as an alternative. You can specify your post content in pure markdown and our backend will convert it to Lexical for display.
Here, the example input markdown is: __Test Message__: All your base are belong to us
NB: This ancient phrase is used by developers to appease the gods of in-jokes and back references. Its meaning has been lost to time.
Note the GraphQL Error
A GraphQL mutation must specify the data it wants to retrieve from the mutation result. It's an error to omit this. So, we'll need to select some fields from the resulting node object in the GraphQL mutation response.
Select the ID field
For demonstration purposes, we'll select the id field on the GraphQL node object. If you're building a complex application on top of our API, you may use the response object to render the result of the mutation ahead of the subscription update.
Press Play to trigger the network request
Press the play button to trigger the GraphiQL interface to make the GraphQL HTTP request. You may need to expand the right side panel of your GraphiQL interface to see the resulting object.
And finally, check out your new Stream post
After all that hard work, you should now see the message posted into your new stream. Welcome home, warrior. Everyone is proud of you.
This is all the documentation we have for the moment. But we strongly encourage you to try Claude Code (or any other LLM of your choosing) to vibe code against our API.
Because your API is built on top of GraphQL with introspection, LLMs are absurdly good at getting what they need from it. While the GraphiQL interface is good for getting a feel for the API, you can do way more and faster with an agent coding for you.