Files
zeekayandHanzo Dev b55332704a feat: Hanzo Cloud SDK for Kotlin (generated from OpenAPI v8.0.0)
Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and
Android. Generated with openapi-generator kotlin (library=jvm-okhttp4,
useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-25 07:10:32 -07:00

8.2 KiB

SlackApi

All URIs are relative to https://api.hanzo.ai

Method HTTP request Description
integrationsSlackCommands POST /v1/integrations/slack/commands Slack slash command webhook
integrationsSlackEvents POST /v1/integrations/slack/events Slack Events API webhook
integrationsSlackLinkCallback GET /v1/integrations/slack/link/callback hanzo.id OIDC callback — bind Slack↔Hanzo (leg 3)
integrationsSlackLinkSlack GET /v1/integrations/slack/link/slack Slack sign-in callback (leg 2)
integrationsSlackLinkStart GET /v1/integrations/slack/link Begin the per-user account link (leg 1 — Slack sign-in)

integrationsSlackCommands

integrationsSlackCommands(command, text, teamId, userId, channelId, responseUrl)

Slack slash command webhook

Public at the JWT layer; HMAC-verified inside the handler. Accepts the Slack `application/x-www-form-urlencoded` slash-command payload.

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = SlackApi()
val command : kotlin.String = command_example // kotlin.String | 
val text : kotlin.String = text_example // kotlin.String | 
val teamId : kotlin.String = teamId_example // kotlin.String | 
val userId : kotlin.String = userId_example // kotlin.String | 
val channelId : kotlin.String = channelId_example // kotlin.String | 
val responseUrl : kotlin.String = responseUrl_example // kotlin.String | 
try {
    apiInstance.integrationsSlackCommands(command, text, teamId, userId, channelId, responseUrl)
} catch (e: ClientException) {
    println("4xx response calling SlackApi#integrationsSlackCommands")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling SlackApi#integrationsSlackCommands")
    e.printStackTrace()
}

Parameters

| command | kotlin.String| | [optional] | | text | kotlin.String| | [optional] | | teamId | kotlin.String| | [optional] | | userId | kotlin.String| | [optional] | | channelId | kotlin.String| | [optional] |

Name Type Description Notes
responseUrl kotlin.String [optional]

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: Not defined

integrationsSlackEvents

integrationsSlackEvents(integrationsSlackEventEnvelope)

Slack Events API webhook

Public at the JWT layer; authenticated inside the handler by HMAC-SHA256 over the raw body with the Slack signing secret. Handles the `url_verification` challenge and routes `app_mention`/`message` events to an on-behalf-of agent run.

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = SlackApi()
val integrationsSlackEventEnvelope : IntegrationsSlackEventEnvelope =  // IntegrationsSlackEventEnvelope | 
try {
    apiInstance.integrationsSlackEvents(integrationsSlackEventEnvelope)
} catch (e: ClientException) {
    println("4xx response calling SlackApi#integrationsSlackEvents")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling SlackApi#integrationsSlackEvents")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
integrationsSlackEventEnvelope IntegrationsSlackEventEnvelope

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

integrationsSlackLinkCallback

kotlin.String integrationsSlackLinkCallback(code, state, error)

hanzo.id OIDC callback — bind Slack↔Hanzo (leg 3)

Reads the Slack-verified (team,user) from the `__Host-` link cookie, exchanges the OIDC code, and seals the refresh token into the workspace org's KMS namespace. Returns an HTML confirmation page.

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = SlackApi()
val code : kotlin.String = code_example // kotlin.String | 
val state : kotlin.String = state_example // kotlin.String | 
val error : kotlin.String = error_example // kotlin.String | 
try {
    val result : kotlin.String = apiInstance.integrationsSlackLinkCallback(code, state, error)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling SlackApi#integrationsSlackLinkCallback")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling SlackApi#integrationsSlackLinkCallback")
    e.printStackTrace()
}

Parameters

| code | kotlin.String| | [optional] | | state | kotlin.String| | [optional] |

Name Type Description Notes
error kotlin.String [optional]

Return type

kotlin.String

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

integrationsSlackLinkSlack

integrationsSlackLinkSlack(code, state, error)

Slack sign-in callback (leg 2)

Requires the leg-1 init cookie to match the sign-in state before exchanging the code; sets the `__Host-` link cookie and redirects to hanzo.id OIDC.

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = SlackApi()
val code : kotlin.String = code_example // kotlin.String | 
val state : kotlin.String = state_example // kotlin.String | 
val error : kotlin.String = error_example // kotlin.String | 
try {
    apiInstance.integrationsSlackLinkSlack(code, state, error)
} catch (e: ClientException) {
    println("4xx response calling SlackApi#integrationsSlackLinkSlack")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling SlackApi#integrationsSlackLinkSlack")
    e.printStackTrace()
}

Parameters

| code | kotlin.String| | [optional] | | state | kotlin.String| | [optional] |

Name Type Description Notes
error kotlin.String [optional]

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

integrationsSlackLinkStart

integrationsSlackLinkStart(state)

Begin the per-user account link (leg 1 — Slack sign-in)

Sets a `__Host-` init cookie and redirects to Slack sign-in. State-authed (no bearer).

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = SlackApi()
val state : kotlin.String = state_example // kotlin.String | Signed, single-use link state
try {
    apiInstance.integrationsSlackLinkStart(state)
} catch (e: ClientException) {
    println("4xx response calling SlackApi#integrationsSlackLinkStart")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling SlackApi#integrationsSlackLinkStart")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
state kotlin.String Signed, single-use link state

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined