---
title: "Connect a platform WhatsApp number to one of the account's agents, so the owner can message that number and reach tha..."
method: POST
path: "/api/mcp/tools/attach_agent_whatsapp"
tags: ["tools"]
---

# Connect a platform WhatsApp number to one of the account's agents, so the owner can message that number and reach tha...

`POST /api/mcp/tools/attach_agent_whatsapp`

## Request

- Base URL: `https://finestructure.ai`
- URL: `https://finestructure.ai/api/mcp/tools/attach_agent_whatsapp`
- Auth: HTTP bearer

Connect a platform WhatsApp number to one of the account's agents, so the owner can message that number and reach that agent. Requires the owner to be verified first. Take phone_number_id from get_agent_whatsapp. A number already used by another account is still valid to connect: it answers only this owner's verified phone.

## Request body

- object
  - `agent_id` string, required: The agent that should answer on this number.
  - `phone_number_id` string, required: phone_number_id from get_agent_whatsapp claimable_numbers.

## Response `200`

Tool executed successfully

- ToolResult
  - `ok` boolean, required
  - `tool` string, required
  - `result` object, required

## Other responses

- `400`: Invalid arguments for this tool
- `401`: Missing or invalid bearer token
- `402`: Not enough credits on the account
- `403`: Token scope does not permit this tool
- `404`: Unknown tool name
- `429`: Rate limit exceeded, retry after the indicated delay
- `500`: Internal error while executing the tool

---

[API](https://skmtc.dev/finestructure/apis/fine-structure-api.md) · [All operations](https://skmtc.dev/finestructure/apis/fine-structure-api/llms.txt) · [OpenAPI document](https://skmtc.dev/finestructure/apis/fine-structure-api/revisions/02c50ed5fd70?raw)
