Build with the API and webhooks
The SoWork API lets your own code work with SoWork. Create an API key to call the API as yourself, add a webhook to hear about events as they happen, or build a custom app that joins your office as a member.
The SoWork API is in beta. If it’s missing something you need, click Request a feature at the top of the SoWork API section to tell the SoWork team.
Before you start
Section titled “Before you start”- You need to be an Admin or a Teammate, on the Premium plan or the trial. Guests can’t use the API.
- To build custom apps, you also need the Install apps permission, which Teammates have by default.
- Use the SoWork desktop app or a browser to open Settings.
Create an API key
Section titled “Create an API key”An API key lets your code use the SoWork API as you. Your code can do what you can do in that office, and nothing more.
- Click Settings in the bar on the left side of SoWork, then select SoWork API under App Settings.
- In API Keys, click the + button at the right end of the table header. The Create API key window opens.
- Type a name you’ll recognize, such as “CRM integration”, and click Create.
- Click the copy button next to the key, store it somewhere safe, then click Done.
SoWork shows the full key only this once and can’t show it again. The window also explains how to send the key with your requests. Messages your code sends with a key show an API label.
Add a webhook
Section titled “Add a webhook”A webhook sends a signed request to your URL each time an event you chose happens in SoWork.
- In Webhooks, click the + button at the right end of the table header. The Create Webhook window opens.
- In Payload URL, type your endpoint’s address, starting with https://.
- Select the events you want, then click Create.
- Click the copy button next to the signing secret, store it somewhere safe, then click Done.
Your code uses the signing secret to check that each delivery came from SoWork. The window explains how. Like the API key, the secret is shown only once.
Events about the whole office, such as any meeting starting, are for Admins only. See Webhook events.
Manage your keys and webhooks
Section titled “Manage your keys and webhooks”The API Keys and Webhooks tables show when each one was last used or delivered. Click the button with three dots at the end of a row to Disable or Enable it, Edit a webhook, or Delete it. Deleting can’t be undone, and anything using the key or webhook stops working right away.
Build a custom app
Section titled “Build a custom app”A custom app joins your office as a member, with its own name, picture and, if you like, a character at a desk. It can post in chat, receive events and act with the permissions approved when it’s installed. There are two kinds:
- Office app: one app for the whole office, such as a standup bot. An Admin manages it. Your code gets its credentials when you create it.
- Personal app: each person connects their own agents with it, and each agent gets its own setup token.
To create an office app:
- In Settings, select Agents & Apps under App Settings, then open the Build tab.
- Click New, then select Office app.
- Type a Name and a Handle, each at least 3 characters. Under Look, upload a Profile picture. Under Bot in the office, you can add a robot and pick its color and hat, or make it a human.
- Under Permissions, select what the app may do. Under Events, you can pick the events it receives and a Webhook URL for them.
- Click Create. A window shows the app’s Client ID, Client secret and Webhook signing secret.
- Click Copy All and store the credentials somewhere safe. They’re shown only once.
- Click Install in office, review the app’s permissions, then click Install. The app joins your office. To install it later, click Install later instead.
The Handle identifies the app in the API, and you can’t change it later. Without a Webhook URL, your code reads the app’s events from the API instead.
Build a personal app
Section titled “Build a personal app”Click New and select Personal app. Instead of a webhook URL, fill in Setup instructions, the steps people follow to run their own copy of your agent. Instance name pattern sets each copy’s name, for example “{userName}’s agent”.
Under Who does this app answer?, choose Only its owner if each agent should work only for the person who connected it. Messages, mentions and thread replies from anyone else then don’t reach the agent. You can also choose what other people get instead: Nothing, or This text, a reply of up to 500 characters that SoWork posts as the agent when someone else messages or @mentions it. Write {ownerName} in it for the owner’s name. The reply needs the Post messages permission.
After you create it, everyone in your office who can connect agents finds it under Connect on their Personal tab. See Connect a personal agent.
Change or delete a custom app
Section titled “Change or delete a custom app”Open the app on the Build tab and click Edit app or Delete app. To delete an office app, uninstall it first. You can delete a personal app once no agents are connected with it.
Deleting an app is permanent, and its client ID and secret stop working.
Webhook events
Section titled “Webhook events”Under Any teammate, Admins and Teammates can choose when:
- Your availability or text status changes, or you join or leave a meeting.
- You’re mentioned in a chat message, receive a direct message, or get a reply to a thread you started.
- A message is posted in a channel you’re in.
- Someone rings the gong or posts an announcement in the office.
- A task is assigned to you, or a task you were assigned to is reassigned or unassigned.
- A task you’re on changes, is deleted or is restored, someone comments on it, or you’re mentioned in a task comment.
Under Admins only, Admins can also choose when a teammate’s availability or text status changes, a meeting starts or ends in your office, or any teammate joins or leaves a meeting.
The list also has events for custom apps, such as your app being installed.
Limits and details
Section titled “Limits and details”- SoWork checks your role and your office’s plan on every request. If you stop being an Admin or Teammate, or your plan no longer includes the API, your keys stop working.
- Your code sees and changes only the tasks you could in Tasks. A custom app can’t change tasks on someone’s behalf, even with Act as teammates.
- Guests see the SoWork API section, but creating a key or a webhook fails.
- An Admin, or the Teammate who built it, can install an office app. A Teammate can have up to 5 office apps they built installed at once.
- An app’s profile picture must be a PNG, JPEG, WebP or GIF under 2 MB.
- For permissions, pausing and removing installed apps, see Agents and apps.
If something didn’t work
Section titled “If something didn’t work”- The + buttons are grayed out. Your office’s plan doesn’t include the API. To compare plans, see the pricing page.
- The Build tab says “Custom apps are a Premium feature”. Custom apps need the Premium plan or the trial.
- Your requests are refused. Check that you’re still an Admin or Teammate in the office, and that the key is Active.
- The webhook URL isn’t accepted. It must start with https:// and can’t contain a username or password, or point to a local or private address.
Still stuck? Click Issues or Feedback? Talk to us! at the bottom of the left sidebar to start a conversation with the SoWork team. See Get help.
