Skip to main content
POST
Create a WhatsApp tool

Authorizations

x-api-key
string
header
required

API Key for authentication

Body

application/json
name
string
required
Maximum string length: 100
fixed_config
object
required

Same discriminated fixed_config stored on WhatsAppOperationTool and sent by Configuración > WhatsApp > Tools. Validated with whatsAppToolFixedConfigSchema. operationTypeId must be a CompanyOperationTypes id of this company and must match toolKind (up/down → up_down, other → other, exchange → exchange, budget → budget). Budget config uses costCenter/paymentSourceMode/internalAccount/payerClient/amount/description; it does not require up_down mode/source/destination. Direction defaults to expense. paymentSourceMode defaults to internal (caja). Expense+external credits a type=1 CC (payerClientId) and does not debit caja. If internalAccountId is omitted on internal, confirm uses the cost center default caja.

slug
string

Optional. Normalized from name when omitted.

description
string | null
enabled
boolean
default:true
parameter_schema
object

Dynamic fields the bot asks for (parameter_schema). Same shape as the dashboard form: { parameters: [...] }. Omit or send { parameters: [] } when every field is fixed.

Response

Tool created

WhatsAppOperationTool row (deleted_at IS NULL). List includes disabled tools.

id
integer
company_id
integer
name
string
Maximum string length: 100
slug
string
description
string | null
enabled
boolean
company_operation_type_id
integer

Copied from fixed_config.operationTypeId

mode
enum<string>

Legacy UP/DOWN column. OTHER, EXCHANGE, and BUDGET store standard here; real settings live in fixed_config.

Available options:
standard,
internal_transfer,
third_party
fixed_config
object

Same discriminated fixed_config stored on WhatsAppOperationTool and sent by Configuración > WhatsApp > Tools. Validated with whatsAppToolFixedConfigSchema. operationTypeId must be a CompanyOperationTypes id of this company and must match toolKind (up/down → up_down, other → other, exchange → exchange, budget → budget). Budget config uses costCenter/paymentSourceMode/internalAccount/payerClient/amount/description; it does not require up_down mode/source/destination. Direction defaults to expense. paymentSourceMode defaults to internal (caja). Expense+external credits a type=1 CC (payerClientId) and does not debit caja. If internalAccountId is omitted on internal, confirm uses the cost center default caja.

parameter_schema
object

Dynamic fields the bot asks for (parameter_schema). Same shape as the dashboard form: { parameters: [...] }. Omit or send { parameters: [] } when every field is fixed.

created_by
integer | null
created_at
string<date-time>
updated_at
string<date-time>
deleted_at
string<date-time> | null