Docs
/
/

Providers API reference

Complete reference documentation for the Providers resource.

Providers

#

A Provider is a channel-specific configuration that determines how a message is delivered to a recipient.

Slack

#

A Slack provider is a channel-specific configuration that determines how a message is delivered to a recipient via Slack.

List channels

#

List Slack channels for a Slack workspace.

Endpoint

GET/v1/providers/slack/{channel_id}/channels

Path parameters

channel_id
string

The ID of the Knock Slack channel to get channels for.

Query parameters

access_token_object
string

A JSON encoded string containing the access token object reference.

query_options.cursor
string

Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection.

query_options.limit
integer

The maximum number of channels to return. Defaults to 200.

query_options.exclude_archived
boolean

Set to true to exclude archived channels from the list. Defaults to true when not explicitly provided.

query_options.types
string

Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im. Defaults to "public_channel,private_channel". If the user's Slack ID is unavailable, this option is ignored and only public channels are returned.

query_options.team_id
string

Encoded team ID (T1234) to list channels in, required if org token is used.

Returns

ChannelsForSlackProviderResponse

The response from a Slack provider request, containing a list of channels.

next_cursor
string

Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection.

slack_channels
object[]

List of Slack channels.

context_team_id
string
Required

The team ID that the Slack channel belongs to.

id
string
Required

A Slack channel ID from the Slack provider.

is_im
boolean
Required

Whether the Slack channel is an IM channel.

is_private
boolean
Required

Whether the Slack channel is private.

name
string
Required

Slack channel name.

AuthenticationError

Authentication error response

code
string

The error code.

message
string

The error message.

status
integer

The HTTP status code.

type
string

The error type.

Check auth

#

Check if a Slack channel is authenticated.

Endpoint

GET/v1/providers/slack/{channel_id}/auth_check

Path parameters

channel_id
string

The ID of the Knock Slack channel to check.

Query parameters

access_token_object
string

A JSON encoded string containing the access token object reference.

Returns

SlackAuthCheckResponse

The response from a Slack auth check request.

connection
object

A Slack connection object.

ok
boolean

Whether the Slack connection is valid.

reason
string

The reason for the Slack connection if it is not valid.

Revoke access

#

Revoke access for a Slack channel.

Endpoint

PUT/v1/providers/slack/{channel_id}/revoke_access

Path parameters

channel_id
string

The ID of the Knock Slack channel to revoke access for.

Query parameters

access_token_object
string

A JSON encoded string containing the access token object reference.

Returns

SuccessResponse

A response indicating the operation was successful.

ok
string

OK response.

AuthenticationError

Authentication error response

code
string

The error code.

message
string

The error message.

status
integer

The HTTP status code.

type
string

The error type.

Microsoft Teams

#

A Microsoft Teams provider is a channel-specific configuration that determines how a message is delivered to a recipient via Microsoft Teams.

List channels

#

List the Microsoft Teams channels within a team. By default, archived and private channels are excluded from the results.

Endpoint

GET/v1/providers/ms-teams/{channel_id}/channels

Path parameters

channel_id
string

The ID of the Knock Microsoft Teams channel to get channels for.

Query parameters

ms_teams_tenant_object
string

A JSON encoded string containing the Microsoft Teams tenant object reference.

team_id
string

Microsoft Teams team ID.

query_options.$filter
string

OData param passed to the Microsoft Graph API to filter channels.

query_options.$select
string

OData param passed to the Microsoft Graph API to select specific properties.

Returns

ChannelsForMsTeamsProviderResponse

The response from a Microsoft Teams provider request, containing a list of channels.

ms_teams_channels
object[]

List of Microsoft Teams channels.

createdDateTime
string

Microsoft Teams channel created date and time.

description
string

Microsoft Teams channel description.

displayName
string
Required

Microsoft Teams channel name.

id
string
Required

Microsoft Teams channel ID.

isArchived
boolean

Whether the Microsoft Teams channel is archived.

membershipType
string

Microsoft Teams channel membership type.

List teams

#

Get a list of teams belonging to the Microsoft Entra tenant. By default, archived and private channels are excluded from the results.

Endpoint

GET/v1/providers/ms-teams/{channel_id}/teams

Path parameters

channel_id
string

The ID of the Knock Microsoft Teams channel to get teams for.

Query parameters

ms_teams_tenant_object
string

A JSON encoded string containing the Microsoft Teams tenant object reference.

query_options.$filter
string

OData param passed to the Microsoft Graph API to filter teams.

query_options.$select
string

OData param passed to the Microsoft Graph API to select fields on a team.

query_options.$top
integer

OData param passed to the Microsoft Graph API to limit the number of teams returned.

query_options.$skiptoken
string

OData param passed to the Microsoft Graph API to retrieve the next page of results.

Returns

TeamsForMsTeamsProviderResponse

The response from a Microsoft Teams provider request, containing a list of teams.

ms_teams_teams
object[]

List of Microsoft Teams teams.

description
string

Microsoft Teams team description.

displayName
string
Required

Microsoft Teams team display name.

id
string
Required

Microsoft Teams team ID.

skip_token
string

OData param passed to the Microsoft Graph API to retrieve the next page of results.

Check auth

#

Check if a connection to Microsoft Teams has been authorized for a given Microsoft Teams tenant object.

Endpoint

GET/v1/providers/ms-teams/{channel_id}/auth_check

Path parameters

channel_id
string

The ID of the Knock Microsoft Teams channel to check.

Query parameters

ms_teams_tenant_object
string

A JSON encoded string containing the Microsoft Teams tenant object reference.

Returns

MsTeamsAuthCheckResponse

The response from a Microsoft Teams auth check request.

connection
object

A Microsoft Teams connection object.

ok
boolean

Whether the Microsoft Teams connection is valid.

reason
string

The reason for the Microsoft Teams connection if it is not valid.

Revoke access

#

Remove a Microsoft Entra tenant ID from a Microsoft Teams tenant object.

Endpoint

PUT/v1/providers/ms-teams/{channel_id}/revoke_access

Path parameters

channel_id
string

The ID of the Knock Microsoft Teams channel to revoke access for.

Query parameters

ms_teams_tenant_object
string

A JSON encoded string containing the Microsoft Teams tenant object reference.

Returns

SuccessResponse

A response indicating the operation was successful.

ok
string

OK response.

AuthenticationError

Authentication error response

code
string

The error code.

message
string

The error message.

status
integer

The HTTP status code.

type
string

The error type.

New chat