Skip to main content
Every teams.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
New to Corsair? See API access, authentication, and error handling.

Channels

create

channels.create Create a new channel in a team Risk: write
await corsair.teams.api.channels.create({});
Input
NameTypeRequiredDescription
teamIdstringYes
displayNamestringYes
descriptionstringNo
membershipTypestandard | private | sharedNo
isFavoriteByDefaultbooleanNo
Output
NameTypeRequiredDescription
idstringYes
displayNamestringNo
descriptionstringNo
emailstringNo
webUrlstringNo
membershipTypestringNo
isFavoriteByDefaultbooleanNo
createdDateTimestringNo

delete

channels.delete Delete a channel [DESTRUCTIVE] Risk: destructive
await corsair.teams.api.channels.delete({});
Input
NameTypeRequiredDescription
teamIdstringYes
channelIdstringYes
Output: empty object

get

channels.get Get details of a specific channel Risk: read
await corsair.teams.api.channels.get({});
Input
NameTypeRequiredDescription
teamIdstringYes
channelIdstringYes
Output
NameTypeRequiredDescription
idstringYes
displayNamestringNo
descriptionstringNo
emailstringNo
webUrlstringNo
membershipTypestringNo
isFavoriteByDefaultbooleanNo
createdDateTimestringNo

list

channels.list List channels in a team Risk: read
await corsair.teams.api.channels.list({});
Input
NameTypeRequiredDescription
teamIdstringYes
filterstringNo
Output
NameTypeRequiredDescription
@odata.contextstringNo
@odata.nextLinkstringNo
valueobject[]Yes
{
  id: string,
  displayName?: string,
  description?: string | null,
  email?: string | null,
  webUrl?: string | null,
  membershipType?: string | null,
  isFavoriteByDefault?: boolean | null,
  createdDateTime?: string | null
}[]

update

channels.update Update a channel Risk: write
await corsair.teams.api.channels.update({});
Input
NameTypeRequiredDescription
teamIdstringYes
channelIdstringYes
displayNamestringNo
descriptionstringNo
isFavoriteByDefaultbooleanNo
Output: empty object

Chats

create

chats.create Create a new chat Risk: write
await corsair.teams.api.chats.create({});
Input
NameTypeRequiredDescription
chatTypeoneOnOne | groupYes
topicstringNo
membersobject[]Yes
{
  userId: string,
  roles?: string[]
}[]
Output
NameTypeRequiredDescription
idstringYes
topicstringNo
createdDateTimestringNo
lastUpdatedDateTimestringNo
chatTypestringNo
webUrlstringNo
tenantIdstringNo

get

chats.get Get details of a specific chat Risk: read
await corsair.teams.api.chats.get({});
Input
NameTypeRequiredDescription
chatIdstringYes
Output
NameTypeRequiredDescription
idstringYes
topicstringNo
createdDateTimestringNo
lastUpdatedDateTimestringNo
chatTypestringNo
webUrlstringNo
tenantIdstringNo

list

chats.list List chats for the current user Risk: read
await corsair.teams.api.chats.list({});
Input
NameTypeRequiredDescription
filterstringNo
topnumberNo
Output
NameTypeRequiredDescription
@odata.contextstringNo
@odata.nextLinkstringNo
valueobject[]Yes
{
  id: string,
  topic?: string | null,
  createdDateTime?: string,
  lastUpdatedDateTime?: string,
  chatType?: string,
  webUrl?: string,
  tenantId?: string
}[]

listMessages

chats.listMessages List messages in a chat Risk: read
await corsair.teams.api.chats.listMessages({});
Input
NameTypeRequiredDescription
chatIdstringYes
topnumberNo
skipTokenstringNo
Output
NameTypeRequiredDescription
@odata.contextstringNo
@odata.nextLinkstringNo
valueobject[]Yes
{
  id: string,
  replyToId?: string | null,
  etag?: string,
  messageType?: string,
  createdDateTime?: string,
  lastModifiedDateTime?: string,
  deletedDateTime?: string | null,
  subject?: string | null,
  summary?: string | null,
  chatId?: string | null,
  importance?: string,
  locale?: string,
  webUrl?: string | null,
  from?: {
    application?: {
    } | null,
    device?: {
    } | null,
    user?: {
      id?: string,
      displayName?: string | null,
      userIdentityType?: string
    } | null
  } | null,
  body?: {
    contentType?: text | html,
    content?: string
  },
  channelIdentity?: {
    teamId?: string,
    channelId?: string
  } | null,
  attachments?: {
  }[],
  mentions?: {
  }[],
  reactions?: {
  }[]
}[]

