Functions

api-test

fn (request: ApiTestRequest): ApiTestResponse
fn (request: ApiTestRequest, opts: Map): ApiTestResponse

GET /api.test - Check API calling code. Useful for testing connectivity. Any key-value pairs passed in the request are echoed back in response.args.

Example

response ::slack::misc/api-test(::slack::misc/ApiTestRequest({
  foo: "bar"
}))
response.ok        // => true
response.args.foo  // => "bar"

auth-revoke

fn (request: AuthRevokeRequest): AuthRevokeResponse
fn (request: AuthRevokeRequest, opts: Map): AuthRevokeResponse

GET /auth.revoke - Revoke a token. Pass test: true to check revocation without actually revoking.

Example

// Checks the call without revoking anything
response ::slack::misc/auth-revoke(::slack::misc/AuthRevokeRequest({test: true}))
response.revoked

auth-test

fn (request: AuthTestRequest): AuthTestResponse
fn (request: AuthTestRequest, opts: Map): AuthTestResponse

POST /auth.test - Check authentication and identity. Returns information about the authenticated user/bot including workspace URL, team name, and user/bot IDs.

Example

response ::slack::misc/auth-test(::slack::misc/AuthTestRequest({}))
response.url       // => "https://myteam.slack.com/"
response.team      // => "My Team"
response.user_id   // => "U1234567"
response.team_id   // => "T1234567"
response.bot_id    // => "B1234567"

dialog-open

fn (request: DialogOpenRequest): DialogOpenResponse
fn (request: DialogOpenRequest, opts: Map): DialogOpenResponse

GET /dialog.open - Open a dialog with a user. Requires a valid trigger_id from an interactive event. The dialog parameter is a JSON-encoded dialog definition.

Example

dialog to-json({
  callback_id: "feedback",
  title: "Feedback",
  elements: [{type: "text", label: "Comment", name: "comment"}]
})

response ::slack::misc/dialog-open(::slack::misc/DialogOpenRequest({
  dialog: dialog,
  trigger_id: "13345224609.738474920.8088930838d88f008e0"
}))
response.ok

emoji-list

fn (): EmojiListResponse
fn (opts: Map): EmojiListResponse

GET /emoji.list - List all custom emoji for a team. Returns a map of emoji names to their URLs or alias targets.

Example

response ::slack::misc/emoji-list()
response.emoji  // => {shipit: "https://...", bowtie: "alias:bow"}

migration-exchange

fn (request: MigrationExchangeRequest): MigrationExchangeResponse
fn (request: MigrationExchangeRequest, opts: Map): MigrationExchangeResponse

GET /migration.exchange - Exchange legacy user IDs to new Enterprise Grid format. Pass a comma-separated list of user IDs. Set to_old: true to convert in the reverse direction.

Example

response ::slack::misc/migration-exchange(::slack::misc/MigrationExchangeRequest({
  users: "U1234567,U2345678"
}))
response.user_id_map

oauth-v2-access

fn (request: OauthV2AccessRequest): OauthV2AccessResponse
fn (request: OauthV2AccessRequest, opts: Map): OauthV2AccessResponse

POST /oauth.v2.access - Exchange a temporary OAuth verifier code for an access token. Used during the OAuth 2.0 flow to complete app installation. The client secret and the tokens returned are masked in the run's call records.

Example

// `code` comes from the OAuth redirect
response ::slack::misc/oauth-v2-access(::slack::misc/OauthV2AccessRequest({
  client_id: ::hot::ctx/get("slack.client.id"),
  client_secret: ::hot::ctx/get("slack.client.secret"),
  code: "1234.5678.abcdef",
  redirect_uri: "https://example.com/slack/callback"
}))
response.access_token
response.team

team-access-logs

fn (request: TeamAccessLogsRequest): TeamAccessLogsResponse
fn (request: TeamAccessLogsRequest, opts: Map): TeamAccessLogsResponse

GET /team.accessLogs - Get the access logs for the current team. Requires an admin or owner token. Returns login records with user, IP, and user agent info.

Example

response ::slack::misc/team-access-logs(::slack::misc/TeamAccessLogsRequest({
  count: 100,
  page: 1
}))
map(response.logins, %.ip)

// With a per-call token
::slack::misc/team-access-logs(::slack::misc/TeamAccessLogsRequest({
  count: 100,
  page: 1
}), {api-key: ::hot::ctx/get("tenant-b.slack.api.key")})

