Web API reference
Version 17.0.2
Sample requests
Each of the api endpoints in the reference has one or more sample requests. Authenticating against the Web API is done using Bearer authentication. The request can be either server-to-server or user-to-server.
You can read more about authentication and the Web API here. In the sample requests, this is illustrated as:
-H "Authorization: Bearer {WEAVY_APIKEY}"
Fig 1. Server-to-server
-H "Authorization: Bearer {ACCESS_TOKEN}"
Fig 2. User-to-server
-H "Authorization: Bearer {ACCESS_TOKEN | WEAVY_APIKEY}"
Fig 3. Either user-to-server or server-to-server
Optional properties
In the Request bodies of the requests, some properties are marked with a question mark. This means that the property is optional. For example:
{
"uid": "string",
"type": "string",
"name?": "string",
"tags?": [
"string"
]
}
Fig 4. Request body with name and tags properties as optional.
Apps
The Apps API enables you to manage apps.
Method | Path | Description |
---|---|---|
POST | /api/apps |
Creates a new app. |
GET | /api/apps |
Get a list of apps. |
POST | /api/apps/init |
Initialize an app (get existing or create new) and ensure user is member (if specified). |
GET | /api/apps/{id} |
Get an app by id. |
PATCH | /api/apps/{id} |
Update an app. |
DELETE | /api/apps/{id} |
Delete an app. |
GET | /api/apps/{uid} |
Get an app by uid. |
POST | /api/apps/{id}/subscribe |
Subscribe to notifications for activity in an app. |
POST | /api/apps/{id}/unsubscribe |
Unsubscribe to notifications for activity in an app. |
POST | /api/apps/{id}/trash |
Move an app to the trash. |
POST | /api/apps/{id}/restore |
Restore an app from the trash. |
GET | /api/apps/{id}/members |
List the members of an app. |
POST | /api/apps/{id}/members |
Add multiple app members. |
DELETE | /api/apps/{id}/members |
Remove multiple app members. |
PUT | /api/apps/{id}/members/{userid} |
Add a single app member. |
DELETE | /api/apps/{id}/members/{userid} |
Remove a single app member. |
Blobs
The Blobs API enables the creation and listing of blobs.
Method | Path | Description |
---|---|---|
GET | /api/blobs/{id} |
Get the metadata of a blob. |
POST | /api/blobs |
Uploads a blob using multipart/form-data. After upload the blob can be used as reference when creating attachments and/or files. |
POST | /api/blobs/external |
Creates a cloud blob, i.e. a blob that links to an external blob provider. After creation the blob can be used as reference when creating attachments and/or files. |
Comments
The Comments API supports managing comments.
Method | Path | Description |
---|---|---|
POST | /api/apps/{id}/comments |
Creates a new comment in the specified Comments app. |
GET | /api/apps/{id}/comments |
List comments in the specified Comments app. |
POST | /api/files/{id}/comments |
Creates a new comment on the specified file. |
GET | /api/files/{id}/comments |
List comments on the specified file. |
POST | /api/posts/{id}/comments |
Creates a new comment on the specified post. |
GET | /api/posts/{id}/comments |
List comments on the specified post. |
GET | /api/comments/{id} |
Gets a comment by id. |
PATCH | /api/comments/{id} |
Updates a comment. |
DELETE | /api/comments/{id} |
Delete a comment. |
POST | /api/comments/{id}/trash |
Move a comment to the trash. |
POST | /api/comments/{id}/restore |
Restore a comment from the trash. |
PUT | /api/files/{id}/comments/typing |
Indicate that the authenticated user is commenting on a file. |
PUT | /api/posts/{id}/comments/typing |
Indicate that the authenticated user is commenting on a post. |
Conversations
The Conversations API has methods for creating, and managing converations.
Method | Path | Description |
---|---|---|
POST | /api/conversations |
Create a chat room or private chat. If member count is more than one, a chat room is created. If name is omitted, the name of the chat will be the participant(s) names. |
GET | /api/conversations |
List the conversations for the authenticated user. |
GET | /api/conversations/{id} |
Get a conversation. |
GET | /api/conversations/badge |
Get number of unread conversations for the authenticated user (grouped by conversation type). |
PUT | /api/conversations/{id}/mark |
Mark a conversation as read. |
DELETE | /api/conversations/{id}/mark |
Mark a conversation as unread. |
PUT | /api/conversations/{id}/pin |
Pin a conversation. |
DELETE | /api/conversations/{id}/pin |
Unpin a conversation. |
Directories
Api for directories.
Method | Path | Description |
---|---|---|
GET | /api/directories/{id} |
Get a directory by id. |
GET | /api/directories/{name} |
Get a directory by name. |
GET | /api/directories |
List directories. |
GET | /api/directories/{id}/members |
List the members of a directory. |
Embeds
The Embeds API converts URLs into embedded videos, images and rich article previews.
Method | Path | Description |
---|---|---|
GET | /api/embeds/{id} |
Get an embed by id. |
POST | /api/embeds |
Create an embed for the given url. |
Files
The Files API has methods for managing files.
Method | Path | Description |
---|---|---|
POST | /api/apps/{id}/files |
Creates a new file in the specified Files app. |
GET | /api/apps/{id}/files |
List files in the specified Files app. |
GET | /api/files/{id} |
Get file metadata. |
PATCH | /api/files/{id} |
Update a file. |
DELETE | /api/files/{id} |
Delete a file. |
GET | /api/files/{id}/versions/{version} |
Get specific version of a file. |
DELETE | /api/files/{id}/versions/{version} |
Delete specific version of a file. |
GET | /api/files/{id}/versions |
Get versions for the specified file. |
POST | /api/files/{id}/subscribe |
Subscribe to notifications for activity on a file. |
POST | /api/files/{id}/unsubscribe |
Unsubscribe to notifications for activity on a file. |
POST | /api/files/{id}/trash |
Move a file to the trash. |
POST | /api/files/{id}/restore |
Restore a file from the trash. |
POST | /api/files/{id}/versions/{version}/restore |
Restore a previous version of a file to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the file. |
GET | /api/comments/{id}/attachments |
List files attached to the specified comment. |
GET | /api/messages/{id}/attachments |
List files attached to the specified message. |
GET | /api/posts/{id}/attachments |
List files attached to the specified post. |
Meetings
The Meetings API enabled you to create meetings (which can later be attached to messages).
Method | Path | Description |
---|---|---|
POST | /api/meetings |
Create a meeting. The provider can either be 'zoom' or 'teams'. |
POST | /api/meetings/zoom/events |
Messages
The Messages API supports managing chat messages.
Method | Path | Description |
---|---|---|
POST | /api/apps/{id}/messages |
Creates a new message in the specified Conversation (Chat, ChatRoom or PrivateChat). |
GET | /api/apps/{id}/messages |
List messages in the specified Conversation (Chat, ChatRoom or PrivateChat). |
GET | /api/messages/{id} |
Gets a message by id. |
PATCH | /api/messages/{id} |
Updates a message. |
DELETE | /api/messages/{id} |
Delete a message. |
POST | /api/messages/{id}/trash |
Move a message to the trash. |
POST | /api/messages/{id}/restore |
Restore a message from the trash. |
PUT | /api/apps/{id}/messages/typing |
Indicate that the authenticated user is typing a message. |
Notifications
The Notifications API has methods for managing notifications.
Method | Path | Description |
---|---|---|
GET | /api/notifications/{id} |
Get a notification by id. |
DELETE | /api/notifications/{id} |
Delete a notification. |
PUT | /api/notifications/{id}/mark |
Mark a notification as read. |
DELETE | /api/notifications/{id}/mark |
Mark a notification as unread. |
PUT | /api/notifications/mark |
Mark (all) notifications as read. |
GET | /api/notifications |
List notifications. |
Options
The Options API supports managing poll options.
Method | Path | Description |
---|---|---|
GET | /api/options/{id} |
Gets a poll option. |
POST | /api/options/{id}/vote |
Vote for a poll option. |
GET | /api/options/{id}/voters |
List users that voted for the specified option. |
Posts
The Comments API supports managing posts.
Method | Path | Description |
---|---|---|
POST | /api/apps/{id}/posts |
Creates a new post in the specified Posts app. |
GET | /api/apps/{id}/posts |
List posts in the specified Posts app. |
GET | /api/posts/{id} |
Gets a post by id. |
PATCH | /api/posts/{id} |
Updates a post. |
DELETE | /api/posts/{id} |
Delete a post. |
POST | /api/posts/{id}/subscribe |
Subscribe to notifications for activity on a post. |
POST | /api/posts/{id}/unsubscribe |
Unsubscribe to notifications for activity on a post. |
POST | /api/posts/{id}/trash |
Move a post to the trash. |
POST | /api/posts/{id}/restore |
Restore a post from the trash. |
PUT | /api/apps/{id}/posts/typing |
Indicate that the authenticated user is writing a post. |
Reactions
The Reactions API enables you to create, list and delete reactions.
Method | Path | Description |
---|---|---|
POST | /api/comments/{id}/reactions |
Create reaction for a comment. |
DELETE | /api/comments/{id}/reactions |
Delete authenticated user's reaction to a comment. |
GET | /api/comments/{id}/reactions |
List reactions for a comment. |
POST | /api/messages/{id}/reactions |
Create reaction for a message. |
DELETE | /api/messages/{id}/reactions |
Delete authenticated user's reaction to a message. |
GET | /api/messages/{id}/reactions |
List reactions for a message. |
POST | /api/posts/{id}/reactions |
Create reaction for a post. |
DELETE | /api/posts/{id}/reactions |
Delete authenticated user's reaction to a post. |
GET | /api/posts/{id}/reactions |
List reactions for a post. |
GET | /api/reactions/{id} |
Get a reaction by id. |
DELETE | /api/reactions/{id} |
Delete a reaction. |
Stars
The Stars API enables bookmarking things for reference and/or follow-up.
Method | Path | Description |
---|---|---|
POST | /api/apps/{id}/stars |
Add a star to an app on behalf of the authenticated user. |
DELETE | /api/apps/{id}/stars |
Remove a star from an app on behalf of the authenticated user. |
GET | /api/stars |
List items starred by the authenticated user. |
Users
The Users API has methods for managing users.
Method | Path | Description |
---|---|---|
POST | /api/users |
Create a user. |
GET | /api/users |
List users. |
GET | /api/users/{id} |
Get a user by id. |
PATCH | /api/users/{id} |
Update a user. |
GET | /api/users/{uid} |
Get a user by uid. |
PUT | /api/users/{uid} |
Create or update user with specified uid. |
GET | /api/user |
Get the authenticated user. |
POST | /api/users/{id}/trash |
Move a user to the trash. |
POST | /api/users/{id}/restore |
Restore a user from the trash. |
GET | /api/users/autocomplete |
List users based on autocomplete search. |
POST | /api/users/{uid}/tokens |
Issue an access token for the specified user. Creates the user if it does not exists. |
DELETE | /api/users/{uid}/tokens |
Revoke all access tokens for the specified user. |
Webhooks
The Webhooks API enable you to register and manage webhooks.
You can also use the API to list webhook deliveries for a webhook.
Method | Path | Description |
---|---|---|
GET | /api/webhooks |
List webhooks. |
POST | /api/webhooks |
Registers a webhook. |
GET | /api/webhooks/{id} |
Get a webhook by id. |
PATCH | /api/webhooks/{id} |
Update a webhook registration. |
DELETE | /api/webhooks/{id} |
Delete a webhook |
GET | /api/webhooks/{id}/deliveries |
List webhook deliveries. |