AI bots

Add an app action to a bot

posthttps://api.whatsable.app/v1/ai-bots/{id}/actions
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 POST 'https://api.whatsable.app/v1/ai-bots/string/actions' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Book a meeting",
  "description": "Run when the customer agrees on a date and time for a meeting.",
  "app": "google_calendar",
  "account_id": "apn_kVh9AoD",
  "component_key": "google_calendar-create-event",
  "fixed": {
    "calendarId": {
      "value": "sales@example.com",
      "label": "Sales calendar"
    }
  },
  "agent_inputs": [
    "summary",
    "eventStartDate",
    "eventEndDate"
  ]
}'

Adds an action of a connected app to this bot: the inputs you choose in fixed, and the inputs the bot fills from the conversation in agent_inputs. The app's action is read when you send this, and the setup must fit it. Connecting an app account is done in the dashboard, because the app's sign-in runs in a browser.

Authorization

bearerAuth
headerAuthorizationBearer <nfy_live_<32 characters>>

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

Path Parameters

id*string

The bot id.

Length1 <= length <= 64

Header Parameters

Idempotency-Key?string

Any string up to 255 characters. A repeat with the same key and body answers the stored response; with another body, 409 idempotency_key_reused.

Lengthlength <= 255

Request Body

application/json
  1. body

An app action to add to the bot. The action's inputs are read from the app, and the setup must fit them.

name*string
Length1 <= length <= 60
description*string

When the bot runs the action. The bot reads it.

Length1 <= length <= 500
read_only?boolean

A lookup: the action only reads, and the bot may run it before it replies.

Defaultfalse
app*string

The app, as GET /v1/app-connections names it.

Match^[a-z0-9_]+$
Length1 <= length <= 100
account_id*string

A connected account of that app.

Match^apn_[A-Za-z0-9]+$
Length1 <= length <= 64
component_key*string

The app's action, for example google_calendar-create-event.

Match^[a-z0-9_]+(-[a-z0-9_]+)+$
Length1 <= length <= 200
fixed?

The inputs you choose, by input name, each { "value": ..., "label": "..." }. label is optional: what the value is called in the app.

Default{}
agent_inputs?array<>

The inputs the bot fills from the conversation, at most 10. Every required input of the action is either in fixed or here; an optional input in neither keeps the app's default.

Itemsitems <= 10
Default[]

Response Body

The action, granted to the bot.

application/json
  1. response

An action an AI bot may run in another system: an HTTP request or an app action.

object*string
id*string
Length1 <= length <= 64
name*string
description*string

What the action does and when the bot runs it. The bot reads it.

method*||

The HTTP method. Null for an app action.

url_host*|

The host the action calls. The path and the query are not shown: a webhook URL often carries its secret in them. Null for an app action.

inputs*array<>

The values the bot fills in when it runs the action.

has_auth_secret*boolean

Whether a credential is sent with each call. The credential itself is never returned.

kind*|

http_request: a request to a URL, set up in the bot editor. app_action: an action of an app the organization connected.

read_only*boolean

A lookup: the action only reads, and the bot may run it before it writes its reply.

app_action*|

The app setup. Null for an HTTP action.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.whatsable.app/v1/ai-bots/string/actions' \  -H 'Content-Type: application/json' \  -d '{  "name": "Book a meeting",  "description": "Run when the customer agrees on a date and time for a meeting.",  "app": "google_calendar",  "account_id": "apn_kVh9AoD",  "component_key": "google_calendar-create-event",  "fixed": {    "calendarId": {      "value": "sales@example.com",      "label": "Sales calendar"    }  },  "agent_inputs": [    "summary",    "eventStartDate",    "eventEndDate"  ]}'
Example Response
{  "object": "ai_bot_action",  "id": "cm3a1b2c30001qz8hact10001",  "name": "Create CRM lead",  "description": "Run when the customer gives their name and email and asks to be contacted.",  "method": "POST",  "url_host": "hooks.zapier.com",  "inputs": [    {      "name": "name",      "type": "string",      "description": "The customer's full name.",      "required": true    },    {      "name": "email",      "type": "string",      "description": null,      "required": true    }  ],  "has_auth_secret": false,  "kind": "http_request",  "read_only": false,  "app_action": null,  "created_at": "2026-11-20T10:00:00Z",  "updated_at": "2026-11-20T10:00:00Z"}