team-billable-info

fn (request: TeamBillableInfoRequest): TeamBillableInfoResponse
fn (request: TeamBillableInfoRequest, opts: Map): TeamBillableInfoResponse

GET /team.billableInfo - Get billable user information for the current team. Optionally filter by a specific user ID.

Example

response ::slack::misc/team-billable-info(::slack::misc/TeamBillableInfoRequest({
  user: "U1234567"
}))
response.billable_info

team-info

fn (request: TeamInfoRequest): TeamInfoResponse
fn (request: TeamInfoRequest, opts: Map): TeamInfoResponse

GET /team.info - Get information about the current team. Returns the team object with id, name, domain, and other workspace details.

Example

response ::slack::misc/team-info(::slack::misc/TeamInfoRequest({}))
response.team.id      // => "T1234567"
response.team.name    // => "My Team"
response.team.domain  // => "myteam"

team-integration-logs

fn (request: TeamIntegrationLogsRequest): TeamIntegrationLogsResponse
fn (request: TeamIntegrationLogsRequest, opts: Map): TeamIntegrationLogsResponse

GET /team.integrationLogs - Get the integration activity logs for the current team. Filter by app_id, change_type, service_id, or user.

Example

response ::slack::misc/team-integration-logs(::slack::misc/TeamIntegrationLogsRequest({
  change_type: "added",
  count: 50
}))
response.logs

team-profile-get

fn (request: TeamProfileGetRequest): TeamProfileGetResponse
fn (request: TeamProfileGetRequest, opts: Map): TeamProfileGetResponse

GET /team.profile.get - Get the team profile field definitions. Optionally filter by visibility level.

Example

response ::slack::misc/team-profile-get(::slack::misc/TeamProfileGetRequest({
  visibility: "all"
}))
response.profile

views-open

fn (request: ViewsOpenRequest): ViewsOpenResponse
fn (request: ViewsOpenRequest, opts: Map): ViewsOpenResponse

POST /views.open - Open a modal view for a user. Requires a valid trigger_id from an interactive event and a JSON-encoded view payload.

Example

view to-json({
  type: "modal",
  title: {type: "plain_text", text: "Feedback"},
  blocks: [{type: "section", text: {type: "mrkdwn", text: "How did it go?"}}]
})

response ::slack::misc/views-open(::slack::misc/ViewsOpenRequest({
  trigger_id: "13345224609.738474920.8088930838d88f008e0",
  view: view
}))
response.view.id

views-publish

fn (request: ViewsPublishRequest): ViewsPublishResponse
fn (request: ViewsPublishRequest, opts: Map): ViewsPublishResponse

POST /views.publish - Publish a static view to the App Home tab for a user. Use hash to avoid overwriting concurrent updates.

Example

view to-json({
  type: "home",
  blocks: [{type: "section", text: {type: "mrkdwn", text: "Welcome back"}}]
})

response ::slack::misc/views-publish(::slack::misc/ViewsPublishRequest({
  user_id: "U1234567",
  view: view
}))
response.view.hash

views-push

fn (request: ViewsPushRequest): ViewsPushResponse
fn (request: ViewsPushRequest, opts: Map): ViewsPushResponse

POST /views.push - Push a new view onto the stack of an existing root view. Requires a valid trigger_id from a view interaction.

Example

view to-json({
  type: "modal",
  title: {type: "plain_text", text: "Feedback"},
  blocks: [{type: "section", text: {type: "mrkdwn", text: "How did it go?"}}]
})

response ::slack::misc/views-push(::slack::misc/ViewsPushRequest({
  trigger_id: "13345224609.738474920.8088930838d88f008e0",
  view: view
}))
response.view.id

views-update

fn (request: ViewsUpdateRequest): ViewsUpdateResponse
fn (request: ViewsUpdateRequest, opts: Map): ViewsUpdateResponse

POST /views.update - Update an existing view by view_id or external_id. Use hash to avoid overwriting concurrent updates.

Example

view to-json({
  type: "modal",
  title: {type: "plain_text", text: "Feedback"},
  blocks: [{type: "section", text: {type: "mrkdwn", text: "How did it go?"}}]
})

response ::slack::misc/views-update(::slack::misc/ViewsUpdateRequest({
  view_id: "V1234567",
  view: view
}))
response.view.hash

Types

ApiTestRequest

