swit-main.yaml•167 kB
openapi: 3.1.0
info:
version: 1.0.0
title: Swit Open API Documentation
description: 'The Core API v1 is our initial API, enabling developers to interact with various Swit resources, such as workspaces, channels, projects, tasks, messages, and users. It serves as a practical tool for integrating your own application with Swit to boost team collaborations. Please note, the Core API v1 is slated for deprecation as we transition to Core API v2.'
termsOfService: 'https://swit.io/privacy?sub=api-term'
contact:
name: Swit User & Developer Support
url: 'https://help.swit.io/?support=true'
email: help@swit.io
license:
url: 'https://www.apache.org/licenses/LICENSE-2.0'
name: Apache 2.0
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
paths:
/api/user.info:
get:
tags:
- User
summary: Get user information
description: Retrieves the authorizing user's basic account information.
operationId: user.info
responses:
'200':
description: Successfully retrieved the user's account information.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetUserInfoResponse'
security:
- OAuth2Application:
- 'user:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/user.info.update:
post:
tags:
- User
summary: Update the user's profile
description: Updates the authorizing user's profile.
operationId: user.info.update
requestBody:
content:
application/json:
schema:
type: object
properties:
user_name:
type: string
description: The name of the user.
examples:
- Jane Kim
department:
type: string
description: Previously used in the Free/Standard plans to describe the department the user is in.
examples:
- Sales
x-deprecated: true
tel:
type: string
description: The telephone number of the user.
examples:
- +82-10-1234-5678
msg:
type: string
description: The status message of the user.
examples:
- Working from home.
is_update_all_profile:
type: boolean
description: Previously used in the Free/Standard plans to describe whether to update all profiles across all workspaces the user is in.
default: true
x-deprecated: true
update_fields:
type: array
description: The fields to update.
examples:
- - user_name
- msg
items:
type: string
responses:
'200':
description: Successfully updated the user profile.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetUserInfoResponse'
security:
- OAuth2Application:
- 'user:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/presence.sync.info:
get:
tags:
- User
summary: Get the user's presence sync setting
description: "Whether or not a `/api/presence.status.update` request can update the user's presence sync setting for your app. In UI, users can view or change this setting in User Settings > Connected apps."
operationId: presence.sync.info
responses:
'200':
description: Successfully retrieved the presence sync setting of the user.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/UserPresenceSyncStatusResponse'
security:
- OAuth2Application:
- 'presence:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/presence.status.update:
post:
tags:
- User
summary: Update the user presence
description: Updates the authorizing user's presence status.
operationId: presence.status.update
requestBody:
content:
application/json:
schema:
type: object
properties:
mode:
enum:
- 'on'
- do_not_disturb
- absence
description: The status of the user to update to.
do_not_disturb_duration:
type: string
description: The duration for the Do not disturb mode.
examples:
- '1'
responses:
'200':
description: Successfully updated the user's presence status.
content:
application/json:
schema:
type: object
properties:
mode:
enum:
- 'on'
- do_not_disturb
- absence
description: The presence status of the user.
is_online:
type: boolean
description: Whether the user is online.
default: true
do_not_disturb_started_at:
type: string
description: The date and time at which the Do not disturb mode started.
examples:
- '2022-04-15T05:13:48.713593Z'
do_not_disturb_duration:
type: string
description: The duration for the Do not disturb mode.
examples:
- '1'
user_id:
type: string
description: The ID of the user.
examples:
- 1908210134210XIiU3W
security:
- OAuth2Application:
- 'presence:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/presence.sync.update:
post:
tags:
- User
summary: Toggle presence sync
description: Set whether to allow your app to update the authorizing user's presence status via API.
operationId: presence.sync.update
requestBody:
content:
application/json:
schema:
type: object
properties:
is_presence_sync_on:
type: boolean
description: Whether to allow the app to update the authorizing user's presence sync.
default: true
responses:
'200':
description: Successfully updated the presence sync setting of the app.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/UserPresenceSyncStatusResponse'
security:
- OAuth2Application:
- 'presence:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/workspace.info:
get:
tags:
- Workspace
summary: Get workspace info
description: Retrieves information about a workspace.
operationId: workspace.info
parameters:
- name: id
in: query
description: The ID of the workspace.
required: true
schema:
type: string
examples:
- 7kYTjHXN98FUutJK
examples:
default:
value: 7kYTjHXN98FUutJK
responses:
'200':
description: Successfully retrieved the workspace's information.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetWorkspaceInfoResponse'
security:
- OAuth2Application:
- 'workspace:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/workspace.list:
get:
tags:
- Workspace
summary: List out workspaces
description: "Lists out a given number of workspaces the user joined. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: workspace.list
parameters:
- name: limit
in: query
description: The number of workspaces to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: offset
in: query
description: Pass the "offset" string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: name
in: query
description: The domain of the workspace to retrieve
schema:
type: string
examples:
- Test WS
examples:
default:
value: Test WS
- name: page
in: query
description: The page number for a paginated response
deprecated: true
schema:
type: integer
responses:
'200':
description: Successfully retrieved the list of workspaces.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetWorkspaceListResponse'
security:
- OAuth2Application:
- 'workspace:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/workspace.update:
post:
tags:
- Workspace
summary: Update a workspace
description: Updates an existing workspace.
operationId: workspace.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/PutWorkspaceParam'
responses:
'200':
description: Successfully updated the workspace.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/PutWorkspaceResponse'
security:
- OAuth2Application:
- 'workspace:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/workspace.user.info:
get:
tags:
- Workspace
summary: Get a workspace member's profile
description: Retrieves a user's profile registered in a given workspace.
operationId: workspace.user.info
parameters:
- name: workspace_id
in: query
description: The ID of the workspace.
required: true
schema:
type: string
examples:
- 230104192047867TUC1
examples:
default:
value: 230104192047867TUC1
- name: user_id
in: query
description: "The ID of the user. If not passed, the signed-in user's profile will be retrieved."
schema:
type: string
examples:
- 190826072741481FcvV
examples:
default:
value: 190826072741481FcvV
responses:
'200':
description: Successfully retrieved the user's profile.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/WorkspaceUserResponse'
security:
- OAuth2Application:
- 'workspace:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/workspace.user.list:
get:
tags:
- Workspace
summary: List out workspace members
description: "Lists out a given number of members from a workspace. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: workspace.user.list
parameters:
- name: page
in: query
description: The page number for a paginated response
deprecated: true
schema:
type: integer
examples:
- 2
examples:
default:
value: 2
- name: workspace_id
in: query
description: The ID of the workspace.
required: true
schema:
type: string
examples:
- 7kPTjHXN98FUutGA
examples:
default:
value: 7kPTjHXN98FUutGA
- name: limit
in: query
description: The number of objects to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: keyword
in: query
description: 'The search keyword used to filter the member list based on their name or email. When using this parameter, make sure to pass the `type` parameter too.'
schema:
type: string
examples:
- gmail
examples:
default:
value: gmail
- name: type
in: query
description: Whether to search by name or email.
schema:
enum:
- name
- email
responses:
'200':
description: Successfully retrieved the members.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetWorkspaceUserListResponse'
security:
- OAuth2Application:
- 'workspace:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/organization.workspace.invite:
post:
tags:
- Workspace
summary: Invite a member
description: Invites a member to the workspace.
operationId: organization.workspace.invite
requestBody:
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddCompanyWorkspaceInviteParam'
responses:
'200':
description: Successfully invited the member to the workspace
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddCompanyWorkspaceInviteResponse'
security:
- OAuth2Application:
- 'workspace:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/workspace.group.list:
get:
tags:
- Workspace
summary: Retrieve a workspace's list of groups
description: Retrieves a list of groups in a workspace
operationId: workspace.group.list
parameters:
- name: page
in: query
description: The page number for a paginated response.
deprecated: true
schema:
type: integer
examples:
- 2
examples:
default:
value: 2
- name: cnt
in: query
description: The number of objects to return per page
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: ws_id
in: query
description: The ID of the workspace
required: true
schema:
type: string
examples:
- 7kPTjHXN98FUutGA
examples:
default:
value: 7kPTjHXN98FUutGA
- name: keyword
in: query
description: The search keyword used to filter the group list
schema:
type: string
examples:
- US office
examples:
default:
value: US office
responses:
'200':
description: Successfully retrieved the workspace group list
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/WorkspaceGroup'
security:
- OAuth2Application:
- 'workspace:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/workspace.group.invite:
post:
tags:
- Workspace
summary: Invite users to a group in a workspace
description: Invites a user to a group in a workspace.
operationId: post-api-workspace.group.invite
requestBody:
description: The users to invite and the group and workspace to invite them to.
content:
application/json:
schema:
type: object
properties:
workspace_id:
type: string
description: The ID of the workspace.
examples:
- 191028004303652vk3M
group_id:
type: string
description: The ID of the group.
examples:
- '20071408275494180'
user_ids:
type: array
description: The IDs of users.
examples:
- - 220327051250T3AfDDu
- 220828163440rQVO7Tb
items:
type: string
responses:
'204':
description: No Content
security:
- OAuth2Application:
- 'workspace:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/emoji.listByWorkspace:
get:
tags:
- Workspace
summary: Retrieve a custom emoji list from a workspace
description: Retrieve the list of custom emojis used in a given workspace
operationId: '[GET]/api/emoji.listByWorkspace'
parameters:
- name: ws_id
in: query
description: The ID of the workspace
required: true
schema:
type: string
examples:
- 191028004303652vk3M
examples:
default:
value: 191028004303652vk3M
responses:
'200':
description: Successfully retrieved the emoji list
content:
application/json:
schema:
type: object
properties:
data:
type: array
description: The list of emojis.
items:
$ref: './swit-schemas.yaml#/Emoji'
security:
- OAuth2Application:
- 'workspace:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/channel.info:
get:
tags:
- Channel
summary: Get a channel's information
description: Retrieves information about a channel.
operationId: channel.info
parameters:
- name: id
in: query
description: The ID of the channel.
required: true
schema:
type: string
examples:
- 201027126104712l114
examples:
default:
value: 201027126104712l114
responses:
'200':
description: Successfully retrieved the channel's information.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetChannelResponse'
security:
- OAuth2Application:
- 'channel:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/channel.list:
get:
tags:
- Channel
summary: List out channels
description: "Lists out a given number of channels from a workspace. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: channel.list
parameters:
- name: activity
in: query
description: 'Filter the list by whether the channel is active (`act`) or archived (`arch`). You can select a comma-delimited list of multiple property filters. If not passed, both filters will be selected.'
schema:
type: string
- name: disclosure
in: query
description: 'Filter the list by whether the channel is pubic (`pub`) or private (`pri`). You can select a comma-delimited list of multiple property filters. If not passed, both filters will be selected.'
schema:
type: string
- name: type
in: query
description: |-
Filter the list by channel type.
- `dfl`: The channel is the default chat room joined by all workspace members.
- `gen`: The channel is an additionally created group chat.
You can select a comma-delimited list of multiple type filters. If not passed, all filters will be selected.
schema:
type: string
- name: name
in: query
description: The name of the channel.
schema:
type: string
examples:
- Marketing channel
examples:
default:
value: Marketing channel
- name: page
in: query
description: The page number for a paginated response.
deprecated: true
schema:
type: integer
examples:
- 2
examples:
default:
value: 2
- name: workspace_id
in: query
description: The ID of the workspace.
required: true
schema:
type: string
examples:
- 191028004303652vk3M
examples:
default:
value: 191028004303652vk3M
- name: limit
in: query
description: The number of channels to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the channels.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetChannelListResponse'
security:
- OAuth2Application:
- 'channel:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/channel.create:
post:
tags:
- Channel
summary: Create a channel
description: Creates a new channel in a workspace.
operationId: channel.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddChannelParam'
responses:
'200':
description: Successfully created the channel.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddChannelResponse'
security:
- OAuth2Application:
- 'channel:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/channel.update:
post:
tags:
- Channel
summary: Update a channel
description: Updates an existing channel.
operationId: channel.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/PutChannelParam'
responses:
'200':
description: Successfully updated the channel.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/PutChannelResponse'
security:
- OAuth2Application:
- 'channel:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/channel.user.list:
get:
tags:
- Channel
summary: List out channel members
description: "Lists out a given number of members belonging to a channel. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: channel.user.list
parameters:
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: page
in: query
description: The page number for a paginated response
deprecated: true
schema:
type: integer
examples:
- 2
examples:
default:
value: 2
- name: channel_id
in: query
description: The ID of the channel.
required: true
schema:
type: string
examples:
- 201027126104712l114
examples:
default:
value: 201027126104712l114
- name: limit
in: query
description: The number of members to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
responses:
'200':
description: Successfully retrieved the channel members.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetChannelUserListResponse'
security:
- OAuth2Application:
- 'channel:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/channel.user.invite:
post:
tags:
- Channel
summary: Invite a user to the channel
description: Invites a user to a channel.
operationId: channel.AddChannelUserInvite
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddChannelUserInviteParam'
responses:
'200':
description: Successfully invited the users to the channel.
security:
- OAuth2Application:
- 'channel:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/channel.user.remove:
post:
tags:
- Channel
summary: Remove users from a channel
description: Removes users from a channel
operationId: channel.DelChannelUser
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelChannelUserParam'
responses:
'200':
description: Successfully removed the users from the channel
security:
- OAuth2Application:
- 'channel:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/channel.archive:
post:
tags:
- Channel
summary: Archive/unarchive a channel
description: Updates a channel's archiving status.
operationId: channel.UpdateChannelArchive
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/UpdateChannelArchiveParam'
responses:
'204':
description: Successfully updated the channel's archiving status.
security:
- OAuth2Application:
- 'channel:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.info:
get:
tags:
- Message
summary: Get a message's information
description: Retrieves information about a message.
operationId: message.info
parameters:
- name: id
in: query
description: The ID of the message.
required: true
schema:
type: string
examples:
- 21080607597093STYhd
examples:
default:
value: 21080607597093STYhd
responses:
'200':
description: Successfully retrieved information about the message.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/Message'
security:
- OAuth2Application:
- 'message:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.list:
get:
tags:
- Message
summary: List out messages
description: "Lists out a given number of messages in a channel. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: message.list
parameters:
- name: limit
in: query
description: The number of messages to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: channel_id
in: query
description: The ID of the channel from which to get messages.
required: true
schema:
type: string
examples:
- 201027126104712l114
examples:
default:
value: 201027126104712l114
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the messages.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetMessageListResponse'
security:
- OAuth2Application:
- 'message:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.create:
post:
tags:
- Message
summary: Create a message
description: Creates a message in a channel.
operationId: message.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/CreateMessageParam'
responses:
'200':
description: Successfully created the message.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/CreateMessageResponse'
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.share:
post:
tags:
- Message
summary: Share a message to a channel
description: Shares a message to a channel.
operationId: post-api-message.share
requestBody:
content:
application/json:
schema:
type: object
properties:
message_id:
type: string
description: The ID of the message.
examples:
- 21080607597093STYhd
channel_id:
type: string
description: The ID of the channel.
examples:
- 201027126104712l114
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/CreateMessageFromMailResponse'
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.taskShare:
post:
tags:
- Message
summary: Share a task to a channel
description: Shares a task to a channel.
operationId: post-api-message.taskShare
requestBody:
content:
application/json:
schema:
type: object
properties:
task_id:
type: string
description: ID of the task.
examples:
- 221031071570KNs6NFX
channel_id:
type: string
description: ID of the channel.
examples:
- 201027126104712l114
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/CreateMessageFromMailResponse'
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.remove:
post:
tags:
- Message
summary: Delete a message
description: Deletes a message in a channel.
operationId: message.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DeleteMessageParam'
responses:
'200':
description: Successfully deleted the message.
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.reaction.create:
post:
tags:
- Message
summary: React to a message
description: Adds a reaction emoji to a message.
operationId: message.reaction.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddMessageReactionParam'
responses:
'200':
description: Successfully added the reaction.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddMessageReactionResponse'
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.reaction.remove:
post:
tags:
- Message
summary: Remove a reaction emoji from a message
description: Removes a reaction emoji from a message.
operationId: message.reaction.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelMessageReactionParam'
responses:
'200':
description: Successfully removed the reaction.
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.comment.list:
get:
tags:
- MessageComment
summary: List out message comments
description: "Lists out a given number of comments on a message. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: message.comment.list
parameters:
- name: message_id
in: query
description: The ID of the message from which to get comments.
required: true
schema:
type: string
examples:
- 21080607597093STYhd
examples:
default:
value: 21080607597093STYhd
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: limit
in: query
description: The number of comments to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
responses:
'200':
description: Successfully retrieved the comments.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetMessageCommentListResponse'
security:
- OAuth2Application:
- 'message:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.comment.create:
post:
tags:
- MessageComment
summary: Comment on a message
description: Posts a comment on a message.
operationId: message.comment.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/CreateMessageCommentParam'
responses:
'200':
description: Successfully commented on the message.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/CreateMessageCommentResponse'
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.comment.remove:
post:
tags:
- MessageComment
summary: Delete a message comment
description: Deletes a comment on a message.
operationId: message.comment.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DeleteMessageCommentParam'
responses:
'200':
description: Successfully deleted the comment.
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/message.comment.reactionCreate:
post:
tags:
- MessageComment
summary: React to a message comment
description: Adds a reaction emoji to a message's comment.
operationId: post-api-message.comment.reactionCreate
requestBody:
content:
application/json:
schema:
type: object
properties:
comment_id:
type: string
description: The ID of the comment to react to.
examples:
- 200401052521746EFE3
reaction_value:
type: string
description: The key value of the reaction.
examples:
- ':joy:'
responses:
'204':
description: No Content
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/idea.info:
get:
tags:
- Idea
summary: Get an idea's information
description: Retrieves information about an idea.
operationId: idea.info
parameters:
- name: id
in: query
description: The ID of the idea.
required: true
schema:
type: string
responses:
'200':
description: Successfully retrieved information about the idea.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetIdeaResponse'
security:
- OAuth2Application:
- 'idea:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/idea.list:
get:
tags:
- Idea
summary: List out ideas
description: "Lists out a given number of ideas in a channel. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: idea.list
parameters:
- name: channel_id
in: query
description: The ID of the channel from which to get posts.
required: true
schema:
type: string
examples:
- 201027126104712l114
examples:
default:
value: 201027126104712l114
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: limit
in: query
description: The number of posts to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
responses:
'200':
description: Successfully retrieved the ideas.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetIdeaListResponse'
security:
- OAuth2Application:
- 'idea:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/idea.create:
post:
tags:
- Idea
summary: Create an idea
description: Creates a idea in a channel.
operationId: idea.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/CreateIdeaParam'
responses:
'200':
description: Successfully created the idea.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/CreateIdeaResponse'
security:
- OAuth2Application:
- 'idea:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/idea.remove:
post:
tags:
- Idea
summary: Delete an idea
description: Deletes an idea in a channel.
operationId: idea.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelIdeaParam'
responses:
'200':
description: Successfully deleted the idea.
security:
- OAuth2Application:
- 'idea:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/idea.reaction.create:
post:
tags:
- Idea
summary: React to an idea
description: Adds a reaction emoji to an idea.
operationId: idea.reaction.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddIdeaReactionParam'
responses:
'200':
description: Successfully added the reaction.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddIdeaReactionResponse'
security:
- OAuth2Application:
- 'idea:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/idea.reaction.remove:
post:
tags:
- Idea
summary: Remove a reaction emoji from an idea
description: Removes a reaction emoji from an idea.
operationId: idea.reaction.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelIdeaReactionParam'
responses:
'200':
description: Successfully removed the reaction.
security:
- OAuth2Application:
- 'idea:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/idea.comment.list:
get:
tags:
- IdeaComment
summary: List out idea comments
description: "Lists out a given number of comments on an idea. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: idea.comment.list
parameters:
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: limit
in: query
description: The number of comments to retrieve.
schema:
type: integer
examples:
- 10
examples:
default:
value: 10
- name: idea_id
in: query
description: The ID of the idea from which to get comments.
required: true
schema:
type: string
examples:
- 21080344042039BrlBU
examples:
default:
value: 21080344042039BrlBU
responses:
'200':
description: Successfully retrieved the comments.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetIdeaCommentListResponse'
security:
- OAuth2Application:
- 'idea:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/idea.comment.create:
post:
tags:
- IdeaComment
summary: Comment on an idea
description: Posts a comment on an idea.
operationId: idea.comment.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/CreateIdeaCommentParam'
responses:
'200':
description: Successfully commented on the idea.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/CreateIdeaCommentResponse'
security:
- OAuth2Application:
- 'idea:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/idea.comment.remove:
post:
tags:
- IdeaComment
summary: Delete an idea comment
description: Deletes a comment on an idea.
operationId: idea.comment.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelIdeaCommentParam'
responses:
'200':
description: Successfully deleted the comment.
security:
- OAuth2Application:
- 'idea:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.info:
get:
tags:
- Project
summary: Get a project's information
description: Retrieves information about a project.
operationId: project.info
parameters:
- name: id
in: query
description: The ID of the project.
required: true
schema:
type: string
examples:
- 2002130601276977jqA
examples:
default:
value: 2002130601276977jqA
responses:
'200':
description: Successfully retrieved the project's information.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetProjectInfoResponse'
security:
- OAuth2Application:
- 'project:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.list:
get:
tags:
- Project
summary: List out projects
description: "Lists out a given number of projects from a workspace. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: project.list
parameters:
- name: workspace_id
in: query
description: The ID of the workspace.
required: true
schema:
type: string
examples:
- 7kPTjHXN98FUutGA
examples:
default:
value: 7kPTjHXN98FUutGA
- name: limit
in: query
description: The number of projects to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: activity
in: query
description: 'Filter the list by whether the project is active (`act`) or archived (`arch`). You can select a comma-delimited list of multiple property filters. If not passed, both filters will be selected.'
schema:
type: string
- name: disclosure
in: query
description: 'Filter the list by whether the project is pubic (`pub`) or private (`pri`). You can select a comma-delimited list of multiple property filters. If not passed, both filters will be selected.'
schema:
type: string
- name: name
in: query
description: The exact name of the project (case-insensitive) to retrieve.
deprecated: true
schema:
type: string
examples:
- Website
- name: page
in: query
description: The page number for a paginated response.
deprecated: true
schema:
type: integer
examples:
- 2
examples:
default:
value: 2
responses:
'200':
description: Successfully retrieved the projects.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetProjectListResponse'
security:
- OAuth2Application:
- 'project:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.create:
post:
tags:
- Project
summary: Create a project
description: Creates a project in a workspace.
operationId: project.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddProjectParam'
responses:
'200':
description: Successfully created the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddProjectResponse'
security:
- OAuth2Application:
- 'project:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.update:
post:
tags:
- Project
summary: Update a project
description: Updates an existing project in a workspace.
operationId: project.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/PutProjectParam'
responses:
'200':
description: Successfully updated the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/PutProjectResponse'
security:
- OAuth2Application:
- 'project:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.archive:
post:
tags:
- Project
summary: Archive/unarchive a project
description: Updates a project's archiving status.
operationId: project.UpdateProjectArchive
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/UpdateProjectArchiveParam'
responses:
'204':
description: Successfully updated the project's archiving status.
security:
- OAuth2Application:
- 'project:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.user.list:
get:
tags:
- Project
summary: List out project members
description: "Lists out a given number of members belonging to a project. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: project.user.list
parameters:
- name: project_id
in: query
description: The ID of the project.
required: true
schema:
type: string
examples:
- 2002130601276977jqA
examples:
default:
value: 2002130601276977jqA
- name: limit
in: query
description: The number of members to retrieve.
schema:
type: integer
examples:
- 10
examples:
default:
value: 10
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: page
in: query
description: The page number for a paginated response
deprecated: true
schema:
type: integer
examples:
- 2
examples:
default:
value: 2
responses:
'200':
description: Successfully retrieved the members.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetProjectUserListResponse'
security:
- OAuth2Application:
- 'project:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.user.invite:
post:
tags:
- Project
summary: Invite users to a project
description: Invites users to a project.
operationId: post-api-project.user.invite
requestBody:
description: The users to invite and the project to invite them to.
content:
application/json:
schema:
type: object
properties:
project_id:
type: string
description: The ID of the project.
examples:
- 2002130601276977jqA
user_ids:
type: array
description: The IDs of users.
examples:
- - 190826072741481FcvV
- 220113011810x7bqTRU
items:
type: string
responses:
'204':
description: No Content
security:
- OAuth2Application:
- 'project:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.tagList:
get:
tags:
- Project
summary: List out task tags
description: |-
Lists out all task tags used in a project.
Assigned to tasks of a project, tags facilitate filtering or searching
those tasks for viewing convenience. This method enumerates all tags
assigned at least once to any task of the target project.
operationId: project.tagList
parameters:
- name: id
in: query
description: The ID of the project.
required: true
schema:
type: string
examples:
- 2002130601276977jqA
examples:
default:
value: 2002130601276977jqA
- name: limit
in: query
description: The number of tags to retrieve.
schema:
type: integer
examples:
- 10
examples:
default:
value: 10
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the tags from the project.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetProjectTagListResponse'
security:
- OAuth2Application:
- 'project:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.status.list:
get:
tags:
- Project
summary: List out statuses in a project
description: Lists out the list of statuses in a given project.
operationId: task.status.list
parameters:
- name: project_id
in: query
description: The ID of the project.
required: true
schema:
type: string
examples:
- 190910100433344Dtjf
examples:
default:
value: 190910100433344Dtjf
responses:
'200':
description: Successfully retrieved the list of statuses in a project.
content:
application/json:
schema:
type: object
properties:
data:
type: object
description: An object wrapping a Swit resource.
properties:
status_list:
type: array
description: Statuses in the project.
items:
$ref: './swit-schemas.yaml#/StatusCustom'
security:
- OAuth2Application:
- 'task:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.bucket.info:
get:
tags:
- ProjectBucket
summary: Get a task bucket's information
description: Retrieves information about a task bucket.
operationId: project.bucket.info
parameters:
- name: project_id
in: query
description: The ID of the project that contains the bucket.
required: true
schema:
type: string
examples:
- 2002130601276977jqA
examples:
default:
value: 2002130601276977jqA
- name: id
in: query
description: The ID of the bucket the task is in.
required: true
schema:
type: string
examples:
- 290324092890QsjMT8I
examples:
default:
value: 290324092890QsjMT8I
responses:
'200':
description: Successfully retrieved the bucket's information.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetProjectBucketInfoResponse'
security:
- OAuth2Application:
- 'project:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.bucket.list:
get:
tags:
- ProjectBucket
summary: List out task buckets
description: Lists out all task buckets from a project.
operationId: project.bucket.list
parameters:
- name: project_id
in: query
description: The ID of the project.
required: true
schema:
type: string
examples:
- 2002130601276977jqA
examples:
default:
value: 2002130601276977jqA
- name: limit
in: query
description: The number of buckets to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the buckets.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetProjectBucketListResponse'
security:
- OAuth2Application:
- 'project:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.bucket.create:
post:
tags:
- ProjectBucket
summary: Add a task bucket
description: Adds a task bucket in a project.
operationId: project.bucket.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddProjectBucketParam'
responses:
'200':
description: Successfully added the bucket.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddProjectBucketResponse'
security:
- OAuth2Application:
- 'project:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/project.bucket.update:
post:
tags:
- ProjectBucket
summary: Update a task bucket
description: Updates the title of an existing task bucket in a project.
operationId: project.bucket.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/PutProjectBucketParam'
responses:
'200':
description: Successfully updated the bucket.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/PutProjectBucketResponse'
security:
- OAuth2Application:
- 'project:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.info:
get:
tags:
- Task
summary: Get a task's information
description: Retrieves information about a task.
operationId: task.info
parameters:
- name: id
in: query
description: The ID of the task.
required: true
schema:
type: string
examples:
- 190910100433344Dtjf
examples:
default:
value: 190910100433344Dtjf
- name: body_type
in: query
description: |-
Whether or not to use rich styles.
- `plain`: The `content` value will be parsed as plaintext.
- `json_string`: The `content` value will be parsed as an object representing a rich-formatted text.
schema:
enum:
- plain
- json_string
default: plain
responses:
'200':
description: Successfully retrieved the task's information.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetTaskInfoResponse'
security:
- OAuth2Application:
- 'task:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.list:
get:
tags:
- Task
summary: List out tasks
description: "Lists out a given number of tasks from a project. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: task.list
parameters:
- name: workspace_id
in: query
description: The ID of the workspace that includes the target project. Only required when `mytask` is passed to the `project_id` parameter (to get the Personal tasks).
schema:
type: string
examples:
- 7kPTjHXN98FUutGA
examples:
default:
value: 7kPTjHXN98FUutGA
- name: project_id
in: query
description: 'The ID of the project. To get the Personal tasks that are visible only to you, pass `mytask`.'
required: true
schema:
type: string
examples:
- 2002130601276977jqA
examples:
default:
value: 2002130601276977jqA
- name: limit
in: query
description: The number of tasks to retrieve.
schema:
type: integer
examples:
- 10
examples:
default:
value: 10
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: parent_id
in: query
description: The ID of the parent task.
schema:
type: string
examples:
- 1207810100433344Dtjy
examples:
default:
value: 1207810100433344Dtjy
responses:
'200':
description: Successfully retrieved the tasks.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetTaskListProjectResponse'
security:
- OAuth2Application:
- 'task:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.listByColumn:
get:
tags:
- Task
summary: List out tasks by bucket
description: "Lists out a given number of tasks from a bucket. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: task.listByColumn
parameters:
- name: project_id
in: query
description: The ID of the project.
required: true
schema:
type: string
examples:
- 2002130601276977jqA
examples:
default:
value: 2002130601276977jqA
- name: bucket_id
in: query
description: The ID of the task bucket.
required: true
schema:
type: string
- name: limit
in: query
description: The number of tasks to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the tasks.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetTaskListByColumnResponse'
security:
- OAuth2Application:
- 'task:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.myTaskList:
get:
tags:
- Task
summary: List out my tasks
description: Lists out "my tasks" of the user from a workspace.
operationId: task.myTaskList
parameters:
- name: workspace_id
in: query
description: The ID of the workspace.
required: true
schema:
type: string
examples:
- 7kPTjHXN98FUutGA
examples:
default:
value: 7kPTjHXN98FUutGA
- name: limit
in: query
description: The number of tasks to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved my tasks.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetTaskListMineResponse'
security:
- OAuth2Application:
- 'task:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.create:
post:
tags:
- Task
summary: Create a task
description: Creates a task in a project.
operationId: task.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddTaskParam'
responses:
'200':
description: Successfully posted the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddTaskResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.remove:
post:
tags:
- Task
summary: Delete a task
description: Deletes a task from a project.
operationId: task.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelTaskParam'
responses:
'200':
description: Successfully deleted the task.
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.move:
post:
tags:
- Task
summary: Move a task
description: Moves a task into another project.
operationId: task.move
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/MoveTaskParam'
responses:
'200':
description: Successfully moved the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/MoveTaskResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.update:
post:
tags:
- Task
summary: Update a task
description: Updates a task in a project.
operationId: task.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/PutTaskParam'
responses:
'200':
description: Successfully updated the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/PutTaskResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.assignee.add:
post:
tags:
- Task
summary: Add an assignee
description: Adds an assignee to a task.
operationId: task.assignee.add
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddTaskAssigneeParam'
responses:
'200':
description: Successfully added an assignee for the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddTaskAssigneeResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.assignee.remove:
post:
tags:
- Task
summary: Remove an assignee
description: Removes a member from the managing role for a task.
operationId: task.assignee.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelTaskAssigneeParam'
responses:
'200':
description: Successfully removed the assignee.
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.follow.add:
post:
tags:
- Task
summary: Add a collaborator
description: Adds a collaborator to a task.
operationId: task.follow.add
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddTaskFollowParam'
responses:
'200':
description: Successfully added the collaborator.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddTaskFollowResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.follow.remove:
post:
tags:
- Task
summary: Remove a collaborator
description: Removes a collaborator from a task.
operationId: task.follow.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelTaskFollowParam'
responses:
'200':
description: Successfully removed the collaborator.
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.status.update:
post:
tags:
- Task
summary: Update the status of a task
description: Updates the status of a task.
operationId: task.status.update
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
task_id:
type: string
description: The ID of the task.
examples:
- 190910100433344Dtjf
project_id:
type: string
description: The ID of the project.
examples:
- 2002130601276977jqA
workspace_id:
type: string
description: The ID of the workspace.
examples:
- 210702062416646BVTPW
to_status_id:
type: string
description: The ID of the custom status to update to.
examples:
- 23050403290569QPK9H8
responses:
'200':
description: Successfully updated the status of the task.
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/TaskResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.asset.append:
post:
tags:
- Task
summary: Add attachments
description: Adds file attachments to a task.
operationId: task.asset.append
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AppendAssetTaskParam'
responses:
'200':
description: Successfully added the attachments to the task.
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/task.checklist.create:
post:
tags:
- TaskChecklist
summary: Add a checklist item
description: Adds an item to a task's checklist.
operationId: task.checklist.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddTaskCheckListParam'
responses:
'200':
description: Successfully added the item to the checklist.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddTaskCheckListResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.checklist.info:
get:
tags:
- TaskChecklist
summary: Get a checklist item's information
description: Retrieves information about a checklist item in a task.
operationId: task.checklist.info
parameters:
- name: id
in: query
description: The ID of the checklist item.
required: true
schema:
type: string
examples:
- 280403052250i4iZgjT
examples:
default:
value: 280403052250i4iZgjT
responses:
'200':
description: Successfully retrieved information about the checklist item.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetTaskCheckListResponse'
security:
- OAuth2Application:
- 'task:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.checklist.list:
get:
tags:
- TaskChecklist
summary: List out checklist items
description: "Lists out a given number of items from a task's checklist. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: task.checklist.list
parameters:
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: task_id
in: query
description: The ID of the task.
required: true
schema:
type: string
examples:
- 190910100433344Dtjf
examples:
default:
value: 190910100433344Dtjf
- name: limit
in: query
description: The number of checklist items to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
responses:
'200':
description: Successfully retrieved items from the checklist.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetTaskCheckListListResponse'
security:
- OAuth2Application:
- 'task:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.checklist.remove:
post:
tags:
- TaskChecklist
summary: Delete a checklist item
description: Deletes an item in a task's checklist.
operationId: task.checklist.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelTaskCheckListParam'
responses:
'200':
description: Successfully deleted the checklist item.
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.checklist.update:
post:
tags:
- TaskChecklist
summary: Update a checklist item
description: Updates an existing item of a task's checklist.
operationId: task.checklist.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/PutTaskCheckListParam'
responses:
'200':
description: Successfully updated the checklist item.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/PutTaskCheckListResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.comment.create:
post:
tags:
- TaskComment
summary: Comment on a task
description: Posts a comment on a task.
operationId: task.comment.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddTaskCommentParam'
responses:
'200':
description: Successfully commented on the task.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddTaskCommentResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.comment.list:
get:
tags:
- TaskComment
summary: List out task comments
description: "Lists out a given number of comments on a task. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: task.comment.list
parameters:
- name: offset
in: query
description: The ordinal number of the page of comments to return.
schema:
type: string
- name: body_type
in: query
description: |-
Whether or not to use rich styles.
- `plain`: The `content` value will be parsed as plaintext.
- `json_string`: The `content` value will be parsed as an object representing a rich-formatted text.
schema:
enum:
- plain
- json_string
default: plain
- name: task_id
in: query
description: The ID of the task.
required: true
schema:
type: string
examples:
- 190910100433344Dtjf
examples:
default:
value: 190910100433344Dtjf
- name: limit
in: query
description: The number of comments to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
responses:
'200':
description: Successfully retrieved the comments.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetTaskCommentResponse'
security:
- OAuth2Application:
- 'task:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.comment.remove:
post:
tags:
- TaskComment
summary: Delete a task comment
description: Deletes a comment on a task.
operationId: task.comment.remove
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DelTaskCommentParam'
responses:
'200':
description: Successfully deleted the comment.
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/task.comment.update:
post:
tags:
- TaskComment
summary: Edit a task comment
description: Edits a comment on a task.
operationId: task.comment.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/PutTaskCommentParam'
responses:
'200':
description: Successfully edited the comment.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/PutTaskCommentResponse'
security:
- OAuth2Application:
- 'task:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/contents.info:
get:
tags:
- DirectMessage
summary: Get a chat message's information
description: Retrieves information about a chat message.
operationId: content
parameters:
- name: contents_id
in: query
description: The ID of the chat message.
required: true
schema:
type: string
examples:
- 649b77793d8047f7821a883d1cf50bba
- name: room_id
in: query
description: The ID of the chat.
required: true
schema:
type: string
examples:
- 72f7d16bfab74675940476df159b1730
responses:
'200':
description: Successfully retrieved information about the chat message.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetContentsResponse'
security:
- OAuth2Application:
- 'message:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/contents.list:
get:
tags:
- DirectMessage
summary: List out posts
description: "Lists out a given number of posts in a chat. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: content.list
parameters:
- name: offset_order_type
in: query
description: |
Whether older or newer chat messages than the offset are to be returned, and whether the offset item is to be included or excluded.
- `less`: Returns items older than the offset item.
- `eq_less`: Returns items older than or equal to the offset item.
- `greater`: Returns items newer than the offset item.
- `eq_greater`: Returns items newer than or equal to the offset item.
schema:
enum:
- less
- eq_less
- greater
- eq_greater
- name: limit
in: query
description: The number of chat messages to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: room_id
in: query
description: The ID of the chat from which to get chat messages.
required: true
schema:
type: string
examples:
- 92f7d16bfab74675940476df159b1715
- name: parent_id
in: query
description: The ID of the primary chat message for which associated comments are to be retrieved.
schema:
type: string
examples:
- 62f7d16bfab74675940476df159b1719
- name: offset_contents_id
in: query
description: "If you'd like to get chat messages older than a particular chat message, pass the ID of the baseline chat message for this parameter. If `offset` is passed, this parameter will be ignored."
schema:
type: string
examples:
- 17690cf0abb04a249d15abf42836b0f7
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the chat messages.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetContentsListResponse'
security:
- OAuth2Application:
- 'message:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/contents.create:
post:
tags:
- DirectMessage
summary: Create a chat message
description: Creates a chat message.
operationId: contents.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/CreateContentsParam'
responses:
'200':
description: Successfully created the chat message.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/CreateContentsResponse'
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/contents.update:
post:
tags:
- DirectMessage
summary: Update a chat message
description: Updates a chat message.
operationId: contents.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/UpdateContentsParam'
responses:
'200':
description: Successfully updated the chat message.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/UpdateContentsResponse'
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/contents.delete:
post:
tags:
- DirectMessage
summary: Delete a chat message
description: Deletes a chat message.
operationId: contents.delete
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DeleteContentsParam'
responses:
'200':
description: Successfully deleted the chat message.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/DeleteContentsResponse'
security:
- OAuth2Application:
- 'message:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/room.info:
get:
tags:
- Conversation
summary: Get a chat's information
description: Retrieves information about a chat.
operationId: room.info
parameters:
- name: room_id
in: query
description: The ID of the chat.
required: true
schema:
type: string
examples:
- ef7f9b3e678b4384a91b5abc37ac142n
- name: target_user_id
in: query
description: The user ID of the chat target.
schema:
type: string
examples:
- 2010161727509IJFTiX
responses:
'200':
description: Successfully retrieved the chat's information.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetRoomResponse'
security:
- OAuth2Application:
- 'channel:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/room.list:
get:
tags:
- Conversation
summary: List out chats
description: "Lists out a given number of chats. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: room.list
parameters:
- name: offset_order_type
in: query
description: |
Whether older or newer chat messages than the offset are to be returned, and whether the offset item is to be included or excluded.
- `less`: Returns items older than the offset item, excluding the offset item.
- `eq_less`: Returns items older than or equal to the offset item, including the offset item.
- `greater`: Returns items newer than the offset item, excluding the offset item.
- `eq_greater`: Returns items newer than or equal to the offset item, including the offset item.
schema:
enum:
- less
- eq_less
- greater
- eq_greater
- name: limit
in: query
description: The number of chats to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: filter
in: query
description: The filter of the chat list.
schema:
enum:
- all
- starred
- unread
- name: search
in: query
description: The search keyword to filter the list by.
schema:
type: string
examples:
- keyword
- name: page
in: query
description: The page number for a paginated response.
deprecated: true
schema:
type: integer
examples:
- 2
examples:
default:
value: 2
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the chats.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetRoomListResponse'
security:
- OAuth2Application:
- 'channel:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/room.create:
post:
tags:
- Conversation
summary: Create a chat
description: "Creates a new chat. If a 1:1 chat with the specified member already exists, the response will not create a duplicate but instead return the existing chat's information. For group chats with specified members, a new chat will be created even if one already exists with the same members."
operationId: room.create
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/CreateRoomParam'
responses:
'200':
description: Successfully created the chat.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/CreateRoomResponse'
security:
- OAuth2Application:
- 'channel:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/room.update:
post:
tags:
- Conversation
summary: Update a chat
description: Updates an existing chat.
operationId: room.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/UpdateRoomParam'
responses:
'200':
description: Successfully updated the chat.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/UpdateRoomResponse'
security:
- OAuth2Application:
- 'channel:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/room.leave:
post:
tags:
- Conversation
summary: Leave a chat
description: The use leaves a chat.
operationId: room.levae
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/LeaveRoomParam'
responses:
'200':
description: Successfully left the chat.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/LeaveRoomResponse'
security:
- OAuth2Application:
- 'channel:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/room.invite:
post:
tags:
- Conversation
summary: Invite people
description: Invites people to a chat.
operationId: room.invite
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/InviteRoomParam'
responses:
'200':
description: Successfully invited people to the chat.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/InviteRoomResponse'
security:
- OAuth2Application:
- 'channel:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/customfield.list:
get:
tags:
- CustomField
summary: List out custom fields
description: Lists out all registered custom fields.
operationId: customfield.list
responses:
'200':
description: Successfully retrieved the custom fields.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetCustomFieldListResponse'
security:
- OAuth2Application:
- 'user:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/customfield.add:
post:
tags:
- CustomField
summary: Add a custom field
description: Adds a new custom field for user profiles.
operationId: customfield.add
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddCustomFieldParam'
responses:
'200':
description: Successfully added the custom field.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/AddCustomFieldResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/customfield.delete:
post:
tags:
- CustomField
summary: Delete custom field
description: Deletes a custom field for user profiles.
operationId: customfield.delete
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/DeleteCustomFieldParam'
responses:
'200':
description: Successfully deleted the custom field.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/DeleteCustomFieldResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/customfield.update:
post:
tags:
- CustomField
summary: Update a custom field
description: Updates an existing custom field.
operationId: customfield.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/UpdateCustomFieldParam'
responses:
'200':
description: Successfully updated the custom field.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/UpdateCustomFieldResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/customfield.user.list:
get:
tags:
- CustomField
summary: List out a user's custom fields in use
description: Retrieves the custom fields and their values used in a given user's profile.
operationId: customfield.user.list
parameters:
- name: user_id
in: query
description: The ID of the target user.
required: true
schema:
type: string
examples:
- 2010161727509IJFTiX
examples:
default:
value: 2010161727509IJFTiX
responses:
'200':
description: Successfully retrieved the user's custom field data.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetUserCustomFieldListResponse'
security:
- OAuth2Application:
- 'user:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/customfield.user.update:
post:
tags:
- CustomField
summary: Update a user's custom field data
description: Updates the values of the custom fields used in a given user's profile.
operationId: customfield.user.update
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/UpdateUserCustomFieldParam'
responses:
'200':
description: Successfully updated the user's custom field data.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/UpdateUserCustomFieldResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/approval.create:
post:
tags:
- Approval
summary: Draft a request
description: Creates a request draft for approval.
operationId: approval.CreateApproval
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/CreateApprovalParam'
responses:
'200':
description: Successfully created the request.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/CreateApprovalResponse'
security:
- OAuth2Application:
- 'approval:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/approval.list.received:
get:
tags:
- Approval
summary: List out received requests
description: "Lists out a given number of requests from the user's inbox. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: approval.GetApprovalListReceived
parameters:
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
- name: limit
in: query
description: The number of objects to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: filter.keyword
in: query
description: 'Filter requests whose ID, title, submitter, approvers, recipients match this keyword.'
schema:
type: string
examples:
- keyword
examples:
default:
value: keyword
- name: filter.is_bookmarked
in: query
description: Filter requests that are starred. Pass `1` to this parameter if you'd like to use this filter.
schema:
type: string
examples:
- '1'
examples:
default:
value: '1'
- name: filter.approval_category_ids
in: query
description: 'Filter requests by template in use. Pass a comma-delimited list of template IDs. If you want to include requests with no template, add `none` to the list.'
schema:
type: string
examples:
- 220519031330UwhTYlh
examples:
default:
value: 220519031330UwhTYlh
- name: filter.end_date
in: query
description: Filter requests submitted at or before this datetime. Use the ISO 8601 format in UTC.
schema:
type: string
examples:
- '2022-04-15T05:13:48.713593Z'
examples:
default:
value: '2022-04-15T05:13:48.713593Z'
- name: type
in: query
description: |-
The tab from which to retrieve requests.
- `me`: **My approvals**
- `me_pending`: **My approvals** > **Pending**
- `me_completed`: **My approvals** > **Completed**
- `team`: **Circulated to my team**
- `referrer_team`: **Received by my team**
- `referrer`: **CC'd to me**
schema:
enum:
- me
- me_pending
- me_completed
- team
- referrer_team
- referrer
examples:
- me
examples:
default:
value: me
- name: filter.start_date
in: query
description: Filter requests submitted at or after this datetime. Use the ISO 8601 format in UTC.
schema:
type: string
examples:
- '2021-04-15T05:13:48.713593Z'
examples:
default:
value: '2021-04-15T05:13:48.713593Z'
- name: filter.approval_status
in: query
description: |-
Filter requests whose status matches this setting.
- `1`: Waiting
- `2`: Approved
- `3`: Denied
You can pass a comma-delimited list of status codes (for example, `1,2`).
schema:
type: string
responses:
'200':
description: Successfully retrieved the requests received.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/ApprovalListResponse'
security:
- OAuth2Application:
- 'approval:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/approval.list.sent:
get:
tags:
- Approval
summary: List out submitted requests
description: "Lists out a given number of requests from the user's submissions. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: approval.GetApprovalListSent
parameters:
- name: filter.keyword
in: query
description: 'Filter requests whose ID, title, submitter, approvers, recipients match this keyword.'
schema:
type: string
- name: filter.is_bookmarked
in: query
description: Filter requests that are starred. Pass `1` to this parameter if you'd like to use this filter.
schema:
enum:
- '0'
- '1'
examples:
- '1'
examples:
default:
value: '1'
- name: filter.approval_category_ids
in: query
description: 'Filter requests by template in use. Pass a comma-delimited list of template IDs. If you want to include requests with no template, add `none` to the list.'
schema:
type: string
- name: filter.start_date
in: query
description: Filter requests submitted at or after this datetime. Use the ISO 8601 format in UTC.
schema:
type: string
- name: filter.approval_status
in: query
description: |-
Filter requests whose status matches this setting.
- `1`: Waiting
- `2`: Approved
- `3`: Denied
You can pass a comma-delimited list of status codes (for example, `1,2`).
schema:
type: string
- name: type
in: query
description: |-
The tab from which to retrieve requests.
- `me`: **My submissions**
- `team`: **Circulated to my team**
schema:
type: string
- name: limit
in: query
description: The number of requests to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: filter.end_date
in: query
description: Filter requests submitted at or after this datetime. Use the ISO 8601 format in UTC.
schema:
type: string
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the requests submitted.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/ApprovalListResponse'
security:
- OAuth2Application:
- 'approval:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/approval.list.temp:
get:
tags:
- Approval
summary: List out drafts
description: "Lists out a given number of request drafts. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: approval.GetApprovalListTemp
parameters:
- name: limit
in: query
description: The number of drafts to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the drafts.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/ApprovalListResponse'
security:
- OAuth2Application:
- 'approval:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/approval.category.info:
get:
tags:
- Approval
summary: Get a template's info
description: Retrieves information about a request template.
operationId: approval.GetApprovalCategoryInfo
parameters:
- name: approval_category_id
in: query
description: The ID of the template to view.
schema:
type: string
examples:
- 211018034560kSKpPY2
examples:
default:
value: 211018034560kSKpPY2
responses:
'200':
description: Successfully retrieved information about the template.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetApprovalCategoryInfoResponse'
security:
- OAuth2Application:
- 'approval:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/approval.category.list:
get:
tags:
- Approval
summary: List out templates
description: "Lists out a given number of request templates. This method uses the Swit API's [pagination scheme](/docs/core1/up49a503iuknu-pagination-scheme)."
operationId: approval.GetApprovalCategoryList
parameters:
- name: limit
in: query
description: The number of objects to retrieve.
schema:
type: integer
examples:
- 5
examples:
default:
value: 5
- name: offset
in: query
description: Pass the `offset` string returned by the previous call to skip already returned entries.
schema:
type: string
examples:
- MTUzOTg0NTg2NTAwMA
examples:
default:
value: MTUzOTg0NTg2NTAwMA
responses:
'200':
description: Successfully retrieved the templates.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/ApprovalCategoryListResponse'
security:
- OAuth2Application:
- 'approval:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
/api/organization.user.info:
get:
tags:
- Membership
summary: Get user information
description: Retrieves information of a user in the organization.
operationId: organization.user.info
parameters:
- name: user_id
in: query
description: The ID of the user to retrieve.
required: true
schema:
type: string
examples:
- 230103011810x7bqTRY
responses:
'200':
description: Successfully retrieved the user information.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetOrganizationUserListResponse'
security:
- OAuth2Application:
- 'user:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/organization.user.list:
get:
tags:
- Membership
summary: Get user list
description: Retrieves a list of users in the organization.
operationId: organization.user.list
parameters:
- name: page
in: query
description: The page number for a paginated response.
schema:
type: integer
examples:
- 5
- name: team_id
in: query
description: The ID of the team to filter users by.
schema:
type: string
examples:
- 226616073670YuFtWmv
- name: ws_id
in: query
description: The ID of the workspace to filter users by.
schema:
type: string
examples:
- 2001210215096173faX
- name: keyword
in: query
description: This parameter filters users based on the provided keyword in their names or email addresses.
schema:
type: string
examples:
- Lydia
- name: filters.membership_status
in: query
description: The membership status to filter the users by.
schema:
enum:
- active
- inactive
examples:
- active
- name: cnt
in: query
description: The number of users to return per page.
required: true
schema:
type: integer
examples:
- 10
examples:
default:
value: 10
responses:
'200':
description: Successfully retrieved the user list from the organization.
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
total_rows:
type: integer
examples:
- 250
users:
type: array
description: An object wrapping a Swit resource.
items:
$ref: './swit-schemas.yaml#/GetOrganizationUserListResponse'
security:
- OAuth2Application:
- 'user:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/organization.user.create:
post:
tags:
- Membership
summary: Create a user
description: Creates a user in the organization.
operationId: organization.user.create
requestBody:
content:
application/json:
schema:
type: object
properties:
language:
enum:
- en
- ko
description: The language setting for the user to create.
timezone:
type: string
description: The timezone of the user to create.
examples:
- Asia/Seoul
user_name:
type: string
description: The name of the user to create.
examples:
- Jane Kim
user_email:
type: string
description: The email of the user to create.
examples:
- jane@example.com
tel:
type: string
description: The telephone number of the user to create.
examples:
- +82-10-1234-5678
msg:
type: string
description: The status message of the user to create.
examples:
- Working from home
required:
- user_name
- user_email
responses:
'200':
description: Successfully created the user.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetOrganizationUserListResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/user.organization.batchCreate:
post:
tags:
- Membership
summary: Create guest accounts
description: |-
Invites multiple users as guests to the organization.
> Calling this endpoint to create a user will not trigger an event notification for subscribers to the user creation event.
operationId: user.organization.batchCreate
requestBody:
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/AddCompanyUserListParam'
responses:
'201':
description: Successfully created the guest accounts.
deprecated: true
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/organization.user.activate:
post:
tags:
- Membership
summary: Activate a user
description: Activates a user in an organization.
operationId: organization.user.activate
requestBody:
description: The user to activate.
content:
application/json:
schema:
type: object
properties:
user_id:
type: string
description: The ID of the user to activate.
examples:
- 230103011810x7bqTRY
required:
- user_id
responses:
'204':
description: No content.
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/organization.user.deactivate:
post:
tags:
- Membership
summary: Deactivate a user
description: Deactivates a user in the organization.
operationId: organization.user.deactivate
requestBody:
description: The user to deactivate.
content:
application/json:
schema:
type: object
properties:
user_id:
type: string
description: The ID of the user to deactivate.
examples:
- 230103011810x7bqTRY
required:
- user_id
responses:
'204':
description: No content.
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/organization.user.remove:
post:
tags:
- Membership
summary: Delete a user
description: Deletes a user from the organization.
operationId: organization.user.remove
requestBody:
content:
application/json:
schema:
type: object
properties:
user_id:
type: string
description: The ID of the user to delete from the organization.
examples:
- 200103015310ImIqLWZ
required:
- user_id
responses:
'200':
description: Successfully deleted the user.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/DelCompanyUserResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/user.team.list:
get:
tags:
- Team
summary: List out teams
description: 'List out the child teams of a given team. If no parameters are passed, the list of all teams in the organization is given as a response.'
operationId: user.team.list
parameters:
- name: direct_children_only
in: query
description: Whether to list out only direct child teams of the given parent.
schema:
type: boolean
examples:
- true
- name: parent_id
in: query
description: The ID of the parent team.
schema:
type: string
examples:
- 24567231758btrwFTY
- name: reference
in: query
description: Custom text to be used as a reference. This is useful to store information from another source.
schema:
type: string
examples:
- '145'
responses:
'200':
description: Successfully retrieved the list of teams.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/GetUserTeamListResponse'
security:
- OAuth2Application:
- 'user:read'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/team.create:
post:
tags:
- Team
summary: Create a team
description: Creates a new team in the organization.
operationId: team.create
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The name of the team to create.
examples:
- Design
parent_id:
type: string
description: 'The ID of the parent team under which the new team will be created.If you want to create a new team directly under the organization, rather than as a sub-team of a specific team within the organization, enter the organization id of the top-level team.'
examples:
- 24567231758btrwFTY
reference:
type: string
description: Custom text to be used as a reference. This is useful to store information from another source.
examples:
- '145'
required:
- name
- parent_id
responses:
'200':
description: Successfully created the team.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/TeamCreateResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/team.update:
post:
tags:
- Team
summary: Update a team
description: Updates a team's information including its name and parent team.
operationId: team.update
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The ID of the team to update.
examples:
- 200103015310ImIqLWZ
reference:
type: string
description: Custom text to be used as a reference. This is useful to store information from another source.
examples:
- '145'
name:
type: string
description: The name of the team to update.
examples:
- Design
parent_id:
type: string
description: The ID of the new parent team for the team being updated.
examples:
- 24567231758btrwFTY
required:
- id
responses:
'200':
description: Successfully updated the team's information.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/TeamUpdateResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/team.delete:
post:
tags:
- Team
summary: Delete a team
description: Deletes a team.
operationId: team.delete
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The ID of the team to delete.
examples:
- 200103015310ImIqLWZ
required:
- id
responses:
'200':
description: Successfully deleted the team.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/TeamDeleteResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/team.sort:
post:
tags:
- Team
summary: Sort teams
description: Sort the child teams of a parent team in a given order.
operationId: team.sort
requestBody:
description: ''
required: true
content:
application/json:
schema:
$ref: './swit-schemas.yaml#/TeamSortParam'
responses:
'200':
description: Successfully sorted the teams.
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/team.user.add:
post:
tags:
- Team
summary: Add users to a team
description: Adds users to a team.
operationId: team.user.add
requestBody:
content:
application/json:
schema:
type: object
properties:
user_ids:
type: array
description: The IDs of the users to add.
examples:
- - 220327051250T3AfDDu
- 220828163440rQVO7Tb
items:
type: string
id:
type: string
description: The ID of the team to add the users to.
examples:
- 200103015310ImIqLWZ
responses:
'200':
description: Successfully added the users to the selected team.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/TeamUserCreateResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/team.user.primary.update:
post:
tags:
- Team
summary: Update a user's primary team
description: Updates a user's primary team.
operationId: team.user.primary.update
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The ID of the team to designate as the primary team.
examples:
- 200103015310ImIqLWZ
user_id:
type: string
description: The ID of the user.
examples:
- 2010161727509IJFTiX
required:
- id
- user_id
responses:
'200':
description: Successfully updated the user's primary team.
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
/api/team.user.remove:
post:
tags:
- Team
summary: Remove team members
description: Removes members from a team.
operationId: team.user.remove
requestBody:
description: The members to remove from the team.
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The ID of the team to remove the members from.
examples:
- 200103015310ImIqLWZ
user_ids:
type: array
description: The IDs of the members to remove.
examples:
- - 220327051250T3AfDDu
- 220828163440rQVO7Tb
items:
type: string
required:
- id
- user_ids
responses:
'200':
description: Successfully removed the members from the team.
content:
application/json:
schema:
type: object
properties:
data:
$ref: './swit-schemas.yaml#/TeamUserDeleteResponse'
security:
- OAuth2Application:
- 'admin:write'
servers:
- url: 'https://openapi.swit.io/v1'
description: Production
- url: 'https://openapi.swit.express/v1'
description: Stage
- url: 'https://openapi2.swit.dev/v1'
description: Development
x-internal: false
tags:
- name: User
description: description
- name: Workspace
description: description
- name: Channel
description: description
- name: Message
description: description
- name: MessageComment
description: description
- name: Idea
description: description
- name: IdeaComment
description: description
- name: Project
description: description
- name: ProjectBucket
description: description
- name: Task
description: description
- name: TaskChecklist
description: description
- name: TaskComment
description: description
- name: DirectMessage
description: description
- name: Conversation
description: description
- name: CustomField
description: description
- name: Approval
description: description
- name: Membership
description: description
- name: Team
description: description
- name: Email
description: description
- name: Interface
description: description
- name: Automation
description: description
- name: SecurityCDN
description: description
- name: Task-ISC
description: description
components:
securitySchemes:
OAuth2Application:
type: oauth2
flows:
authorizationCode:
authorizationUrl: 'https://openapi.swit.io/oauth/authorize'
scopes:
'user:write': 'Edit the authorizing user’s account information, profile, and settings'
'presence:write': Change the authorizing user’s presence status
'presence:read': View the authorizing user’s presence status
'approval:write': 'Edit your organization’s Approvals plug-in settings, and draft and submit approval requests'
'approval:read': 'View your organization’s Approvals plug-in settings, and view approval requests accessible to the authorizing user'
'admin:write': 'Edit your organization’s administrative settings, membership and teams'
'admin:read': 'View your organization’s administrative settings, membership and teams'
'workspace:write': Create and edit workspaces
'workspace:read': View information about workspaces
'user:read': 'View the authorizing user’s account information, profile, and settings'
'task:write': Create and edit tasks in projects the authorizing user is in
'task:read': View tasks posted to projects the authorizing user is in
'project:write': Create and edit projects
'project:read': View information about projects
'message:write': Create and edit messages in channels the authorizing user is in
'message:read': View messages posted to channels the authorizing user is in
'idea:write': Create and edit ideas in channels the authorizing user is in
'idea:read': View ideas posted to channels the authorizing user is in
'channel:write': Create and edit channels
'channel:read': View information about channels
'app:install': Add the bot user and extended UI elements for users to interact with the app server
'store:write': Create and delete event subscriptions for the authorizing user’s account
'imap:write': Connect to an IMAP server and read email.
'imap:read': Fetch email details using IMAP.
tokenUrl: 'https://openapi.swit.io/oauth/token'