@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • 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.

      Parameters

      • input: {
            agent_user_ids: string[];
            channel_id: string;
            customer_label?: string;
            is_ext_shared_cached?: boolean;
            slack_team_id: string;
            team_id: string;
        }

        Request body.

        • agent_user_ids: string[]

          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.

        • channel_id: string

          Slack channel ID to bind (e.g. C01234ABCDE). Acts as the natural key of the binding within the workspace.

        • Optionalcustomer_label?: string

          Human-readable label for the customer associated with this channel. Stored in the binding's config. null if omitted.

        • Optionalis_ext_shared_cached?: boolean

          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.

        • slack_team_id: string

          Slack workspace team ID that the channel belongs to (e.g. T01234ABCDE). Identifies which Slack integration to use.

        • team_id: string

          ID of the team to bind the Slack channel to. The caller must have team-manage rights on this team.

      Returns Promise<SlackChannelBinding>

      The created or updated Slack channel binding, including the full list of currently attached agents.

    • 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.

      Parameters

      • channel: string

        Slack channel ID of the binding to delete (e.g. C01234ABCDE).

      Returns Promise<{ channel: string; deleted: boolean }>

      Successful response

    • 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.

      Parameters

      • channel: string

        Slack channel ID of the binding to retrieve (e.g. C01234ABCDE).

      • Optionalparams: { slackTeamId?: string }

        Query parameters.

        • OptionalslackTeamId?: string

          Slack workspace team ID that the channel belongs to (e.g. T01234ABCDE). Used together with channel to uniquely identify the binding.

      Returns Promise<SlackChannelBinding>

      The Slack channel binding for the given channel and workspace.

    • 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.

      Parameters

      • Optionalparams: {
            agent?: string[];
            integration?: string[];
            org?: string[];
            page?: number;
            perPage?: number;
            team?: string[];
        }

        Query parameters.

        • Optionalagent?: string[]

          Return only bindings that have at least one of these agent user IDs attached. Omit to return bindings regardless of agent attachment.

        • Optionalintegration?: string[]

          Return only bindings whose Slack integration matches one of these integration IDs. Omit to return bindings across all integrations.

        • Optionalorg?: string[]

          Return only bindings that belong to one of these organization IDs. Omit to return bindings across all organizations visible to the caller.

        • Optionalpage?: number

          Page number to retrieve, 1-indexed. Defaults to 1. Must be a positive integer.

        • OptionalperPage?: number

          Number of bindings to return per page. Defaults to 25; maximum is 100.

        • Optionalteam?: string[]

          Return only bindings bound to one of these team IDs. Omit to return bindings for all teams.

      Returns Promise<SlackChannelBindingListResponse>

      Paginated list of Slack channel bindings visible to the caller.