API v1AI bots
Choose the bot a number answers with
puthttps://api.whatsable.app/v1/numbers/{id}/ai-bot
Build a request to copy
This page never sends a request. Fill in the fields, then copy the request and run it from your server.
Request
curl -X PUT 'https://api.whatsable.app/v1/numbers/string/ai-bot' \
-H 'Content-Type: application/json' \
-d '{
"bot_id": "cm2v8b1a00001qz8h3j4k5l6m"
}'Sets the default AI bot of a number. It answers every conversation on the number that has no bot of its own. An archived bot cannot be assigned.
bearerAuthheader
AuthorizationBearer <nfy_live_<32 characters>>An API key from Settings > API keys, sent as Authorization: Bearer <key>.
id*stringThe number id.
Length
1 <= length <= 64application/json- body
The bot a number answers with, unless a conversation names its own.
bot_id*|The bot that answers on this number by default, or null for none: a conversation on the number with no bot of its own then gets no AI.
The number's bot.
application/json- response
The bot a number answers with by default.
object*stringnumber_id*stringLength
1 <= length <= 64bot_id*|The number's default bot. Null when none is assigned.
curl -X PUT 'https://api.whatsable.app/v1/numbers/string/ai-bot' \ -H 'Content-Type: application/json' \ -d '{ "bot_id": "cm2v8b1a00001qz8h3j4k5l6m"}'Example Response
{ "object": "number_ai_bot", "number_id": "cm2v8a1b20002qz8h9i0j1k2l", "bot_id": "cm2v8b1a00001qz8h3j4k5l6m"}