sendMessage

chats.sendMessage Send a message in a chat Risk: write
await corsair.teams.api.chats.sendMessage({});
Input
NameTypeRequiredDescription
chatIdstringYes
bodyobjectYes
importancenormal | high | urgentNo
{
  content: string,
  contentType?: text | html
}
Output
NameTypeRequiredDescription
idstringYes
replyToIdstringNo
etagstringNo
messageTypestringNo
createdDateTimestringNo
lastModifiedDateTimestringNo
deletedDateTimestringNo
subjectstringNo
summarystringNo
chatIdstringNo
importancestringNo
localestringNo
webUrlstringNo
fromobjectNo
bodyobjectNo
channelIdentityobjectNo
attachmentsobject[]No
mentionsobject[]No
reactionsobject[]No
{
  application?: {
  } | null,
  device?: {
  } | null,
  user?: {
    id?: string,
    displayName?: string | null,
    userIdentityType?: string
  } | null
}
{
  contentType?: text | html,
  content?: string
}
{
  teamId?: string,
  channelId?: string
}
{
}[]
{
}[]
{
}[]

Members

add

members.add Add a member to a team Risk: write
await corsair.teams.api.members.add({});
Input
NameTypeRequiredDescription
teamIdstringYes
userIdstringYes
rolesowner | member[]No
Output
NameTypeRequiredDescription
idstringYes
displayNamestringNo
userIdstringNo
emailstringNo
tenantIdstringNo
rolesstring[]No
visibleHistoryStartDateTimestringNo

get

members.get Get a specific team member Risk: read
await corsair.teams.api.members.get({});
Input
NameTypeRequiredDescription
teamIdstringYes
membershipIdstringYes
Output
NameTypeRequiredDescription
idstringYes
displayNamestringNo
userIdstringNo
emailstringNo
tenantIdstringNo
rolesstring[]No
visibleHistoryStartDateTimestringNo

list

members.list List members of a team Risk: read
await corsair.teams.api.members.list({});
Input
NameTypeRequiredDescription
teamIdstringYes
filterstringNo
Output
NameTypeRequiredDescription
@odata.contextstringNo
@odata.nextLinkstringNo
valueobject[]Yes
{
  id: string,
  displayName?: string | null,
  userId?: string | null,
  email?: string | null,
  tenantId?: string | null,
  roles?: string[],
  visibleHistoryStartDateTime?: string | null
}[]

remove

members.remove Remove a member from a team [DESTRUCTIVE] Risk: destructive
await corsair.teams.api.members.remove({});
Input
NameTypeRequiredDescription
teamIdstringYes
membershipIdstringYes
Output: empty object

Messages

delete

messages.delete Delete a channel message [DESTRUCTIVE] Risk: destructive
await corsair.teams.api.messages.delete({});
Input
NameTypeRequiredDescription
teamIdstringYes
channelIdstringYes
messageIdstringYes
Output: empty object

get

messages.get Get a specific channel message Risk: read
await corsair.teams.api.messages.get({});
Input
NameTypeRequiredDescription
teamIdstringYes
channelIdstringYes
messageIdstringYes
Output
NameTypeRequiredDescription
idstringYes
replyToIdstringNo
etagstringNo
messageTypestringNo
createdDateTimestringNo
lastModifiedDateTimestringNo
deletedDateTimestringNo
subjectstringNo
summarystringNo
chatIdstringNo
importancestringNo
localestringNo
webUrlstringNo
fromobjectNo
bodyobjectNo
channelIdentityobjectNo
attachmentsobject[]No
mentionsobject[]No
reactionsobject[]No
{
  application?: {
  } | null,
  device?: {
  } | null,
  user?: {
    id?: string,
    displayName?: string | null,
    userIdentityType?: string
  } | null
}
{
  contentType?: text | html,
  content?: string
}
{
  teamId?: string,
  channelId?: string
}
{
}[]
{
}[]
{
}[]

list

messages.list List messages in a channel Risk: read
await corsair.teams.api.messages.list({});
Input
NameTypeRequiredDescription
teamIdstringYes
channelIdstringYes
topnumberNo
skipTokenstringNo
Output
NameTypeRequiredDescription
@odata.contextstringNo
@odata.nextLinkstringNo
valueobject[]Yes
{
  id: string,
  replyToId?: string | null,
  etag?: string,
  messageType?: string,
  createdDateTime?: string,
  lastModifiedDateTime?: string,
  deletedDateTime?: string | null,
  subject?: string | null,
  summary?: string | null,
  chatId?: string | null,
  importance?: string,
  locale?: string,
  webUrl?: string | null,
  from?: {
    application?: {
    } | null,
    device?: {
    } | null,
    user?: {
      id?: string,
      displayName?: string | null,
      userIdentityType?: string
    } | null
  } | null,
  body?: {
    contentType?: text | html,
    content?: string
  },
  channelIdentity?: {
    teamId?: string,
    channelId?: string
  } | null,
  attachments?: {
  }[],
  mentions?: {
  }[],
  reactions?: {
  }[]
}[]

