slackapi

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Block builders + a few helpers for things Slack's flat OpenAPI doesn't cover (block kit composition, message references, reaction targets).

Pure data — every type here marshals straight to the JSON shape Slack expects on the wire. Pass a `[]Block` to chat.postMessage / chat.update via SerializeBlocks(), or use BlocksJSON() inline if you only need the string.

Package slackapi is the typed Slack Web API client used by slackbuzz-cli.

It mirrors the clickup-cli `internal/apiv{2,3}` pattern: a small hand-written transport (this file) plus generated operation wrappers + types (operations.gen.go, types.gen.go, scopes.gen.go) produced from `api/specs/slack_web.json` via `cmd/gen-api`.

The hand-written surface is intentionally minimal — everything that could drift from the spec is generated. Add an operation? Run `make api-gen`. Add a scope? It comes for free from the spec.

Hand-written file-upload helper.

Slack hard-deprecated the legacy /files.upload endpoint in 2026 and fresh requests now return method_deprecated. Modern uploads use a 3-step external flow:

  1. files.getUploadURLExternal — POST filename + length, get back a presigned upload URL and a file_id.
  2. POST the file content to the presigned URL (multipart/form-data, "filename" field). No auth header on this hop.
  3. files.completeUploadExternal — POST the file_id (in a JSON-string array along with optional title), channel_id, initial_comment, thread_ts. This is the call that actually shares the file.

The public UploadFile signature is unchanged so call sites don't need to touch anything; the 3-step dance is internal.

Hand-written operation wrappers for Slack methods that are live in the API but missing from slack_web_openapi_v2.json. Keep this small — regenerate from the spec instead whenever Slack ships an updated one.

Hand-written augmentations to types.gen.go.

Most types come from the OpenAPI spec via cmd/gen-api. This file is just for things the spec doesn't cover:

  • Methods missing from Slack's published spec (e.g. search.files)
  • Convenience helpers (HistoryPayload) that compose generated types

If you find yourself adding a type that mirrors a spec definition, stop — extend the generator instead so the spec stays the source of truth.

Index

Constants

View Source
const (
	CodeMissingScope      = "missing_scope"
	CodeNotAuthed         = "not_authed"
	CodeInvalidAuth       = "invalid_auth"
	CodeAccountInactive   = "account_inactive"
	CodeTokenRevoked      = "token_revoked"
	CodeRatelimited       = "ratelimited"
	CodeChannelNotFound   = "channel_not_found"
	CodeUserNotFound      = "user_not_found"
	CodeNotInChannel      = "not_in_channel"
	CodeIsArchived        = "is_archived"
	CodeMessageNotFound   = "message_not_found"
	CodeCantUpdateMessage = "cant_update_message"
	CodeCantDeleteMessage = "cant_delete_message"
)

Slack's error code constants. Use errors.Is(err, ErrMissingScope) etc. to test for specific failure modes — see the sentinel errors below.

View Source
const BaseURL = "https://slack.com/api"

BaseURL is Slack's Web API root.

Variables

View Source
var (
	ErrMissingScope    = &APIError{Code: CodeMissingScope}
	ErrNotAuthed       = &APIError{Code: CodeNotAuthed}
	ErrInvalidAuth     = &APIError{Code: CodeInvalidAuth}
	ErrAccountInactive = &APIError{Code: CodeAccountInactive}
	ErrTokenRevoked    = &APIError{Code: CodeTokenRevoked}
	ErrRatelimited     = &APIError{Code: CodeRatelimited}
	ErrChannelNotFound = &APIError{Code: CodeChannelNotFound}
	ErrUserNotFound    = &APIError{Code: CodeUserNotFound}
	ErrNotInChannel    = &APIError{Code: CodeNotInChannel}
	ErrIsArchived      = &APIError{Code: CodeIsArchived}
	ErrMessageNotFound = &APIError{Code: CodeMessageNotFound}
)

Sentinel errors callers can match against with errors.Is.

Each sentinel corresponds to one of the well-known Slack error codes listed above. The transport returns an *APIError; errors.Is walks its Unwrap chain to match these sentinels by code.

View Source
var MethodScopes = map[string][]string{}/* 174 elements not displayed */

MethodScopes maps every Slack Web API method to the OAuth scopes Slack requires (any one of which is sufficient — Slack's spec lists them as a single union via security[0].slackAuth).

Generated from api/specs/slack_web.json.

Functions

func AllScopes

func AllScopes() []string

AllScopes returns every scope referenced by any method, deduplicated.

func BlocksJSON

func BlocksJSON(blocks []Block) string

BlocksJSON serializes a slice of blocks to the JSON-string form Slack's chat.postMessage / chat.update expect on the `blocks` form parameter.

Returns "" for an empty input so callers can pass it directly without special-casing.

func Do

func Do(ctx context.Context, c *Client, method string, form url.Values, out Envelope) ([]byte, error)

Do POSTs the given form values to the named Slack method, decodes the JSON response into out (which must implement Envelope, normally by embedding BaseResponse), and returns the raw response body for callers who need typed access to method-specific fields.

Generated wrappers all bottom out here. Callers do not normally invoke Do directly — use ConversationsHistory(...) etc.

func ScopesForMethods

func ScopesForMethods(methods []string) []string

ScopesForMethods returns the union of scopes for the given methods.

Types

type APIError

type APIError struct {
	Method  string
	Code    string // Slack's machine-readable error string ("missing_scope", "channel_not_found", ...)
	Warning string
	// NeededScopes / ProvidedScopes are populated by the transport when
	// the response carries Slack's `needed`/`provided` scope split. Only
	// applies to Code == CodeMissingScope.
	NeededScopes   []string
	ProvidedScopes []string
}

APIError is the typed error returned by every operation when Slack's response envelope says ok=false.

Match specific failures with errors.Is:

if errors.Is(err, slackapi.ErrChannelNotFound) {
    // …handle the user typing a stale channel ID
}

Or pull the typed value to read scope context:

var apiErr *slackapi.APIError
if errors.As(err, &apiErr) && apiErr.Code == slackapi.CodeMissingScope {
    fmt.Printf("Missing: %v\n", apiErr.NeededScopes)
}

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) Is

func (e *APIError) Is(target error) bool

Is supports errors.Is matching against the sentinel error values declared above. The match is by Code only — Method/Warning are ignored.

type APITestParams

type APITestParams struct {
	Error string `url:"error,omitempty"` // Error response to return
	Foo   string `url:"foo,omitempty"`   // example property to return
}

APITestParams holds the parameters for the api.test method.

type APITestResponse

type APITestResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

APITestResponse is the typed response envelope for api.test.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func APITest

func APITest(ctx context.Context, c *Client, params *APITestParams) (*APITestResponse, error)

APITest calls Slack's api.test method.

Required scopes (any one combination): none

type AdminAppsApproveParams

type AdminAppsApproveParams struct {
	AppID     string `url:"app_id,omitempty"`     // The id of the app to approve.
	RequestID string `url:"request_id,omitempty"` // The id of the request to approve.
	TeamID    string `url:"team_id,omitempty"`
}

AdminAppsApproveParams holds the parameters for the admin.apps.approve method.

type AdminAppsApproveResponse

type AdminAppsApproveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminAppsApproveResponse is the typed response envelope for admin.apps.approve.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminAppsApprove

func AdminAppsApprove(ctx context.Context, c *Client, params *AdminAppsApproveParams) (*AdminAppsApproveResponse, error)

AdminAppsApprove calls Slack's admin.apps.approve method.

Required scopes (any one combination): admin.apps:write

type AdminAppsApprovedListParams

type AdminAppsApprovedListParams struct {
	Limit        int    `url:"limit,omitempty"`  // The maximum number of items to return. Must be between 1 - 1000 both inclusive.
	Cursor       string `url:"cursor,omitempty"` // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page
	TeamID       string `url:"team_id,omitempty"`
	EnterpriseID string `url:"enterprise_id,omitempty"`
}

AdminAppsApprovedListParams holds the parameters for the admin.apps.approved.list method.

type AdminAppsApprovedListResponse

type AdminAppsApprovedListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminAppsApprovedListResponse is the typed response envelope for admin.apps.approved.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminAppsApprovedList

func AdminAppsApprovedList(ctx context.Context, c *Client, params *AdminAppsApprovedListParams) (*AdminAppsApprovedListResponse, error)

AdminAppsApprovedList calls Slack's admin.apps.approved.list method.

Required scopes (any one combination): admin.apps:read

type AdminAppsRequestsListParams

type AdminAppsRequestsListParams struct {
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return. Must be between 1 - 1000 both inclusive.
	Cursor string `url:"cursor,omitempty"` // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page
	TeamID string `url:"team_id,omitempty"`
}

AdminAppsRequestsListParams holds the parameters for the admin.apps.requests.list method.

type AdminAppsRequestsListResponse

type AdminAppsRequestsListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminAppsRequestsListResponse is the typed response envelope for admin.apps.requests.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminAppsRequestsList

func AdminAppsRequestsList(ctx context.Context, c *Client, params *AdminAppsRequestsListParams) (*AdminAppsRequestsListResponse, error)

AdminAppsRequestsList calls Slack's admin.apps.requests.list method.

Required scopes (any one combination): admin.apps:read

type AdminAppsRestrictParams

type AdminAppsRestrictParams struct {
	AppID     string `url:"app_id,omitempty"`     // The id of the app to restrict.
	RequestID string `url:"request_id,omitempty"` // The id of the request to restrict.
	TeamID    string `url:"team_id,omitempty"`
}

AdminAppsRestrictParams holds the parameters for the admin.apps.restrict method.

type AdminAppsRestrictResponse

type AdminAppsRestrictResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminAppsRestrictResponse is the typed response envelope for admin.apps.restrict.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminAppsRestrict

func AdminAppsRestrict(ctx context.Context, c *Client, params *AdminAppsRestrictParams) (*AdminAppsRestrictResponse, error)

AdminAppsRestrict calls Slack's admin.apps.restrict method.

Required scopes (any one combination): admin.apps:write

type AdminAppsRestrictedListParams

type AdminAppsRestrictedListParams struct {
	Limit        int    `url:"limit,omitempty"`  // The maximum number of items to return. Must be between 1 - 1000 both inclusive.
	Cursor       string `url:"cursor,omitempty"` // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page
	TeamID       string `url:"team_id,omitempty"`
	EnterpriseID string `url:"enterprise_id,omitempty"`
}

AdminAppsRestrictedListParams holds the parameters for the admin.apps.restricted.list method.

type AdminAppsRestrictedListResponse

type AdminAppsRestrictedListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminAppsRestrictedListResponse is the typed response envelope for admin.apps.restricted.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminAppsRestrictedList

func AdminAppsRestrictedList(ctx context.Context, c *Client, params *AdminAppsRestrictedListParams) (*AdminAppsRestrictedListResponse, error)

AdminAppsRestrictedList calls Slack's admin.apps.restricted.list method.

Required scopes (any one combination): admin.apps:read

type AdminConversationsArchiveParams

type AdminConversationsArchiveParams struct {
	ChannelID string `url:"channel_id"` // The channel to archive.
}

AdminConversationsArchiveParams holds the parameters for the admin.conversations.archive method.

type AdminConversationsArchiveResponse

type AdminConversationsArchiveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsArchiveResponse is the typed response envelope for admin.conversations.archive.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsArchive

func AdminConversationsArchive(ctx context.Context, c *Client, params *AdminConversationsArchiveParams) (*AdminConversationsArchiveResponse, error)

AdminConversationsArchive calls Slack's admin.conversations.archive method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsConvertToPrivateParams

type AdminConversationsConvertToPrivateParams struct {
	ChannelID string `url:"channel_id"` // The channel to convert to private.
}

AdminConversationsConvertToPrivateParams holds the parameters for the admin.conversations.convertToPrivate method.

type AdminConversationsConvertToPrivateResponse

type AdminConversationsConvertToPrivateResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsConvertToPrivateResponse is the typed response envelope for admin.conversations.convertToPrivate.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsConvertToPrivate

AdminConversationsConvertToPrivate calls Slack's admin.conversations.convertToPrivate method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsCreateParams

type AdminConversationsCreateParams struct {
	Name        string `url:"name"`                  // Name of the public or private channel to create.
	Description string `url:"description,omitempty"` // Description of the public or private channel to create.
	IsPrivate   bool   `url:"is_private"`            // When `true`, creates a private channel instead of a public channel
	OrgWide     bool   `url:"org_wide,omitempty"`    // When `true`, the channel will be available org-wide. Note: if the channel is not `org_wide=true`, you must specify a `team_id` for this chan...
	TeamID      string `url:"team_id,omitempty"`     // The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`.
}

AdminConversationsCreateParams holds the parameters for the admin.conversations.create method.

type AdminConversationsCreateResponse

