# Provider

URL: https://docs.hanzo.ai/docs/openapi/provider

> How your org connects third-party accounts like Slack, and revokes them.

Also for this capability: **API** · [CLI](https://docs.hanzo.ai/docs/cli/provider) · [MCP](https://docs.hanzo.ai/docs/mcp-tools/provider) · [SDKs](https://docs.hanzo.ai/docs/sdks)

How your org connects third-party accounts like Slack, and revokes them.

> [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|                |                                        |
| -------------- | -------------------------------------- |
| **Base URL**   | `https://api.hanzo.ai`                 |
| **Operations** | 71                                     |
| **Auth**       | `Authorization: Bearer $HANZO_API_KEY` |

## Specification

Specification pending — no HIP in [hanzoai/hips](https://github.com/hanzoai/hips) declares `capability: provider` yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.

## Four surfaces

| Surface  | Reaches this capability as                       | Coverage                                                                   |
| -------- | ------------------------------------------------ | -------------------------------------------------------------------------- |
| **REST** | `provider` at its own prefix                     | 71 operations                                                              |
| **CLI**  | `hanzo connection …`                             | 63 of 71 — the CLI pins the document on its own clock                      |
| **SDK**  | `ProviderApi` in every published client          | 71 methods                                                                 |
| **MCP**  | tool `provider` on `https://api.hanzo.ai/v1/mcp` | 38 operations, 2 under the document's own id — ask `describe` for the rest |

## Quickstart

```bash
export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys
```

Then the first call — a read that needs nothing but the key. `GET /v1/provider`, operation `get_provider`:

**CLI**

```bash
hanzo provider list
```

**SDK**

**.ts**

```ts
import { Configuration, ProviderApi } from 'hanzoai';

const api = new ProviderApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProvider();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ProviderApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ProviderApi(client).get_provider()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ProviderAPI.GetProvider(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, provider_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = provider_api::get_provider(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ProviderApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ProviderApi(client).getProvider();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/provider \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **provider** through the `provider` tool, which names its 38 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_connections"
         }
       }
     }'
```

Answers `200` with `object` — ok.

## Endpoints

| Endpoint                                                                                                                                                   | What it does                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [`POST /v1/connection/{id}/refresh`](https://docs.hanzo.ai/docs/openapi/provider/post-connection-by-id-refresh)                                            | Forces a token rotation for a connected connector, ahead of the automatic rotation a token read would do inside the expiry window.                     |
| [`GET /v1/connection/{id}/token`](https://docs.hanzo.ai/docs/openapi/provider/get-connection-by-id-token)                                                  | Hands the custodied access token to its owner — the ONE place custody exits.                                                                           |
| [`DELETE /v1/connection/{id}`](https://docs.hanzo.ai/docs/openapi/provider/delete-connection-by-id)                                                        | Forgets a connector: every custodied secret, then the row.                                                                                             |
| [`POST /v1/connection/{provider}/credential`](https://docs.hanzo.ai/docs/openapi/provider/post-connection-by-provider-credential)                          | The direct intake path: a customer-held token/setup-token (Verify) or an externally obtained OAuth bundle from the CLI's local PKCE (Adopt).           |
| [`POST /v1/connection/{provider}/device/{flow}/poll`](https://docs.hanzo.ai/docs/openapi/provider/post-connection-by-provider-device-by-flow-poll)         | Advances a device sign-in.                                                                                                                             |
| [`POST /v1/connection/{provider}/device`](https://docs.hanzo.ai/docs/openapi/provider/post-connection-by-provider-device)                                  | Begins a device sign-in and returns the code to show the user plus how to poll for completion.                                                         |
| [`GET /v1/connection/providers`](https://docs.hanzo.ai/docs/openapi/provider/get-connection-providers)                                                     | Lists the USER-plane provider cards.                                                                                                                   |
| [`GET /v1/connection`](https://docs.hanzo.ai/docs/openapi/provider/get-connection)                                                                         | Lists the caller's OWN connectors across every provider — the set `hanzo connector ls` prints.                                                         |
| [`GET /v1/provider/{provider}/callback`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-by-provider-callback)                                    | OAuth return for any connector                                                                                                                         |
| [`POST /v1/provider/{provider}/connect`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-by-provider-connect)                                    | Acquires the org's credential for one provider.                                                                                                        |
| [`POST /v1/provider/{provider}/disconnect`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-by-provider-disconnect)                              | Revokes (best-effort) and forgets an org's connection: it deletes every custodied KMS secret and the connection row.                                   |
| [`GET /v1/provider/{provider}/logo`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-by-provider-logo)                                            | Serves a connector's logo from the catalog.                                                                                                            |
| [`POST /v1/provider/{provider}/run`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-by-provider-run)                                            | Runs one action of a connector as the caller's org, with the credential the org connected, and answers what the action returned.                       |
| [`POST /v1/provider/{provider}/verify`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-by-provider-verify)                                      | Re-checks a CONNECTED apikey connector's stored credential against the provider, live (`hanzo connector verify`).                                      |
| [`GET /v1/provider/{provider}`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-by-provider)                                                      | Returns ONE provider with this org's connection status — the same view list carries, for a single id.                                                  |
| [`POST /v1/provider/discord/interactions`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-discord-interactions)                                 | Discord interactions endpoint                                                                                                                          |
| [`GET /v1/provider/discord/link/callback`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-discord-link-callback)                                 | Complete the Discord account link                                                                                                                      |
| [`GET /v1/provider/discord/link/discord`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-discord-link-discord)                                   | Discord sign-in return leg                                                                                                                             |
| [`GET /v1/provider/discord/link`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-discord-link)                                                   | Begin linking a Hanzo account from Discord                                                                                                             |
| [`POST /v1/provider/forge/webhook`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-forge-webhook)                                               | Forge workflow\_job webhook                                                                                                                            |
| [`POST /v1/provider/github/fork`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-fork)                                                   | Forks a granted repository.                                                                                                                            |
| [`GET /v1/provider/github/installations`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-github-installations)                                   | Lists the GitHub accounts the caller may see the App installed on, each confirmed against the App's own list, plus where to add another.               |
| [`POST /v1/provider/github/issues/backfill`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-issues-backfill)                             | Seeds the native todo with the EXISTING issues across the org's granted repos (default state=open); the webhook keeps them live thereafter.            |
| [`GET /v1/provider/github/repos/{owner}/{repo}/branches`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-github-repos-by-owner-by-repo-branches) | Lists a repository's branches, the default first, with prefix search.                                                                                  |
| [`POST /v1/provider/github/repos/{repo}/pages/builds`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-repos-by-repo-pages-builds)        | Requests a Pages rebuild and returns the queued build's status.                                                                                        |
| [`GET /v1/provider/github/repos/{repo}/pages`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-github-repos-by-repo-pages)                        | Returns the repo's Pages status, live URL, custom domain and build source.                                                                             |
| [`POST /v1/provider/github/repos/{repo}/pages`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-repos-by-repo-pages)                      | Creates the repo's Pages site and answers 201 Created with it.                                                                                         |
| [`PUT /v1/provider/github/repos/{repo}/pages`](https://docs.hanzo.ai/docs/openapi/provider/put-provider-github-repos-by-repo-pages)                        | Sets or clears the custom domain (cname) and updates HTTPS enforcement, build type, or source.                                                         |
| [`DELETE /v1/provider/github/repos/{repo}/pages`](https://docs.hanzo.ai/docs/openapi/provider/delete-provider-github-repos-by-repo-pages)                  | Deletes the repo's Pages site.                                                                                                                         |
| [`POST /v1/provider/github/repos/import`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-repos-import)                                   | Imports the selected (or all) granted repos into git.hanzo.ai.                                                                                         |
| [`GET /v1/provider/github/repos`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-github-repos)                                                   | Lists the GitHub repositories the caller may work on, most recently pushed first, searched and paged on the server.                                    |
| [`POST /v1/provider/github/search`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-search)                                               | Finds repositories on GitHub.                                                                                                                          |
| [`GET /v1/provider/github/user/callback`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-github-user-callback)                                   | Where GitHub returns the person.                                                                                                                       |
| [`POST /v1/provider/github/user/complete`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-user-complete)                                 | Finishes connecting the caller's GitHub account: it takes the authorization the callback parked, trades it for the person's token, and seals it.       |
| [`POST /v1/provider/github/user/connect`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-user-connect)                                   | Begins connecting the caller's own GitHub account: it answers the App's authorization page, carrying a state signed for this org and this person.      |
| [`POST /v1/provider/github/user/disconnect`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-user-disconnect)                             | Forgets the caller's GitHub connection in this org: the token is revoked at GitHub, and the sealed secrets and the row go.                             |
| [`GET /v1/provider/github/user`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-github-user)                                                     | Reports whether the caller has connected their own GitHub account in the org they act in, and as whom.                                                 |
| [`POST /v1/provider/github/webhook`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-github-webhook)                                             | GitHub App webhook                                                                                                                                     |
| [`GET /v1/provider/gitlab/projects`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-gitlab-projects)                                             | Lists the projects the org's GitLab connection can reach — membership projects, most recently active first.                                            |
| [`POST /v1/provider/linear/claim`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-linear-claim)                                                 | Binds the caller's Linear organization to the org and seals the webhook secret.                                                                        |
| [`POST /v1/provider/linear/comments`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-linear-comments)                                           | Posts a comment on a Linear issue with the caller's own key, so it carries their name.                                                                 |
| [`POST /v1/provider/linear/issues/backfill`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-linear-issues-backfill)                             | Seeds the native todo with the EXISTING Linear issues the caller's key can see (default state=open); the webhook keeps them live thereafter.           |
| [`POST /v1/provider/linear/webhook`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-linear-webhook)                                             | Linear webhook                                                                                                                                         |
| [`POST /v1/provider/openrouter/webhook`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-openrouter-webhook)                                     | Receive OpenRouter Broadcast traces as usage rows                                                                                                      |
| [`GET /v1/provider/slack/channels`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-slack-channels)                                               | Lists Slack conversations for the caller's connected workspace.                                                                                        |
| [`POST /v1/provider/slack/commands`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-slack-commands)                                             | Slack slash command webhook                                                                                                                            |
| [`POST /v1/provider/slack/events`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-slack-events)                                                 | Slack Events API webhook                                                                                                                               |
| [`GET /v1/provider/slack/file`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-slack-file)                                                       | Read one Slack file's bytes.                                                                                                                           |
| [`GET /v1/provider/slack/install`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-slack-install)                                                 | Install the Hanzo app into a Slack workspace                                                                                                           |
| [`POST /v1/provider/slack/join`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-slack-join)                                                     | Joins every public channel in the caller org's workspace.                                                                                              |
| [`GET /v1/provider/slack/link/callback`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-slack-link-callback)                                     | Complete the Slack account link                                                                                                                        |
| [`GET /v1/provider/slack/link/slack`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-slack-link-slack)                                           | Slack sign-in return leg                                                                                                                               |
| [`GET /v1/provider/slack/link`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-slack-link)                                                       | Begin linking a Hanzo account from Slack                                                                                                               |
| [`GET /v1/provider/slack/messages`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-slack-messages)                                               | Reads recent messages from a named Slack channel such as #hanzo-gtm.                                                                                   |
| [`POST /v1/provider/slack/messages`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-slack-messages)                                             | Posts as Hanzo to the caller's connected Slack workspace.                                                                                              |
| [`PUT /v1/provider/slack/messages`](https://docs.hanzo.ai/docs/openapi/provider/put-provider-slack-messages)                                               | Rewrites one of this app's messages: PUT /v1/provider/slack/messages.                                                                                  |
| [`DELETE /v1/provider/slack/messages`](https://docs.hanzo.ai/docs/openapi/provider/delete-provider-slack-messages)                                         | Takes back one of this app's messages: DELETE /v1/provider/slack/messages.                                                                             |
| [`POST /v1/provider/slack/reactions`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-slack-reactions)                                           | Adds an emoji reaction: POST /v1/provider/slack/reactions.                                                                                             |
| [`POST /v1/provider/slack/search`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-slack-search)                                                 | Answers a workspace question: POST /v1/provider/slack/search.                                                                                          |
| [`POST /v1/provider/teams/events`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-teams-events)                                                 | Microsoft Teams Bot Framework webhook                                                                                                                  |
| [`GET /v1/provider/teams/link/aad`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-teams-link-aad)                                               | Microsoft sign-in return leg                                                                                                                           |
| [`GET /v1/provider/teams/link/callback`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-teams-link-callback)                                     | Complete the Teams account link                                                                                                                        |
| [`GET /v1/provider/teams/link`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-teams-link)                                                       | Begin linking a Hanzo account from Teams                                                                                                               |
| [`POST /v1/provider/telegram/connect`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-telegram-connect)                                         | Mints a short, single-use deep-link code bound to the caller's org and returns the t.me link the console navigates to.                                 |
| [`GET /v1/provider/telegram/link/auth`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-telegram-link-auth)                                       | Telegram Login Widget return leg                                                                                                                       |
| [`GET /v1/provider/telegram/link/callback`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-telegram-link-callback)                               | Complete the Telegram account link                                                                                                                     |
| [`GET /v1/provider/telegram/link`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-telegram-link)                                                 | Begin linking a Hanzo account from Telegram                                                                                                            |
| [`POST /v1/provider/telegram/webhook`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-telegram-webhook)                                         | Telegram Bot API webhook                                                                                                                               |
| [`GET /v1/provider/whatsapp/webhook`](https://docs.hanzo.ai/docs/openapi/provider/get-provider-whatsapp-webhook)                                           | WhatsApp Cloud API subscription challenge                                                                                                              |
| [`POST /v1/provider/whatsapp/webhook`](https://docs.hanzo.ai/docs/openapi/provider/post-provider-whatsapp-webhook)                                         | WhatsApp Cloud API webhook                                                                                                                             |
| [`GET /v1/provider`](https://docs.hanzo.ai/docs/openapi/provider/get-provider)                                                                             | Returns every registered integration provider together with THIS org's connection status for it — the catalog the console's Integrations page renders. |

---

[All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
