Mediflo
REST APIPhone numbers

Route an inbound number to a bot

Creates (or refreshes) the generated start → dispatchBot IVR flow and activates it. Idempotent. Returns 409 `PHONE_NUMBER_HAS_CUSTOM_FLOW` when the number already routes through a hand-built flow — those are never replaced. Required scope: `bots.write`.

POST/phone-numbers/{phoneNumberId}/attach-bot

Authorization

ApiKeyAuth
AuthorizationBearer <token>

An external API key, sent as Authorization: Bearer mflo_…. Scopes are checked per route; see each operation’s description.

In: header

Path Parameters

phoneNumberId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/phone-numbers/497f6eca-6276-4993-bfeb-53cbbbba6f08/attach-bot" \  -H "Content-Type: application/json" \  -d '{    "botId": "58ed41f0-04bf-402f-9853-7143ef7dd5ce"  }'
{  "data": {    "phoneNumberId": "8e9ce3fb-4d22-4fe3-baa7-b7892dd942d7",    "botId": "58ed41f0-04bf-402f-9853-7143ef7dd5ce",    "flowId": "ccd52024-9c9c-4751-993a-9d75a778bf9d",    "created": true  }}