listReplies

messages.listReplies List replies to a channel message Risk: read
await corsair.teams.api.messages.listReplies({});
Input
NameTypeRequiredDescription
teamIdstringYes
channelIdstringYes
messageIdstringYes
topnumberNo
Output
NameTypeRequiredDescription
@odata.contextstringNo
@odata.nextLinkstringNo
valueobject[]Yes
{
  id: string,
  replyToId?: string | null,
  etag?: string,
  messageType?: string,
  createdDateTime?: string,
  lastModifiedDateTime?: string,
  deletedDateTime?: string | null,
  subject?: string | null,
  summary?: string | null,
  chatId?: string | null,
  importance?: string,
  locale?: string,
  webUrl?: string | null,
  from?: {
    application?: {
    } | null,
    device?: {
    } | null,
    user?: {
      id?: string,
      displayName?: string | null,
      userIdentityType?: string
    } | null
  } | null,
  body?: {
    contentType?: text | html,
    content?: string
  },
  channelIdentity?: {
    teamId?: string,
    channelId?: string
  } | null,
  attachments?: {
  }[],
  mentions?: {
  }[],
  reactions?: {
  }[]
}[]

reply

messages.reply Reply to a message in a channel Risk: write
await corsair.teams.api.messages.reply({});
Input
NameTypeRequiredDescription
teamIdstringYes
channelIdstringYes
messageIdstringYes
bodyobjectYes
importancenormal | high | urgentNo
{
  content: string,
  contentType?: text | html
}
Output
NameTypeRequiredDescription
idstringYes
replyToIdstringNo
etagstringNo
messageTypestringNo
createdDateTimestringNo
lastModifiedDateTimestringNo
deletedDateTimestringNo
subjectstringNo
summarystringNo
chatIdstringNo
importancestringNo
localestringNo
webUrlstringNo
fromobjectNo
bodyobjectNo
channelIdentityobjectNo
attachmentsobject[]No
mentionsobject[]No
reactionsobject[]No
{
  application?: {
  } | null,
  device?: {
  } | null,
  user?: {
    id?: string,
    displayName?: string | null,
    userIdentityType?: string
  } | null
}
{
  contentType?: text | html,
  content?: string
}
{
  teamId?: string,
  channelId?: string
}
{
}[]
{
}[]
{
}[]

send

messages.send Send a message to a channel Risk: write
await corsair.teams.api.messages.send({});
Input
NameTypeRequiredDescription
teamIdstringYes
channelIdstringYes
bodyobjectYes
subjectstringNo
importancenormal | high | urgentNo
{
  content: string,
  contentType?: text | html
}
Output
NameTypeRequiredDescription
idstringYes
replyToIdstringNo
etagstringNo
messageTypestringNo
createdDateTimestringNo
lastModifiedDateTimestringNo
deletedDateTimestringNo
subjectstringNo
summarystringNo
chatIdstringNo
importancestringNo
localestringNo
webUrlstringNo
fromobjectNo
bodyobjectNo
channelIdentityobjectNo
attachmentsobject[]No
mentionsobject[]No
reactionsobject[]No
{
  application?: {
  } | null,
  device?: {
  } | null,
  user?: {
    id?: string,
    displayName?: string | null,
    userIdentityType?: string
  } | null
}
{
  contentType?: text | html,
  content?: string
}
{
  teamId?: string,
  channelId?: string
}
{
}[]
{
}[]
{
}[]

Teams

create

teams.create Create a new team Risk: write
await corsair.teams.api.teams.create({});
Input
NameTypeRequiredDescription
displayNamestringYes
descriptionstringNo
visibilitypublic | privateNo
memberSettingsobjectNo
guestSettingsobjectNo
messagingSettingsobjectNo
funSettingsobjectNo
{
  allowCreateUpdateChannels?: boolean,
  allowDeleteChannels?: boolean,
  allowAddRemoveApps?: boolean,
  allowCreateUpdateRemoveTabs?: boolean,
  allowCreateUpdateRemoveConnectors?: boolean
}
{
  allowCreateUpdateChannels?: boolean,
  allowDeleteChannels?: boolean
}
{
  allowUserEditMessages?: boolean,
  allowUserDeleteMessages?: boolean,
  allowOwnerDeleteMessages?: boolean,
  allowTeamMentions?: boolean,
  allowChannelMentions?: boolean
}
{
  allowGiphy?: boolean,
  giphyContentRating?: string,
  allowStickersAndMemes?: boolean,
  allowCustomMemes?: boolean
}
Output
NameTypeRequiredDescription
idstringNo
displayNamestringNo
descriptionstringNo