ApiTestRequest type {
    error: Str?,
    foo: Str?
}

ApiTestResponse

ApiTestResponse type {
    ok: Bool?,
    error: Str?,
    args: Map?
}

AuthRevokeRequest

AuthRevokeRequest type {
    test: Bool?
}

AuthRevokeResponse

AuthRevokeResponse type {
    ok: Bool?,
    error: Str?,
    revoked: Bool?
}

AuthTestRequest

AuthTestRequest type Map

AuthTestResponse

AuthTestResponse type {
    ok: Bool?,
    error: Str?,
    url: Str?,
    team: Str?,
    user: Str?,
    team_id: Str?,
    user_id: Str?,
    bot_id: Str?,
    is_enterprise_install: Bool?
}

DialogOpenRequest

DialogOpenRequest type {
    dialog: Str,
    trigger_id: Str
}

DialogOpenResponse

DialogOpenResponse type {
    ok: Bool?,
    error: Str?
}

EmojiListResponse

EmojiListResponse type {
    ok: Bool?,
    error: Str?,
    emoji: Map?
}

MigrationExchangeRequest

MigrationExchangeRequest type {
    users: Str,
    team_id: Str?,
    to_old: Bool?
}

MigrationExchangeResponse

MigrationExchangeResponse type {
    ok: Bool?,
    error: Str?,
    team_id: Str?,
    enterprise_id: Str?,
    user_id_map: Map?,
    invalid_user_ids: Vec<Str>?
}

OauthV2AccessRequest

OauthV2AccessRequest type {
    client_id: Str,
    client_secret: Str,
    code: Str,
    redirect_uri: Str?
}

OauthV2AccessResponse

OauthV2AccessResponse type {
    ok: Bool?,
    error: Str?,
    access_token: Str?,
    token_type: Str?,
    scope: Str?,
    bot_user_id: Str?,
    app_id: Str?,
    team: Map?,
    authed_user: Map?,
    enterprise: Map?,
    is_enterprise_install: Bool?
}

TeamAccessLogsRequest

TeamAccessLogsRequest type {
    before: Str?,
    count: Int?,
    page: Int?
}

TeamAccessLogsResponse

TeamAccessLogsResponse type {
    ok: Bool?,
    error: Str?,
    logins: Vec<Map>?,
    paging: Map?
}

TeamBillableInfoRequest

TeamBillableInfoRequest type {
    user: Str?
}

TeamBillableInfoResponse

TeamBillableInfoResponse type {
    ok: Bool?,
    error: Str?,
    billable_info: Map?
}

TeamInfoRequest

TeamInfoRequest type {
    team: Str?
}

TeamInfoResponse

TeamInfoResponse type {
    ok: Bool?,
    error: Str?,
    team: Map?
}

TeamIntegrationLogsRequest

TeamIntegrationLogsRequest type {
    app_id: Str?,
    change_type: Str?,
    count: Int?,
    page: Int?,
    service_id: Str?,
    user: Str?
}

TeamIntegrationLogsResponse

TeamIntegrationLogsResponse type {
    ok: Bool?,
    error: Str?,
    logs: Vec<Map>?,
    paging: Map?
}

TeamProfileGetRequest

TeamProfileGetRequest type {
    visibility: Str?
}

TeamProfileGetResponse

TeamProfileGetResponse type {
    ok: Bool?,
    error: Str?,
    profile: Map?
}

ViewsOpenRequest

ViewsOpenRequest type {
    trigger_id: Str,
    view: Str
}

ViewsOpenResponse

ViewsOpenResponse type {
    ok: Bool?,
    error: Str?,
    view: Map?
}

ViewsPublishRequest

ViewsPublishRequest type {
    user_id: Str,
    view: Str,
    hash: Str?
}

ViewsPublishResponse

ViewsPublishResponse type {
    ok: Bool?,
    error: Str?,
    view: Map?
}

ViewsPushRequest

ViewsPushRequest type {
    trigger_id: Str,
    view: Str
}

ViewsPushResponse

ViewsPushResponse type {
    ok: Bool?,
    error: Str?,
    view: Map?
}

ViewsUpdateRequest

ViewsUpdateRequest type {
    view_id: Str?,
    external_id: Str?,
    view: Str,
    hash: Str?
}

ViewsUpdateResponse

ViewsUpdateResponse type {
    ok: Bool?,
    error: Str?,
    view: Map?
}