Message operations
List all unread messages across channels
POST /workspaces/{wid}/unreads
Requires authentication.
Fetch unread messages across all channels in the workspace. Returns messages grouped by channel with cursor-based pagination. Useful for building an "All Unreads" view.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
wid |
path | string | Workspace ID |
Request body
{
"limit": 50,
"cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ"
}
Responses
200 List of unread messages
{
"messages": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
},
"channel_name": "general",
"channel_type": "public"
}
],
"has_more": true,
"next_cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ"
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
Search messages in workspace
POST /workspaces/{wid}/messages/search
Requires authentication.
Full-text search across messages in the workspace. Supports filtering by channel, user, and date range. Results include surrounding context and are ranked by relevance.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
wid |
path | string | Workspace ID |
Request body
{
"query": "search term",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"before": "2025-01-15T09:30:00Z",
"after": "2025-01-15T09:30:00Z",
"limit": 20,
"offset": 0
}
Responses
200 Search results
{
"messages": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
},
"channel_name": "general",
"channel_type": "public"
}
],
"total_count": 42,
"has_more": true,
"query": "search term"
}
400 Bad request
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
List threads user is subscribed to
POST /workspaces/{wid}/threads
Requires authentication.
List threads that the current user is subscribed to in the workspace. Includes the root message and latest replies with unread counts. Supports cursor-based pagination.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
wid |
path | string | Workspace ID |
Request body
{
"limit": 20,
"cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ"
}
Responses
200 List of user threads
{
"threads": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
},
"channel_name": "general",
"channel_type": "public",
"has_new_replies": true
}
],
"has_more": true,
"next_cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ",
"unread_thread_count": 2
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
Get a single message
GET /messages/{id}
Requires authentication.
Retrieve a single message by ID, including its author, reactions, thread metadata, and file attachments.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Responses
200 Message details
{
"message": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
}
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Send a message
POST /channels/{id}/messages/send
Requires authentication.
Send a new message to a channel. Supports plain text content, file attachments (by referencing previously uploaded file IDs), and threading (by setting a parent message ID). The sender must be a member of the channel.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Channel ID |
Request body
{
"content": "Hello, world!",
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"attachment_ids": [
"string"
],
"also_send_to_channel": true
}
Responses
200 Message sent
{
"message": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
}
}
}
400 Bad request
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
List messages in channel
POST /channels/{id}/messages/list
Requires authentication.
List messages in a channel with cursor-based pagination. Returns messages in reverse chronological order by default. Supports fetching around a specific message for scroll-to-message functionality.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Channel ID |
Request body
{
"cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ",
"limit": 0,
"direction": "before"
}
Responses
200 List of messages
{
"messages": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
}
}
],
"has_more": true,
"has_newer": true,
"next_cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ"
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Update a message
POST /messages/{id}/update
Requires authentication.
Edit the content of a previously sent message. Only the message author can edit their own messages. An edit indicator is shown on the message after updating.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Request body
{
"content": "Hello, world!"
}
Responses
200 Message updated
{
"message": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
}
}
}
400 Bad request
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Delete a message
POST /messages/{id}/delete
Requires authentication.
Delete a message. Authors can delete their own messages. Channel admins and workspace admins/owners can delete any message in channels they have access to.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Responses
200 Message deleted
{
"success": true
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Delete a message's link preview
POST /messages/{id}/link-preview/delete
Requires authentication.
Remove the link preview (unfurl) from a message. Only the message author can remove link previews from their own messages.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Responses
200 Link preview deleted
{
"success": true
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Add reaction to message
POST /messages/{id}/reactions/add
Requires authentication.
Add an emoji reaction to a message. Each user can only add each unique emoji once per message. Supports both standard Unicode emoji and custom workspace emoji.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Request body
{
"emoji": "👍"
}
Responses
200 Reaction added
{
"reaction": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
}
400 Bad request
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Remove reaction from message
POST /messages/{id}/reactions/remove
Requires authentication.
Remove your emoji reaction from a message. You can only remove reactions that you previously added.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Request body
{
"emoji": "👍"
}
Responses
200 Reaction removed
{
"success": true
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Mark message as unread
POST /messages/{id}/mark-unread
Requires authentication.
Mark a message as unread, setting the channel's read position to just before this message. The channel will appear as having unread messages starting from this point.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Responses
200 Message marked as unread
{
"success": true
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Mark thread as read
POST /messages/{id}/thread/mark-read
Requires authentication.
Mark a thread as read up to a specific reply, or up to the latest reply if no reply ID is provided. Updates the thread's unread count.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Request body
{
"last_read_reply_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
}
Responses
200 Thread marked as read
{
"success": true
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
List thread replies
POST /messages/{id}/thread/list
Requires authentication.
List replies in a message thread with cursor-based pagination. Returns the thread replies in chronological order.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Request body
{
"cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ",
"limit": 0,
"direction": "before"
}
Responses
200 Thread messages
{
"messages": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
}
}
],
"has_more": true,
"has_newer": true,
"next_cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ"
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Get thread subscription status
GET /messages/{id}/subscription
Requires authentication.
Check whether the current user is subscribed to a thread. Subscribed users receive notifications for new replies.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Responses
200 Thread subscription status
{
"status": "subscribed"
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Subscribe to thread
POST /messages/{id}/subscribe
Requires authentication.
Subscribe to a thread to receive notifications for new replies. Users are automatically subscribed when they reply to a thread.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Responses
200 Subscribed to thread
{
"status": "subscribed"
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Unsubscribe from thread
POST /messages/{id}/unsubscribe
Requires authentication.
Unsubscribe from a thread to stop receiving notifications for new replies.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Responses
200 Unsubscribed from thread
{
"status": "subscribed"
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Pin a message
POST /messages/{id}/pin
Requires authentication.
Pin a message to its channel. Any workspace member with access to the channel can pin messages. A channel can have at most 50 pinned messages. Already-pinned messages cannot be pinned again. The pinned message is returned with updated metadata including the pinned_by user and pinned_at timestamp.
Errors:
- 400: Message is already pinned, or the channel has reached the 50-pin limit.
- 401: Not authenticated.
- 403: Caller does not have access to the channel.
- 404: Message not found.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Responses
200 Message pinned
{
"message": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
}
}
}
400 Bad request
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Unpin a message
POST /messages/{id}/unpin
Requires authentication.
Unpin a previously pinned message from its channel. Any workspace member with access to the channel can unpin messages (not restricted to the user who originally pinned it). The message is returned with its pin metadata cleared.
Errors:
- 401: Not authenticated.
- 403: Caller does not have access to the channel.
- 404: Message not found or message is not currently pinned.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Message ID |
Responses
200 Message unpinned
{
"message": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
}
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
List pinned messages in channel
POST /channels/{id}/pins/list
Requires authentication.
List all pinned messages in a channel with cursor-based pagination. Returns messages in reverse chronological order of when they were pinned. Only workspace members with access to the channel can list its pins.
Errors:
- 401: Not authenticated.
- 403: Caller does not have access to the channel.
- 404: Channel not found.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Channel ID |
Request body
{
"cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ",
"limit": 50
}
Responses
200 List of pinned messages
{
"messages": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
}
}
],
"has_more": true,
"next_cursor": "eyJpZCI6IjAxSkVYQU1QTEUifQ"
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Schedule a message for future delivery
POST /channels/{id}/messages/schedule
Requires authentication.
Schedule a message for future delivery to a channel. The message will be automatically sent at the specified time. Scheduled messages can be edited or cancelled before delivery.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | Channel ID |
Request body
{
"content": "Hello, world!",
"scheduled_for": "2025-01-15T09:30:00Z",
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"also_send_to_channel": true,
"attachment_ids": [
"string"
]
}
Responses
200 Message scheduled
{
"scheduled_message": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"channel_name": "general",
"workspace_id": "01JQ3KMP2RQHYJ5ZV8NMWCX4ET",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"also_send_to_channel": true,
"attachment_ids": [
"string"
],
"scheduled_for": "2025-01-15T09:30:00Z",
"status": "In a meeting",
"last_error": "string",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z"
}
}
400 Bad request
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
List user's scheduled messages in a workspace
POST /workspaces/{wid}/scheduled-messages
Requires authentication.
List all pending scheduled messages created by the current user in a workspace.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
wid |
path | string | Workspace ID |
Responses
200 Scheduled messages
{
"scheduled_messages": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"channel_name": "general",
"workspace_id": "01JQ3KMP2RQHYJ5ZV8NMWCX4ET",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"also_send_to_channel": true,
"attachment_ids": [
"string"
],
"scheduled_for": "2025-01-15T09:30:00Z",
"status": "In a meeting",
"last_error": "string",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z"
}
],
"count": 5
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
Get a scheduled message
POST /scheduled-messages/{id}
Requires authentication.
Retrieve a single scheduled message by ID, including its content, target channel, and scheduled delivery time.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | - |
Responses
200 Scheduled message
{
"scheduled_message": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"channel_name": "general",
"workspace_id": "01JQ3KMP2RQHYJ5ZV8NMWCX4ET",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"also_send_to_channel": true,
"attachment_ids": [
"string"
],
"scheduled_for": "2025-01-15T09:30:00Z",
"status": "In a meeting",
"last_error": "string",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z"
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
Update a scheduled message
POST /scheduled-messages/{id}/update
Requires authentication.
Update the content or delivery time of a pending scheduled message. Cannot update messages that have already been sent.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | - |
Request body
{
"content": "Hello, world!",
"scheduled_for": "2025-01-15T09:30:00Z",
"attachment_ids": [
"string"
]
}
Responses
200 Updated scheduled message
{
"scheduled_message": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"channel_name": "general",
"workspace_id": "01JQ3KMP2RQHYJ5ZV8NMWCX4ET",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"also_send_to_channel": true,
"attachment_ids": [
"string"
],
"scheduled_for": "2025-01-15T09:30:00Z",
"status": "In a meeting",
"last_error": "string",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z"
}
}
400 Bad request
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
409 Conflict with current resource state
{
"error": {
"code": "CONFLICT",
"message": "Resource already exists"
}
}
Delete a scheduled message
POST /scheduled-messages/{id}/delete
Requires authentication.
Cancel and delete a pending scheduled message. Cannot delete messages that have already been sent.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | - |
Responses
200 Scheduled message deleted
{
"success": true
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
409 Conflict with current resource state
{
"error": {
"code": "CONFLICT",
"message": "Resource already exists"
}
}
Send a scheduled message immediately
POST /scheduled-messages/{id}/send-now
Requires authentication.
Immediately send a scheduled message instead of waiting for its scheduled delivery time. The message is sent and the scheduled entry is removed.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string | - |
Responses
200 Message sent
{
"message": {
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"content": "Hello, world!",
"type": "user",
"system_event": {
"event_type": "user_joined",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"channel_name": "general",
"actor_id": "01JQ3KMS4WTVY6BN8FRCJD2HAQ",
"actor_display_name": "Bob Martinez",
"old_channel_name": "old-channel-name",
"channel_type": "public",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL"
},
"thread_parent_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"reply_count": 3,
"last_reply_at": "2025-01-15T09:30:00Z",
"edited_at": "2025-01-15T09:30:00Z",
"deleted_at": "2025-01-15T09:30:00Z",
"created_at": "2025-01-15T09:30:00Z",
"updated_at": "2025-01-15T09:30:00Z",
"also_send_to_channel": true,
"pinned_at": "2025-01-15T09:30:00Z",
"pinned_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"user_display_name": "Alice Chen",
"user_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"user_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"reactions": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"emoji": "👍",
"created_at": "2025-01-15T09:30:00Z"
}
],
"thread_participants": [
{
"user_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"display_name": "Alice Chen",
"avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp"
}
],
"attachments": [
{
"id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"filename": "report.pdf",
"content_type": "application/pdf",
"size_bytes": 1048576,
"url": "/files/01JQ3KMT6B/download?sig=abc",
"created_at": "2025-01-15T09:30:00Z"
}
],
"link_preview": {
"url": "/files/01JQ3KMT6B/download?sig=abc",
"type": "external",
"title": "Example Page",
"description": "string",
"image_url": "https://example.com/image.png",
"site_name": "example.com",
"linked_message_id": "01JQ3KMR5KVDW2TG9NHP0XEJBL",
"linked_channel_id": "01JQ3KMQ8YNBC3DFHM6RWVS7AG",
"linked_channel_name": "random",
"linked_channel_type": "public",
"message_author_id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
"message_author_name": "Alice Chen",
"message_author_avatar_url": "/files/01JQ3KMT6B/download?sig=abc",
"message_author_gravatar_url": "https://www.gravatar.com/avatar/abc123?d=mp",
"message_content": "Check out this link!",
"message_created_at": "2025-01-15T09:30:00Z"
}
}
}
400 Bad request
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}
401 Unauthorized
{
"error": {
"code": "NOT_AUTHENTICATED",
"message": "Not authenticated"
}
}
403 Forbidden
{
"error": {
"code": "PERMISSION_DENIED",
"message": "You do not have permission to perform this action"
}
}
404 Not found
{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}
409 Conflict with current resource state
{
"error": {
"code": "CONFLICT",
"message": "Resource already exists"
}
}