---
name: "admin_revoke_join_code"
area: "admin"
title: "Withdraw a join code"
price: "free"
method: "POST"
url: "https://api.conecto.chat/v1/tools/admin_revoke_join_code"
mcp_server: "https://api.conecto.chat/mcp/admin"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/admin/admin_revoke_join_code"
---

# Withdraw a join code (`admin_revoke_join_code`)

Withdraws a join code no bot used yet.

Withdraw a join code no bot used yet, by the last four characters it ends with (or its id).

Price: Free. A call that fails costs nothing.

## Use it when

A code was sent to the wrong place, or is no longer needed.

## Say this to your agent

> Withdraw the join code ending in Xk3Q, it went to the wrong address.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `code` | string | yes | 1 to 20 characters. |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `admin_revoke_join_code` on the MCP server `https://api.conecto.chat/mcp/admin` with these arguments:

```json
{
  "code": "Xk3Q"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/admin_revoke_join_code \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code": "Xk3Q"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "admin_revoke_join_code",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.00",
  "balance_usd": "$19.75",
  "result": {
    "join_code": {
      "id": 4101,
      "label": "Accounting bot",
      "team": "Accounting",
      "areas": [
        "books",
        "invoices"
      ],
      "read_only": false,
      "drafts_only": true,
      "last4": "Xk3Q",
      "expires_at": "2026-10-21T08:00:00+00:00",
      "used_at": null,
      "revoked": true,
      "bot": null
    }
  }
}
```

`result`: join_code: the code, now withdrawn.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_found` | 404 | No unused code ends like that. | admin_list_join_codes lists them. |
| `owner_required` | 403 | The key is not one that runs the account: it works for one team, has limits, or is a member's assistant. | Use a key of the company-wide team without limits, or ask the owner (account_owner_link). |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [admin_overview](https://conecto.chat/tools/admin/admin_overview.md): The account page's Home in one read: balance, spending, limits, teams, people, keys, systems and rentals. Free up to 1,000,000 reads a month.
- [admin_save_setup](https://conecto.chat/tools/admin/admin_save_setup.md): Saves the answers to the first questions: the AI the business uses, the jobs to hand over, the systems it runs and its size. Free.
- [admin_list_people](https://conecto.chat/tools/admin/admin_list_people.md): Who besides the owner can open the account, with role, teams, areas and end of access, and the requests to join waiting. Free up to 1,000,000 reads a month.
- [admin_save_person](https://conecto.chat/tools/admin/admin_save_person.md): Adds a person as a member or auditor, or changes their name, teams, areas or end of access. $0.001 a call.
- [admin_remove_person](https://conecto.chat/tools/admin/admin_remove_person.md): Takes a person's access away at once, with their own assistants. Free.
- [admin_list_domains](https://conecto.chat/tools/admin/admin_list_domains.md): The company's email domains on the account: proved or not, how people on them join, and the TXT record that proves each. Free up to 1,000,000 reads a month.
- [admin_save_domain](https://conecto.chat/tools/admin/admin_save_domain.md): Adds the company's email domain, proves it with a TXT record, and sets how people on it join. $0.001 a call.
- [admin_remove_domain](https://conecto.chat/tools/admin/admin_remove_domain.md): Takes a domain off the account; people who joined with it stay. Free.
- [admin_decide_join_request](https://conecto.chat/tools/admin/admin_decide_join_request.md): Approves someone who asked to join, as a member in their domain's team, or declines them. $0.001 a call.
- [admin_list_join_codes](https://conecto.chat/tools/admin/admin_list_join_codes.md): The one-time codes made for other bots to join, with their team, areas, expiry and the bot that used each. Free up to 1,000,000 reads a month.
- [admin_make_join_code](https://conecto.chat/tools/admin/admin_make_join_code.md): A one-time code another bot uses to join this account, for one team and its areas. $0.001 a call.
- [admin_list_bridges](https://conecto.chat/tools/admin/admin_list_bridges.md): The bridges inside the company's network: online or not, last check-in, version and the systems each serves. Free up to 1,000,000 reads a month.
- [admin_make_bridge](https://conecto.chat/tools/admin/admin_make_bridge.md): A new bridge for systems behind the company's firewall, with its token (shown once) and the steps for IT. $0.001 a call.
- [admin_revoke_bridge](https://conecto.chat/tools/admin/admin_revoke_bridge.md): Stops a bridge at once; calls waiting for it fail at no cost. Free.
