WhatsAble
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.

Authorization

bearerAuth
headerAuthorizationBearer <nfy_live_<32 characters>>

An API key from Settings > API keys, sent as Authorization: Bearer <key>.

Path Parameters

id*string

The number id.

Length1 <= length <= 64

Request Body

application/json
  1. 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.

Response Body

The number's bot.

application/json
  1. response

The bot a number answers with by default.

object*string
number_id*string
Length1 <= length <= 64
bot_id*|

The number's default bot. Null when none is assigned.

Example Request
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"}