archastro.platform.v1.resources.slack_channel_bindings
1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: 7380ca17d8de 4 5from __future__ import annotations 6 7import builtins 8from typing import Required, TypedDict 9 10from pydantic import BaseModel, Field 11 12from ...runtime.http_client import HttpClient, SyncHttpClient 13from ...types.common import SlackChannelBinding, SlackChannelBindingListResponse 14 15 16class SlackChannelBindingCreateInput(TypedDict, total=False): 17 "Create or update a Slack channel binding" 18 19 agent_user_ids: Required[list[str]] 20 "List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents." 21 channel_id: Required[str] 22 "Slack channel ID to bind (e.g. `C01234ABCDE`). Acts as the natural key of the binding within the workspace." 23 customer_label: str | None 24 "Human-readable label for the customer associated with this channel. Stored in the binding's config. `null` if omitted." 25 is_ext_shared_cached: bool | None 26 "Cached value of Slack's `is_ext_shared` flag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups. `null` if omitted." 27 slack_team_id: Required[str] 28 "Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Identifies which Slack integration to use." 29 team_id: Required[str] 30 "ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team." 31 32 33class SlackChannelBindingDeleteResponse(BaseModel): 34 """ 35 Successful response 36 """ 37 38 channel: str = Field(..., description="Slack channel ID of the binding that was deleted.") 39 deleted: bool = Field( 40 ..., description="Always `true` when the binding was successfully removed." 41 ) 42 43 44class AsyncSlackChannelBindingResource: 45 def __init__(self, http: HttpClient): 46 self._http = http 47 48 async def list( 49 self, 50 *, 51 integration: builtins.list[str] | None = None, 52 team: builtins.list[str] | None = None, 53 agent: builtins.list[str] | None = None, 54 org: builtins.list[str] | None = None, 55 page: int | None = None, 56 per_page: int | None = None, 57 ) -> SlackChannelBindingListResponse: 58 """ 59 List Slack channel bindings 60 Returns a page of Slack channel bindings visible to the authenticated user. 61 Results can be filtered by integration, team, agent, or organization. Omit all 62 filter params to retrieve every binding the caller can see. 63 Pagination is page-based. Pass `page` and `per_page` to navigate large result 64 sets. `page` must be a positive integer; `per_page` must be between 1 and 100. 65 Invalid values return 400. 66 67 Args: 68 integration: Return only bindings whose Slack integration matches one of these integration IDs. Omit to return bindings across all integrations. 69 team: Return only bindings bound to one of these team IDs. Omit to return bindings for all teams. 70 agent: Return only bindings that have at least one of these agent user IDs attached. Omit to return bindings regardless of agent attachment. 71 org: Return only bindings that belong to one of these organization IDs. Omit to return bindings across all organizations visible to the caller. 72 page: Page number to retrieve, 1-indexed. Defaults to 1. Must be a positive integer. 73 per_page: Number of bindings to return per page. Defaults to 25; maximum is 100. 74 75 Returns: 76 Paginated list of Slack channel bindings visible to the caller. 77 """ 78 query: dict[str, object] = {} 79 if integration is not None: 80 query["integration"] = integration 81 if team is not None: 82 query["team"] = team 83 if agent is not None: 84 query["agent"] = agent 85 if org is not None: 86 query["org"] = org 87 if page is not None: 88 query["page"] = page 89 if per_page is not None: 90 query["per_page"] = per_page 91 return await self._http.request( 92 "/api/v1/slack_channel_bindings", 93 query=query, 94 response_type=SlackChannelBindingListResponse, 95 ) 96 97 async def create(self, input: SlackChannelBindingCreateInput) -> SlackChannelBinding: 98 """ 99 Create or update a Slack channel binding 100 Creates a new binding between a Slack channel and a team, or updates the 101 existing binding if one already exists for the given channel. The caller also 102 supplies a list of agents to attach to the binding and enroll as members of the 103 destination team. 104 The caller must have team-manage rights on the destination team (and on the 105 currently bound team if the channel is being re-pointed). Returns 403 if 106 permission is insufficient. All write steps are idempotent, so retrying after 107 a partial failure is safe. 108 On success the REST endpoint returns 201 Created. The script binding 109 (`slack.channel_bindings.upsert`) returns the full binding object including the 110 attached agents. 111 112 Args: 113 input: Request body. 114 input.agent_user_ids: List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents. 115 input.channel_id: Slack channel ID to bind (e.g. `C01234ABCDE`). Acts as the natural key of the binding within the workspace. 116 input.customer_label: Human-readable label for the customer associated with this channel. Stored in the binding's config. `null` if omitted. 117 input.is_ext_shared_cached: Cached value of Slack's `is_ext_shared` flag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups. `null` if omitted. 118 input.slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Identifies which Slack integration to use. 119 input.team_id: ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team. 120 121 Returns: 122 The created or updated Slack channel binding, including the full list of currently attached agents. 123 """ 124 return await self._http.request( 125 "/api/v1/slack_channel_bindings", 126 method="POST", 127 body=input, 128 response_type=SlackChannelBinding, 129 ) 130 131 async def delete(self, channel: str) -> SlackChannelBindingDeleteResponse: 132 """ 133 Delete a Slack channel binding 134 Removes the binding between a Slack channel and its associated team. The 135 channel is identified by its Slack channel ID together with the `slack_team_id` 136 that scopes it to a specific Slack workspace. Removing the binding does not 137 delete the bound team or any conversation threads scoped to it; decommission 138 those resources separately if required. 139 The caller must have team-manage rights on the team the channel is currently 140 bound to. Returning 403 indicates insufficient permission; returning 404 141 indicates the binding does not exist or is not visible to the caller. 142 The REST endpoint returns 204 No Content on success. The script binding 143 (`slack.channel_bindings.delete`) returns a confirmation object so script 144 callers can verify success without an additional fetch. Both paths are 145 idempotent retrying after a partial failure is safe. 146 147 Args: 148 channel: Slack channel ID of the binding to delete (e.g. `C01234ABCDE`). 149 150 Returns: 151 Successful response 152 """ 153 return await self._http.request( 154 f"/api/v1/slack_channel_bindings/{channel}", 155 method="DELETE", 156 response_type=SlackChannelBindingDeleteResponse, 157 ) 158 159 async def get(self, channel: str, slack_team_id: str) -> SlackChannelBinding: 160 """ 161 Retrieve a Slack channel binding 162 Returns the Slack channel binding identified by a Slack channel ID and workspace 163 team ID pair. Use this endpoint to look up the team and agents currently bound 164 to a specific Slack channel. 165 The `channel` path parameter is the Slack channel ID; `slack_team_id` identifies 166 the Slack workspace the channel belongs to, disambiguating channels with the same 167 ID across workspaces. Both parameters are required. Returns 404 if no binding 168 exists for the given pair or the associated Slack integration is not visible to 169 the caller. 170 171 Args: 172 channel: Slack channel ID of the binding to retrieve (e.g. `C01234ABCDE`). 173 slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Used together with `channel` to uniquely identify the binding. 174 175 Returns: 176 The Slack channel binding for the given channel and workspace. 177 """ 178 query: dict[str, object] = {} 179 query["slack_team_id"] = slack_team_id 180 return await self._http.request( 181 f"/api/v1/slack_channel_bindings/{channel}", 182 query=query, 183 response_type=SlackChannelBinding, 184 ) 185 186 187class SlackChannelBindingResource: 188 def __init__(self, http: SyncHttpClient): 189 self._http = http 190 191 def list( 192 self, 193 *, 194 integration: builtins.list[str] | None = None, 195 team: builtins.list[str] | None = None, 196 agent: builtins.list[str] | None = None, 197 org: builtins.list[str] | None = None, 198 page: int | None = None, 199 per_page: int | None = None, 200 ) -> SlackChannelBindingListResponse: 201 """ 202 List Slack channel bindings 203 Returns a page of Slack channel bindings visible to the authenticated user. 204 Results can be filtered by integration, team, agent, or organization. Omit all 205 filter params to retrieve every binding the caller can see. 206 Pagination is page-based. Pass `page` and `per_page` to navigate large result 207 sets. `page` must be a positive integer; `per_page` must be between 1 and 100. 208 Invalid values return 400. 209 210 Args: 211 integration: Return only bindings whose Slack integration matches one of these integration IDs. Omit to return bindings across all integrations. 212 team: Return only bindings bound to one of these team IDs. Omit to return bindings for all teams. 213 agent: Return only bindings that have at least one of these agent user IDs attached. Omit to return bindings regardless of agent attachment. 214 org: Return only bindings that belong to one of these organization IDs. Omit to return bindings across all organizations visible to the caller. 215 page: Page number to retrieve, 1-indexed. Defaults to 1. Must be a positive integer. 216 per_page: Number of bindings to return per page. Defaults to 25; maximum is 100. 217 218 Returns: 219 Paginated list of Slack channel bindings visible to the caller. 220 """ 221 query: dict[str, object] = {} 222 if integration is not None: 223 query["integration"] = integration 224 if team is not None: 225 query["team"] = team 226 if agent is not None: 227 query["agent"] = agent 228 if org is not None: 229 query["org"] = org 230 if page is not None: 231 query["page"] = page 232 if per_page is not None: 233 query["per_page"] = per_page 234 return self._http.request( 235 "/api/v1/slack_channel_bindings", 236 query=query, 237 response_type=SlackChannelBindingListResponse, 238 ) 239 240 def create(self, input: SlackChannelBindingCreateInput) -> SlackChannelBinding: 241 """ 242 Create or update a Slack channel binding 243 Creates a new binding between a Slack channel and a team, or updates the 244 existing binding if one already exists for the given channel. The caller also 245 supplies a list of agents to attach to the binding and enroll as members of the 246 destination team. 247 The caller must have team-manage rights on the destination team (and on the 248 currently bound team if the channel is being re-pointed). Returns 403 if 249 permission is insufficient. All write steps are idempotent, so retrying after 250 a partial failure is safe. 251 On success the REST endpoint returns 201 Created. The script binding 252 (`slack.channel_bindings.upsert`) returns the full binding object including the 253 attached agents. 254 255 Args: 256 input: Request body. 257 input.agent_user_ids: List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents. 258 input.channel_id: Slack channel ID to bind (e.g. `C01234ABCDE`). Acts as the natural key of the binding within the workspace. 259 input.customer_label: Human-readable label for the customer associated with this channel. Stored in the binding's config. `null` if omitted. 260 input.is_ext_shared_cached: Cached value of Slack's `is_ext_shared` flag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups. `null` if omitted. 261 input.slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Identifies which Slack integration to use. 262 input.team_id: ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team. 263 264 Returns: 265 The created or updated Slack channel binding, including the full list of currently attached agents. 266 """ 267 return self._http.request( 268 "/api/v1/slack_channel_bindings", 269 method="POST", 270 body=input, 271 response_type=SlackChannelBinding, 272 ) 273 274 def delete(self, channel: str) -> SlackChannelBindingDeleteResponse: 275 """ 276 Delete a Slack channel binding 277 Removes the binding between a Slack channel and its associated team. The 278 channel is identified by its Slack channel ID together with the `slack_team_id` 279 that scopes it to a specific Slack workspace. Removing the binding does not 280 delete the bound team or any conversation threads scoped to it; decommission 281 those resources separately if required. 282 The caller must have team-manage rights on the team the channel is currently 283 bound to. Returning 403 indicates insufficient permission; returning 404 284 indicates the binding does not exist or is not visible to the caller. 285 The REST endpoint returns 204 No Content on success. The script binding 286 (`slack.channel_bindings.delete`) returns a confirmation object so script 287 callers can verify success without an additional fetch. Both paths are 288 idempotent retrying after a partial failure is safe. 289 290 Args: 291 channel: Slack channel ID of the binding to delete (e.g. `C01234ABCDE`). 292 293 Returns: 294 Successful response 295 """ 296 return self._http.request( 297 f"/api/v1/slack_channel_bindings/{channel}", 298 method="DELETE", 299 response_type=SlackChannelBindingDeleteResponse, 300 ) 301 302 def get(self, channel: str, slack_team_id: str) -> SlackChannelBinding: 303 """ 304 Retrieve a Slack channel binding 305 Returns the Slack channel binding identified by a Slack channel ID and workspace 306 team ID pair. Use this endpoint to look up the team and agents currently bound 307 to a specific Slack channel. 308 The `channel` path parameter is the Slack channel ID; `slack_team_id` identifies 309 the Slack workspace the channel belongs to, disambiguating channels with the same 310 ID across workspaces. Both parameters are required. Returns 404 if no binding 311 exists for the given pair or the associated Slack integration is not visible to 312 the caller. 313 314 Args: 315 channel: Slack channel ID of the binding to retrieve (e.g. `C01234ABCDE`). 316 slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Used together with `channel` to uniquely identify the binding. 317 318 Returns: 319 The Slack channel binding for the given channel and workspace. 320 """ 321 query: dict[str, object] = {} 322 query["slack_team_id"] = slack_team_id 323 return self._http.request( 324 f"/api/v1/slack_channel_bindings/{channel}", 325 query=query, 326 response_type=SlackChannelBinding, 327 )
17class SlackChannelBindingCreateInput(TypedDict, total=False): 18 "Create or update a Slack channel binding" 19 20 agent_user_ids: Required[list[str]] 21 "List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents." 22 channel_id: Required[str] 23 "Slack channel ID to bind (e.g. `C01234ABCDE`). Acts as the natural key of the binding within the workspace." 24 customer_label: str | None 25 "Human-readable label for the customer associated with this channel. Stored in the binding's config. `null` if omitted." 26 is_ext_shared_cached: bool | None 27 "Cached value of Slack's `is_ext_shared` flag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups. `null` if omitted." 28 slack_team_id: Required[str] 29 "Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Identifies which Slack integration to use." 30 team_id: Required[str] 31 "ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team."
Create or update a Slack channel binding
List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents.
Slack channel ID to bind (e.g. C01234ABCDE). Acts as the natural key of the binding within the workspace.
Human-readable label for the customer associated with this channel. Stored in the binding's config. null if omitted.
34class SlackChannelBindingDeleteResponse(BaseModel): 35 """ 36 Successful response 37 """ 38 39 channel: str = Field(..., description="Slack channel ID of the binding that was deleted.") 40 deleted: bool = Field( 41 ..., description="Always `true` when the binding was successfully removed." 42 )
Successful response
45class AsyncSlackChannelBindingResource: 46 def __init__(self, http: HttpClient): 47 self._http = http 48 49 async def list( 50 self, 51 *, 52 integration: builtins.list[str] | None = None, 53 team: builtins.list[str] | None = None, 54 agent: builtins.list[str] | None = None, 55 org: builtins.list[str] | None = None, 56 page: int | None = None, 57 per_page: int | None = None, 58 ) -> SlackChannelBindingListResponse: 59 """ 60 List Slack channel bindings 61 Returns a page of Slack channel bindings visible to the authenticated user. 62 Results can be filtered by integration, team, agent, or organization. Omit all 63 filter params to retrieve every binding the caller can see. 64 Pagination is page-based. Pass `page` and `per_page` to navigate large result 65 sets. `page` must be a positive integer; `per_page` must be between 1 and 100. 66 Invalid values return 400. 67 68 Args: 69 integration: Return only bindings whose Slack integration matches one of these integration IDs. Omit to return bindings across all integrations. 70 team: Return only bindings bound to one of these team IDs. Omit to return bindings for all teams. 71 agent: Return only bindings that have at least one of these agent user IDs attached. Omit to return bindings regardless of agent attachment. 72 org: Return only bindings that belong to one of these organization IDs. Omit to return bindings across all organizations visible to the caller. 73 page: Page number to retrieve, 1-indexed. Defaults to 1. Must be a positive integer. 74 per_page: Number of bindings to return per page. Defaults to 25; maximum is 100. 75 76 Returns: 77 Paginated list of Slack channel bindings visible to the caller. 78 """ 79 query: dict[str, object] = {} 80 if integration is not None: 81 query["integration"] = integration 82 if team is not None: 83 query["team"] = team 84 if agent is not None: 85 query["agent"] = agent 86 if org is not None: 87 query["org"] = org 88 if page is not None: 89 query["page"] = page 90 if per_page is not None: 91 query["per_page"] = per_page 92 return await self._http.request( 93 "/api/v1/slack_channel_bindings", 94 query=query, 95 response_type=SlackChannelBindingListResponse, 96 ) 97 98 async def create(self, input: SlackChannelBindingCreateInput) -> SlackChannelBinding: 99 """ 100 Create or update a Slack channel binding 101 Creates a new binding between a Slack channel and a team, or updates the 102 existing binding if one already exists for the given channel. The caller also 103 supplies a list of agents to attach to the binding and enroll as members of the 104 destination team. 105 The caller must have team-manage rights on the destination team (and on the 106 currently bound team if the channel is being re-pointed). Returns 403 if 107 permission is insufficient. All write steps are idempotent, so retrying after 108 a partial failure is safe. 109 On success the REST endpoint returns 201 Created. The script binding 110 (`slack.channel_bindings.upsert`) returns the full binding object including the 111 attached agents. 112 113 Args: 114 input: Request body. 115 input.agent_user_ids: List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents. 116 input.channel_id: Slack channel ID to bind (e.g. `C01234ABCDE`). Acts as the natural key of the binding within the workspace. 117 input.customer_label: Human-readable label for the customer associated with this channel. Stored in the binding's config. `null` if omitted. 118 input.is_ext_shared_cached: Cached value of Slack's `is_ext_shared` flag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups. `null` if omitted. 119 input.slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Identifies which Slack integration to use. 120 input.team_id: ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team. 121 122 Returns: 123 The created or updated Slack channel binding, including the full list of currently attached agents. 124 """ 125 return await self._http.request( 126 "/api/v1/slack_channel_bindings", 127 method="POST", 128 body=input, 129 response_type=SlackChannelBinding, 130 ) 131 132 async def delete(self, channel: str) -> SlackChannelBindingDeleteResponse: 133 """ 134 Delete a Slack channel binding 135 Removes the binding between a Slack channel and its associated team. The 136 channel is identified by its Slack channel ID together with the `slack_team_id` 137 that scopes it to a specific Slack workspace. Removing the binding does not 138 delete the bound team or any conversation threads scoped to it; decommission 139 those resources separately if required. 140 The caller must have team-manage rights on the team the channel is currently 141 bound to. Returning 403 indicates insufficient permission; returning 404 142 indicates the binding does not exist or is not visible to the caller. 143 The REST endpoint returns 204 No Content on success. The script binding 144 (`slack.channel_bindings.delete`) returns a confirmation object so script 145 callers can verify success without an additional fetch. Both paths are 146 idempotent retrying after a partial failure is safe. 147 148 Args: 149 channel: Slack channel ID of the binding to delete (e.g. `C01234ABCDE`). 150 151 Returns: 152 Successful response 153 """ 154 return await self._http.request( 155 f"/api/v1/slack_channel_bindings/{channel}", 156 method="DELETE", 157 response_type=SlackChannelBindingDeleteResponse, 158 ) 159 160 async def get(self, channel: str, slack_team_id: str) -> SlackChannelBinding: 161 """ 162 Retrieve a Slack channel binding 163 Returns the Slack channel binding identified by a Slack channel ID and workspace 164 team ID pair. Use this endpoint to look up the team and agents currently bound 165 to a specific Slack channel. 166 The `channel` path parameter is the Slack channel ID; `slack_team_id` identifies 167 the Slack workspace the channel belongs to, disambiguating channels with the same 168 ID across workspaces. Both parameters are required. Returns 404 if no binding 169 exists for the given pair or the associated Slack integration is not visible to 170 the caller. 171 172 Args: 173 channel: Slack channel ID of the binding to retrieve (e.g. `C01234ABCDE`). 174 slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Used together with `channel` to uniquely identify the binding. 175 176 Returns: 177 The Slack channel binding for the given channel and workspace. 178 """ 179 query: dict[str, object] = {} 180 query["slack_team_id"] = slack_team_id 181 return await self._http.request( 182 f"/api/v1/slack_channel_bindings/{channel}", 183 query=query, 184 response_type=SlackChannelBinding, 185 )
49 async def list( 50 self, 51 *, 52 integration: builtins.list[str] | None = None, 53 team: builtins.list[str] | None = None, 54 agent: builtins.list[str] | None = None, 55 org: builtins.list[str] | None = None, 56 page: int | None = None, 57 per_page: int | None = None, 58 ) -> SlackChannelBindingListResponse: 59 """ 60 List Slack channel bindings 61 Returns a page of Slack channel bindings visible to the authenticated user. 62 Results can be filtered by integration, team, agent, or organization. Omit all 63 filter params to retrieve every binding the caller can see. 64 Pagination is page-based. Pass `page` and `per_page` to navigate large result 65 sets. `page` must be a positive integer; `per_page` must be between 1 and 100. 66 Invalid values return 400. 67 68 Args: 69 integration: Return only bindings whose Slack integration matches one of these integration IDs. Omit to return bindings across all integrations. 70 team: Return only bindings bound to one of these team IDs. Omit to return bindings for all teams. 71 agent: Return only bindings that have at least one of these agent user IDs attached. Omit to return bindings regardless of agent attachment. 72 org: Return only bindings that belong to one of these organization IDs. Omit to return bindings across all organizations visible to the caller. 73 page: Page number to retrieve, 1-indexed. Defaults to 1. Must be a positive integer. 74 per_page: Number of bindings to return per page. Defaults to 25; maximum is 100. 75 76 Returns: 77 Paginated list of Slack channel bindings visible to the caller. 78 """ 79 query: dict[str, object] = {} 80 if integration is not None: 81 query["integration"] = integration 82 if team is not None: 83 query["team"] = team 84 if agent is not None: 85 query["agent"] = agent 86 if org is not None: 87 query["org"] = org 88 if page is not None: 89 query["page"] = page 90 if per_page is not None: 91 query["per_page"] = per_page 92 return await self._http.request( 93 "/api/v1/slack_channel_bindings", 94 query=query, 95 response_type=SlackChannelBindingListResponse, 96 )
List Slack channel bindings
Returns a page of Slack channel bindings visible to the authenticated user.
Results can be filtered by integration, team, agent, or organization. Omit all
filter params to retrieve every binding the caller can see.
Pagination is page-based. Pass page and per_page to navigate large result
sets. page must be a positive integer; per_page must be between 1 and 100.
Invalid values return 400.
Arguments:
- integration: Return only bindings whose Slack integration matches one of these integration IDs. Omit to return bindings across all integrations.
- team: Return only bindings bound to one of these team IDs. Omit to return bindings for all teams.
- agent: Return only bindings that have at least one of these agent user IDs attached. Omit to return bindings regardless of agent attachment.
- org: Return only bindings that belong to one of these organization IDs. Omit to return bindings across all organizations visible to the caller.
- page: Page number to retrieve, 1-indexed. Defaults to 1. Must be a positive integer.
- per_page: Number of bindings to return per page. Defaults to 25; maximum is 100.
Returns:
Paginated list of Slack channel bindings visible to the caller.
98 async def create(self, input: SlackChannelBindingCreateInput) -> SlackChannelBinding: 99 """ 100 Create or update a Slack channel binding 101 Creates a new binding between a Slack channel and a team, or updates the 102 existing binding if one already exists for the given channel. The caller also 103 supplies a list of agents to attach to the binding and enroll as members of the 104 destination team. 105 The caller must have team-manage rights on the destination team (and on the 106 currently bound team if the channel is being re-pointed). Returns 403 if 107 permission is insufficient. All write steps are idempotent, so retrying after 108 a partial failure is safe. 109 On success the REST endpoint returns 201 Created. The script binding 110 (`slack.channel_bindings.upsert`) returns the full binding object including the 111 attached agents. 112 113 Args: 114 input: Request body. 115 input.agent_user_ids: List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents. 116 input.channel_id: Slack channel ID to bind (e.g. `C01234ABCDE`). Acts as the natural key of the binding within the workspace. 117 input.customer_label: Human-readable label for the customer associated with this channel. Stored in the binding's config. `null` if omitted. 118 input.is_ext_shared_cached: Cached value of Slack's `is_ext_shared` flag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups. `null` if omitted. 119 input.slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Identifies which Slack integration to use. 120 input.team_id: ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team. 121 122 Returns: 123 The created or updated Slack channel binding, including the full list of currently attached agents. 124 """ 125 return await self._http.request( 126 "/api/v1/slack_channel_bindings", 127 method="POST", 128 body=input, 129 response_type=SlackChannelBinding, 130 )
Create or update a Slack channel binding
Creates a new binding between a Slack channel and a team, or updates the
existing binding if one already exists for the given channel. The caller also
supplies a list of agents to attach to the binding and enroll as members of the
destination team.
The caller must have team-manage rights on the destination team (and on the
currently bound team if the channel is being re-pointed). Returns 403 if
permission is insufficient. All write steps are idempotent, so retrying after
a partial failure is safe.
On success the REST endpoint returns 201 Created. The script binding
(slack.channel_bindings.upsert) returns the full binding object including the
attached agents.
Arguments:
- input: Request body.
- input.agent_user_ids: List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents.
- input.channel_id: Slack channel ID to bind (e.g.
C01234ABCDE). Acts as the natural key of the binding within the workspace. - input.customer_label: Human-readable label for the customer associated with this channel. Stored in the binding's config.
nullif omitted. - input.is_ext_shared_cached: Cached value of Slack's
is_ext_sharedflag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups.nullif omitted. - input.slack_team_id: Slack workspace team ID that the channel belongs to (e.g.
T01234ABCDE). Identifies which Slack integration to use. - input.team_id: ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team.
Returns:
The created or updated Slack channel binding, including the full list of currently attached agents.
132 async def delete(self, channel: str) -> SlackChannelBindingDeleteResponse: 133 """ 134 Delete a Slack channel binding 135 Removes the binding between a Slack channel and its associated team. The 136 channel is identified by its Slack channel ID together with the `slack_team_id` 137 that scopes it to a specific Slack workspace. Removing the binding does not 138 delete the bound team or any conversation threads scoped to it; decommission 139 those resources separately if required. 140 The caller must have team-manage rights on the team the channel is currently 141 bound to. Returning 403 indicates insufficient permission; returning 404 142 indicates the binding does not exist or is not visible to the caller. 143 The REST endpoint returns 204 No Content on success. The script binding 144 (`slack.channel_bindings.delete`) returns a confirmation object so script 145 callers can verify success without an additional fetch. Both paths are 146 idempotent retrying after a partial failure is safe. 147 148 Args: 149 channel: Slack channel ID of the binding to delete (e.g. `C01234ABCDE`). 150 151 Returns: 152 Successful response 153 """ 154 return await self._http.request( 155 f"/api/v1/slack_channel_bindings/{channel}", 156 method="DELETE", 157 response_type=SlackChannelBindingDeleteResponse, 158 )
Delete a Slack channel binding
Removes the binding between a Slack channel and its associated team. The
channel is identified by its Slack channel ID together with the slack_team_id
that scopes it to a specific Slack workspace. Removing the binding does not
delete the bound team or any conversation threads scoped to it; decommission
those resources separately if required.
The caller must have team-manage rights on the team the channel is currently
bound to. Returning 403 indicates insufficient permission; returning 404
indicates the binding does not exist or is not visible to the caller.
The REST endpoint returns 204 No Content on success. The script binding
(slack.channel_bindings.delete) returns a confirmation object so script
callers can verify success without an additional fetch. Both paths are
idempotent retrying after a partial failure is safe.
Arguments:
- channel: Slack channel ID of the binding to delete (e.g.
C01234ABCDE).
Returns:
Successful response
160 async def get(self, channel: str, slack_team_id: str) -> SlackChannelBinding: 161 """ 162 Retrieve a Slack channel binding 163 Returns the Slack channel binding identified by a Slack channel ID and workspace 164 team ID pair. Use this endpoint to look up the team and agents currently bound 165 to a specific Slack channel. 166 The `channel` path parameter is the Slack channel ID; `slack_team_id` identifies 167 the Slack workspace the channel belongs to, disambiguating channels with the same 168 ID across workspaces. Both parameters are required. Returns 404 if no binding 169 exists for the given pair or the associated Slack integration is not visible to 170 the caller. 171 172 Args: 173 channel: Slack channel ID of the binding to retrieve (e.g. `C01234ABCDE`). 174 slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Used together with `channel` to uniquely identify the binding. 175 176 Returns: 177 The Slack channel binding for the given channel and workspace. 178 """ 179 query: dict[str, object] = {} 180 query["slack_team_id"] = slack_team_id 181 return await self._http.request( 182 f"/api/v1/slack_channel_bindings/{channel}", 183 query=query, 184 response_type=SlackChannelBinding, 185 )
Retrieve a Slack channel binding
Returns the Slack channel binding identified by a Slack channel ID and workspace
team ID pair. Use this endpoint to look up the team and agents currently bound
to a specific Slack channel.
The channel path parameter is the Slack channel ID; slack_team_id identifies
the Slack workspace the channel belongs to, disambiguating channels with the same
ID across workspaces. Both parameters are required. Returns 404 if no binding
exists for the given pair or the associated Slack integration is not visible to
the caller.
Arguments:
- channel: Slack channel ID of the binding to retrieve (e.g.
C01234ABCDE). - slack_team_id: Slack workspace team ID that the channel belongs to (e.g.
T01234ABCDE). Used together withchannelto uniquely identify the binding.
Returns:
The Slack channel binding for the given channel and workspace.
188class SlackChannelBindingResource: 189 def __init__(self, http: SyncHttpClient): 190 self._http = http 191 192 def list( 193 self, 194 *, 195 integration: builtins.list[str] | None = None, 196 team: builtins.list[str] | None = None, 197 agent: builtins.list[str] | None = None, 198 org: builtins.list[str] | None = None, 199 page: int | None = None, 200 per_page: int | None = None, 201 ) -> SlackChannelBindingListResponse: 202 """ 203 List Slack channel bindings 204 Returns a page of Slack channel bindings visible to the authenticated user. 205 Results can be filtered by integration, team, agent, or organization. Omit all 206 filter params to retrieve every binding the caller can see. 207 Pagination is page-based. Pass `page` and `per_page` to navigate large result 208 sets. `page` must be a positive integer; `per_page` must be between 1 and 100. 209 Invalid values return 400. 210 211 Args: 212 integration: Return only bindings whose Slack integration matches one of these integration IDs. Omit to return bindings across all integrations. 213 team: Return only bindings bound to one of these team IDs. Omit to return bindings for all teams. 214 agent: Return only bindings that have at least one of these agent user IDs attached. Omit to return bindings regardless of agent attachment. 215 org: Return only bindings that belong to one of these organization IDs. Omit to return bindings across all organizations visible to the caller. 216 page: Page number to retrieve, 1-indexed. Defaults to 1. Must be a positive integer. 217 per_page: Number of bindings to return per page. Defaults to 25; maximum is 100. 218 219 Returns: 220 Paginated list of Slack channel bindings visible to the caller. 221 """ 222 query: dict[str, object] = {} 223 if integration is not None: 224 query["integration"] = integration 225 if team is not None: 226 query["team"] = team 227 if agent is not None: 228 query["agent"] = agent 229 if org is not None: 230 query["org"] = org 231 if page is not None: 232 query["page"] = page 233 if per_page is not None: 234 query["per_page"] = per_page 235 return self._http.request( 236 "/api/v1/slack_channel_bindings", 237 query=query, 238 response_type=SlackChannelBindingListResponse, 239 ) 240 241 def create(self, input: SlackChannelBindingCreateInput) -> SlackChannelBinding: 242 """ 243 Create or update a Slack channel binding 244 Creates a new binding between a Slack channel and a team, or updates the 245 existing binding if one already exists for the given channel. The caller also 246 supplies a list of agents to attach to the binding and enroll as members of the 247 destination team. 248 The caller must have team-manage rights on the destination team (and on the 249 currently bound team if the channel is being re-pointed). Returns 403 if 250 permission is insufficient. All write steps are idempotent, so retrying after 251 a partial failure is safe. 252 On success the REST endpoint returns 201 Created. The script binding 253 (`slack.channel_bindings.upsert`) returns the full binding object including the 254 attached agents. 255 256 Args: 257 input: Request body. 258 input.agent_user_ids: List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents. 259 input.channel_id: Slack channel ID to bind (e.g. `C01234ABCDE`). Acts as the natural key of the binding within the workspace. 260 input.customer_label: Human-readable label for the customer associated with this channel. Stored in the binding's config. `null` if omitted. 261 input.is_ext_shared_cached: Cached value of Slack's `is_ext_shared` flag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups. `null` if omitted. 262 input.slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Identifies which Slack integration to use. 263 input.team_id: ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team. 264 265 Returns: 266 The created or updated Slack channel binding, including the full list of currently attached agents. 267 """ 268 return self._http.request( 269 "/api/v1/slack_channel_bindings", 270 method="POST", 271 body=input, 272 response_type=SlackChannelBinding, 273 ) 274 275 def delete(self, channel: str) -> SlackChannelBindingDeleteResponse: 276 """ 277 Delete a Slack channel binding 278 Removes the binding between a Slack channel and its associated team. The 279 channel is identified by its Slack channel ID together with the `slack_team_id` 280 that scopes it to a specific Slack workspace. Removing the binding does not 281 delete the bound team or any conversation threads scoped to it; decommission 282 those resources separately if required. 283 The caller must have team-manage rights on the team the channel is currently 284 bound to. Returning 403 indicates insufficient permission; returning 404 285 indicates the binding does not exist or is not visible to the caller. 286 The REST endpoint returns 204 No Content on success. The script binding 287 (`slack.channel_bindings.delete`) returns a confirmation object so script 288 callers can verify success without an additional fetch. Both paths are 289 idempotent retrying after a partial failure is safe. 290 291 Args: 292 channel: Slack channel ID of the binding to delete (e.g. `C01234ABCDE`). 293 294 Returns: 295 Successful response 296 """ 297 return self._http.request( 298 f"/api/v1/slack_channel_bindings/{channel}", 299 method="DELETE", 300 response_type=SlackChannelBindingDeleteResponse, 301 ) 302 303 def get(self, channel: str, slack_team_id: str) -> SlackChannelBinding: 304 """ 305 Retrieve a Slack channel binding 306 Returns the Slack channel binding identified by a Slack channel ID and workspace 307 team ID pair. Use this endpoint to look up the team and agents currently bound 308 to a specific Slack channel. 309 The `channel` path parameter is the Slack channel ID; `slack_team_id` identifies 310 the Slack workspace the channel belongs to, disambiguating channels with the same 311 ID across workspaces. Both parameters are required. Returns 404 if no binding 312 exists for the given pair or the associated Slack integration is not visible to 313 the caller. 314 315 Args: 316 channel: Slack channel ID of the binding to retrieve (e.g. `C01234ABCDE`). 317 slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Used together with `channel` to uniquely identify the binding. 318 319 Returns: 320 The Slack channel binding for the given channel and workspace. 321 """ 322 query: dict[str, object] = {} 323 query["slack_team_id"] = slack_team_id 324 return self._http.request( 325 f"/api/v1/slack_channel_bindings/{channel}", 326 query=query, 327 response_type=SlackChannelBinding, 328 )
192 def list( 193 self, 194 *, 195 integration: builtins.list[str] | None = None, 196 team: builtins.list[str] | None = None, 197 agent: builtins.list[str] | None = None, 198 org: builtins.list[str] | None = None, 199 page: int | None = None, 200 per_page: int | None = None, 201 ) -> SlackChannelBindingListResponse: 202 """ 203 List Slack channel bindings 204 Returns a page of Slack channel bindings visible to the authenticated user. 205 Results can be filtered by integration, team, agent, or organization. Omit all 206 filter params to retrieve every binding the caller can see. 207 Pagination is page-based. Pass `page` and `per_page` to navigate large result 208 sets. `page` must be a positive integer; `per_page` must be between 1 and 100. 209 Invalid values return 400. 210 211 Args: 212 integration: Return only bindings whose Slack integration matches one of these integration IDs. Omit to return bindings across all integrations. 213 team: Return only bindings bound to one of these team IDs. Omit to return bindings for all teams. 214 agent: Return only bindings that have at least one of these agent user IDs attached. Omit to return bindings regardless of agent attachment. 215 org: Return only bindings that belong to one of these organization IDs. Omit to return bindings across all organizations visible to the caller. 216 page: Page number to retrieve, 1-indexed. Defaults to 1. Must be a positive integer. 217 per_page: Number of bindings to return per page. Defaults to 25; maximum is 100. 218 219 Returns: 220 Paginated list of Slack channel bindings visible to the caller. 221 """ 222 query: dict[str, object] = {} 223 if integration is not None: 224 query["integration"] = integration 225 if team is not None: 226 query["team"] = team 227 if agent is not None: 228 query["agent"] = agent 229 if org is not None: 230 query["org"] = org 231 if page is not None: 232 query["page"] = page 233 if per_page is not None: 234 query["per_page"] = per_page 235 return self._http.request( 236 "/api/v1/slack_channel_bindings", 237 query=query, 238 response_type=SlackChannelBindingListResponse, 239 )
List Slack channel bindings
Returns a page of Slack channel bindings visible to the authenticated user.
Results can be filtered by integration, team, agent, or organization. Omit all
filter params to retrieve every binding the caller can see.
Pagination is page-based. Pass page and per_page to navigate large result
sets. page must be a positive integer; per_page must be between 1 and 100.
Invalid values return 400.
Arguments:
- integration: Return only bindings whose Slack integration matches one of these integration IDs. Omit to return bindings across all integrations.
- team: Return only bindings bound to one of these team IDs. Omit to return bindings for all teams.
- agent: Return only bindings that have at least one of these agent user IDs attached. Omit to return bindings regardless of agent attachment.
- org: Return only bindings that belong to one of these organization IDs. Omit to return bindings across all organizations visible to the caller.
- page: Page number to retrieve, 1-indexed. Defaults to 1. Must be a positive integer.
- per_page: Number of bindings to return per page. Defaults to 25; maximum is 100.
Returns:
Paginated list of Slack channel bindings visible to the caller.
241 def create(self, input: SlackChannelBindingCreateInput) -> SlackChannelBinding: 242 """ 243 Create or update a Slack channel binding 244 Creates a new binding between a Slack channel and a team, or updates the 245 existing binding if one already exists for the given channel. The caller also 246 supplies a list of agents to attach to the binding and enroll as members of the 247 destination team. 248 The caller must have team-manage rights on the destination team (and on the 249 currently bound team if the channel is being re-pointed). Returns 403 if 250 permission is insufficient. All write steps are idempotent, so retrying after 251 a partial failure is safe. 252 On success the REST endpoint returns 201 Created. The script binding 253 (`slack.channel_bindings.upsert`) returns the full binding object including the 254 attached agents. 255 256 Args: 257 input: Request body. 258 input.agent_user_ids: List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents. 259 input.channel_id: Slack channel ID to bind (e.g. `C01234ABCDE`). Acts as the natural key of the binding within the workspace. 260 input.customer_label: Human-readable label for the customer associated with this channel. Stored in the binding's config. `null` if omitted. 261 input.is_ext_shared_cached: Cached value of Slack's `is_ext_shared` flag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups. `null` if omitted. 262 input.slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Identifies which Slack integration to use. 263 input.team_id: ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team. 264 265 Returns: 266 The created or updated Slack channel binding, including the full list of currently attached agents. 267 """ 268 return self._http.request( 269 "/api/v1/slack_channel_bindings", 270 method="POST", 271 body=input, 272 response_type=SlackChannelBinding, 273 )
Create or update a Slack channel binding
Creates a new binding between a Slack channel and a team, or updates the
existing binding if one already exists for the given channel. The caller also
supplies a list of agents to attach to the binding and enroll as members of the
destination team.
The caller must have team-manage rights on the destination team (and on the
currently bound team if the channel is being re-pointed). Returns 403 if
permission is insufficient. All write steps are idempotent, so retrying after
a partial failure is safe.
On success the REST endpoint returns 201 Created. The script binding
(slack.channel_bindings.upsert) returns the full binding object including the
attached agents.
Arguments:
- input: Request body.
- input.agent_user_ids: List of agent user IDs to attach to the binding and enroll as members of the destination team. Pass an empty array to bind the channel without attaching any agents.
- input.channel_id: Slack channel ID to bind (e.g.
C01234ABCDE). Acts as the natural key of the binding within the workspace. - input.customer_label: Human-readable label for the customer associated with this channel. Stored in the binding's config.
nullif omitted. - input.is_ext_shared_cached: Cached value of Slack's
is_ext_sharedflag for the channel. When provided, this value is persisted on the binding to avoid repeated Slack API lookups.nullif omitted. - input.slack_team_id: Slack workspace team ID that the channel belongs to (e.g.
T01234ABCDE). Identifies which Slack integration to use. - input.team_id: ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team.
Returns:
The created or updated Slack channel binding, including the full list of currently attached agents.
275 def delete(self, channel: str) -> SlackChannelBindingDeleteResponse: 276 """ 277 Delete a Slack channel binding 278 Removes the binding between a Slack channel and its associated team. The 279 channel is identified by its Slack channel ID together with the `slack_team_id` 280 that scopes it to a specific Slack workspace. Removing the binding does not 281 delete the bound team or any conversation threads scoped to it; decommission 282 those resources separately if required. 283 The caller must have team-manage rights on the team the channel is currently 284 bound to. Returning 403 indicates insufficient permission; returning 404 285 indicates the binding does not exist or is not visible to the caller. 286 The REST endpoint returns 204 No Content on success. The script binding 287 (`slack.channel_bindings.delete`) returns a confirmation object so script 288 callers can verify success without an additional fetch. Both paths are 289 idempotent retrying after a partial failure is safe. 290 291 Args: 292 channel: Slack channel ID of the binding to delete (e.g. `C01234ABCDE`). 293 294 Returns: 295 Successful response 296 """ 297 return self._http.request( 298 f"/api/v1/slack_channel_bindings/{channel}", 299 method="DELETE", 300 response_type=SlackChannelBindingDeleteResponse, 301 )
Delete a Slack channel binding
Removes the binding between a Slack channel and its associated team. The
channel is identified by its Slack channel ID together with the slack_team_id
that scopes it to a specific Slack workspace. Removing the binding does not
delete the bound team or any conversation threads scoped to it; decommission
those resources separately if required.
The caller must have team-manage rights on the team the channel is currently
bound to. Returning 403 indicates insufficient permission; returning 404
indicates the binding does not exist or is not visible to the caller.
The REST endpoint returns 204 No Content on success. The script binding
(slack.channel_bindings.delete) returns a confirmation object so script
callers can verify success without an additional fetch. Both paths are
idempotent retrying after a partial failure is safe.
Arguments:
- channel: Slack channel ID of the binding to delete (e.g.
C01234ABCDE).
Returns:
Successful response
303 def get(self, channel: str, slack_team_id: str) -> SlackChannelBinding: 304 """ 305 Retrieve a Slack channel binding 306 Returns the Slack channel binding identified by a Slack channel ID and workspace 307 team ID pair. Use this endpoint to look up the team and agents currently bound 308 to a specific Slack channel. 309 The `channel` path parameter is the Slack channel ID; `slack_team_id` identifies 310 the Slack workspace the channel belongs to, disambiguating channels with the same 311 ID across workspaces. Both parameters are required. Returns 404 if no binding 312 exists for the given pair or the associated Slack integration is not visible to 313 the caller. 314 315 Args: 316 channel: Slack channel ID of the binding to retrieve (e.g. `C01234ABCDE`). 317 slack_team_id: Slack workspace team ID that the channel belongs to (e.g. `T01234ABCDE`). Used together with `channel` to uniquely identify the binding. 318 319 Returns: 320 The Slack channel binding for the given channel and workspace. 321 """ 322 query: dict[str, object] = {} 323 query["slack_team_id"] = slack_team_id 324 return self._http.request( 325 f"/api/v1/slack_channel_bindings/{channel}", 326 query=query, 327 response_type=SlackChannelBinding, 328 )
Retrieve a Slack channel binding
Returns the Slack channel binding identified by a Slack channel ID and workspace
team ID pair. Use this endpoint to look up the team and agents currently bound
to a specific Slack channel.
The channel path parameter is the Slack channel ID; slack_team_id identifies
the Slack workspace the channel belongs to, disambiguating channels with the same
ID across workspaces. Both parameters are required. Returns 404 if no binding
exists for the given pair or the associated Slack integration is not visible to
the caller.
Arguments:
- channel: Slack channel ID of the binding to retrieve (e.g.
C01234ABCDE). - slack_team_id: Slack workspace team ID that the channel belongs to (e.g.
T01234ABCDE). Used together withchannelto uniquely identify the binding.
Returns:
The Slack channel binding for the given channel and workspace.