delete

teams.delete Delete a team [DESTRUCTIVE] Risk: destructive
await corsair.teams.api.teams.delete({});
Input
NameTypeRequiredDescription
teamIdstringYes
Output: empty object

get

teams.get Get details of a specific team Risk: read
await corsair.teams.api.teams.get({});
Input
NameTypeRequiredDescription
teamIdstringYes
Output
NameTypeRequiredDescription
idstringYes
displayNamestringNo
descriptionstringNo
internalIdstringNo
classificationstringNo
specializationstringNo
visibilitystringNo
webUrlstringNo
isArchivedbooleanNo
memberSettingsobjectNo
guestSettingsobjectNo
messagingSettingsobjectNo
funSettingsobjectNo
{
  allowCreateUpdateChannels?: boolean,
  allowDeleteChannels?: boolean,
  allowAddRemoveApps?: boolean,
  allowCreateUpdateRemoveTabs?: boolean,
  allowCreateUpdateRemoveConnectors?: boolean
}
{
  allowCreateUpdateChannels?: boolean,
  allowDeleteChannels?: boolean
}
{
  allowUserEditMessages?: boolean,
  allowUserDeleteMessages?: boolean,
  allowOwnerDeleteMessages?: boolean,
  allowTeamMentions?: boolean,
  allowChannelMentions?: boolean
}
{
  allowGiphy?: boolean,
  giphyContentRating?: string,
  allowStickersAndMemes?: boolean,
  allowCustomMemes?: boolean
}

list

teams.list List teams the current user is a member of Risk: read
await corsair.teams.api.teams.list({});
Input
NameTypeRequiredDescription
filterstringNo
selectstringNo
topnumberNo
skipTokenstringNo
Output
NameTypeRequiredDescription
@odata.contextstringNo
@odata.countnumberNo
@odata.nextLinkstringNo
valueobject[]Yes
{
  id: string,
  displayName?: string,
  description?: string | null,
  internalId?: string | null,
  classification?: string | null,
  specialization?: string | null,
  visibility?: string | null,
  webUrl?: string | null,
  isArchived?: boolean | null,
  memberSettings?: {
    allowCreateUpdateChannels?: boolean,
    allowDeleteChannels?: boolean,
    allowAddRemoveApps?: boolean,
    allowCreateUpdateRemoveTabs?: boolean,
    allowCreateUpdateRemoveConnectors?: boolean
  } | null,
  guestSettings?: {
    allowCreateUpdateChannels?: boolean,
    allowDeleteChannels?: boolean
  } | null,
  messagingSettings?: {
    allowUserEditMessages?: boolean,
    allowUserDeleteMessages?: boolean,
    allowOwnerDeleteMessages?: boolean,
    allowTeamMentions?: boolean,
    allowChannelMentions?: boolean
  } | null,
  funSettings?: {
    allowGiphy?: boolean,
    giphyContentRating?: string,
    allowStickersAndMemes?: boolean,
    allowCustomMemes?: boolean
  } | null
}[]

update

teams.update Update team settings Risk: write
await corsair.teams.api.teams.update({});
Input
NameTypeRequiredDescription
teamIdstringYes
displayNamestringNo
descriptionstringNo
visibilitystringNo
memberSettingsobjectNo
guestSettingsobjectNo
messagingSettingsobjectNo
funSettingsobjectNo
{
  allowCreateUpdateChannels?: boolean,
  allowDeleteChannels?: boolean,
  allowAddRemoveApps?: boolean,
  allowCreateUpdateRemoveTabs?: boolean,
  allowCreateUpdateRemoveConnectors?: boolean
}
{
  allowCreateUpdateChannels?: boolean,
  allowDeleteChannels?: boolean
}
{
  allowUserEditMessages?: boolean,
  allowUserDeleteMessages?: boolean,
  allowOwnerDeleteMessages?: boolean,
  allowTeamMentions?: boolean,
  allowChannelMentions?: boolean
}
{
  allowGiphy?: boolean,
  giphyContentRating?: string,
  allowStickersAndMemes?: boolean,
  allowCustomMemes?: boolean
}
Output: empty object