type AdminConversationsCreateResponse struct {
	BaseResponse
	ChannelID string          `json:"channel_id,omitempty"`
	Raw       json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsCreateResponse is the typed response envelope for admin.conversations.create.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsCreate

func AdminConversationsCreate(ctx context.Context, c *Client, params *AdminConversationsCreateParams) (*AdminConversationsCreateResponse, error)

AdminConversationsCreate calls Slack's admin.conversations.create method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsDeleteParams

type AdminConversationsDeleteParams struct {
	ChannelID string `url:"channel_id"` // The channel to delete.
}

AdminConversationsDeleteParams holds the parameters for the admin.conversations.delete method.

type AdminConversationsDeleteResponse

type AdminConversationsDeleteResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsDeleteResponse is the typed response envelope for admin.conversations.delete.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsDelete

func AdminConversationsDelete(ctx context.Context, c *Client, params *AdminConversationsDeleteParams) (*AdminConversationsDeleteResponse, error)

AdminConversationsDelete calls Slack's admin.conversations.delete method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsDisconnectSharedParams

type AdminConversationsDisconnectSharedParams struct {
	ChannelID      string `url:"channel_id"`                 // The channel to be disconnected from some workspaces.
	LeavingTeamIds string `url:"leaving_team_ids,omitempty"` // The team to be removed from the channel. Currently only a single team id can be specified.
}

AdminConversationsDisconnectSharedParams holds the parameters for the admin.conversations.disconnectShared method.

type AdminConversationsDisconnectSharedResponse

type AdminConversationsDisconnectSharedResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsDisconnectSharedResponse is the typed response envelope for admin.conversations.disconnectShared.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsDisconnectShared

AdminConversationsDisconnectShared calls Slack's admin.conversations.disconnectShared method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsEkmListOriginalConnectedChannelInfoParams

type AdminConversationsEkmListOriginalConnectedChannelInfoParams struct {
	ChannelIds string `url:"channel_ids,omitempty"` // A comma-separated list of channels to filter to.
	TeamIds    string `url:"team_ids,omitempty"`    // A comma-separated list of the workspaces to which the channels you would like returned belong.
	Limit      int    `url:"limit,omitempty"`       // The maximum number of items to return. Must be between 1 - 1000 both inclusive.
	Cursor     string `url:"cursor,omitempty"`      // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
}

AdminConversationsEkmListOriginalConnectedChannelInfoParams holds the parameters for the admin.conversations.ekm.listOriginalConnectedChannelInfo method.

type AdminConversationsEkmListOriginalConnectedChannelInfoResponse

type AdminConversationsEkmListOriginalConnectedChannelInfoResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsEkmListOriginalConnectedChannelInfoResponse is the typed response envelope for admin.conversations.ekm.listOriginalConnectedChannelInfo.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsEkmListOriginalConnectedChannelInfo

AdminConversationsEkmListOriginalConnectedChannelInfo calls Slack's admin.conversations.ekm.listOriginalConnectedChannelInfo method.

Required scopes (any one combination): admin.conversations:read

type AdminConversationsGetConversationPrefsParams

type AdminConversationsGetConversationPrefsParams struct {
	ChannelID string `url:"channel_id"` // The channel to get preferences for.
}

AdminConversationsGetConversationPrefsParams holds the parameters for the admin.conversations.getConversationPrefs method.

type AdminConversationsGetConversationPrefsResponse

type AdminConversationsGetConversationPrefsResponse struct {
	BaseResponse
	Prefs map[string]any  `json:"prefs,omitempty"`
	Raw   json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsGetConversationPrefsResponse is the typed response envelope for admin.conversations.getConversationPrefs.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsGetConversationPrefs

AdminConversationsGetConversationPrefs calls Slack's admin.conversations.getConversationPrefs method.

Required scopes (any one combination): admin.conversations:read

type AdminConversationsGetTeamsParams

type AdminConversationsGetTeamsParams struct {
	ChannelID string `url:"channel_id"`       // The channel to determine connected workspaces within the organization for.
	Cursor    string `url:"cursor,omitempty"` // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page
	Limit     int    `url:"limit,omitempty"`  // The maximum number of items to return. Must be between 1 - 1000 both inclusive.
}

AdminConversationsGetTeamsParams holds the parameters for the admin.conversations.getTeams method.

type AdminConversationsGetTeamsResponse

type AdminConversationsGetTeamsResponse struct {
	BaseResponse
	TeamIds []string        `json:"team_ids,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsGetTeamsResponse is the typed response envelope for admin.conversations.getTeams.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsGetTeams

func AdminConversationsGetTeams(ctx context.Context, c *Client, params *AdminConversationsGetTeamsParams) (*AdminConversationsGetTeamsResponse, error)

AdminConversationsGetTeams calls Slack's admin.conversations.getTeams method.

Required scopes (any one combination): admin.conversations:read

type AdminConversationsInviteParams

type AdminConversationsInviteParams struct {
	UserIds   string `url:"user_ids"`   // The users to invite.
	ChannelID string `url:"channel_id"` // The channel that the users will be invited to.
}

AdminConversationsInviteParams holds the parameters for the admin.conversations.invite method.

type AdminConversationsInviteResponse

type AdminConversationsInviteResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsInviteResponse is the typed response envelope for admin.conversations.invite.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsInvite

func AdminConversationsInvite(ctx context.Context, c *Client, params *AdminConversationsInviteParams) (*AdminConversationsInviteResponse, error)

AdminConversationsInvite calls Slack's admin.conversations.invite method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsRenameParams

type AdminConversationsRenameParams struct {
	ChannelID string `url:"channel_id"` // The channel to rename.
	Name      string `url:"name"`
}

AdminConversationsRenameParams holds the parameters for the admin.conversations.rename method.

type AdminConversationsRenameResponse

type AdminConversationsRenameResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsRenameResponse is the typed response envelope for admin.conversations.rename.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsRename

func AdminConversationsRename(ctx context.Context, c *Client, params *AdminConversationsRenameParams) (*AdminConversationsRenameResponse, error)

AdminConversationsRename calls Slack's admin.conversations.rename method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsRestrictAccessAddGroupParams

type AdminConversationsRestrictAccessAddGroupParams struct {
	TeamID    string `url:"team_id,omitempty"` // The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that ar...
	GroupID   string `url:"group_id"`          // The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-Grid-org) ID to be an allow...
	ChannelID string `url:"channel_id"`        // The channel to link this group to.
}

AdminConversationsRestrictAccessAddGroupParams holds the parameters for the admin.conversations.restrictAccess.addGroup method.

type AdminConversationsRestrictAccessAddGroupResponse

type AdminConversationsRestrictAccessAddGroupResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsRestrictAccessAddGroupResponse is the typed response envelope for admin.conversations.restrictAccess.addGroup.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsRestrictAccessAddGroup

AdminConversationsRestrictAccessAddGroup calls Slack's admin.conversations.restrictAccess.addGroup method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsRestrictAccessListGroupsParams

type AdminConversationsRestrictAccessListGroupsParams struct {
	ChannelID string `url:"channel_id"`
	TeamID    string `url:"team_id,omitempty"` // The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that ar...
}

AdminConversationsRestrictAccessListGroupsParams holds the parameters for the admin.conversations.restrictAccess.listGroups method.

type AdminConversationsRestrictAccessListGroupsResponse

type AdminConversationsRestrictAccessListGroupsResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsRestrictAccessListGroupsResponse is the typed response envelope for admin.conversations.restrictAccess.listGroups.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsRestrictAccessListGroups

AdminConversationsRestrictAccessListGroups calls Slack's admin.conversations.restrictAccess.listGroups method.

Required scopes (any one combination): admin.conversations:read

type AdminConversationsRestrictAccessRemoveGroupParams

type AdminConversationsRestrictAccessRemoveGroupParams struct {
	TeamID    string `url:"team_id"`    // The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that ar...
	GroupID   string `url:"group_id"`   // The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-Grid-org) ID to remove from...
	ChannelID string `url:"channel_id"` // The channel to remove the linked group from.
}

AdminConversationsRestrictAccessRemoveGroupParams holds the parameters for the admin.conversations.restrictAccess.removeGroup method.

type AdminConversationsRestrictAccessRemoveGroupResponse

type AdminConversationsRestrictAccessRemoveGroupResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsRestrictAccessRemoveGroupResponse is the typed response envelope for admin.conversations.restrictAccess.removeGroup.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsRestrictAccessRemoveGroup

AdminConversationsRestrictAccessRemoveGroup calls Slack's admin.conversations.restrictAccess.removeGroup method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsSearchParams

type AdminConversationsSearchParams struct {
	TeamIds            string `url:"team_ids,omitempty"`             // Comma separated string of team IDs, signifying the workspaces to search through.
	Query              string `url:"query,omitempty"`                // Name of the the channel to query by.
	Limit              int    `url:"limit,omitempty"`                // Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.
	Cursor             string `url:"cursor,omitempty"`               // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
	SearchChannelTypes string `url:"search_channel_types,omitempty"` // The type of channel to include or exclude in the search. For example `private` will search private channels, while `private_exclude` will ex...
	Sort               string `url:"sort,omitempty"`                 // Possible values are `relevant` (search ranking based on what we think is closest), `name` (alphabetical), `member_count` (number of users in...
	SortDir            string `url:"sort_dir,omitempty"`             // Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or...
}

AdminConversationsSearchParams holds the parameters for the admin.conversations.search method.

type AdminConversationsSearchResponse

type AdminConversationsSearchResponse struct {
	BaseResponse
	Channels   []*Channel      `json:"channels,omitempty"`
	NextCursor string          `json:"next_cursor,omitempty"`
	Raw        json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsSearchResponse is the typed response envelope for admin.conversations.search.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsSearch

func AdminConversationsSearch(ctx context.Context, c *Client, params *AdminConversationsSearchParams) (*AdminConversationsSearchResponse, error)

AdminConversationsSearch calls Slack's admin.conversations.search method.

Required scopes (any one combination): admin.conversations:read

type AdminConversationsSetConversationPrefsParams

type AdminConversationsSetConversationPrefsParams struct {
	ChannelID string `url:"channel_id"` // The channel to set the prefs for
	Prefs     string `url:"prefs"`      // The prefs for this channel in a stringified JSON format.
}

AdminConversationsSetConversationPrefsParams holds the parameters for the admin.conversations.setConversationPrefs method.

type AdminConversationsSetConversationPrefsResponse

type AdminConversationsSetConversationPrefsResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsSetConversationPrefsResponse is the typed response envelope for admin.conversations.setConversationPrefs.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsSetConversationPrefs

AdminConversationsSetConversationPrefs calls Slack's admin.conversations.setConversationPrefs method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsSetTeamsParams

type AdminConversationsSetTeamsParams struct {
	ChannelID     string `url:"channel_id"`                // The encoded `channel_id` to add or remove to workspaces.
	TeamID        string `url:"team_id,omitempty"`         // The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel.
	TargetTeamIds string `url:"target_team_ids,omitempty"` // A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.
	OrgChannel    bool   `url:"org_channel,omitempty"`     // True if channel has to be converted to an org channel
}

AdminConversationsSetTeamsParams holds the parameters for the admin.conversations.setTeams method.

type AdminConversationsSetTeamsResponse

type AdminConversationsSetTeamsResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsSetTeamsResponse is the typed response envelope for admin.conversations.setTeams.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsSetTeams

func AdminConversationsSetTeams(ctx context.Context, c *Client, params *AdminConversationsSetTeamsParams) (*AdminConversationsSetTeamsResponse, error)

AdminConversationsSetTeams calls Slack's admin.conversations.setTeams method.

Required scopes (any one combination): admin.conversations:write

type AdminConversationsUnarchiveParams

type AdminConversationsUnarchiveParams struct {
	ChannelID string `url:"channel_id"` // The channel to unarchive.
}

AdminConversationsUnarchiveParams holds the parameters for the admin.conversations.unarchive method.

type AdminConversationsUnarchiveResponse

type AdminConversationsUnarchiveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminConversationsUnarchiveResponse is the typed response envelope for admin.conversations.unarchive.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminConversationsUnarchive

func AdminConversationsUnarchive(ctx context.Context, c *Client, params *AdminConversationsUnarchiveParams) (*AdminConversationsUnarchiveResponse, error)

AdminConversationsUnarchive calls Slack's admin.conversations.unarchive method.

Required scopes (any one combination): admin.conversations:write

type AdminEmojiAddAliasParams

type AdminEmojiAddAliasParams struct {
	Name     string `url:"name"`      // The name of the emoji to be aliased. Colons (`:myemoji:`) around the value are not required, although they may be included.
	AliasFor string `url:"alias_for"` // The alias of the emoji.
}

AdminEmojiAddAliasParams holds the parameters for the admin.emoji.addAlias method.

type AdminEmojiAddAliasResponse

type AdminEmojiAddAliasResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminEmojiAddAliasResponse is the typed response envelope for admin.emoji.addAlias.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminEmojiAddAlias

func AdminEmojiAddAlias(ctx context.Context, c *Client, params *AdminEmojiAddAliasParams) (*AdminEmojiAddAliasResponse, error)

AdminEmojiAddAlias calls Slack's admin.emoji.addAlias method.

Required scopes (any one combination): admin.teams:write

type AdminEmojiAddParams

type AdminEmojiAddParams struct {
	Name string `url:"name"` // The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.
	URL  string `url:"url"`  // The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.
}

AdminEmojiAddParams holds the parameters for the admin.emoji.add method.

type AdminEmojiAddResponse

type AdminEmojiAddResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminEmojiAddResponse is the typed response envelope for admin.emoji.add.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminEmojiAdd

func AdminEmojiAdd(ctx context.Context, c *Client, params *AdminEmojiAddParams) (*AdminEmojiAddResponse, error)

AdminEmojiAdd calls Slack's admin.emoji.add method.

Required scopes (any one combination): admin.teams:write

type AdminEmojiListParams

type AdminEmojiListParams struct {
	Cursor string `url:"cursor,omitempty"` // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return. Must be between 1 - 1000 both inclusive.
}

AdminEmojiListParams holds the parameters for the admin.emoji.list method.

type AdminEmojiListResponse

type AdminEmojiListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminEmojiListResponse is the typed response envelope for admin.emoji.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminEmojiList

func AdminEmojiList(ctx context.Context, c *Client, params *AdminEmojiListParams) (*AdminEmojiListResponse, error)

AdminEmojiList calls Slack's admin.emoji.list method.

Required scopes (any one combination): admin.teams:read

type AdminEmojiRemoveParams

type AdminEmojiRemoveParams struct {
	Name string `url:"name"` // The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included.
}

AdminEmojiRemoveParams holds the parameters for the admin.emoji.remove method.

type AdminEmojiRemoveResponse

type AdminEmojiRemoveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminEmojiRemoveResponse is the typed response envelope for admin.emoji.remove.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminEmojiRemove

func AdminEmojiRemove(ctx context.Context, c *Client, params *AdminEmojiRemoveParams) (*AdminEmojiRemoveResponse, error)

AdminEmojiRemove calls Slack's admin.emoji.remove method.

Required scopes (any one combination): admin.teams:write

type AdminEmojiRenameParams

type AdminEmojiRenameParams struct {
	Name    string `url:"name"`     // The name of the emoji to be renamed. Colons (`:myemoji:`) around the value are not required, although they may be included.
	NewName string `url:"new_name"` // The new name of the emoji.
}

AdminEmojiRenameParams holds the parameters for the admin.emoji.rename method.

type AdminEmojiRenameResponse

type AdminEmojiRenameResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminEmojiRenameResponse is the typed response envelope for admin.emoji.rename.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminEmojiRename

func AdminEmojiRename(ctx context.Context, c *Client, params *AdminEmojiRenameParams) (*AdminEmojiRenameResponse, error)

AdminEmojiRename calls Slack's admin.emoji.rename method.

Required scopes (any one combination): admin.teams:write

type AdminInviteRequestsApproveParams

type AdminInviteRequestsApproveParams struct {
	TeamID          string `url:"team_id,omitempty"` // ID for the workspace where the invite request was made.
	InviteRequestID string `url:"invite_request_id"` // ID of the request to invite.
}

AdminInviteRequestsApproveParams holds the parameters for the admin.inviteRequests.approve method.

type AdminInviteRequestsApproveResponse

type AdminInviteRequestsApproveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminInviteRequestsApproveResponse is the typed response envelope for admin.inviteRequests.approve.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminInviteRequestsApprove

func AdminInviteRequestsApprove(ctx context.Context, c *Client, params *AdminInviteRequestsApproveParams) (*AdminInviteRequestsApproveResponse, error)

AdminInviteRequestsApprove calls Slack's admin.inviteRequests.approve method.

Required scopes (any one combination): admin.invites:write

type AdminInviteRequestsApprovedListParams

type AdminInviteRequestsApprovedListParams struct {
	TeamID string `url:"team_id,omitempty"` // ID for the workspace where the invite requests were made.
	Cursor string `url:"cursor,omitempty"`  // Value of the `next_cursor` field sent as part of the previous API response
	Limit  int    `url:"limit,omitempty"`   // The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive
}

AdminInviteRequestsApprovedListParams holds the parameters for the admin.inviteRequests.approved.list method.

type AdminInviteRequestsApprovedListResponse

type AdminInviteRequestsApprovedListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminInviteRequestsApprovedListResponse is the typed response envelope for admin.inviteRequests.approved.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminInviteRequestsApprovedList

AdminInviteRequestsApprovedList calls Slack's admin.inviteRequests.approved.list method.

Required scopes (any one combination): admin.invites:read

type AdminInviteRequestsDeniedListParams

type AdminInviteRequestsDeniedListParams struct {
	TeamID string `url:"team_id,omitempty"` // ID for the workspace where the invite requests were made.
	Cursor string `url:"cursor,omitempty"`  // Value of the `next_cursor` field sent as part of the previous api response
	Limit  int    `url:"limit,omitempty"`   // The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive
}

AdminInviteRequestsDeniedListParams holds the parameters for the admin.inviteRequests.denied.list method.

type AdminInviteRequestsDeniedListResponse

type AdminInviteRequestsDeniedListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminInviteRequestsDeniedListResponse is the typed response envelope for admin.inviteRequests.denied.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminInviteRequestsDeniedList

AdminInviteRequestsDeniedList calls Slack's admin.inviteRequests.denied.list method.

Required scopes (any one combination): admin.invites:read

type AdminInviteRequestsDenyParams

type AdminInviteRequestsDenyParams struct {
	TeamID          string `url:"team_id,omitempty"` // ID for the workspace where the invite request was made.
	InviteRequestID string `url:"invite_request_id"` // ID of the request to invite.
}

AdminInviteRequestsDenyParams holds the parameters for the admin.inviteRequests.deny method.

type AdminInviteRequestsDenyResponse

type AdminInviteRequestsDenyResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminInviteRequestsDenyResponse is the typed response envelope for admin.inviteRequests.deny.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminInviteRequestsDeny

func AdminInviteRequestsDeny(ctx context.Context, c *Client, params *AdminInviteRequestsDenyParams) (*AdminInviteRequestsDenyResponse, error)

AdminInviteRequestsDeny calls Slack's admin.inviteRequests.deny method.

Required scopes (any one combination): admin.invites:write

type AdminInviteRequestsListParams

type AdminInviteRequestsListParams struct {
	TeamID string `url:"team_id,omitempty"` // ID for the workspace where the invite requests were made.
	Cursor string `url:"cursor,omitempty"`  // Value of the `next_cursor` field sent as part of the previous API response
	Limit  int    `url:"limit,omitempty"`   // The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive
}

AdminInviteRequestsListParams holds the parameters for the admin.inviteRequests.list method.

type AdminInviteRequestsListResponse

type AdminInviteRequestsListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminInviteRequestsListResponse is the typed response envelope for admin.inviteRequests.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminInviteRequestsList

func AdminInviteRequestsList(ctx context.Context, c *Client, params *AdminInviteRequestsListParams) (*AdminInviteRequestsListResponse, error)

AdminInviteRequestsList calls Slack's admin.inviteRequests.list method.

Required scopes (any one combination): admin.invites:read

type AdminTeamsAdminsListParams

type AdminTeamsAdminsListParams struct {
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return.
	Cursor string `url:"cursor,omitempty"` // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
	TeamID string `url:"team_id"`
}

AdminTeamsAdminsListParams holds the parameters for the admin.teams.admins.list method.

type AdminTeamsAdminsListResponse

type AdminTeamsAdminsListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsAdminsListResponse is the typed response envelope for admin.teams.admins.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsAdminsList

func AdminTeamsAdminsList(ctx context.Context, c *Client, params *AdminTeamsAdminsListParams) (*AdminTeamsAdminsListResponse, error)

AdminTeamsAdminsList calls Slack's admin.teams.admins.list method.

Required scopes (any one combination): admin.teams:read

type AdminTeamsCreateParams

type AdminTeamsCreateParams struct {
	TeamDomain          string `url:"team_domain"`                    // Team domain (for example, slacksoftballteam).
	TeamName            string `url:"team_name"`                      // Team name (for example, Slack Softball Team).
	TeamDescription     string `url:"team_description,omitempty"`     // Description for the team.
	TeamDiscoverability string `url:"team_discoverability,omitempty"` // Who can join the team. A team's discoverability can be `open`, `closed`, `invite_only`, or `unlisted`.
}

AdminTeamsCreateParams holds the parameters for the admin.teams.create method.

type AdminTeamsCreateResponse

type AdminTeamsCreateResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsCreateResponse is the typed response envelope for admin.teams.create.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsCreate

func AdminTeamsCreate(ctx context.Context, c *Client, params *AdminTeamsCreateParams) (*AdminTeamsCreateResponse, error)

AdminTeamsCreate calls Slack's admin.teams.create method.

Required scopes (any one combination): admin.teams:write

type AdminTeamsListParams

type AdminTeamsListParams struct {
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return. Must be between 1 - 100 both inclusive.
	Cursor string `url:"cursor,omitempty"` // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
}

AdminTeamsListParams holds the parameters for the admin.teams.list method.

type AdminTeamsListResponse

type AdminTeamsListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsListResponse is the typed response envelope for admin.teams.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsList

func AdminTeamsList(ctx context.Context, c *Client, params *AdminTeamsListParams) (*AdminTeamsListResponse, error)

AdminTeamsList calls Slack's admin.teams.list method.

Required scopes (any one combination): admin.teams:read

type AdminTeamsOwnersListParams

type AdminTeamsOwnersListParams struct {
	TeamID string `url:"team_id"`
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return. Must be between 1 - 1000 both inclusive.
	Cursor string `url:"cursor,omitempty"` // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
}

AdminTeamsOwnersListParams holds the parameters for the admin.teams.owners.list method.

type AdminTeamsOwnersListResponse

type AdminTeamsOwnersListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsOwnersListResponse is the typed response envelope for admin.teams.owners.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsOwnersList

func AdminTeamsOwnersList(ctx context.Context, c *Client, params *AdminTeamsOwnersListParams) (*AdminTeamsOwnersListResponse, error)

AdminTeamsOwnersList calls Slack's admin.teams.owners.list method.

Required scopes (any one combination): admin.teams:read

type AdminTeamsSettingsInfoParams

type AdminTeamsSettingsInfoParams struct {
	TeamID string `url:"team_id"`
}

AdminTeamsSettingsInfoParams holds the parameters for the admin.teams.settings.info method.

type AdminTeamsSettingsInfoResponse

type AdminTeamsSettingsInfoResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsSettingsInfoResponse is the typed response envelope for admin.teams.settings.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsSettingsInfo

func AdminTeamsSettingsInfo(ctx context.Context, c *Client, params *AdminTeamsSettingsInfoParams) (*AdminTeamsSettingsInfoResponse, error)

AdminTeamsSettingsInfo calls Slack's admin.teams.settings.info method.

Required scopes (any one combination): admin.teams:read

type AdminTeamsSettingsSetDefaultChannelsParams

type AdminTeamsSettingsSetDefaultChannelsParams struct {
	TeamID     string `url:"team_id"`     // ID for the workspace to set the default channel for.
	ChannelIds string `url:"channel_ids"` // An array of channel IDs.
}

AdminTeamsSettingsSetDefaultChannelsParams holds the parameters for the admin.teams.settings.setDefaultChannels method.

type AdminTeamsSettingsSetDefaultChannelsResponse

type AdminTeamsSettingsSetDefaultChannelsResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsSettingsSetDefaultChannelsResponse is the typed response envelope for admin.teams.settings.setDefaultChannels.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsSettingsSetDefaultChannels

AdminTeamsSettingsSetDefaultChannels calls Slack's admin.teams.settings.setDefaultChannels method.

Required scopes (any one combination): admin.teams:write

type AdminTeamsSettingsSetDescriptionParams

type AdminTeamsSettingsSetDescriptionParams struct {
	TeamID      string `url:"team_id"`     // ID for the workspace to set the description for.
	Description string `url:"description"` // The new description for the workspace.
}

AdminTeamsSettingsSetDescriptionParams holds the parameters for the admin.teams.settings.setDescription method.

type AdminTeamsSettingsSetDescriptionResponse

type AdminTeamsSettingsSetDescriptionResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsSettingsSetDescriptionResponse is the typed response envelope for admin.teams.settings.setDescription.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsSettingsSetDescription

AdminTeamsSettingsSetDescription calls Slack's admin.teams.settings.setDescription method.

Required scopes (any one combination): admin.teams:write

type AdminTeamsSettingsSetDiscoverabilityParams

type AdminTeamsSettingsSetDiscoverabilityParams struct {
	TeamID          string `url:"team_id"`         // The ID of the workspace to set discoverability on.
	Discoverability string `url:"discoverability"` // This workspace's discovery setting. It must be set to one of `open`, `invite_only`, `closed`, or `unlisted`.
}

AdminTeamsSettingsSetDiscoverabilityParams holds the parameters for the admin.teams.settings.setDiscoverability method.

type AdminTeamsSettingsSetDiscoverabilityResponse

type AdminTeamsSettingsSetDiscoverabilityResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsSettingsSetDiscoverabilityResponse is the typed response envelope for admin.teams.settings.setDiscoverability.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsSettingsSetDiscoverability

AdminTeamsSettingsSetDiscoverability calls Slack's admin.teams.settings.setDiscoverability method.

Required scopes (any one combination): admin.teams:write

type AdminTeamsSettingsSetIconParams

type AdminTeamsSettingsSetIconParams struct {
	ImageURL string `url:"image_url"` // Image URL for the icon
	TeamID   string `url:"team_id"`   // ID for the workspace to set the icon for.
}

AdminTeamsSettingsSetIconParams holds the parameters for the admin.teams.settings.setIcon method.

type AdminTeamsSettingsSetIconResponse

type AdminTeamsSettingsSetIconResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsSettingsSetIconResponse is the typed response envelope for admin.teams.settings.setIcon.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsSettingsSetIcon

func AdminTeamsSettingsSetIcon(ctx context.Context, c *Client, params *AdminTeamsSettingsSetIconParams) (*AdminTeamsSettingsSetIconResponse, error)

AdminTeamsSettingsSetIcon calls Slack's admin.teams.settings.setIcon method.

Required scopes (any one combination): admin.teams:write

type AdminTeamsSettingsSetNameParams

type AdminTeamsSettingsSetNameParams struct {
	TeamID string `url:"team_id"` // ID for the workspace to set the name for.
	Name   string `url:"name"`    // The new name of the workspace.
}

AdminTeamsSettingsSetNameParams holds the parameters for the admin.teams.settings.setName method.

type AdminTeamsSettingsSetNameResponse

type AdminTeamsSettingsSetNameResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminTeamsSettingsSetNameResponse is the typed response envelope for admin.teams.settings.setName.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminTeamsSettingsSetName

func AdminTeamsSettingsSetName(ctx context.Context, c *Client, params *AdminTeamsSettingsSetNameParams) (*AdminTeamsSettingsSetNameResponse, error)

AdminTeamsSettingsSetName calls Slack's admin.teams.settings.setName method.

Required scopes (any one combination): admin.teams:write

type AdminUsergroupsAddChannelsParams

type AdminUsergroupsAddChannelsParams struct {
	UsergroupID string `url:"usergroup_id"`      // ID of the IDP group to add default channels for.
	TeamID      string `url:"team_id,omitempty"` // The workspace to add default channels in.
	ChannelIds  string `url:"channel_ids"`       // Comma separated string of channel IDs.
}

AdminUsergroupsAddChannelsParams holds the parameters for the admin.usergroups.addChannels method.

type AdminUsergroupsAddChannelsResponse

type AdminUsergroupsAddChannelsResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsergroupsAddChannelsResponse is the typed response envelope for admin.usergroups.addChannels.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsergroupsAddChannels

func AdminUsergroupsAddChannels(ctx context.Context, c *Client, params *AdminUsergroupsAddChannelsParams) (*AdminUsergroupsAddChannelsResponse, error)

AdminUsergroupsAddChannels calls Slack's admin.usergroups.addChannels method.

Required scopes (any one combination): admin.usergroups:write

type AdminUsergroupsAddTeamsParams

type AdminUsergroupsAddTeamsParams struct {
	UsergroupID   string `url:"usergroup_id"`             // An encoded usergroup (IDP Group) ID.
	TeamIds       string `url:"team_ids"`                 // A comma separated list of encoded team (workspace) IDs. Each workspace *MUST* belong to the organization associated with the token.
	AutoProvision bool   `url:"auto_provision,omitempty"` // When `true`, this method automatically creates new workspace accounts for the IDP group members.
}

AdminUsergroupsAddTeamsParams holds the parameters for the admin.usergroups.addTeams method.

type AdminUsergroupsAddTeamsResponse

type AdminUsergroupsAddTeamsResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsergroupsAddTeamsResponse is the typed response envelope for admin.usergroups.addTeams.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsergroupsAddTeams

func AdminUsergroupsAddTeams(ctx context.Context, c *Client, params *AdminUsergroupsAddTeamsParams) (*AdminUsergroupsAddTeamsResponse, error)

AdminUsergroupsAddTeams calls Slack's admin.usergroups.addTeams method.

Required scopes (any one combination): admin.teams:write

type AdminUsergroupsListChannelsParams

type AdminUsergroupsListChannelsParams struct {
	UsergroupID       string `url:"usergroup_id"`                  // ID of the IDP group to list default channels for.
	TeamID            string `url:"team_id,omitempty"`             // ID of the the workspace.
	IncludeNumMembers bool   `url:"include_num_members,omitempty"` // Flag to include or exclude the count of members per channel.
}

AdminUsergroupsListChannelsParams holds the parameters for the admin.usergroups.listChannels method.

type AdminUsergroupsListChannelsResponse

type AdminUsergroupsListChannelsResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsergroupsListChannelsResponse is the typed response envelope for admin.usergroups.listChannels.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsergroupsListChannels

func AdminUsergroupsListChannels(ctx context.Context, c *Client, params *AdminUsergroupsListChannelsParams) (*AdminUsergroupsListChannelsResponse, error)

AdminUsergroupsListChannels calls Slack's admin.usergroups.listChannels method.

Required scopes (any one combination): admin.usergroups:read

type AdminUsergroupsRemoveChannelsParams

type AdminUsergroupsRemoveChannelsParams struct {
	UsergroupID string `url:"usergroup_id"` // ID of the IDP Group
	ChannelIds  string `url:"channel_ids"`  // Comma-separated string of channel IDs
}

AdminUsergroupsRemoveChannelsParams holds the parameters for the admin.usergroups.removeChannels method.

type AdminUsergroupsRemoveChannelsResponse

type AdminUsergroupsRemoveChannelsResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsergroupsRemoveChannelsResponse is the typed response envelope for admin.usergroups.removeChannels.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsergroupsRemoveChannels

AdminUsergroupsRemoveChannels calls Slack's admin.usergroups.removeChannels method.

Required scopes (any one combination): admin.usergroups:write

type AdminUsersAssignParams

type AdminUsersAssignParams struct {
	TeamID            string `url:"team_id"`                       // The ID (`T1234`) of the workspace.
	UserID            string `url:"user_id"`                       // The ID of the user to add to the workspace.
	IsRestricted      bool   `url:"is_restricted,omitempty"`       // True if user should be added to the workspace as a guest.
	IsUltraRestricted bool   `url:"is_ultra_restricted,omitempty"` // True if user should be added to the workspace as a single-channel guest.
	ChannelIds        string `url:"channel_ids,omitempty"`         // Comma separated values of channel IDs to add user in the new workspace.
}

AdminUsersAssignParams holds the parameters for the admin.users.assign method.

type AdminUsersAssignResponse

type AdminUsersAssignResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersAssignResponse is the typed response envelope for admin.users.assign.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersAssign

func AdminUsersAssign(ctx context.Context, c *Client, params *AdminUsersAssignParams) (*AdminUsersAssignResponse, error)

AdminUsersAssign calls Slack's admin.users.assign method.

Required scopes (any one combination): admin.users:write

type AdminUsersInviteParams

type AdminUsersInviteParams struct {
	TeamID            string `url:"team_id"`                       // The ID (`T1234`) of the workspace.
	Email             string `url:"email"`                         // The email address of the person to invite.
	ChannelIds        string `url:"channel_ids"`                   // A comma-separated list of `channel_id`s for this user to join. At least one channel is required.
	CustomMessage     string `url:"custom_message,omitempty"`      // An optional message to send to the user in the invite email.
	RealName          string `url:"real_name,omitempty"`           // Full name of the user.
	Resend            bool   `url:"resend,omitempty"`              // Allow this invite to be resent in the future if a user has not signed up yet. (default: false)
	IsRestricted      bool   `url:"is_restricted,omitempty"`       // Is this user a multi-channel guest user? (default: false)
	IsUltraRestricted bool   `url:"is_ultra_restricted,omitempty"` // Is this user a single channel guest user? (default: false)
	GuestExpirationTS string `url:"guest_expiration_ts,omitempty"` // Timestamp when guest account should be disabled. Only include this timestamp if you are inviting a guest user and you want their account to ...
}

AdminUsersInviteParams holds the parameters for the admin.users.invite method.

type AdminUsersInviteResponse

type AdminUsersInviteResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersInviteResponse is the typed response envelope for admin.users.invite.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersInvite

func AdminUsersInvite(ctx context.Context, c *Client, params *AdminUsersInviteParams) (*AdminUsersInviteResponse, error)

AdminUsersInvite calls Slack's admin.users.invite method.

Required scopes (any one combination): admin.users:write

type AdminUsersListParams

type AdminUsersListParams struct {
	TeamID string `url:"team_id"`          // The ID (`T1234`) of the workspace.
	Cursor string `url:"cursor,omitempty"` // Set `cursor` to `next_cursor` returned by the previous call to list items in the next page.
	Limit  int    `url:"limit,omitempty"`  // Limit for how many users to be retrieved per page
}

AdminUsersListParams holds the parameters for the admin.users.list method.

type AdminUsersListResponse

type AdminUsersListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersListResponse is the typed response envelope for admin.users.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersList

func AdminUsersList(ctx context.Context, c *Client, params *AdminUsersListParams) (*AdminUsersListResponse, error)

AdminUsersList calls Slack's admin.users.list method.

Required scopes (any one combination): admin.users:read

type AdminUsersRemoveParams

type AdminUsersRemoveParams struct {
	TeamID string `url:"team_id"` // The ID (`T1234`) of the workspace.
	UserID string `url:"user_id"` // The ID of the user to remove.
}

AdminUsersRemoveParams holds the parameters for the admin.users.remove method.

type AdminUsersRemoveResponse

type AdminUsersRemoveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersRemoveResponse is the typed response envelope for admin.users.remove.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersRemove

func AdminUsersRemove(ctx context.Context, c *Client, params *AdminUsersRemoveParams) (*AdminUsersRemoveResponse, error)

AdminUsersRemove calls Slack's admin.users.remove method.

Required scopes (any one combination): admin.users:write

type AdminUsersSessionInvalidateParams

type AdminUsersSessionInvalidateParams struct {
	TeamID    string `url:"team_id"` // ID of the team that the session belongs to
	SessionID int    `url:"session_id"`
}

AdminUsersSessionInvalidateParams holds the parameters for the admin.users.session.invalidate method.

type AdminUsersSessionInvalidateResponse

type AdminUsersSessionInvalidateResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersSessionInvalidateResponse is the typed response envelope for admin.users.session.invalidate.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersSessionInvalidate

func AdminUsersSessionInvalidate(ctx context.Context, c *Client, params *AdminUsersSessionInvalidateParams) (*AdminUsersSessionInvalidateResponse, error)

AdminUsersSessionInvalidate calls Slack's admin.users.session.invalidate method.

Required scopes (any one combination): admin.users:write

type AdminUsersSessionResetParams

type AdminUsersSessionResetParams struct {
	UserID     string `url:"user_id"`               // The ID of the user to wipe sessions for
	MobileOnly bool   `url:"mobile_only,omitempty"` // Only expire mobile sessions (default: false)
	WebOnly    bool   `url:"web_only,omitempty"`    // Only expire web sessions (default: false)
}

AdminUsersSessionResetParams holds the parameters for the admin.users.session.reset method.

type AdminUsersSessionResetResponse

type AdminUsersSessionResetResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersSessionResetResponse is the typed response envelope for admin.users.session.reset.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersSessionReset

func AdminUsersSessionReset(ctx context.Context, c *Client, params *AdminUsersSessionResetParams) (*AdminUsersSessionResetResponse, error)

AdminUsersSessionReset calls Slack's admin.users.session.reset method.

Required scopes (any one combination): admin.users:write

type AdminUsersSetAdminParams

type AdminUsersSetAdminParams struct {
	TeamID string `url:"team_id"` // The ID (`T1234`) of the workspace.
	UserID string `url:"user_id"` // The ID of the user to designate as an admin.
}

AdminUsersSetAdminParams holds the parameters for the admin.users.setAdmin method.

type AdminUsersSetAdminResponse

type AdminUsersSetAdminResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersSetAdminResponse is the typed response envelope for admin.users.setAdmin.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersSetAdmin

func AdminUsersSetAdmin(ctx context.Context, c *Client, params *AdminUsersSetAdminParams) (*AdminUsersSetAdminResponse, error)

AdminUsersSetAdmin calls Slack's admin.users.setAdmin method.

Required scopes (any one combination): admin.users:write

type AdminUsersSetExpirationParams

type AdminUsersSetExpirationParams struct {
	TeamID       string `url:"team_id"`       // The ID (`T1234`) of the workspace.
	UserID       string `url:"user_id"`       // The ID of the user to set an expiration for.
	ExpirationTS int    `url:"expiration_ts"` // Timestamp when guest account should be disabled.
}

AdminUsersSetExpirationParams holds the parameters for the admin.users.setExpiration method.

type AdminUsersSetExpirationResponse

type AdminUsersSetExpirationResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersSetExpirationResponse is the typed response envelope for admin.users.setExpiration.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersSetExpiration

func AdminUsersSetExpiration(ctx context.Context, c *Client, params *AdminUsersSetExpirationParams) (*AdminUsersSetExpirationResponse, error)

AdminUsersSetExpiration calls Slack's admin.users.setExpiration method.

Required scopes (any one combination): admin.users:write

type AdminUsersSetOwnerParams

type AdminUsersSetOwnerParams struct {
	TeamID string `url:"team_id"` // The ID (`T1234`) of the workspace.
	UserID string `url:"user_id"` // Id of the user to promote to owner.
}

AdminUsersSetOwnerParams holds the parameters for the admin.users.setOwner method.

type AdminUsersSetOwnerResponse

type AdminUsersSetOwnerResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersSetOwnerResponse is the typed response envelope for admin.users.setOwner.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersSetOwner

func AdminUsersSetOwner(ctx context.Context, c *Client, params *AdminUsersSetOwnerParams) (*AdminUsersSetOwnerResponse, error)

AdminUsersSetOwner calls Slack's admin.users.setOwner method.

Required scopes (any one combination): admin.users:write

type AdminUsersSetRegularParams

type AdminUsersSetRegularParams struct {
	TeamID string `url:"team_id"` // The ID (`T1234`) of the workspace.
	UserID string `url:"user_id"` // The ID of the user to designate as a regular user.
}

AdminUsersSetRegularParams holds the parameters for the admin.users.setRegular method.

type AdminUsersSetRegularResponse

type AdminUsersSetRegularResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AdminUsersSetRegularResponse is the typed response envelope for admin.users.setRegular.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AdminUsersSetRegular

func AdminUsersSetRegular(ctx context.Context, c *Client, params *AdminUsersSetRegularParams) (*AdminUsersSetRegularResponse, error)

AdminUsersSetRegular calls Slack's admin.users.setRegular method.

Required scopes (any one combination): admin.users:write

type AppsEventAuthorizationsListParams

type AppsEventAuthorizationsListParams struct {
	EventContext string `url:"event_context"`
	Cursor       string `url:"cursor,omitempty"`
	Limit        int    `url:"limit,omitempty"`
}

AppsEventAuthorizationsListParams holds the parameters for the apps.event.authorizations.list method.

type AppsEventAuthorizationsListResponse

type AppsEventAuthorizationsListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AppsEventAuthorizationsListResponse is the typed response envelope for apps.event.authorizations.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AppsEventAuthorizationsList

func AppsEventAuthorizationsList(ctx context.Context, c *Client, params *AppsEventAuthorizationsListParams) (*AppsEventAuthorizationsListResponse, error)

AppsEventAuthorizationsList calls Slack's apps.event.authorizations.list method.

Required scopes (any one combination): authorizations:read

type AppsPermissionsInfoResponse

type AppsPermissionsInfoResponse struct {
	BaseResponse
	Info map[string]any  `json:"info,omitempty"`
	Raw  json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AppsPermissionsInfoResponse is the typed response envelope for apps.permissions.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AppsPermissionsInfo

func AppsPermissionsInfo(ctx context.Context, c *Client) (*AppsPermissionsInfoResponse, error)

AppsPermissionsInfo calls Slack's apps.permissions.info method.

Required scopes (any one combination): none

type AppsPermissionsRequestParams

type AppsPermissionsRequestParams struct {
	Scopes    string `url:"scopes"`     // A comma separated list of scopes to request for
	TriggerID string `url:"trigger_id"` // Token used to trigger the permissions API
}

AppsPermissionsRequestParams holds the parameters for the apps.permissions.request method.

type AppsPermissionsRequestResponse

type AppsPermissionsRequestResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AppsPermissionsRequestResponse is the typed response envelope for apps.permissions.request.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AppsPermissionsRequest

func AppsPermissionsRequest(ctx context.Context, c *Client, params *AppsPermissionsRequestParams) (*AppsPermissionsRequestResponse, error)

AppsPermissionsRequest calls Slack's apps.permissions.request method.

Required scopes (any one combination): none

type AppsPermissionsResourcesListParams

type AppsPermissionsResourcesListParams struct {
	Cursor string `url:"cursor,omitempty"` // Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `respon...
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return.
}

AppsPermissionsResourcesListParams holds the parameters for the apps.permissions.resources.list method.

type AppsPermissionsResourcesListResponse

type AppsPermissionsResourcesListResponse struct {
	BaseResponse
	Resources []map[string]any `json:"resources,omitempty"`
	Raw       json.RawMessage  `json:"-"` // full response body, populated by the operation wrapper
}

AppsPermissionsResourcesListResponse is the typed response envelope for apps.permissions.resources.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AppsPermissionsResourcesList

AppsPermissionsResourcesList calls Slack's apps.permissions.resources.list method.

Required scopes (any one combination): none

type AppsPermissionsScopesListResponse

type AppsPermissionsScopesListResponse struct {
	BaseResponse
	Scopes map[string]any  `json:"scopes,omitempty"`
	Raw    json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AppsPermissionsScopesListResponse is the typed response envelope for apps.permissions.scopes.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AppsPermissionsScopesList

func AppsPermissionsScopesList(ctx context.Context, c *Client) (*AppsPermissionsScopesListResponse, error)

AppsPermissionsScopesList calls Slack's apps.permissions.scopes.list method.

Required scopes (any one combination): none

type AppsPermissionsUsersListParams

type AppsPermissionsUsersListParams struct {
	Cursor string `url:"cursor,omitempty"` // Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `respon...
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return.
}

AppsPermissionsUsersListParams holds the parameters for the apps.permissions.users.list method.

type AppsPermissionsUsersListResponse

type AppsPermissionsUsersListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AppsPermissionsUsersListResponse is the typed response envelope for apps.permissions.users.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AppsPermissionsUsersList

func AppsPermissionsUsersList(ctx context.Context, c *Client, params *AppsPermissionsUsersListParams) (*AppsPermissionsUsersListResponse, error)

AppsPermissionsUsersList calls Slack's apps.permissions.users.list method.

Required scopes (any one combination): none

type AppsPermissionsUsersRequestParams

type AppsPermissionsUsersRequestParams struct {
	Scopes    string `url:"scopes"`     // A comma separated list of user scopes to request for
	TriggerID string `url:"trigger_id"` // Token used to trigger the request
	User      string `url:"user"`       // The user this scope is being requested for
}

AppsPermissionsUsersRequestParams holds the parameters for the apps.permissions.users.request method.

type AppsPermissionsUsersRequestResponse

type AppsPermissionsUsersRequestResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AppsPermissionsUsersRequestResponse is the typed response envelope for apps.permissions.users.request.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AppsPermissionsUsersRequest

func AppsPermissionsUsersRequest(ctx context.Context, c *Client, params *AppsPermissionsUsersRequestParams) (*AppsPermissionsUsersRequestResponse, error)

AppsPermissionsUsersRequest calls Slack's apps.permissions.users.request method.

Required scopes (any one combination): none

type AppsUninstallParams

type AppsUninstallParams struct {
	ClientID     string `url:"client_id,omitempty"`     // Issued when you created your application.
	ClientSecret string `url:"client_secret,omitempty"` // Issued when you created your application.
}

AppsUninstallParams holds the parameters for the apps.uninstall method.

type AppsUninstallResponse

type AppsUninstallResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AppsUninstallResponse is the typed response envelope for apps.uninstall.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AppsUninstall

func AppsUninstall(ctx context.Context, c *Client, params *AppsUninstallParams) (*AppsUninstallResponse, error)

AppsUninstall calls Slack's apps.uninstall method.

Required scopes (any one combination): none

type AuthRevokeParams

type AuthRevokeParams struct {
	Test bool `url:"test,omitempty"` // Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked.
}

AuthRevokeParams holds the parameters for the auth.revoke method.

type AuthRevokeResponse

type AuthRevokeResponse struct {
	BaseResponse
	Revoked bool            `json:"revoked,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AuthRevokeResponse is the typed response envelope for auth.revoke.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AuthRevoke

func AuthRevoke(ctx context.Context, c *Client, params *AuthRevokeParams) (*AuthRevokeResponse, error)

AuthRevoke calls Slack's auth.revoke method.

Required scopes (any one combination): none

type AuthTestResponse

type AuthTestResponse struct {
	BaseResponse
	BotID               string          `json:"bot_id,omitempty"`
	IsEnterpriseInstall bool            `json:"is_enterprise_install,omitempty"`
	Team                string          `json:"team,omitempty"`
	TeamID              string          `json:"team_id,omitempty"`
	URL                 string          `json:"url,omitempty"`
	User                string          `json:"user,omitempty"`
	UserID              string          `json:"user_id,omitempty"`
	Raw                 json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

AuthTestResponse is the typed response envelope for auth.test.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func AuthTest

func AuthTest(ctx context.Context, c *Client) (*AuthTestResponse, error)

AuthTest calls Slack's auth.test method.

Required scopes (any one combination): none

type BaseResponse

type BaseResponse struct {
	Ok               bool   `json:"ok"`
	Error            string `json:"error,omitempty"`
	Warning          string `json:"warning,omitempty"`
	ResponseMetadata struct {
		Messages   []string `json:"messages,omitempty"`
		NextCursor string   `json:"next_cursor,omitempty"`
	} `json:"response_metadata,omitempty"`
}

BaseResponse captures the envelope every Slack Web API call returns. All generated *Response types embed it.

func (*BaseResponse) AsError

func (b *BaseResponse) AsError(method string) error

AsError returns a non-nil error if the response indicates failure.

type Block

type Block interface {
	// contains filtered or unexported methods
}

Block is the interface every concrete block type implements. Slack distinguishes blocks by their `type` field on the wire; each concrete type carries that field as a json:"type" tag.

type BotProfile

type BotProfile struct {
	AppID   string         `json:"app_id,omitempty"`
	Deleted bool           `json:"deleted,omitempty"`
	Icons   map[string]any `json:"icons,omitempty"`
	ID      string         `json:"id,omitempty"`
	Name    string         `json:"name,omitempty"`
	TeamID  string         `json:"team_id,omitempty"`
	Updated int            `json:"updated,omitempty"`
}

BotProfile — Bot Profile Object.

type BotsInfoParams

type BotsInfoParams struct {
	Bot string `url:"bot,omitempty"` // Bot user to get info on
}

BotsInfoParams holds the parameters for the bots.info method.

type BotsInfoResponse

type BotsInfoResponse struct {
	BaseResponse
	Bot map[string]any  `json:"bot,omitempty"`
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

BotsInfoResponse is the typed response envelope for bots.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func BotsInfo

func BotsInfo(ctx context.Context, c *Client, params *BotsInfoParams) (*BotsInfoResponse, error)

BotsInfo calls Slack's bots.info method.

Required scopes (any one combination): users:read

type CallsAddParams

type CallsAddParams struct {
	ExternalUniqueID  string `url:"external_unique_id"`             // An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.
	ExternalDisplayID string `url:"external_display_id,omitempty"`  // An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.
	JoinURL           string `url:"join_url"`                       // The URL required for a client to join the Call.
	DesktopAppJoinURL string `url:"desktop_app_join_url,omitempty"` // When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.
	DateStart         int    `url:"date_start,omitempty"`           // Call start time in UTC UNIX timestamp format
	Title             string `url:"title,omitempty"`                // The name of the Call.
	CreatedBy         string `url:"created_by,omitempty"`           // The valid Slack user ID of the user who created this Call. When this method is called with a user token, the `created_by` field is optional ...
	Users             string `url:"users,omitempty"`                // The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/calls#users).
}

CallsAddParams holds the parameters for the calls.add method.

type CallsAddResponse

type CallsAddResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

CallsAddResponse is the typed response envelope for calls.add.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func CallsAdd

func CallsAdd(ctx context.Context, c *Client, params *CallsAddParams) (*CallsAddResponse, error)

CallsAdd calls Slack's calls.add method.

Required scopes (any one combination): calls:write

type CallsEndParams

type CallsEndParams struct {
	ID       string `url:"id"`                 // `id` returned when registering the call using the [`calls.add`](/methods/calls.add) method.
	Duration int    `url:"duration,omitempty"` // Call duration in seconds
}

CallsEndParams holds the parameters for the calls.end method.

type CallsEndResponse

type CallsEndResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

CallsEndResponse is the typed response envelope for calls.end.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func CallsEnd

func CallsEnd(ctx context.Context, c *Client, params *CallsEndParams) (*CallsEndResponse, error)

CallsEnd calls Slack's calls.end method.

Required scopes (any one combination): calls:write

type CallsInfoParams

type CallsInfoParams struct {
	ID string `url:"id"` // `id` of the Call returned by the [`calls.add`](/methods/calls.add) method.
}

CallsInfoParams holds the parameters for the calls.info method.

type CallsInfoResponse

type CallsInfoResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

CallsInfoResponse is the typed response envelope for calls.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func CallsInfo

func CallsInfo(ctx context.Context, c *Client, params *CallsInfoParams) (*CallsInfoResponse, error)

CallsInfo calls Slack's calls.info method.

Required scopes (any one combination): calls:read

type CallsParticipantsAddParams

type CallsParticipantsAddParams struct {
	ID    string `url:"id"`    // `id` returned by the [`calls.add`](/methods/calls.add) method.
	Users string `url:"users"` // The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/calls#users).
}

CallsParticipantsAddParams holds the parameters for the calls.participants.add method.

type CallsParticipantsAddResponse

type CallsParticipantsAddResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

CallsParticipantsAddResponse is the typed response envelope for calls.participants.add.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func CallsParticipantsAdd

func CallsParticipantsAdd(ctx context.Context, c *Client, params *CallsParticipantsAddParams) (*CallsParticipantsAddResponse, error)

CallsParticipantsAdd calls Slack's calls.participants.add method.

Required scopes (any one combination): calls:write

type CallsParticipantsRemoveParams

type CallsParticipantsRemoveParams struct {
	ID    string `url:"id"`    // `id` returned by the [`calls.add`](/methods/calls.add) method.
	Users string `url:"users"` // The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/calls#users).
}

CallsParticipantsRemoveParams holds the parameters for the calls.participants.remove method.

type CallsParticipantsRemoveResponse

type CallsParticipantsRemoveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

CallsParticipantsRemoveResponse is the typed response envelope for calls.participants.remove.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func CallsParticipantsRemove

func CallsParticipantsRemove(ctx context.Context, c *Client, params *CallsParticipantsRemoveParams) (*CallsParticipantsRemoveResponse, error)

CallsParticipantsRemove calls Slack's calls.participants.remove method.

Required scopes (any one combination): calls:write

type CallsUpdateParams

type CallsUpdateParams struct {
	ID                string `url:"id"`                             // `id` returned by the [`calls.add`](/methods/calls.add) method.
	Title             string `url:"title,omitempty"`                // The name of the Call.
	JoinURL           string `url:"join_url,omitempty"`             // The URL required for a client to join the Call.
	DesktopAppJoinURL string `url:"desktop_app_join_url,omitempty"` // When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.
}

CallsUpdateParams holds the parameters for the calls.update method.

type CallsUpdateResponse

type CallsUpdateResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

CallsUpdateResponse is the typed response envelope for calls.update.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func CallsUpdate

func CallsUpdate(ctx context.Context, c *Client, params *CallsUpdateParams) (*CallsUpdateResponse, error)

CallsUpdate calls Slack's calls.update method.

Required scopes (any one combination): calls:write

type Channel

type Channel struct {
	AcceptedUser       string        `json:"accepted_user,omitempty"`
	Created            int           `json:"created,omitempty"`
	Creator            string        `json:"creator,omitempty"`
	ID                 string        `json:"id,omitempty"`
	IsArchived         bool          `json:"is_archived,omitempty"`
	IsChannel          bool          `json:"is_channel,omitempty"`
	IsFrozen           bool          `json:"is_frozen,omitempty"`
	IsGeneral          bool          `json:"is_general,omitempty"`
	IsMember           bool          `json:"is_member,omitempty"`
	IsMoved            int           `json:"is_moved,omitempty"`
	IsMPIM             bool          `json:"is_mpim,omitempty"`
	IsNonThreadable    bool          `json:"is_non_threadable,omitempty"`
	IsOrgShared        bool          `json:"is_org_shared,omitempty"`
	IsPendingExtShared bool          `json:"is_pending_ext_shared,omitempty"`
	IsPrivate          bool          `json:"is_private,omitempty"`
	IsReadOnly         bool          `json:"is_read_only,omitempty"`
	IsShared           bool          `json:"is_shared,omitempty"`
	IsThreadOnly       bool          `json:"is_thread_only,omitempty"`
	LastRead           string        `json:"last_read,omitempty"`
	Latest             *Message      `json:"latest,omitempty"`
	Members            []string      `json:"members,omitempty"`
	Name               string        `json:"name,omitempty"`
	NameNormalized     string        `json:"name_normalized,omitempty"`
	NumMembers         int           `json:"num_members,omitempty"`
	PendingShared      []string      `json:"pending_shared,omitempty"`
	PreviousNames      []string      `json:"previous_names,omitempty"`
	Priority           float64       `json:"priority,omitempty"`
	Purpose            *TopicPurpose `json:"purpose,omitempty"`
	Topic              *TopicPurpose `json:"topic,omitempty"`
	Unlinked           int           `json:"unlinked,omitempty"`
	UnreadCount        int           `json:"unread_count,omitempty"`
	UnreadCountDisplay int           `json:"unread_count_display,omitempty"`
}

Channel — Channel Object.

type ChatDeleteParams

type ChatDeleteParams struct {
	TS      string `url:"ts,omitempty"`      // Timestamp of the message to be deleted.
	Channel string `url:"channel,omitempty"` // Channel containing the message to be deleted.
	AsUser  bool   `url:"as_user,omitempty"` // Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered auth...
}

ChatDeleteParams holds the parameters for the chat.delete method.

type ChatDeleteResponse

type ChatDeleteResponse struct {
	BaseResponse
	Channel string          `json:"channel,omitempty"`
	TS      string          `json:"ts,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ChatDeleteResponse is the typed response envelope for chat.delete.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatDelete

func ChatDelete(ctx context.Context, c *Client, params *ChatDeleteParams) (*ChatDeleteResponse, error)

ChatDelete calls Slack's chat.delete method.

Required scopes (any one combination): chat:write:bot, chat:write:user

type ChatDeleteScheduledMessageParams

type ChatDeleteScheduledMessageParams struct {
	AsUser             bool   `url:"as_user,omitempty"`    // Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered auth...
	Channel            string `url:"channel"`              // The channel the scheduled_message is posting to
	ScheduledMessageID string `url:"scheduled_message_id"` // `scheduled_message_id` returned from call to chat.scheduleMessage
}

ChatDeleteScheduledMessageParams holds the parameters for the chat.deleteScheduledMessage method.

type ChatDeleteScheduledMessageResponse

type ChatDeleteScheduledMessageResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ChatDeleteScheduledMessageResponse is the typed response envelope for chat.deleteScheduledMessage.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatDeleteScheduledMessage

func ChatDeleteScheduledMessage(ctx context.Context, c *Client, params *ChatDeleteScheduledMessageParams) (*ChatDeleteScheduledMessageResponse, error)

ChatDeleteScheduledMessage calls Slack's chat.deleteScheduledMessage method.

Required scopes (any one combination): chat:write:bot, chat:write:user

type ChatGetPermalinkParams

type ChatGetPermalinkParams struct {
	Channel   string `url:"channel"`    // The ID of the conversation or channel containing the message
	MessageTS string `url:"message_ts"` // A message's `ts` value, uniquely identifying it within a channel
}

ChatGetPermalinkParams holds the parameters for the chat.getPermalink method.

type ChatGetPermalinkResponse

type ChatGetPermalinkResponse struct {
	BaseResponse
	Channel   string          `json:"channel,omitempty"`
	Permalink string          `json:"permalink,omitempty"`
	Raw       json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ChatGetPermalinkResponse is the typed response envelope for chat.getPermalink.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatGetPermalink(ctx context.Context, c *Client, params *ChatGetPermalinkParams) (*ChatGetPermalinkResponse, error)

ChatGetPermalink calls Slack's chat.getPermalink method.

Required scopes (any one combination): none

type ChatMeMessageParams

type ChatMeMessageParams struct {
	Channel string `url:"channel,omitempty"` // Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.
	Text    string `url:"text,omitempty"`    // Text of the message to send.
}

ChatMeMessageParams holds the parameters for the chat.meMessage method.

type ChatMeMessageResponse

type ChatMeMessageResponse struct {
	BaseResponse
	Channel string          `json:"channel,omitempty"`
	TS      string          `json:"ts,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ChatMeMessageResponse is the typed response envelope for chat.meMessage.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatMeMessage

func ChatMeMessage(ctx context.Context, c *Client, params *ChatMeMessageParams) (*ChatMeMessageResponse, error)

ChatMeMessage calls Slack's chat.meMessage method.

Required scopes (any one combination): chat:write:bot, chat:write:user

type ChatPostEphemeralParams

type ChatPostEphemeralParams struct {
	AsUser      bool   `url:"as_user,omitempty"`     // Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false...
	Attachments string `url:"attachments,omitempty"` // A JSON-based array of structured attachments, presented as a URL-encoded string.
	Blocks      string `url:"blocks,omitempty"`      // A JSON-based array of structured blocks, presented as a URL-encoded string.
	Channel     string `url:"channel"`               // Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.
	IconEmoji   string `url:"icon_emoji,omitempty"`  // Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignore...
	IconURL     string `url:"icon_url,omitempty"`    // URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [author...
	LinkNames   bool   `url:"link_names,omitempty"`  // Find and link channel names and usernames.
	Parse       string `url:"parse,omitempty"`       // Change how messages are treated. Defaults to `none`. See [below](#formatting).
	Text        string `url:"text,omitempty"`        // How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail.
	ThreadTS    string `url:"thread_ts,omitempty"`   // Provide another message's `ts` value to post this message in a thread. Avoid using a reply's `ts` value; use its parent's value instead. Eph...
	User        string `url:"user"`                  // `id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument.
	Username    string `url:"username,omitempty"`    // Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.
}

ChatPostEphemeralParams holds the parameters for the chat.postEphemeral method.

type ChatPostEphemeralResponse

type ChatPostEphemeralResponse struct {
	BaseResponse
	MessageTS string          `json:"message_ts,omitempty"`
	Raw       json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ChatPostEphemeralResponse is the typed response envelope for chat.postEphemeral.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatPostEphemeral

func ChatPostEphemeral(ctx context.Context, c *Client, params *ChatPostEphemeralParams) (*ChatPostEphemeralResponse, error)

ChatPostEphemeral calls Slack's chat.postEphemeral method.

Required scopes (any one combination): chat:write:bot, chat:write:user

type ChatPostMessageParams

type ChatPostMessageParams struct {
	AsUser         string `url:"as_user,omitempty"`         // Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.
	Attachments    string `url:"attachments,omitempty"`     // A JSON-based array of structured attachments, presented as a URL-encoded string.
	Blocks         string `url:"blocks,omitempty"`          // A JSON-based array of structured blocks, presented as a URL-encoded string.
	Channel        string `url:"channel"`                   // Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.
	IconEmoji      string `url:"icon_emoji,omitempty"`      // Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignore...
	IconURL        string `url:"icon_url,omitempty"`        // URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [author...
	LinkNames      bool   `url:"link_names,omitempty"`      // Find and link channel names and usernames.
	Mrkdwn         bool   `url:"mrkdwn,omitempty"`          // Disable Slack markup parsing by setting to `false`. Enabled by default.
	Parse          string `url:"parse,omitempty"`           // Change how messages are treated. Defaults to `none`. See [below](#formatting).
	ReplyBroadcast bool   `url:"reply_broadcast,omitempty"` // Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults...
	Text           string `url:"text,omitempty"`            // How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail.
	ThreadTS       string `url:"thread_ts,omitempty"`       // Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.
	UnfurlLinks    bool   `url:"unfurl_links,omitempty"`    // Pass true to enable unfurling of primarily text-based content.
	UnfurlMedia    bool   `url:"unfurl_media,omitempty"`    // Pass false to disable unfurling of media content.
	Username       string `url:"username,omitempty"`        // Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.
}

ChatPostMessageParams holds the parameters for the chat.postMessage method.

type ChatPostMessageResponse

type ChatPostMessageResponse struct {
	BaseResponse
	Channel string          `json:"channel,omitempty"`
	Message *Message        `json:"message,omitempty"`
	TS      string          `json:"ts,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ChatPostMessageResponse is the typed response envelope for chat.postMessage.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatPostMessage

func ChatPostMessage(ctx context.Context, c *Client, params *ChatPostMessageParams) (*ChatPostMessageResponse, error)

ChatPostMessage calls Slack's chat.postMessage method.

Required scopes (any one combination): chat:write:bot, chat:write:user

type ChatScheduleMessageParams

type ChatScheduleMessageParams struct {
	Channel        string `url:"channel,omitempty"`         // Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details.
	Text           string `url:"text,omitempty"`            // How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail.
	PostAt         string `url:"post_at,omitempty"`         // Unix EPOCH timestamp of time in future to send the message.
	Parse          string `url:"parse,omitempty"`           // Change how messages are treated. Defaults to `none`. See [chat.postMessage](chat.postMessage#formatting).
	AsUser         bool   `url:"as_user,omitempty"`         // Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [chat.postMessage](chat.postMessage#authorship...
	LinkNames      bool   `url:"link_names,omitempty"`      // Find and link channel names and usernames.
	Attachments    string `url:"attachments,omitempty"`     // A JSON-based array of structured attachments, presented as a URL-encoded string.
	Blocks         string `url:"blocks,omitempty"`          // A JSON-based array of structured blocks, presented as a URL-encoded string.
	UnfurlLinks    bool   `url:"unfurl_links,omitempty"`    // Pass true to enable unfurling of primarily text-based content.
	UnfurlMedia    bool   `url:"unfurl_media,omitempty"`    // Pass false to disable unfurling of media content.
	ThreadTS       string `url:"thread_ts,omitempty"`       // Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.
	ReplyBroadcast bool   `url:"reply_broadcast,omitempty"` // Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults...
}

ChatScheduleMessageParams holds the parameters for the chat.scheduleMessage method.

type ChatScheduleMessageResponse

type ChatScheduleMessageResponse struct {
	BaseResponse
	Channel            string          `json:"channel,omitempty"`
	Message            map[string]any  `json:"message,omitempty"`
	PostAt             int             `json:"post_at,omitempty"`
	ScheduledMessageID string          `json:"scheduled_message_id,omitempty"`
	Raw                json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ChatScheduleMessageResponse is the typed response envelope for chat.scheduleMessage.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatScheduleMessage

func ChatScheduleMessage(ctx context.Context, c *Client, params *ChatScheduleMessageParams) (*ChatScheduleMessageResponse, error)

ChatScheduleMessage calls Slack's chat.scheduleMessage method.

Required scopes (any one combination): chat:write:bot, chat:write:user

type ChatScheduledMessagesListParams

type ChatScheduledMessagesListParams struct {
	Channel string `url:"channel,omitempty"` // The channel of the scheduled messages
	Latest  string `url:"latest,omitempty"`  // A UNIX timestamp of the latest value in the time range
	Oldest  string `url:"oldest,omitempty"`  // A UNIX timestamp of the oldest value in the time range
	Limit   int    `url:"limit,omitempty"`   // Maximum number of original entries to return.
	Cursor  string `url:"cursor,omitempty"`  // For pagination purposes, this is the `cursor` value returned from a previous call to `chat.scheduledmessages.list` indicating where you want...
}

ChatScheduledMessagesListParams holds the parameters for the chat.scheduledMessages.list method.

type ChatScheduledMessagesListResponse

type ChatScheduledMessagesListResponse struct {
	BaseResponse
	ScheduledMessages []map[string]any `json:"scheduled_messages,omitempty"`
	Raw               json.RawMessage  `json:"-"` // full response body, populated by the operation wrapper
}

ChatScheduledMessagesListResponse is the typed response envelope for chat.scheduledMessages.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatScheduledMessagesList

func ChatScheduledMessagesList(ctx context.Context, c *Client, params *ChatScheduledMessagesListParams) (*ChatScheduledMessagesListResponse, error)

ChatScheduledMessagesList calls Slack's chat.scheduledMessages.list method.

Required scopes (any one combination): none

type ChatUnfurlParams

type ChatUnfurlParams struct {
	Channel          string `url:"channel"`                      // Channel ID of the message
	TS               string `url:"ts"`                           // Timestamp of the message to add unfurl behavior to.
	Unfurls          string `url:"unfurls,omitempty"`            // URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.
	UserAuthMessage  string `url:"user_auth_message,omitempty"`  // Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurlin...
	UserAuthRequired bool   `url:"user_auth_required,omitempty"` // Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain
	UserAuthURL      string `url:"user_auth_url,omitempty"`      // Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-e...
}

ChatUnfurlParams holds the parameters for the chat.unfurl method.

type ChatUnfurlResponse

type ChatUnfurlResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ChatUnfurlResponse is the typed response envelope for chat.unfurl.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatUnfurl

func ChatUnfurl(ctx context.Context, c *Client, params *ChatUnfurlParams) (*ChatUnfurlResponse, error)

ChatUnfurl calls Slack's chat.unfurl method.

Required scopes (any one combination): links:write

type ChatUpdateParams

type ChatUpdateParams struct {
	AsUser      string `url:"as_user,omitempty"`     // Pass true to update the message as the authed user. [Bot users](/bot-users) in this context are considered authed users.
	Attachments string `url:"attachments,omitempty"` // A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting `text`. If you d...
	Blocks      string `url:"blocks,omitempty"`      // A JSON-based array of [structured blocks](/block-kit/building), presented as a URL-encoded string. If you don't include this field, the mess...
	Channel     string `url:"channel"`               // Channel containing the message to be updated.
	LinkNames   string `url:"link_names,omitempty"`  // Find and link channel names and usernames. Defaults to `none`. If you do not specify a value for this field, the original value set for the ...
	Parse       string `url:"parse,omitempty"`       // Change how messages are treated. Defaults to `client`, unlike `chat.postMessage`. Accepts either `none` or `full`. If you do not specify a v...
	Text        string `url:"text,omitempty"`        // New text for the message, using the [default formatting rules](/reference/surfaces/formatting). It's not required when presenting `blocks` o...
	TS          string `url:"ts"`                    // Timestamp of the message to be updated.
}

ChatUpdateParams holds the parameters for the chat.update method.

type ChatUpdateResponse

type ChatUpdateResponse struct {
	BaseResponse
	Channel string          `json:"channel,omitempty"`
	Message map[string]any  `json:"message,omitempty"`
	Text    string          `json:"text,omitempty"`
	TS      string          `json:"ts,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ChatUpdateResponse is the typed response envelope for chat.update.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ChatUpdate

func ChatUpdate(ctx context.Context, c *Client, params *ChatUpdateParams) (*ChatUpdateResponse, error)

ChatUpdate calls Slack's chat.update method.

Required scopes (any one combination): chat:write:bot, chat:write:user

type Client

type Client struct {
	HTTP    *http.Client
	Token   string
	BaseURL string // for tests; defaults to BaseURL
}

Client is the minimal transport for Slack Web API calls.

Slack's Web API is a single-host, form-encoded, JSON-response service — roughly: POST https://slack.com/api/<method> with a bearer token and either form params or a JSON body. We don't need the full ceremony of REST routing.

func New

func New(token string) *Client

New constructs a Client with the given OAuth token and a sensible HTTP timeout. Use NewWithHTTP when you need to override the transport (tests, custom retry policy, etc).

func NewWithHTTP

func NewWithHTTP(token string, hc *http.Client) *Client

NewWithHTTP constructs a Client with a caller-supplied http.Client.

type Comment

type Comment struct {
	Comment    string          `json:"comment,omitempty"`
	Created    int             `json:"created,omitempty"`
	ID         string          `json:"id,omitempty"`
	IsIntro    bool            `json:"is_intro,omitempty"`
	IsStarred  bool            `json:"is_starred,omitempty"`
	NumStars   int             `json:"num_stars,omitempty"`
	PinnedInfo json.RawMessage `json:"pinned_info,omitempty"`
	PinnedTo   []string        `json:"pinned_to,omitempty"`
	Reactions  []*Reaction     `json:"reactions,omitempty"`
	Timestamp  int             `json:"timestamp,omitempty"`
	User       string          `json:"user,omitempty"`
}

Comment — File Comment Object.

type ContextBlock

type ContextBlock struct {
	Type     string        `json:"type"` // always "context"
	Elements []interface{} `json:"elements"`
	BlockID  string        `json:"block_id,omitempty"`
}

ContextBlock holds a small line of context elements (text + images).

func NewContextBlock

func NewContextBlock(elements ...interface{}) *ContextBlock

NewContextBlock constructs a context block from heterogeneous elements (TextObject pointers, image objects, etc.).

type ConversationsArchiveParams

type ConversationsArchiveParams struct {
	Channel string `url:"channel,omitempty"` // ID of conversation to archive
}

ConversationsArchiveParams holds the parameters for the conversations.archive method.

type ConversationsArchiveResponse

type ConversationsArchiveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsArchiveResponse is the typed response envelope for conversations.archive.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsArchive

func ConversationsArchive(ctx context.Context, c *Client, params *ConversationsArchiveParams) (*ConversationsArchiveResponse, error)

ConversationsArchive calls Slack's conversations.archive method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsCloseParams

type ConversationsCloseParams struct {
	Channel string `url:"channel,omitempty"` // Conversation to close.
}

ConversationsCloseParams holds the parameters for the conversations.close method.

type ConversationsCloseResponse

type ConversationsCloseResponse struct {
	BaseResponse
	AlreadyClosed bool            `json:"already_closed,omitempty"`
	NoOp          bool            `json:"no_op,omitempty"`
	Raw           json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsCloseResponse is the typed response envelope for conversations.close.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsClose

func ConversationsClose(ctx context.Context, c *Client, params *ConversationsCloseParams) (*ConversationsCloseResponse, error)

ConversationsClose calls Slack's conversations.close method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsCreateParams

type ConversationsCreateParams struct {
	Name      string `url:"name,omitempty"`       // Name of the public or private channel to create
	IsPrivate bool   `url:"is_private,omitempty"` // Create a private channel instead of a public one
}

ConversationsCreateParams holds the parameters for the conversations.create method.

type ConversationsCreateResponse

type ConversationsCreateResponse struct {
	BaseResponse
	Channel json.RawMessage `json:"channel,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsCreateResponse is the typed response envelope for conversations.create.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsCreate

func ConversationsCreate(ctx context.Context, c *Client, params *ConversationsCreateParams) (*ConversationsCreateResponse, error)

ConversationsCreate calls Slack's conversations.create method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsHistoryParams

type ConversationsHistoryParams struct {
	Channel   string `url:"channel,omitempty"`   // Conversation ID to fetch history for.
	Latest    string `url:"latest,omitempty"`    // End of time range of messages to include in results.
	Oldest    string `url:"oldest,omitempty"`    // Start of time range of messages to include in results.
	Inclusive bool   `url:"inclusive,omitempty"` // Include messages with latest or oldest timestamp in results only when either timestamp is specified.
	Limit     int    `url:"limit,omitempty"`     // The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't be...
	Cursor    string `url:"cursor,omitempty"`    // Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `respon...
}

ConversationsHistoryParams holds the parameters for the conversations.history method.

type ConversationsHistoryResponse

type ConversationsHistoryResponse struct {
	BaseResponse
	ChannelActionsCount int             `json:"channel_actions_count,omitempty"`
	ChannelActionsTS    int             `json:"channel_actions_ts,omitempty"`
	HasMore             bool            `json:"has_more,omitempty"`
	Messages            []*Message      `json:"messages,omitempty"`
	PinCount            int             `json:"pin_count,omitempty"`
	Raw                 json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsHistoryResponse is the typed response envelope for conversations.history.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsHistory

func ConversationsHistory(ctx context.Context, c *Client, params *ConversationsHistoryParams) (*ConversationsHistoryResponse, error)

ConversationsHistory calls Slack's conversations.history method.

Required scopes (any one combination): channels:history, groups:history, im:history, mpim:history

type ConversationsInfoParams

type ConversationsInfoParams struct {
	Channel           string `url:"channel,omitempty"`             // Conversation ID to learn more about
	IncludeLocale     bool   `url:"include_locale,omitempty"`      // Set this to `true` to receive the locale for this conversation. Defaults to `false`
	IncludeNumMembers bool   `url:"include_num_members,omitempty"` // Set to `true` to include the member count for the specified conversation. Defaults to `false`
}

ConversationsInfoParams holds the parameters for the conversations.info method.

type ConversationsInfoResponse

type ConversationsInfoResponse struct {
	BaseResponse
	Channel *Channel        `json:"channel,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsInfoResponse is the typed response envelope for conversations.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsInfo

func ConversationsInfo(ctx context.Context, c *Client, params *ConversationsInfoParams) (*ConversationsInfoResponse, error)

ConversationsInfo calls Slack's conversations.info method.

Required scopes (any one combination): channels:read, groups:read, im:read, mpim:read

type ConversationsInviteParams

type ConversationsInviteParams struct {
	Channel string `url:"channel,omitempty"` // The ID of the public or private channel to invite user(s) to.
	Users   string `url:"users,omitempty"`   // A comma separated list of user IDs. Up to 1000 users may be listed.
}

ConversationsInviteParams holds the parameters for the conversations.invite method.

type ConversationsInviteResponse

type ConversationsInviteResponse struct {
	BaseResponse
	Channel json.RawMessage `json:"channel,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsInviteResponse is the typed response envelope for conversations.invite.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsInvite

func ConversationsInvite(ctx context.Context, c *Client, params *ConversationsInviteParams) (*ConversationsInviteResponse, error)

ConversationsInvite calls Slack's conversations.invite method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsJoinParams

type ConversationsJoinParams struct {
	Channel string `url:"channel,omitempty"` // ID of conversation to join
}

ConversationsJoinParams holds the parameters for the conversations.join method.

type ConversationsJoinResponse

type ConversationsJoinResponse struct {
	BaseResponse
	Channel json.RawMessage `json:"channel,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsJoinResponse is the typed response envelope for conversations.join.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsJoin

func ConversationsJoin(ctx context.Context, c *Client, params *ConversationsJoinParams) (*ConversationsJoinResponse, error)

ConversationsJoin calls Slack's conversations.join method.

Required scopes (any one combination): channels:write

type ConversationsKickParams

type ConversationsKickParams struct {
	Channel string `url:"channel,omitempty"` // ID of conversation to remove user from.
	User    string `url:"user,omitempty"`    // User ID to be removed.
}

ConversationsKickParams holds the parameters for the conversations.kick method.

type ConversationsKickResponse

type ConversationsKickResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsKickResponse is the typed response envelope for conversations.kick.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsKick

func ConversationsKick(ctx context.Context, c *Client, params *ConversationsKickParams) (*ConversationsKickResponse, error)

ConversationsKick calls Slack's conversations.kick method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsLeaveParams

type ConversationsLeaveParams struct {
	Channel string `url:"channel,omitempty"` // Conversation to leave
}

ConversationsLeaveParams holds the parameters for the conversations.leave method.

type ConversationsLeaveResponse

type ConversationsLeaveResponse struct {
	BaseResponse
	NotInChannel bool            `json:"not_in_channel,omitempty"`
	Raw          json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsLeaveResponse is the typed response envelope for conversations.leave.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsLeave

func ConversationsLeave(ctx context.Context, c *Client, params *ConversationsLeaveParams) (*ConversationsLeaveResponse, error)

ConversationsLeave calls Slack's conversations.leave method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsListParams

type ConversationsListParams struct {
	ExcludeArchived bool   `url:"exclude_archived,omitempty"` // Set to `true` to exclude archived channels from the list
	Types           string `url:"types,omitempty"`            // Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`
	Limit           int    `url:"limit,omitempty"`            // The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been rea...
	Cursor          string `url:"cursor,omitempty"`           // Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `respon...
}

ConversationsListParams holds the parameters for the conversations.list method.

type ConversationsListResponse

type ConversationsListResponse struct {
	BaseResponse
	Channels []*Channel      `json:"channels,omitempty"`
	Raw      json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsListResponse is the typed response envelope for conversations.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsList

func ConversationsList(ctx context.Context, c *Client, params *ConversationsListParams) (*ConversationsListResponse, error)

ConversationsList calls Slack's conversations.list method.

Required scopes (any one combination): channels:read, groups:read, im:read, mpim:read

type ConversationsMarkParams

type ConversationsMarkParams struct {
	Channel string `url:"channel,omitempty"` // Channel or conversation to set the read cursor for.
	TS      string `url:"ts,omitempty"`      // Unique identifier of message you want marked as most recently seen in this conversation.
}

ConversationsMarkParams holds the parameters for the conversations.mark method.

type ConversationsMarkResponse

type ConversationsMarkResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsMarkResponse is the typed response envelope for conversations.mark.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsMark

func ConversationsMark(ctx context.Context, c *Client, params *ConversationsMarkParams) (*ConversationsMarkResponse, error)

ConversationsMark calls Slack's conversations.mark method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsMembersParams

type ConversationsMembersParams struct {
	Channel string `url:"channel,omitempty"` // ID of the conversation to retrieve members for
	Limit   int    `url:"limit,omitempty"`   // The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't be...
	Cursor  string `url:"cursor,omitempty"`  // Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `respon...
}

ConversationsMembersParams holds the parameters for the conversations.members method.

type ConversationsMembersResponse

type ConversationsMembersResponse struct {
	BaseResponse
	Members []string        `json:"members,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsMembersResponse is the typed response envelope for conversations.members.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsMembers

func ConversationsMembers(ctx context.Context, c *Client, params *ConversationsMembersParams) (*ConversationsMembersResponse, error)

ConversationsMembers calls Slack's conversations.members method.

Required scopes (any one combination): channels:read, groups:read, im:read, mpim:read

type ConversationsOpenParams

type ConversationsOpenParams struct {
	Channel  string `url:"channel,omitempty"`   // Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead.
	Users    string `url:"users,omitempty"`     // Comma separated lists of users. If only one user is included, this creates a 1:1 DM.  The ordering of the users is preserved whenever a mult...
	ReturnIm bool   `url:"return_im,omitempty"` // Boolean, indicates you want the full IM channel definition in the response.
}

ConversationsOpenParams holds the parameters for the conversations.open method.

type ConversationsOpenResponse

type ConversationsOpenResponse struct {
	BaseResponse
	AlreadyOpen bool            `json:"already_open,omitempty"`
	Channel     *Channel        `json:"channel,omitempty"`
	NoOp        bool            `json:"no_op,omitempty"`
	Raw         json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsOpenResponse is the typed response envelope for conversations.open.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsOpen

func ConversationsOpen(ctx context.Context, c *Client, params *ConversationsOpenParams) (*ConversationsOpenResponse, error)

ConversationsOpen calls Slack's conversations.open method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsRenameParams

type ConversationsRenameParams struct {
	Channel string `url:"channel,omitempty"` // ID of conversation to rename
	Name    string `url:"name,omitempty"`    // New name for conversation.
}

ConversationsRenameParams holds the parameters for the conversations.rename method.

type ConversationsRenameResponse

type ConversationsRenameResponse struct {
	BaseResponse
	Channel json.RawMessage `json:"channel,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsRenameResponse is the typed response envelope for conversations.rename.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsRename

func ConversationsRename(ctx context.Context, c *Client, params *ConversationsRenameParams) (*ConversationsRenameResponse, error)

ConversationsRename calls Slack's conversations.rename method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsRepliesParams

type ConversationsRepliesParams struct {
	Channel   string `url:"channel,omitempty"`   // Conversation ID to fetch thread from.
	TS        string `url:"ts,omitempty"`        // Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no re...
	Latest    string `url:"latest,omitempty"`    // End of time range of messages to include in results.
	Oldest    string `url:"oldest,omitempty"`    // Start of time range of messages to include in results.
	Inclusive bool   `url:"inclusive,omitempty"` // Include messages with latest or oldest timestamp in results only when either timestamp is specified.
	Limit     int    `url:"limit,omitempty"`     // The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't be...
	Cursor    string `url:"cursor,omitempty"`    // Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `respon...
}

ConversationsRepliesParams holds the parameters for the conversations.replies method.

type ConversationsRepliesResponse

type ConversationsRepliesResponse struct {
	BaseResponse
	HasMore  bool            `json:"has_more,omitempty"`
	Messages []*Message      `json:"messages,omitempty"`
	Raw      json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsRepliesResponse is the typed response envelope for conversations.replies.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsReplies

func ConversationsReplies(ctx context.Context, c *Client, params *ConversationsRepliesParams) (*ConversationsRepliesResponse, error)

ConversationsReplies calls Slack's conversations.replies method.

Required scopes (any one combination): channels:history, groups:history, im:history, mpim:history

type ConversationsSetPurposeParams

type ConversationsSetPurposeParams struct {
	Channel string `url:"channel,omitempty"` // Conversation to set the purpose of
	Purpose string `url:"purpose,omitempty"` // A new, specialer purpose
}

ConversationsSetPurposeParams holds the parameters for the conversations.setPurpose method.

type ConversationsSetPurposeResponse

type ConversationsSetPurposeResponse struct {
	BaseResponse
	Channel json.RawMessage `json:"channel,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsSetPurposeResponse is the typed response envelope for conversations.setPurpose.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsSetPurpose

func ConversationsSetPurpose(ctx context.Context, c *Client, params *ConversationsSetPurposeParams) (*ConversationsSetPurposeResponse, error)

ConversationsSetPurpose calls Slack's conversations.setPurpose method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsSetTopicParams

type ConversationsSetTopicParams struct {
	Channel string `url:"channel,omitempty"` // Conversation to set the topic of
	Topic   string `url:"topic,omitempty"`   // The new topic string. Does not support formatting or linkification.
}

ConversationsSetTopicParams holds the parameters for the conversations.setTopic method.

type ConversationsSetTopicResponse

type ConversationsSetTopicResponse struct {
	BaseResponse
	Channel json.RawMessage `json:"channel,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsSetTopicResponse is the typed response envelope for conversations.setTopic.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsSetTopic

func ConversationsSetTopic(ctx context.Context, c *Client, params *ConversationsSetTopicParams) (*ConversationsSetTopicResponse, error)

ConversationsSetTopic calls Slack's conversations.setTopic method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type ConversationsUnarchiveParams

type ConversationsUnarchiveParams struct {
	Channel string `url:"channel,omitempty"` // ID of conversation to unarchive
}

ConversationsUnarchiveParams holds the parameters for the conversations.unarchive method.

type ConversationsUnarchiveResponse

type ConversationsUnarchiveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ConversationsUnarchiveResponse is the typed response envelope for conversations.unarchive.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ConversationsUnarchive

func ConversationsUnarchive(ctx context.Context, c *Client, params *ConversationsUnarchiveParams) (*ConversationsUnarchiveResponse, error)

ConversationsUnarchive calls Slack's conversations.unarchive method.

Required scopes (any one combination): channels:write, groups:write, im:write, mpim:write

type DialogOpenParams

type DialogOpenParams struct {
	Dialog    string `url:"dialog"`     // The dialog definition. This must be a JSON-encoded string.
	TriggerID string `url:"trigger_id"` // Exchange a trigger to post to the user.
}

DialogOpenParams holds the parameters for the dialog.open method.

type DialogOpenResponse

type DialogOpenResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

DialogOpenResponse is the typed response envelope for dialog.open.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func DialogOpen

func DialogOpen(ctx context.Context, c *Client, params *DialogOpenParams) (*DialogOpenResponse, error)

DialogOpen calls Slack's dialog.open method.

Required scopes (any one combination): none

type DividerBlock

type DividerBlock struct {
	Type    string `json:"type"` // always "divider"
	BlockID string `json:"block_id,omitempty"`
}

DividerBlock is a visual separator.

func NewDividerBlock

func NewDividerBlock() *DividerBlock

NewDividerBlock constructs a divider block.

type DndEndDndResponse

type DndEndDndResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

DndEndDndResponse is the typed response envelope for dnd.endDnd.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func DndEndDnd

func DndEndDnd(ctx context.Context, c *Client) (*DndEndDndResponse, error)

DndEndDnd calls Slack's dnd.endDnd method.

Required scopes (any one combination): dnd:write

type DndEndSnoozeResponse

type DndEndSnoozeResponse struct {
	BaseResponse
	DndEnabled     bool            `json:"dnd_enabled,omitempty"`
	NextDndEndTS   int             `json:"next_dnd_end_ts,omitempty"`
	NextDndStartTS int             `json:"next_dnd_start_ts,omitempty"`
	SnoozeEnabled  bool            `json:"snooze_enabled,omitempty"`
	Raw            json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

DndEndSnoozeResponse is the typed response envelope for dnd.endSnooze.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func DndEndSnooze

func DndEndSnooze(ctx context.Context, c *Client) (*DndEndSnoozeResponse, error)

DndEndSnooze calls Slack's dnd.endSnooze method.

Required scopes (any one combination): dnd:write

type DndInfoParams

type DndInfoParams struct {
	User string `url:"user,omitempty"` // User to fetch status for (defaults to current user)
}

DndInfoParams holds the parameters for the dnd.info method.

type DndInfoResponse

type DndInfoResponse struct {
	BaseResponse
	DndEnabled      bool            `json:"dnd_enabled,omitempty"`
	NextDndEndTS    int             `json:"next_dnd_end_ts,omitempty"`
	NextDndStartTS  int             `json:"next_dnd_start_ts,omitempty"`
	SnoozeEnabled   bool            `json:"snooze_enabled,omitempty"`
	SnoozeEndtime   int             `json:"snooze_endtime,omitempty"`
	SnoozeRemaining int             `json:"snooze_remaining,omitempty"`
	Raw             json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

DndInfoResponse is the typed response envelope for dnd.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func DndInfo

func DndInfo(ctx context.Context, c *Client, params *DndInfoParams) (*DndInfoResponse, error)

DndInfo calls Slack's dnd.info method.

Required scopes (any one combination): dnd:read

type DndSetSnoozeParams

type DndSetSnoozeParams struct {
	NumMinutes string `url:"num_minutes"` // Number of minutes, from now, to snooze until.
}

DndSetSnoozeParams holds the parameters for the dnd.setSnooze method.

type DndSetSnoozeResponse

type DndSetSnoozeResponse struct {
	BaseResponse
	SnoozeEnabled   bool            `json:"snooze_enabled,omitempty"`
	SnoozeEndtime   int             `json:"snooze_endtime,omitempty"`
	SnoozeRemaining int             `json:"snooze_remaining,omitempty"`
	Raw             json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

DndSetSnoozeResponse is the typed response envelope for dnd.setSnooze.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func DndSetSnooze

func DndSetSnooze(ctx context.Context, c *Client, params *DndSetSnoozeParams) (*DndSetSnoozeResponse, error)

DndSetSnooze calls Slack's dnd.setSnooze method.

Required scopes (any one combination): dnd:write

type DndTeamInfoParams

type DndTeamInfoParams struct {
	Users string `url:"users,omitempty"` // Comma-separated list of users to fetch Do Not Disturb status for
}

DndTeamInfoParams holds the parameters for the dnd.teamInfo method.

type DndTeamInfoResponse

type DndTeamInfoResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

DndTeamInfoResponse is the typed response envelope for dnd.teamInfo.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func DndTeamInfo

func DndTeamInfo(ctx context.Context, c *Client, params *DndTeamInfoParams) (*DndTeamInfoResponse, error)

DndTeamInfo calls Slack's dnd.teamInfo method.

Required scopes (any one combination): dnd:read

type EmojiListResponse

type EmojiListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

EmojiListResponse is the typed response envelope for emoji.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func EmojiList

func EmojiList(ctx context.Context, c *Client) (*EmojiListResponse, error)

EmojiList calls Slack's emoji.list method.

Required scopes (any one combination): emoji:read

type EnterpriseUser

type EnterpriseUser struct {
	EnterpriseID   string   `json:"enterprise_id,omitempty"`
	EnterpriseName string   `json:"enterprise_name,omitempty"`
	ID             string   `json:"id,omitempty"`
	IsAdmin        bool     `json:"is_admin,omitempty"`
	IsOwner        bool     `json:"is_owner,omitempty"`
	Teams          []string `json:"teams,omitempty"`
}

type Envelope

type Envelope interface {
	// contains filtered or unexported methods
}

Envelope is implemented by every generated *Response type. It exposes the embedded BaseResponse so the transport can check ok/error uniformly without reflection.

type ExternalOrgMigrations

type ExternalOrgMigrations struct {
	Current     []map[string]any `json:"current,omitempty"`
	DateUpdated int              `json:"date_updated,omitempty"`
}

ExternalOrgMigrations — External Org Migrations.

type File

type File struct {
	Channels           []string        `json:"channels,omitempty"`
	CommentsCount      int             `json:"comments_count,omitempty"`
	Created            int             `json:"created,omitempty"`
	DateDelete         int             `json:"date_delete,omitempty"`
	DisplayAsBot       bool            `json:"display_as_bot,omitempty"`
	Editable           bool            `json:"editable,omitempty"`
	Editor             string          `json:"editor,omitempty"`
	ExternalID         string          `json:"external_id,omitempty"`
	ExternalType       string          `json:"external_type,omitempty"`
	ExternalURL        string          `json:"external_url,omitempty"`
	Filetype           string          `json:"filetype,omitempty"`
	Groups             []string        `json:"groups,omitempty"`
	HasRichPreview     bool            `json:"has_rich_preview,omitempty"`
	ID                 string          `json:"id,omitempty"`
	ImageExifRotation  int             `json:"image_exif_rotation,omitempty"`
	Ims                []string        `json:"ims,omitempty"`
	IsExternal         bool            `json:"is_external,omitempty"`
	IsPublic           bool            `json:"is_public,omitempty"`
	IsStarred          bool            `json:"is_starred,omitempty"`
	IsTombstoned       bool            `json:"is_tombstoned,omitempty"`
	LastEditor         string          `json:"last_editor,omitempty"`
	Mimetype           string          `json:"mimetype,omitempty"`
	Mode               string          `json:"mode,omitempty"`
	Name               string          `json:"name,omitempty"`
	NonOwnerEditable   bool            `json:"non_owner_editable,omitempty"`
	NumStars           int             `json:"num_stars,omitempty"`
	OriginalH          int             `json:"original_h,omitempty"`
	OriginalW          int             `json:"original_w,omitempty"`
	Permalink          string          `json:"permalink,omitempty"`
	PermalinkPublic    string          `json:"permalink_public,omitempty"`
	PinnedInfo         json.RawMessage `json:"pinned_info,omitempty"`
	PinnedTo           []string        `json:"pinned_to,omitempty"`
	PrettyType         string          `json:"pretty_type,omitempty"`
	Preview            string          `json:"preview,omitempty"`
	PublicURLShared    bool            `json:"public_url_shared,omitempty"`
	Reactions          []*Reaction     `json:"reactions,omitempty"`
	Shares             map[string]any  `json:"shares,omitempty"`
	Size               int             `json:"size,omitempty"`
	SourceTeam         string          `json:"source_team,omitempty"`
	State              string          `json:"state,omitempty"`
	Thumb1024          string          `json:"thumb_1024,omitempty"`
	Thumb1024H         int             `json:"thumb_1024_h,omitempty"`
	Thumb1024W         int             `json:"thumb_1024_w,omitempty"`
	Thumb160           string          `json:"thumb_160,omitempty"`
	Thumb360           string          `json:"thumb_360,omitempty"`
	Thumb360H          int             `json:"thumb_360_h,omitempty"`
	Thumb360W          int             `json:"thumb_360_w,omitempty"`
	Thumb480           string          `json:"thumb_480,omitempty"`
	Thumb480H          int             `json:"thumb_480_h,omitempty"`
	Thumb480W          int             `json:"thumb_480_w,omitempty"`
	Thumb64            string          `json:"thumb_64,omitempty"`
	Thumb720           string          `json:"thumb_720,omitempty"`
	Thumb720H          int             `json:"thumb_720_h,omitempty"`
	Thumb720W          int             `json:"thumb_720_w,omitempty"`
	Thumb80            string          `json:"thumb_80,omitempty"`
	Thumb800           string          `json:"thumb_800,omitempty"`
	Thumb800H          int             `json:"thumb_800_h,omitempty"`
	Thumb800W          int             `json:"thumb_800_w,omitempty"`
	Thumb960           string          `json:"thumb_960,omitempty"`
	Thumb960H          int             `json:"thumb_960_h,omitempty"`
	Thumb960W          int             `json:"thumb_960_w,omitempty"`
	ThumbTiny          string          `json:"thumb_tiny,omitempty"`
	Timestamp          int             `json:"timestamp,omitempty"`
	Title              string          `json:"title,omitempty"`
	Updated            int             `json:"updated,omitempty"`
	URLPrivate         string          `json:"url_private,omitempty"`
	URLPrivateDownload string          `json:"url_private_download,omitempty"`
	User               string          `json:"user,omitempty"`
	UserTeam           string          `json:"user_team,omitempty"`
	Username           string          `json:"username,omitempty"`
}

File — file object.

type FilesCommentsDeleteParams

type FilesCommentsDeleteParams struct {
	File string `url:"file,omitempty"` // File to delete a comment from.
	ID   string `url:"id,omitempty"`   // The comment to delete.
}

FilesCommentsDeleteParams holds the parameters for the files.comments.delete method.

type FilesCommentsDeleteResponse

type FilesCommentsDeleteResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesCommentsDeleteResponse is the typed response envelope for files.comments.delete.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesCommentsDelete

func FilesCommentsDelete(ctx context.Context, c *Client, params *FilesCommentsDeleteParams) (*FilesCommentsDeleteResponse, error)

FilesCommentsDelete calls Slack's files.comments.delete method.

Required scopes (any one combination): files:write:user

type FilesDeleteParams

type FilesDeleteParams struct {
	File string `url:"file,omitempty"` // ID of file to delete.
}

FilesDeleteParams holds the parameters for the files.delete method.

type FilesDeleteResponse

type FilesDeleteResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesDeleteResponse is the typed response envelope for files.delete.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesDelete

func FilesDelete(ctx context.Context, c *Client, params *FilesDeleteParams) (*FilesDeleteResponse, error)

FilesDelete calls Slack's files.delete method.

Required scopes (any one combination): files:write:user

type FilesInfoParams

type FilesInfoParams struct {
	File   string `url:"file,omitempty"` // Specify a file by providing its ID.
	Count  string `url:"count,omitempty"`
	Page   string `url:"page,omitempty"`
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been rea...
	Cursor string `url:"cursor,omitempty"` // Parameter for pagination. File comments are paginated for a single file. Set `cursor` equal to the `next_cursor` attribute returned by the p...
}

FilesInfoParams holds the parameters for the files.info method.

type FilesInfoResponse

type FilesInfoResponse struct {
	BaseResponse
	Comments    []json.RawMessage `json:"comments,omitempty"`
	ContentHtml json.RawMessage   `json:"content_html,omitempty"`
	Editor      string            `json:"editor,omitempty"`
	File        *File             `json:"file,omitempty"`
	Paging      *Paging           `json:"paging,omitempty"`
	Raw         json.RawMessage   `json:"-"` // full response body, populated by the operation wrapper
}

FilesInfoResponse is the typed response envelope for files.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesInfo

func FilesInfo(ctx context.Context, c *Client, params *FilesInfoParams) (*FilesInfoResponse, error)

FilesInfo calls Slack's files.info method.

Required scopes (any one combination): files:read

type FilesListParams

type FilesListParams struct {
	User                   string  `url:"user,omitempty"`    // Filter files created by a single user.
	Channel                string  `url:"channel,omitempty"` // Filter files appearing in a specific channel, indicated by its ID.
	TSFrom                 float64 `url:"ts_from,omitempty"` // Filter files created after this timestamp (inclusive).
	TSTo                   float64 `url:"ts_to,omitempty"`   // Filter files created before this timestamp (inclusive).
	Types                  string  `url:"types,omitempty"`   // Filter files by type ([see below](#file_types)). You can pass multiple values in the types argument, like `types=spaces,snippets`.The defaul...
	Count                  string  `url:"count,omitempty"`
	Page                   string  `url:"page,omitempty"`
	ShowFilesHiddenByLimit bool    `url:"show_files_hidden_by_limit,omitempty"` // Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.
}

FilesListParams holds the parameters for the files.list method.

type FilesListResponse

type FilesListResponse struct {
	BaseResponse
	Files  []*File         `json:"files,omitempty"`
	Paging *Paging         `json:"paging,omitempty"`
	Raw    json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesListResponse is the typed response envelope for files.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesList

func FilesList(ctx context.Context, c *Client, params *FilesListParams) (*FilesListResponse, error)

FilesList calls Slack's files.list method.

Required scopes (any one combination): files:read

type FilesRemoteAddParams

type FilesRemoteAddParams struct {
	ExternalID            string `url:"external_id,omitempty"`             // Creator defined GUID for the file.
	Title                 string `url:"title,omitempty"`                   // Title of the file being shared.
	Filetype              string `url:"filetype,omitempty"`                // type of file
	ExternalURL           string `url:"external_url,omitempty"`            // URL of the remote file.
	PreviewImage          string `url:"preview_image,omitempty"`           // Preview of the document via `multipart/form-data`.
	IndexableFileContents string `url:"indexable_file_contents,omitempty"` // A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.
}

FilesRemoteAddParams holds the parameters for the files.remote.add method.

type FilesRemoteAddResponse

type FilesRemoteAddResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesRemoteAddResponse is the typed response envelope for files.remote.add.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesRemoteAdd

func FilesRemoteAdd(ctx context.Context, c *Client, params *FilesRemoteAddParams) (*FilesRemoteAddResponse, error)

FilesRemoteAdd calls Slack's files.remote.add method.

Required scopes (any one combination): remote_files:write

type FilesRemoteInfoParams

type FilesRemoteInfoParams struct {
	File       string `url:"file,omitempty"`        // Specify a file by providing its ID.
	ExternalID string `url:"external_id,omitempty"` // Creator defined GUID for the file.
}

FilesRemoteInfoParams holds the parameters for the files.remote.info method.

type FilesRemoteInfoResponse

type FilesRemoteInfoResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesRemoteInfoResponse is the typed response envelope for files.remote.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesRemoteInfo

func FilesRemoteInfo(ctx context.Context, c *Client, params *FilesRemoteInfoParams) (*FilesRemoteInfoResponse, error)

FilesRemoteInfo calls Slack's files.remote.info method.

Required scopes (any one combination): remote_files:read

type FilesRemoteListParams

type FilesRemoteListParams struct {
	Channel string  `url:"channel,omitempty"` // Filter files appearing in a specific channel, indicated by its ID.
	TSFrom  float64 `url:"ts_from,omitempty"` // Filter files created after this timestamp (inclusive).
	TSTo    float64 `url:"ts_to,omitempty"`   // Filter files created before this timestamp (inclusive).
	Limit   int     `url:"limit,omitempty"`   // The maximum number of items to return.
	Cursor  string  `url:"cursor,omitempty"`  // Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `respon...
}

FilesRemoteListParams holds the parameters for the files.remote.list method.

type FilesRemoteListResponse

type FilesRemoteListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesRemoteListResponse is the typed response envelope for files.remote.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesRemoteList

func FilesRemoteList(ctx context.Context, c *Client, params *FilesRemoteListParams) (*FilesRemoteListResponse, error)

FilesRemoteList calls Slack's files.remote.list method.

Required scopes (any one combination): remote_files:read

type FilesRemoteRemoveParams

type FilesRemoteRemoveParams struct {
	File       string `url:"file,omitempty"`        // Specify a file by providing its ID.
	ExternalID string `url:"external_id,omitempty"` // Creator defined GUID for the file.
}

FilesRemoteRemoveParams holds the parameters for the files.remote.remove method.

type FilesRemoteRemoveResponse

type FilesRemoteRemoveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesRemoteRemoveResponse is the typed response envelope for files.remote.remove.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesRemoteRemove

func FilesRemoteRemove(ctx context.Context, c *Client, params *FilesRemoteRemoveParams) (*FilesRemoteRemoveResponse, error)

FilesRemoteRemove calls Slack's files.remote.remove method.

Required scopes (any one combination): remote_files:write

type FilesRemoteShareParams

type FilesRemoteShareParams struct {
	File       string `url:"file,omitempty"`        // Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required.
	ExternalID string `url:"external_id,omitempty"` // The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack.  Either this field or `file` or both ...
	Channels   string `url:"channels,omitempty"`    // Comma-separated list of channel IDs where the file will be shared.
}

FilesRemoteShareParams holds the parameters for the files.remote.share method.

type FilesRemoteShareResponse

type FilesRemoteShareResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesRemoteShareResponse is the typed response envelope for files.remote.share.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesRemoteShare

func FilesRemoteShare(ctx context.Context, c *Client, params *FilesRemoteShareParams) (*FilesRemoteShareResponse, error)

FilesRemoteShare calls Slack's files.remote.share method.

Required scopes (any one combination): remote_files:share

type FilesRemoteUpdateParams

type FilesRemoteUpdateParams struct {
	File                  string `url:"file,omitempty"`                    // Specify a file by providing its ID.
	ExternalID            string `url:"external_id,omitempty"`             // Creator defined GUID for the file.
	Title                 string `url:"title,omitempty"`                   // Title of the file being shared.
	Filetype              string `url:"filetype,omitempty"`                // type of file
	ExternalURL           string `url:"external_url,omitempty"`            // URL of the remote file.
	PreviewImage          string `url:"preview_image,omitempty"`           // Preview of the document via `multipart/form-data`.
	IndexableFileContents string `url:"indexable_file_contents,omitempty"` // File containing contents that can be used to improve searchability for the remote file.
}

FilesRemoteUpdateParams holds the parameters for the files.remote.update method.

type FilesRemoteUpdateResponse

type FilesRemoteUpdateResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesRemoteUpdateResponse is the typed response envelope for files.remote.update.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesRemoteUpdate

func FilesRemoteUpdate(ctx context.Context, c *Client, params *FilesRemoteUpdateParams) (*FilesRemoteUpdateResponse, error)

FilesRemoteUpdate calls Slack's files.remote.update method.

Required scopes (any one combination): remote_files:write

type FilesRevokePublicURLParams

type FilesRevokePublicURLParams struct {
	File string `url:"file,omitempty"` // File to revoke
}

FilesRevokePublicURLParams holds the parameters for the files.revokePublicURL method.

type FilesRevokePublicURLResponse

type FilesRevokePublicURLResponse struct {
	BaseResponse
	File *File           `json:"file,omitempty"`
	Raw  json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesRevokePublicURLResponse is the typed response envelope for files.revokePublicURL.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesRevokePublicURL

func FilesRevokePublicURL(ctx context.Context, c *Client, params *FilesRevokePublicURLParams) (*FilesRevokePublicURLResponse, error)

FilesRevokePublicURL calls Slack's files.revokePublicURL method.

Required scopes (any one combination): files:write:user

type FilesSharedPublicURLParams

type FilesSharedPublicURLParams struct {
	File string `url:"file,omitempty"` // File to share
}

FilesSharedPublicURLParams holds the parameters for the files.sharedPublicURL method.

type FilesSharedPublicURLResponse

type FilesSharedPublicURLResponse struct {
	BaseResponse
	File *File           `json:"file,omitempty"`
	Raw  json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesSharedPublicURLResponse is the typed response envelope for files.sharedPublicURL.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesSharedPublicURL

func FilesSharedPublicURL(ctx context.Context, c *Client, params *FilesSharedPublicURLParams) (*FilesSharedPublicURLResponse, error)

FilesSharedPublicURL calls Slack's files.sharedPublicURL method.

Required scopes (any one combination): files:write:user

type FilesUploadParams

type FilesUploadParams struct {
	File           string `url:"file,omitempty"`            // File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`.
	Content        string `url:"content,omitempty"`         // File contents via a POST variable. If omitting this parameter, you must provide a `file`.
	Filetype       string `url:"filetype,omitempty"`        // A [file type](/types/file#file_types) identifier.
	Filename       string `url:"filename,omitempty"`        // Filename of file.
	Title          string `url:"title,omitempty"`           // Title of file.
	InitialComment string `url:"initial_comment,omitempty"` // The message text introducing the file in specified `channels`.
	Channels       string `url:"channels,omitempty"`        // Comma-separated list of channel names or IDs where the file will be shared.
	ThreadTS       string `url:"thread_ts,omitempty"`       // Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead.
}

FilesUploadParams holds the parameters for the files.upload method.

type FilesUploadResponse

type FilesUploadResponse struct {
	BaseResponse
	File *File           `json:"file,omitempty"`
	Raw  json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

FilesUploadResponse is the typed response envelope for files.upload.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func FilesUpload

func FilesUpload(ctx context.Context, c *Client, params *FilesUploadParams) (*FilesUploadResponse, error)

FilesUpload calls Slack's files.upload method.

Required scopes (any one combination): files:write:user

type HeaderBlock

type HeaderBlock struct {
	Type    string      `json:"type"` // always "header"
	Text    *TextObject `json:"text"` // must be plain_text
	BlockID string      `json:"block_id,omitempty"`
}

HeaderBlock displays a large heading.

func NewHeaderBlock

func NewHeaderBlock(text *TextObject) *HeaderBlock

NewHeaderBlock constructs a header block from a plain_text TextObject.

type HistoryPayload

type HistoryPayload struct {
	Messages []*Message `json:"messages"`
	HasMore  bool       `json:"has_more,omitempty"`
}

HistoryPayload is the typed shape of a conversations.history / conversations.replies response body — used by callers that just want the messages without touching .Raw.

type Icon

type Icon struct {
	Image102     string `json:"image_102,omitempty"`
	Image132     string `json:"image_132,omitempty"`
	Image230     string `json:"image_230,omitempty"`
	Image34      string `json:"image_34,omitempty"`
	Image44      string `json:"image_44,omitempty"`
	Image68      string `json:"image_68,omitempty"`
	Image88      string `json:"image_88,omitempty"`
	ImageDefault bool   `json:"image_default,omitempty"`
}

type ItemRef

type ItemRef struct {
	Channel   string
	Timestamp string
}

ItemRef identifies a message-target for the reactions.* and pins.* family of methods (channel + timestamp).

func NewRefToMessage

func NewRefToMessage(channel, timestamp string) ItemRef

NewRefToMessage mirrors slack-go's NewRefToMessage(channelID, ts).

type Message

type Message struct {
	Attachments      []map[string]any  `json:"attachments,omitempty"`
	Blocks           []json.RawMessage `json:"blocks,omitempty"`
	BotID            string            `json:"bot_id,omitempty"`
	BotProfile       *BotProfile       `json:"bot_profile,omitempty"`
	ClientMsgID      string            `json:"client_msg_id,omitempty"`
	Comment          *Comment          `json:"comment,omitempty"`
	DisplayAsBot     bool              `json:"display_as_bot,omitempty"`
	File             *File             `json:"file,omitempty"`
	Files            []*File           `json:"files,omitempty"`
	Icons            map[string]any    `json:"icons,omitempty"`
	Inviter          string            `json:"inviter,omitempty"`
	IsDelayedMessage bool              `json:"is_delayed_message,omitempty"`
	IsIntro          bool              `json:"is_intro,omitempty"`
	IsStarred        bool              `json:"is_starred,omitempty"`
	LastRead         string            `json:"last_read,omitempty"`
	LatestReply      string            `json:"latest_reply,omitempty"`
	Name             string            `json:"name,omitempty"`
	OldName          string            `json:"old_name,omitempty"`
	ParentUserID     string            `json:"parent_user_id,omitempty"`
	Permalink        string            `json:"permalink,omitempty"`
	PinnedTo         []string          `json:"pinned_to,omitempty"`
	Purpose          string            `json:"purpose,omitempty"`
	Reactions        []*Reaction       `json:"reactions,omitempty"`
	ReplyCount       int               `json:"reply_count,omitempty"`
	ReplyUsers       []string          `json:"reply_users,omitempty"`
	ReplyUsersCount  int               `json:"reply_users_count,omitempty"`
	SourceTeam       string            `json:"source_team,omitempty"`
	Subscribed       bool              `json:"subscribed,omitempty"`
	Subtype          string            `json:"subtype,omitempty"`
	Team             string            `json:"team,omitempty"`
	Text             string            `json:"text,omitempty"`
	ThreadTS         string            `json:"thread_ts,omitempty"`
	Topic            string            `json:"topic,omitempty"`
	TS               string            `json:"ts,omitempty"`
	Type             string            `json:"type,omitempty"`
	UnreadCount      int               `json:"unread_count,omitempty"`
	Upload           bool              `json:"upload,omitempty"`
	User             string            `json:"user,omitempty"`
	UserProfile      *UserProfileShort `json:"user_profile,omitempty"`
	UserTeam         string            `json:"user_team,omitempty"`
	Username         string            `json:"username,omitempty"`
}

Message — Message object.

type MigrationExchangeParams

type MigrationExchangeParams struct {
	Users  string `url:"users"`             // A comma-separated list of user ids, up to 400 per request
	TeamID string `url:"team_id,omitempty"` // Specify team_id starts with `T` in case of Org Token
	ToOld  bool   `url:"to_old,omitempty"`  // Specify `true` to convert `W` global user IDs to workspace-specific `U` IDs. Defaults to `false`.
}

MigrationExchangeParams holds the parameters for the migration.exchange method.

type MigrationExchangeResponse

type MigrationExchangeResponse struct {
	BaseResponse
	EnterpriseID   string          `json:"enterprise_id,omitempty"`
	InvalidUserIds []string        `json:"invalid_user_ids,omitempty"`
	TeamID         string          `json:"team_id,omitempty"`
	UserIDMap      map[string]any  `json:"user_id_map,omitempty"`
	Raw            json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

MigrationExchangeResponse is the typed response envelope for migration.exchange.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func MigrationExchange

func MigrationExchange(ctx context.Context, c *Client, params *MigrationExchangeParams) (*MigrationExchangeResponse, error)

MigrationExchange calls Slack's migration.exchange method.

Required scopes (any one combination): tokens.basic

type OAUTHAccessParams

type OAUTHAccessParams struct {
	ClientID      string `url:"client_id,omitempty"`      // Issued when you created your application.
	ClientSecret  string `url:"client_secret,omitempty"`  // Issued when you created your application.
	Code          string `url:"code,omitempty"`           // The `code` param returned via the OAuth callback.
	RedirectUri   string `url:"redirect_uri,omitempty"`   // This must match the originally submitted URI (if one was sent).
	SingleChannel bool   `url:"single_channel,omitempty"` // Request the user to add your app only to a single channel. Only valid with a [legacy workspace app](https://api.slack.com/legacy-workspace-a...
}

OAUTHAccessParams holds the parameters for the oauth.access method.

type OAUTHAccessResponse

type OAUTHAccessResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

OAUTHAccessResponse is the typed response envelope for oauth.access.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func OAUTHAccess

func OAUTHAccess(ctx context.Context, c *Client, params *OAUTHAccessParams) (*OAUTHAccessResponse, error)

OAUTHAccess calls Slack's oauth.access method.

Required scopes (any one combination): none

type OAUTHTokenParams

type OAUTHTokenParams struct {
	ClientID      string `url:"client_id,omitempty"`      // Issued when you created your application.
	ClientSecret  string `url:"client_secret,omitempty"`  // Issued when you created your application.
	Code          string `url:"code,omitempty"`           // The `code` param returned via the OAuth callback.
	RedirectUri   string `url:"redirect_uri,omitempty"`   // This must match the originally submitted URI (if one was sent).
	SingleChannel bool   `url:"single_channel,omitempty"` // Request the user to add your app only to a single channel.
}

OAUTHTokenParams holds the parameters for the oauth.token method.

type OAUTHTokenResponse

type OAUTHTokenResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

OAUTHTokenResponse is the typed response envelope for oauth.token.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func OAUTHToken

func OAUTHToken(ctx context.Context, c *Client, params *OAUTHTokenParams) (*OAUTHTokenResponse, error)

OAUTHToken calls Slack's oauth.token method.

Required scopes (any one combination): none

type OAUTHV2AccessParams

type OAUTHV2AccessParams struct {
	ClientID     string `url:"client_id,omitempty"`     // Issued when you created your application.
	ClientSecret string `url:"client_secret,omitempty"` // Issued when you created your application.
	Code         string `url:"code"`                    // The `code` param returned via the OAuth callback.
	RedirectUri  string `url:"redirect_uri,omitempty"`  // This must match the originally submitted URI (if one was sent).
}

OAUTHV2AccessParams holds the parameters for the oauth.v2.access method.

type OAUTHV2AccessResponse

type OAUTHV2AccessResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

OAUTHV2AccessResponse is the typed response envelope for oauth.v2.access.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func OAUTHV2Access

func OAUTHV2Access(ctx context.Context, c *Client, params *OAUTHV2AccessParams) (*OAUTHV2AccessResponse, error)

OAUTHV2Access calls Slack's oauth.v2.access method.

Required scopes (any one combination): none

type Paging

type Paging struct {
	Count   int `json:"count,omitempty"`
	Page    int `json:"page,omitempty"`
	Pages   int `json:"pages,omitempty"`
	PerPage int `json:"per_page,omitempty"`
	Spill   int `json:"spill,omitempty"`
	Total   int `json:"total,omitempty"`
}

Paging — paging object.

type PinsAddParams

type PinsAddParams struct {
	Channel   string `url:"channel"`             // Channel to pin the item in.
	Timestamp string `url:"timestamp,omitempty"` // Timestamp of the message to pin.
}

PinsAddParams holds the parameters for the pins.add method.

type PinsAddResponse

type PinsAddResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

PinsAddResponse is the typed response envelope for pins.add.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func PinsAdd

func PinsAdd(ctx context.Context, c *Client, params *PinsAddParams) (*PinsAddResponse, error)

PinsAdd calls Slack's pins.add method.

Required scopes (any one combination): pins:write

type PinsListParams

type PinsListParams struct {
	Channel string `url:"channel"` // Channel to get pinned items for.
}

PinsListParams holds the parameters for the pins.list method.

type PinsListResponse

type PinsListResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

PinsListResponse is the typed response envelope for pins.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func PinsList

func PinsList(ctx context.Context, c *Client, params *PinsListParams) (*PinsListResponse, error)

PinsList calls Slack's pins.list method.

Required scopes (any one combination): pins:read

type PinsRemoveParams

type PinsRemoveParams struct {
	Channel   string `url:"channel"`             // Channel where the item is pinned to.
	Timestamp string `url:"timestamp,omitempty"` // Timestamp of the message to un-pin.
}

PinsRemoveParams holds the parameters for the pins.remove method.

type PinsRemoveResponse

type PinsRemoveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

PinsRemoveResponse is the typed response envelope for pins.remove.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func PinsRemove

func PinsRemove(ctx context.Context, c *Client, params *PinsRemoveParams) (*PinsRemoveResponse, error)

PinsRemove calls Slack's pins.remove method.

Required scopes (any one combination): pins:write

type PrimaryOwner

type PrimaryOwner struct {
	Email string `json:"email,omitempty"`
	ID    string `json:"id,omitempty"`
}

type Reaction

type Reaction struct {
	Count int      `json:"count,omitempty"`
	Name  string   `json:"name,omitempty"`
	Users []string `json:"users,omitempty"`
}

Reaction — Reaction object.

type ReactionsAddParams

type ReactionsAddParams struct {
	Channel   string `url:"channel"`   // Channel where the message to add reaction to was posted.
	Name      string `url:"name"`      // Reaction (emoji) name.
	Timestamp string `url:"timestamp"` // Timestamp of the message to add reaction to.
}

ReactionsAddParams holds the parameters for the reactions.add method.

type ReactionsAddResponse

type ReactionsAddResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ReactionsAddResponse is the typed response envelope for reactions.add.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ReactionsAdd

func ReactionsAdd(ctx context.Context, c *Client, params *ReactionsAddParams) (*ReactionsAddResponse, error)

ReactionsAdd calls Slack's reactions.add method.

Required scopes (any one combination): reactions:write

type ReactionsGetParams

type ReactionsGetParams struct {
	Channel     string `url:"channel,omitempty"`      // Channel where the message to get reactions for was posted.
	File        string `url:"file,omitempty"`         // File to get reactions for.
	FileComment string `url:"file_comment,omitempty"` // File comment to get reactions for.
	Full        bool   `url:"full,omitempty"`         // If true always return the complete reaction list.
	Timestamp   string `url:"timestamp,omitempty"`    // Timestamp of the message to get reactions for.
}

ReactionsGetParams holds the parameters for the reactions.get method.

type ReactionsGetResponse

type ReactionsGetResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ReactionsGetResponse is the typed response envelope for reactions.get.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ReactionsGet

func ReactionsGet(ctx context.Context, c *Client, params *ReactionsGetParams) (*ReactionsGetResponse, error)

ReactionsGet calls Slack's reactions.get method.

Required scopes (any one combination): reactions:read

type ReactionsListParams

type ReactionsListParams struct {
	User   string `url:"user,omitempty"` // Show reactions made by this user. Defaults to the authed user.
	Full   bool   `url:"full,omitempty"` // If true always return the complete reaction list.
	Count  int    `url:"count,omitempty"`
	Page   int    `url:"page,omitempty"`
	Cursor string `url:"cursor,omitempty"` // Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This par...
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been rea...
}

ReactionsListParams holds the parameters for the reactions.list method.

type ReactionsListResponse

type ReactionsListResponse struct {
	BaseResponse
	Items  []map[string]any `json:"items,omitempty"`
	Paging *Paging          `json:"paging,omitempty"`
	Raw    json.RawMessage  `json:"-"` // full response body, populated by the operation wrapper
}

ReactionsListResponse is the typed response envelope for reactions.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ReactionsList

func ReactionsList(ctx context.Context, c *Client, params *ReactionsListParams) (*ReactionsListResponse, error)

ReactionsList calls Slack's reactions.list method.

Required scopes (any one combination): reactions:read

type ReactionsRemoveParams

type ReactionsRemoveParams struct {
	Name        string `url:"name"`                   // Reaction (emoji) name.
	File        string `url:"file,omitempty"`         // File to remove reaction from.
	FileComment string `url:"file_comment,omitempty"` // File comment to remove reaction from.
	Channel     string `url:"channel,omitempty"`      // Channel where the message to remove reaction from was posted.
	Timestamp   string `url:"timestamp,omitempty"`    // Timestamp of the message to remove reaction from.
}

ReactionsRemoveParams holds the parameters for the reactions.remove method.

type ReactionsRemoveResponse

type ReactionsRemoveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ReactionsRemoveResponse is the typed response envelope for reactions.remove.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ReactionsRemove

func ReactionsRemove(ctx context.Context, c *Client, params *ReactionsRemoveParams) (*ReactionsRemoveResponse, error)

ReactionsRemove calls Slack's reactions.remove method.

Required scopes (any one combination): reactions:write

type Reminder

type Reminder struct {
	CompleteTS int    `json:"complete_ts,omitempty"`
	Creator    string `json:"creator,omitempty"`
	ID         string `json:"id,omitempty"`
	Recurring  bool   `json:"recurring,omitempty"`
	Text       string `json:"text,omitempty"`
	Time       int    `json:"time,omitempty"`
	User       string `json:"user,omitempty"`
}

type RemindersAddParams

type RemindersAddParams struct {
	Text string `url:"text"`           // The content of the reminder
	Time string `url:"time"`           // When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hou...
	User string `url:"user,omitempty"` // The user who will receive the reminder. If no user is specified, the reminder will go to user who created it.
}

RemindersAddParams holds the parameters for the reminders.add method.

type RemindersAddResponse

type RemindersAddResponse struct {
	BaseResponse
	Reminder *Reminder       `json:"reminder,omitempty"`
	Raw      json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

RemindersAddResponse is the typed response envelope for reminders.add.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func RemindersAdd

func RemindersAdd(ctx context.Context, c *Client, params *RemindersAddParams) (*RemindersAddResponse, error)

RemindersAdd calls Slack's reminders.add method.

Required scopes (any one combination): reminders:write

type RemindersCompleteParams

type RemindersCompleteParams struct {
	Reminder string `url:"reminder,omitempty"` // The ID of the reminder to be marked as complete
}

RemindersCompleteParams holds the parameters for the reminders.complete method.

type RemindersCompleteResponse

type RemindersCompleteResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

RemindersCompleteResponse is the typed response envelope for reminders.complete.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func RemindersComplete

func RemindersComplete(ctx context.Context, c *Client, params *RemindersCompleteParams) (*RemindersCompleteResponse, error)

RemindersComplete calls Slack's reminders.complete method.

Required scopes (any one combination): reminders:write

type RemindersDeleteParams

type RemindersDeleteParams struct {
	Reminder string `url:"reminder,omitempty"` // The ID of the reminder
}

RemindersDeleteParams holds the parameters for the reminders.delete method.

type RemindersDeleteResponse

type RemindersDeleteResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

RemindersDeleteResponse is the typed response envelope for reminders.delete.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func RemindersDelete

func RemindersDelete(ctx context.Context, c *Client, params *RemindersDeleteParams) (*RemindersDeleteResponse, error)

RemindersDelete calls Slack's reminders.delete method.

Required scopes (any one combination): reminders:write

type RemindersInfoParams

type RemindersInfoParams struct {
	Reminder string `url:"reminder,omitempty"` // The ID of the reminder
}

RemindersInfoParams holds the parameters for the reminders.info method.

type RemindersInfoResponse

type RemindersInfoResponse struct {
	BaseResponse
	Reminder *Reminder       `json:"reminder,omitempty"`
	Raw      json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

RemindersInfoResponse is the typed response envelope for reminders.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func RemindersInfo

func RemindersInfo(ctx context.Context, c *Client, params *RemindersInfoParams) (*RemindersInfoResponse, error)

RemindersInfo calls Slack's reminders.info method.

Required scopes (any one combination): reminders:read

type RemindersListResponse

type RemindersListResponse struct {
	BaseResponse
	Reminders []*Reminder     `json:"reminders,omitempty"`
	Raw       json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

RemindersListResponse is the typed response envelope for reminders.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func RemindersList

func RemindersList(ctx context.Context, c *Client) (*RemindersListResponse, error)

RemindersList calls Slack's reminders.list method.

Required scopes (any one combination): reminders:read

type Resources

type Resources struct {
	ExcludedIds []string `json:"excluded_ids,omitempty"`
	Ids         []string `json:"ids,omitempty"`
	Wildcard    bool     `json:"wildcard,omitempty"`
}

Resources — resources in info from apps.permissions.info.

type RtmConnectParams

type RtmConnectParams struct {
	BatchPresenceAware bool `url:"batch_presence_aware,omitempty"` // Batch presence deliveries via subscription. Enabling changes the shape of `presence_change` events. See [batch presence](/docs/presence-and-...
	PresenceSub        bool `url:"presence_sub,omitempty"`         // Only deliver presence events when requested by subscription. See [presence subscriptions](/docs/presence-and-status#subscriptions).
}

RtmConnectParams holds the parameters for the rtm.connect method.

type RtmConnectResponse

type RtmConnectResponse struct {
	BaseResponse
	Self map[string]any  `json:"self,omitempty"`
	Team map[string]any  `json:"team,omitempty"`
	URL  string          `json:"url,omitempty"`
	Raw  json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

RtmConnectResponse is the typed response envelope for rtm.connect.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func RtmConnect

func RtmConnect(ctx context.Context, c *Client, params *RtmConnectParams) (*RtmConnectResponse, error)

RtmConnect calls Slack's rtm.connect method.

Required scopes (any one combination): rtm:stream

type SearchFilesParams

type SearchFilesParams struct {
	Count     int    `url:"count,omitempty"`
	Highlight bool   `url:"highlight,omitempty"`
	Page      int    `url:"page,omitempty"`
	Query     string `url:"query"`
	Sort      string `url:"sort,omitempty"`
	SortDir   string `url:"sort_dir,omitempty"`
}

SearchFilesParams mirrors SearchMessagesParams for the search.files method.

type SearchFilesResponse

type SearchFilesResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"`
}

SearchFilesResponse is the typed response envelope for search.files.

func SearchFiles

func SearchFiles(ctx context.Context, c *Client, params *SearchFilesParams) (*SearchFilesResponse, error)

SearchFiles calls Slack's search.files method.

The Slack Web API supports this method but their published OpenAPI 2.0 spec doesn't list it. Hand-written here until they fix the spec.

Required scopes: search:read.

type SearchMessagesParams

type SearchMessagesParams struct {
	Count     int    `url:"count,omitempty"`     // Pass the number of results you want per "page". Maximum of `100`.
	Highlight bool   `url:"highlight,omitempty"` // Pass a value of `true` to enable query highlight markers (see below).
	Page      int    `url:"page,omitempty"`
	Query     string `url:"query"`              // Search query.
	Sort      string `url:"sort,omitempty"`     // Return matches sorted by either `score` or `timestamp`.
	SortDir   string `url:"sort_dir,omitempty"` // Change sort direction to ascending (`asc`) or descending (`desc`).
}

SearchMessagesParams holds the parameters for the search.messages method.

type SearchMessagesResponse

type SearchMessagesResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

SearchMessagesResponse is the typed response envelope for search.messages.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func SearchMessages

func SearchMessages(ctx context.Context, c *Client, params *SearchMessagesParams) (*SearchMessagesResponse, error)

SearchMessages calls Slack's search.messages method.

Required scopes (any one combination): search:read

type SectionBlock

type SectionBlock struct {
	Type      string                 `json:"type"` // always "section"
	Text      *TextObject            `json:"text,omitempty"`
	Fields    []*TextObject          `json:"fields,omitempty"`
	Accessory map[string]interface{} `json:"accessory,omitempty"`
	BlockID   string                 `json:"block_id,omitempty"`
}

SectionBlock is a generic section — text, optional fields, optional accessory.

func NewSectionBlock

func NewSectionBlock(text *TextObject, fields []*TextObject, accessory map[string]interface{}) *SectionBlock

NewSectionBlock constructs a section block. Matches slack-go's NewSectionBlock(text, fields, accessory) signature.

type StarsAddParams

type StarsAddParams struct {
	Channel     string `url:"channel,omitempty"`      // Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`).
	File        string `url:"file,omitempty"`         // File to add star to.
	FileComment string `url:"file_comment,omitempty"` // File comment to add star to.
	Timestamp   string `url:"timestamp,omitempty"`    // Timestamp of the message to add star to.
}

StarsAddParams holds the parameters for the stars.add method.

type StarsAddResponse

type StarsAddResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

StarsAddResponse is the typed response envelope for stars.add.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func StarsAdd

func StarsAdd(ctx context.Context, c *Client, params *StarsAddParams) (*StarsAddResponse, error)

StarsAdd calls Slack's stars.add method.

Required scopes (any one combination): stars:write

type StarsListParams

type StarsListParams struct {
	Count  string `url:"count,omitempty"`
	Page   string `url:"page,omitempty"`
	Cursor string `url:"cursor,omitempty"` // Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This par...
	Limit  int    `url:"limit,omitempty"`  // The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been rea...
}

StarsListParams holds the parameters for the stars.list method.

type StarsListResponse

type StarsListResponse struct {
	BaseResponse
	Items  []map[string]any `json:"items,omitempty"`
	Paging *Paging          `json:"paging,omitempty"`
	Raw    json.RawMessage  `json:"-"` // full response body, populated by the operation wrapper
}

StarsListResponse is the typed response envelope for stars.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func StarsList

func StarsList(ctx context.Context, c *Client, params *StarsListParams) (*StarsListResponse, error)

StarsList calls Slack's stars.list method.

Required scopes (any one combination): stars:read

type StarsRemoveParams

type StarsRemoveParams struct {
	Channel     string `url:"channel,omitempty"`      // Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`).
	File        string `url:"file,omitempty"`         // File to remove star from.
	FileComment string `url:"file_comment,omitempty"` // File comment to remove star from.
	Timestamp   string `url:"timestamp,omitempty"`    // Timestamp of the message to remove star from.
}

StarsRemoveParams holds the parameters for the stars.remove method.

type StarsRemoveResponse

type StarsRemoveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

StarsRemoveResponse is the typed response envelope for stars.remove.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func StarsRemove

func StarsRemove(ctx context.Context, c *Client, params *StarsRemoveParams) (*StarsRemoveResponse, error)

StarsRemove calls Slack's stars.remove method.

Required scopes (any one combination): stars:write

type Subteam

type Subteam struct {
	AutoProvision       bool           `json:"auto_provision,omitempty"`
	AutoType            string         `json:"auto_type,omitempty"`
	ChannelCount        int            `json:"channel_count,omitempty"`
	CreatedBy           string         `json:"created_by,omitempty"`
	DateCreate          int            `json:"date_create,omitempty"`
	DateDelete          int            `json:"date_delete,omitempty"`
	DateUpdate          int            `json:"date_update,omitempty"`
	DeletedBy           string         `json:"deleted_by,omitempty"`
	Description         string         `json:"description,omitempty"`
	EnterpriseSubteamID string         `json:"enterprise_subteam_id,omitempty"`
	Handle              string         `json:"handle,omitempty"`
	ID                  string         `json:"id,omitempty"`
	IsExternal          bool           `json:"is_external,omitempty"`
	IsSubteam           bool           `json:"is_subteam,omitempty"`
	IsUsergroup         bool           `json:"is_usergroup,omitempty"`
	Name                string         `json:"name,omitempty"`
	Prefs               map[string]any `json:"prefs,omitempty"`
	TeamID              string         `json:"team_id,omitempty"`
	UpdatedBy           string         `json:"updated_by,omitempty"`
	UserCount           int            `json:"user_count,omitempty"`
	Users               []string       `json:"users,omitempty"`
}

Subteam — Subteam/Usergroup Object.

type Team

type Team struct {
	Archived              bool                   `json:"archived,omitempty"`
	AvatarBaseURL         string                 `json:"avatar_base_url,omitempty"`
	Created               int                    `json:"created,omitempty"`
	DateCreate            int                    `json:"date_create,omitempty"`
	Deleted               bool                   `json:"deleted,omitempty"`
	Description           string                 `json:"description,omitempty"`
	Discoverable          string                 `json:"discoverable,omitempty"`
	Domain                string                 `json:"domain,omitempty"`
	EmailDomain           string                 `json:"email_domain,omitempty"`
	EnterpriseID          string                 `json:"enterprise_id,omitempty"`
	EnterpriseName        string                 `json:"enterprise_name,omitempty"`
	ExternalOrgMigrations *ExternalOrgMigrations `json:"external_org_migrations,omitempty"`
	HasComplianceExport   bool                   `json:"has_compliance_export,omitempty"`
	Icon                  *Icon                  `json:"icon,omitempty"`
	ID                    string                 `json:"id,omitempty"`
	IsAssigned            bool                   `json:"is_assigned,omitempty"`
	IsEnterprise          int                    `json:"is_enterprise,omitempty"`
	IsOverStorageLimit    bool                   `json:"is_over_storage_limit,omitempty"`
	LimitTS               int                    `json:"limit_ts,omitempty"`
	Locale                string                 `json:"locale,omitempty"`
	MessagesCount         int                    `json:"messages_count,omitempty"`
	MsgEditWindowMins     int                    `json:"msg_edit_window_mins,omitempty"`
	Name                  string                 `json:"name,omitempty"`
	OverIntegrationsLimit bool                   `json:"over_integrations_limit,omitempty"`
	OverStorageLimit      bool                   `json:"over_storage_limit,omitempty"`
	PayProdCur            string                 `json:"pay_prod_cur,omitempty"`
	Plan                  string                 `json:"plan,omitempty"`
	PrimaryOwner          *PrimaryOwner          `json:"primary_owner,omitempty"`
	SsoProvider           map[string]any         `json:"sso_provider,omitempty"`
}

Team — Team Object.

type TeamAccessLogsParams

type TeamAccessLogsParams struct {
	Before string `url:"before,omitempty"` // End of time range of logs to include in results (inclusive).
	Count  string `url:"count,omitempty"`
	Page   string `url:"page,omitempty"`
}

TeamAccessLogsParams holds the parameters for the team.accessLogs method.

type TeamAccessLogsResponse

type TeamAccessLogsResponse struct {
	BaseResponse
	Logins []map[string]any `json:"logins,omitempty"`
	Paging *Paging          `json:"paging,omitempty"`
	Raw    json.RawMessage  `json:"-"` // full response body, populated by the operation wrapper
}

TeamAccessLogsResponse is the typed response envelope for team.accessLogs.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func TeamAccessLogs

func TeamAccessLogs(ctx context.Context, c *Client, params *TeamAccessLogsParams) (*TeamAccessLogsResponse, error)

TeamAccessLogs calls Slack's team.accessLogs method.

Required scopes (any one combination): admin

type TeamBillableInfoParams

type TeamBillableInfoParams struct {
	User string `url:"user,omitempty"` // A user to retrieve the billable information for. Defaults to all users.
}

TeamBillableInfoParams holds the parameters for the team.billableInfo method.

type TeamBillableInfoResponse

type TeamBillableInfoResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

TeamBillableInfoResponse is the typed response envelope for team.billableInfo.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func TeamBillableInfo

func TeamBillableInfo(ctx context.Context, c *Client, params *TeamBillableInfoParams) (*TeamBillableInfoResponse, error)

TeamBillableInfo calls Slack's team.billableInfo method.

Required scopes (any one combination): admin

type TeamInfoParams

type TeamInfoParams struct {
	Team string `url:"team,omitempty"` // Team to get info on, if omitted, will return information about the current team. Will only return team that the authenticated token is allow...
}

TeamInfoParams holds the parameters for the team.info method.

type TeamInfoResponse

type TeamInfoResponse struct {
	BaseResponse
	Team *Team           `json:"team,omitempty"`
	Raw  json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

TeamInfoResponse is the typed response envelope for team.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func TeamInfo

func TeamInfo(ctx context.Context, c *Client, params *TeamInfoParams) (*TeamInfoResponse, error)

TeamInfo calls Slack's team.info method.

Required scopes (any one combination): team:read

type TeamIntegrationLogsParams

type TeamIntegrationLogsParams struct {
	AppID      string `url:"app_id,omitempty"`      // Filter logs to this Slack app. Defaults to all logs.
	ChangeType string `url:"change_type,omitempty"` // Filter logs with this change type. Defaults to all logs.
	Count      string `url:"count,omitempty"`
	Page       string `url:"page,omitempty"`
	ServiceID  string `url:"service_id,omitempty"` // Filter logs to this service. Defaults to all logs.
	User       string `url:"user,omitempty"`       // Filter logs generated by this user’s actions. Defaults to all logs.
}

TeamIntegrationLogsParams holds the parameters for the team.integrationLogs method.

type TeamIntegrationLogsResponse

type TeamIntegrationLogsResponse struct {
	BaseResponse
	Logs   []map[string]any `json:"logs,omitempty"`
	Paging *Paging          `json:"paging,omitempty"`
	Raw    json.RawMessage  `json:"-"` // full response body, populated by the operation wrapper
}

TeamIntegrationLogsResponse is the typed response envelope for team.integrationLogs.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func TeamIntegrationLogs

func TeamIntegrationLogs(ctx context.Context, c *Client, params *TeamIntegrationLogsParams) (*TeamIntegrationLogsResponse, error)

TeamIntegrationLogs calls Slack's team.integrationLogs method.

Required scopes (any one combination): admin

type TeamProfileField

type TeamProfileField struct {
	FieldName      string                  `json:"field_name,omitempty"`
	Hint           string                  `json:"hint,omitempty"`
	ID             string                  `json:"id,omitempty"`
	IsHidden       bool                    `json:"is_hidden,omitempty"`
	Label          string                  `json:"label,omitempty"`
	Options        *TeamProfileFieldOption `json:"options,omitempty"`
	Ordering       float64                 `json:"ordering,omitempty"`
	PossibleValues []string                `json:"possible_values,omitempty"`
	Type           string                  `json:"type,omitempty"`
}

type TeamProfileFieldOption

type TeamProfileFieldOption struct {
	IsCustom        bool `json:"is_custom,omitempty"`
	IsMultipleEntry bool `json:"is_multiple_entry,omitempty"`
	IsProtected     bool `json:"is_protected,omitempty"`
	IsScim          bool `json:"is_scim,omitempty"`
}

type TeamProfileGetParams

type TeamProfileGetParams struct {
	Visibility string `url:"visibility,omitempty"` // Filter by visibility.
}

TeamProfileGetParams holds the parameters for the team.profile.get method.

type TeamProfileGetResponse

type TeamProfileGetResponse struct {
	BaseResponse
	Profile map[string]any  `json:"profile,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

TeamProfileGetResponse is the typed response envelope for team.profile.get.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func TeamProfileGet

func TeamProfileGet(ctx context.Context, c *Client, params *TeamProfileGetParams) (*TeamProfileGetResponse, error)

TeamProfileGet calls Slack's team.profile.get method.

Required scopes (any one combination): users.profile:read

type TextObject

type TextObject struct {
	Type     string `json:"type"` // "mrkdwn" | "plain_text"
	Text     string `json:"text"`
	Emoji    bool   `json:"emoji,omitempty"`    // plain_text only
	Verbatim bool   `json:"verbatim,omitempty"` // mrkdwn only
}

TextObject is a Slack composition object — used inside blocks.

Type is "mrkdwn" (Slack's markdown-ish format) or "plain_text".

func NewMrkdwnText

func NewMrkdwnText(text string) *TextObject

NewMrkdwnText is shorthand for NewTextObject("mrkdwn", text, false, false).

func NewPlainText

func NewPlainText(text string) *TextObject

NewPlainText is shorthand for NewTextObject("plain_text", text, true, false).

func NewTextObject

func NewTextObject(typeStr, text string, emoji, verbatim bool) *TextObject

NewTextObject constructs a TextObject. Mirrors slack-go's NewTextBlockObject(typeStr, text, emoji, verbatim).

type TopicPurpose

type TopicPurpose struct {
	Creator string `json:"creator,omitempty"`
	LastSet int    `json:"last_set,omitempty"`
	Value   string `json:"value,omitempty"`
}

TopicPurpose — Topic or Purpose Object (synthesised).

type UploadFileParams

type UploadFileParams struct {
	FilePath       string // path on disk; required
	Filename       string // override filename (defaults to basename of FilePath)
	Title          string
	InitialComment string
	Channels       string // single channel_id; if comma-separated, the first wins
	ThreadTS       string
	AltTxt         string // accessibility text (images)
	SnippetType    string // for text snippets, e.g. "text", "go"
}

UploadFileParams is the option set for UploadFile.

type UploadFileResponse

type UploadFileResponse struct {
	BaseResponse
	Raw  json.RawMessage `json:"-"`
	File struct {
		ID        string `json:"id"`
		Title     string `json:"title"`
		Name      string `json:"name"`
		Mimetype  string `json:"mimetype"`
		URL       string `json:"url_private"`
		Permalink string `json:"permalink"`
	} `json:"file"`
}

UploadFileResponse is the typed response envelope for the upload flow. Shape preserved from the legacy files.upload response so callers don't change — we synthesise the .File fields from completeUploadExternal's `files[0]` array entry.

func UploadFile

func UploadFile(ctx context.Context, c *Client, params *UploadFileParams) (*UploadFileResponse, error)

UploadFile uploads a file via Slack's modern external-upload flow (files.getUploadURLExternal → presigned PUT → files.completeUploadExternal). Replaces the deprecated files.upload endpoint.

type User

type User struct {
	Deleted  bool         `json:"deleted,omitempty"`
	ID       string       `json:"id,omitempty"`
	IsAdmin  bool         `json:"is_admin,omitempty"`
	IsBot    bool         `json:"is_bot,omitempty"`
	IsOwner  bool         `json:"is_owner,omitempty"`
	Name     string       `json:"name,omitempty"`
	Profile  *UserProfile `json:"profile,omitempty"`
	RealName string       `json:"real_name,omitempty"`
	TeamID   string       `json:"team_id,omitempty"`
	TZ       string       `json:"tz,omitempty"`
	TZLabel  string       `json:"tz_label,omitempty"`
	TZOffset int          `json:"tz_offset,omitempty"`
	Updated  int          `json:"updated,omitempty"`
}

User — User Object (synthesised — Slack's spec leaves objs_user empty).

type UserProfile

type UserProfile struct {
	AlwaysActive               bool           `json:"always_active,omitempty"`
	APIAppID                   string         `json:"api_app_id,omitempty"`
	AvatarHash                 string         `json:"avatar_hash,omitempty"`
	BotID                      string         `json:"bot_id,omitempty"`
	DisplayName                string         `json:"display_name,omitempty"`
	DisplayNameNormalized      string         `json:"display_name_normalized,omitempty"`
	Email                      string         `json:"email,omitempty"`
	Fields                     map[string]any `json:"fields,omitempty"`
	FirstName                  string         `json:"first_name,omitempty"`
	GuestExpirationTS          int            `json:"guest_expiration_ts,omitempty"`
	GuestInvitedBy             string         `json:"guest_invited_by,omitempty"`
	Image1024                  string         `json:"image_1024,omitempty"`
	Image192                   string         `json:"image_192,omitempty"`
	Image24                    string         `json:"image_24,omitempty"`
	Image32                    string         `json:"image_32,omitempty"`
	Image48                    string         `json:"image_48,omitempty"`
	Image512                   string         `json:"image_512,omitempty"`
	Image72                    string         `json:"image_72,omitempty"`
	ImageOriginal              string         `json:"image_original,omitempty"`
	IsAppUser                  bool           `json:"is_app_user,omitempty"`
	IsCustomImage              bool           `json:"is_custom_image,omitempty"`
	IsRestricted               bool           `json:"is_restricted,omitempty"`
	IsUltraRestricted          bool           `json:"is_ultra_restricted,omitempty"`
	LastAvatarImageHash        string         `json:"last_avatar_image_hash,omitempty"`
	LastName                   string         `json:"last_name,omitempty"`
	MembershipsCount           int            `json:"memberships_count,omitempty"`
	Name                       string         `json:"name,omitempty"`
	Phone                      string         `json:"phone,omitempty"`
	Pronouns                   string         `json:"pronouns,omitempty"`
	RealName                   string         `json:"real_name,omitempty"`
	RealNameNormalized         string         `json:"real_name_normalized,omitempty"`
	Skype                      string         `json:"skype,omitempty"`
	StatusDefaultEmoji         string         `json:"status_default_emoji,omitempty"`
	StatusDefaultText          string         `json:"status_default_text,omitempty"`
	StatusDefaultTextCanonical string         `json:"status_default_text_canonical,omitempty"`
	StatusEmoji                string         `json:"status_emoji,omitempty"`
	StatusExpiration           int            `json:"status_expiration,omitempty"`
	StatusText                 string         `json:"status_text,omitempty"`
	StatusTextCanonical        string         `json:"status_text_canonical,omitempty"`
	Team                       string         `json:"team,omitempty"`
	Title                      string         `json:"title,omitempty"`
	Updated                    int            `json:"updated,omitempty"`
	UserID                     string         `json:"user_id,omitempty"`
	Username                   string         `json:"username,omitempty"`
}

UserProfile — User profile object.

type UserProfileShort

type UserProfileShort struct {
	AvatarHash            string `json:"avatar_hash,omitempty"`
	DisplayName           string `json:"display_name,omitempty"`
	DisplayNameNormalized string `json:"display_name_normalized,omitempty"`
	FirstName             string `json:"first_name,omitempty"`
	Image72               string `json:"image_72,omitempty"`
	IsRestricted          bool   `json:"is_restricted,omitempty"`
	IsUltraRestricted     bool   `json:"is_ultra_restricted,omitempty"`
	Name                  string `json:"name,omitempty"`
	RealName              string `json:"real_name,omitempty"`
	RealNameNormalized    string `json:"real_name_normalized,omitempty"`
	Team                  string `json:"team,omitempty"`
}

type UsergroupsCreateParams

type UsergroupsCreateParams struct {
	Channels     string `url:"channels,omitempty"`      // A comma separated string of encoded channel IDs for which the User Group uses as a default.
	Description  string `url:"description,omitempty"`   // A short description of the User Group.
	Handle       string `url:"handle,omitempty"`        // A mention handle. Must be unique among channels, users and User Groups.
	IncludeCount bool   `url:"include_count,omitempty"` // Include the number of users in each User Group.
	Name         string `url:"name"`                    // A name for the User Group. Must be unique among User Groups.
}

UsergroupsCreateParams holds the parameters for the usergroups.create method.

type UsergroupsCreateResponse

type UsergroupsCreateResponse struct {
	BaseResponse
	Usergroup *Subteam        `json:"usergroup,omitempty"`
	Raw       json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsergroupsCreateResponse is the typed response envelope for usergroups.create.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsergroupsCreate

func UsergroupsCreate(ctx context.Context, c *Client, params *UsergroupsCreateParams) (*UsergroupsCreateResponse, error)

UsergroupsCreate calls Slack's usergroups.create method.

Required scopes (any one combination): usergroups:write

type UsergroupsDisableParams

type UsergroupsDisableParams struct {
	IncludeCount bool   `url:"include_count,omitempty"` // Include the number of users in the User Group.
	Usergroup    string `url:"usergroup"`               // The encoded ID of the User Group to disable.
}

UsergroupsDisableParams holds the parameters for the usergroups.disable method.

type UsergroupsDisableResponse

type UsergroupsDisableResponse struct {
	BaseResponse
	Usergroup *Subteam        `json:"usergroup,omitempty"`
	Raw       json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsergroupsDisableResponse is the typed response envelope for usergroups.disable.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsergroupsDisable

func UsergroupsDisable(ctx context.Context, c *Client, params *UsergroupsDisableParams) (*UsergroupsDisableResponse, error)

UsergroupsDisable calls Slack's usergroups.disable method.

Required scopes (any one combination): usergroups:write

type UsergroupsEnableParams

type UsergroupsEnableParams struct {
	IncludeCount bool   `url:"include_count,omitempty"` // Include the number of users in the User Group.
	Usergroup    string `url:"usergroup"`               // The encoded ID of the User Group to enable.
}

UsergroupsEnableParams holds the parameters for the usergroups.enable method.

type UsergroupsEnableResponse

type UsergroupsEnableResponse struct {
	BaseResponse
	Usergroup *Subteam        `json:"usergroup,omitempty"`
	Raw       json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsergroupsEnableResponse is the typed response envelope for usergroups.enable.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsergroupsEnable

func UsergroupsEnable(ctx context.Context, c *Client, params *UsergroupsEnableParams) (*UsergroupsEnableResponse, error)

UsergroupsEnable calls Slack's usergroups.enable method.

Required scopes (any one combination): usergroups:write

type UsergroupsListParams

type UsergroupsListParams struct {
	IncludeUsers    bool `url:"include_users,omitempty"`    // Include the list of users for each User Group.
	IncludeCount    bool `url:"include_count,omitempty"`    // Include the number of users in each User Group.
	IncludeDisabled bool `url:"include_disabled,omitempty"` // Include disabled User Groups.
}

UsergroupsListParams holds the parameters for the usergroups.list method.

type UsergroupsListResponse

type UsergroupsListResponse struct {
	BaseResponse
	Usergroups []*Subteam      `json:"usergroups,omitempty"`
	Raw        json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsergroupsListResponse is the typed response envelope for usergroups.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsergroupsList

func UsergroupsList(ctx context.Context, c *Client, params *UsergroupsListParams) (*UsergroupsListResponse, error)

UsergroupsList calls Slack's usergroups.list method.

Required scopes (any one combination): usergroups:read

type UsergroupsUpdateParams

type UsergroupsUpdateParams struct {
	Handle       string `url:"handle,omitempty"`        // A mention handle. Must be unique among channels, users and User Groups.
	Description  string `url:"description,omitempty"`   // A short description of the User Group.
	Channels     string `url:"channels,omitempty"`      // A comma separated string of encoded channel IDs for which the User Group uses as a default.
	IncludeCount bool   `url:"include_count,omitempty"` // Include the number of users in the User Group.
	Usergroup    string `url:"usergroup"`               // The encoded ID of the User Group to update.
	Name         string `url:"name,omitempty"`          // A name for the User Group. Must be unique among User Groups.
}

UsergroupsUpdateParams holds the parameters for the usergroups.update method.

type UsergroupsUpdateResponse

type UsergroupsUpdateResponse struct {
	BaseResponse
	Usergroup *Subteam        `json:"usergroup,omitempty"`
	Raw       json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsergroupsUpdateResponse is the typed response envelope for usergroups.update.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsergroupsUpdate

func UsergroupsUpdate(ctx context.Context, c *Client, params *UsergroupsUpdateParams) (*UsergroupsUpdateResponse, error)

UsergroupsUpdate calls Slack's usergroups.update method.

Required scopes (any one combination): usergroups:write

type UsergroupsUsersListParams

type UsergroupsUsersListParams struct {
	IncludeDisabled bool   `url:"include_disabled,omitempty"` // Allow results that involve disabled User Groups.
	Usergroup       string `url:"usergroup"`                  // The encoded ID of the User Group to update.
}

UsergroupsUsersListParams holds the parameters for the usergroups.users.list method.

type UsergroupsUsersListResponse

type UsergroupsUsersListResponse struct {
	BaseResponse
	Users []string        `json:"users,omitempty"`
	Raw   json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsergroupsUsersListResponse is the typed response envelope for usergroups.users.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsergroupsUsersList

func UsergroupsUsersList(ctx context.Context, c *Client, params *UsergroupsUsersListParams) (*UsergroupsUsersListResponse, error)

UsergroupsUsersList calls Slack's usergroups.users.list method.

Required scopes (any one combination): usergroups:read

type UsergroupsUsersUpdateParams

type UsergroupsUsersUpdateParams struct {
	IncludeCount bool   `url:"include_count,omitempty"` // Include the number of users in the User Group.
	Usergroup    string `url:"usergroup"`               // The encoded ID of the User Group to update.
	Users        string `url:"users"`                   // A comma separated string of encoded user IDs that represent the entire list of users for the User Group.
}

UsergroupsUsersUpdateParams holds the parameters for the usergroups.users.update method.

type UsergroupsUsersUpdateResponse

type UsergroupsUsersUpdateResponse struct {
	BaseResponse
	Usergroup *Subteam        `json:"usergroup,omitempty"`
	Raw       json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsergroupsUsersUpdateResponse is the typed response envelope for usergroups.users.update.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsergroupsUsersUpdate

func UsergroupsUsersUpdate(ctx context.Context, c *Client, params *UsergroupsUsersUpdateParams) (*UsergroupsUsersUpdateResponse, error)

UsergroupsUsersUpdate calls Slack's usergroups.users.update method.

Required scopes (any one combination): usergroups:write

type UsersConversationsParams

type UsersConversationsParams struct {
	User            string `url:"user,omitempty"`             // Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membershi...
	Types           string `url:"types,omitempty"`            // Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`
	ExcludeArchived bool   `url:"exclude_archived,omitempty"` // Set to `true` to exclude archived channels from the list
	Limit           int    `url:"limit,omitempty"`            // The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been rea...
	Cursor          string `url:"cursor,omitempty"`           // Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `respon...
}

UsersConversationsParams holds the parameters for the users.conversations method.

type UsersConversationsResponse

type UsersConversationsResponse struct {
	BaseResponse
	Channels []json.RawMessage `json:"channels,omitempty"`
	Raw      json.RawMessage   `json:"-"` // full response body, populated by the operation wrapper
}

UsersConversationsResponse is the typed response envelope for users.conversations.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersConversations

func UsersConversations(ctx context.Context, c *Client, params *UsersConversationsParams) (*UsersConversationsResponse, error)

UsersConversations calls Slack's users.conversations method.

Required scopes (any one combination): channels:read, groups:read, im:read, mpim:read

type UsersDeletePhotoResponse

type UsersDeletePhotoResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersDeletePhotoResponse is the typed response envelope for users.deletePhoto.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersDeletePhoto

func UsersDeletePhoto(ctx context.Context, c *Client) (*UsersDeletePhotoResponse, error)

UsersDeletePhoto calls Slack's users.deletePhoto method.

Required scopes (any one combination): users.profile:write

type UsersGetPresenceParams

type UsersGetPresenceParams struct {
	User string `url:"user,omitempty"` // User to get presence info on. Defaults to the authed user.
}

UsersGetPresenceParams holds the parameters for the users.getPresence method.

type UsersGetPresenceResponse

type UsersGetPresenceResponse struct {
	BaseResponse
	AutoAway        bool            `json:"auto_away,omitempty"`
	ConnectionCount int             `json:"connection_count,omitempty"`
	LastActivity    int             `json:"last_activity,omitempty"`
	ManualAway      bool            `json:"manual_away,omitempty"`
	Online          bool            `json:"online,omitempty"`
	Presence        string          `json:"presence,omitempty"`
	Raw             json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersGetPresenceResponse is the typed response envelope for users.getPresence.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersGetPresence

func UsersGetPresence(ctx context.Context, c *Client, params *UsersGetPresenceParams) (*UsersGetPresenceResponse, error)

UsersGetPresence calls Slack's users.getPresence method.

Required scopes (any one combination): users:read

type UsersIdentityResponse

type UsersIdentityResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersIdentityResponse is the typed response envelope for users.identity.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersIdentity

func UsersIdentity(ctx context.Context, c *Client) (*UsersIdentityResponse, error)

UsersIdentity calls Slack's users.identity method.

Required scopes (any one combination): identity.basic

type UsersInfoParams

type UsersInfoParams struct {
	IncludeLocale bool   `url:"include_locale,omitempty"` // Set this to `true` to receive the locale for this user. Defaults to `false`
	User          string `url:"user,omitempty"`           // User to get info on
}

UsersInfoParams holds the parameters for the users.info method.

type UsersInfoResponse

type UsersInfoResponse struct {
	BaseResponse
	User *User           `json:"user,omitempty"`
	Raw  json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersInfoResponse is the typed response envelope for users.info.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersInfo

func UsersInfo(ctx context.Context, c *Client, params *UsersInfoParams) (*UsersInfoResponse, error)

UsersInfo calls Slack's users.info method.

Required scopes (any one combination): users:read

type UsersListParams

type UsersListParams struct {
	Limit         int    `url:"limit,omitempty"`          // The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't be...
	Cursor        string `url:"cursor,omitempty"`         // Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `respon...
	IncludeLocale bool   `url:"include_locale,omitempty"` // Set this to `true` to receive the locale for users. Defaults to `false`
}

UsersListParams holds the parameters for the users.list method.

type UsersListResponse

type UsersListResponse struct {
	BaseResponse
	CacheTS int             `json:"cache_ts,omitempty"`
	Members []*User         `json:"members,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersListResponse is the typed response envelope for users.list.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersList

func UsersList(ctx context.Context, c *Client, params *UsersListParams) (*UsersListResponse, error)

UsersList calls Slack's users.list method.

Required scopes (any one combination): users:read

type UsersLookupByEmailParams

type UsersLookupByEmailParams struct {
	Email string `url:"email"` // An email address belonging to a user in the workspace
}

UsersLookupByEmailParams holds the parameters for the users.lookupByEmail method.

type UsersLookupByEmailResponse

type UsersLookupByEmailResponse struct {
	BaseResponse
	User *User           `json:"user,omitempty"`
	Raw  json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersLookupByEmailResponse is the typed response envelope for users.lookupByEmail.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersLookupByEmail

func UsersLookupByEmail(ctx context.Context, c *Client, params *UsersLookupByEmailParams) (*UsersLookupByEmailResponse, error)

UsersLookupByEmail calls Slack's users.lookupByEmail method.

Required scopes (any one combination): users:read.email

type UsersProfileGetParams

type UsersProfileGetParams struct {
	IncludeLabels bool   `url:"include_labels,omitempty"` // Include labels for each ID in custom profile fields
	User          string `url:"user,omitempty"`           // User to retrieve profile info for
}

UsersProfileGetParams holds the parameters for the users.profile.get method.

type UsersProfileGetResponse

type UsersProfileGetResponse struct {
	BaseResponse
	Profile *UserProfile    `json:"profile,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersProfileGetResponse is the typed response envelope for users.profile.get.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersProfileGet

func UsersProfileGet(ctx context.Context, c *Client, params *UsersProfileGetParams) (*UsersProfileGetResponse, error)

UsersProfileGet calls Slack's users.profile.get method.

Required scopes (any one combination): users.profile:read

type UsersProfileSetParams

type UsersProfileSetParams struct {
	Name    string `url:"name,omitempty"`    // Name of a single key to set. Usable only if `profile` is not passed.
	Profile string `url:"profile,omitempty"` // Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characte...
	User    string `url:"user,omitempty"`    // ID of user to change. This argument may only be specified by team admins on paid teams.
	Value   string `url:"value,omitempty"`   // Value to set a single key to. Usable only if `profile` is not passed.
}

UsersProfileSetParams holds the parameters for the users.profile.set method.

type UsersProfileSetResponse

type UsersProfileSetResponse struct {
	BaseResponse
	EmailPending string          `json:"email_pending,omitempty"`
	Profile      *UserProfile    `json:"profile,omitempty"`
	Username     string          `json:"username,omitempty"`
	Raw          json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersProfileSetResponse is the typed response envelope for users.profile.set.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersProfileSet

func UsersProfileSet(ctx context.Context, c *Client, params *UsersProfileSetParams) (*UsersProfileSetResponse, error)

UsersProfileSet calls Slack's users.profile.set method.

Required scopes (any one combination): users.profile:write

type UsersSetActiveResponse

type UsersSetActiveResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersSetActiveResponse is the typed response envelope for users.setActive.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersSetActive

func UsersSetActive(ctx context.Context, c *Client) (*UsersSetActiveResponse, error)

UsersSetActive calls Slack's users.setActive method.

Required scopes (any one combination): users:write

type UsersSetPhotoParams

type UsersSetPhotoParams struct {
	CropW string `url:"crop_w,omitempty"` // Width/height of crop box (always square)
	CropX string `url:"crop_x,omitempty"` // X coordinate of top-left corner of crop box
	CropY string `url:"crop_y,omitempty"` // Y coordinate of top-left corner of crop box
	Image string `url:"image,omitempty"`  // File contents via `multipart/form-data`.
}

UsersSetPhotoParams holds the parameters for the users.setPhoto method.

type UsersSetPhotoResponse

type UsersSetPhotoResponse struct {
	BaseResponse
	Profile map[string]any  `json:"profile,omitempty"`
	Raw     json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersSetPhotoResponse is the typed response envelope for users.setPhoto.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersSetPhoto

func UsersSetPhoto(ctx context.Context, c *Client, params *UsersSetPhotoParams) (*UsersSetPhotoResponse, error)

UsersSetPhoto calls Slack's users.setPhoto method.

Required scopes (any one combination): users.profile:write

type UsersSetPresenceParams

type UsersSetPresenceParams struct {
	Presence string `url:"presence"` // Either `auto` or `away`
}

UsersSetPresenceParams holds the parameters for the users.setPresence method.

type UsersSetPresenceResponse

type UsersSetPresenceResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

UsersSetPresenceResponse is the typed response envelope for users.setPresence.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func UsersSetPresence

func UsersSetPresence(ctx context.Context, c *Client, params *UsersSetPresenceParams) (*UsersSetPresenceResponse, error)

UsersSetPresence calls Slack's users.setPresence method.

Required scopes (any one combination): users:write

type ViewsOpenParams

type ViewsOpenParams struct {
	TriggerID string `url:"trigger_id"` // Exchange a trigger to post to the user.
	View      string `url:"view"`       // A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.
}

ViewsOpenParams holds the parameters for the views.open method.

type ViewsOpenResponse

type ViewsOpenResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ViewsOpenResponse is the typed response envelope for views.open.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ViewsOpen

func ViewsOpen(ctx context.Context, c *Client, params *ViewsOpenParams) (*ViewsOpenResponse, error)

ViewsOpen calls Slack's views.open method.

Required scopes (any one combination): none

type ViewsPublishParams

type ViewsPublishParams struct {
	UserID string `url:"user_id"`        // `id` of the user you want publish a view to.
	View   string `url:"view"`           // A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.
	Hash   string `url:"hash,omitempty"` // A string that represents view state to protect against possible race conditions.
}

ViewsPublishParams holds the parameters for the views.publish method.

type ViewsPublishResponse

type ViewsPublishResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ViewsPublishResponse is the typed response envelope for views.publish.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ViewsPublish

func ViewsPublish(ctx context.Context, c *Client, params *ViewsPublishParams) (*ViewsPublishResponse, error)

ViewsPublish calls Slack's views.publish method.

Required scopes (any one combination): none

type ViewsPushParams

type ViewsPushParams struct {
	TriggerID string `url:"trigger_id"` // Exchange a trigger to post to the user.
	View      string `url:"view"`       // A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.
}

ViewsPushParams holds the parameters for the views.push method.

type ViewsPushResponse

type ViewsPushResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ViewsPushResponse is the typed response envelope for views.push.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ViewsPush

func ViewsPush(ctx context.Context, c *Client, params *ViewsPushParams) (*ViewsPushResponse, error)

ViewsPush calls Slack's views.push method.

Required scopes (any one combination): none

type ViewsUpdateParams

type ViewsUpdateParams struct {
	ViewID     string `url:"view_id,omitempty"`     // A unique identifier of the view to be updated. Either `view_id` or `external_id` is required.
	ExternalID string `url:"external_id,omitempty"` // A unique identifier of the view set by the developer. Must be unique for all views on a team. Max length of 255 characters. Either `view_id`...
	View       string `url:"view,omitempty"`        // A [view object](/reference/surfaces/views). This must be a JSON-encoded string.
	Hash       string `url:"hash,omitempty"`        // A string that represents view state to protect against possible race conditions.
}

ViewsUpdateParams holds the parameters for the views.update method.

type ViewsUpdateResponse

type ViewsUpdateResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

ViewsUpdateResponse is the typed response envelope for views.update.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func ViewsUpdate

func ViewsUpdate(ctx context.Context, c *Client, params *ViewsUpdateParams) (*ViewsUpdateResponse, error)

ViewsUpdate calls Slack's views.update method.

Required scopes (any one combination): none

type WorkflowsStepCompletedParams

type WorkflowsStepCompletedParams struct {
	WorkflowStepExecuteID string `url:"workflow_step_execute_id"` // Context identifier that maps to the correct workflow step execution.
	Outputs               string `url:"outputs,omitempty"`        // Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workf...
}

WorkflowsStepCompletedParams holds the parameters for the workflows.stepCompleted method.

type WorkflowsStepCompletedResponse

type WorkflowsStepCompletedResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

WorkflowsStepCompletedResponse is the typed response envelope for workflows.stepCompleted.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func WorkflowsStepCompleted

func WorkflowsStepCompleted(ctx context.Context, c *Client, params *WorkflowsStepCompletedParams) (*WorkflowsStepCompletedResponse, error)

WorkflowsStepCompleted calls Slack's workflows.stepCompleted method.

Required scopes (any one combination): workflow.steps:execute

type WorkflowsStepFailedParams

type WorkflowsStepFailedParams struct {
	WorkflowStepExecuteID string `url:"workflow_step_execute_id"` // Context identifier that maps to the correct workflow step execution.
	Error                 string `url:"error"`                    // A JSON-based object with a `message` property that should contain a human readable error message.
}

WorkflowsStepFailedParams holds the parameters for the workflows.stepFailed method.

type WorkflowsStepFailedResponse

type WorkflowsStepFailedResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

WorkflowsStepFailedResponse is the typed response envelope for workflows.stepFailed.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func WorkflowsStepFailed

func WorkflowsStepFailed(ctx context.Context, c *Client, params *WorkflowsStepFailedParams) (*WorkflowsStepFailedResponse, error)

WorkflowsStepFailed calls Slack's workflows.stepFailed method.

Required scopes (any one combination): workflow.steps:execute

type WorkflowsUpdateStepParams

type WorkflowsUpdateStepParams struct {
	WorkflowStepEditID string `url:"workflow_step_edit_id"`    // A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`.
	Inputs             string `url:"inputs,omitempty"`         // A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow ste...
	Outputs            string `url:"outputs,omitempty"`        // An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed...
	StepName           string `url:"step_name,omitempty"`      // An optional field that can be used to override the step name that is shown in the Workflow Builder.
	StepImageURL       string `url:"step_image_url,omitempty"` // An optional field that can be used to override app image that is shown in the Workflow Builder.
}

WorkflowsUpdateStepParams holds the parameters for the workflows.updateStep method.

type WorkflowsUpdateStepResponse

type WorkflowsUpdateStepResponse struct {
	BaseResponse
	Raw json.RawMessage `json:"-"` // full response body, populated by the operation wrapper
}

WorkflowsUpdateStepResponse is the typed response envelope for workflows.updateStep.

Top-level fields are walked from the spec's response.200 schema. The embedded BaseResponse carries ok/error; Raw retains the full body for callers needing fields the spec doesn't model.

func WorkflowsUpdateStep

func WorkflowsUpdateStep(ctx context.Context, c *Client, params *WorkflowsUpdateStepParams) (*WorkflowsUpdateStepResponse, error)

WorkflowsUpdateStep calls Slack's workflows.updateStep method.

Required scopes (any one combination): workflow.steps:execute

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL