Skip to main content
POST
Create WhatsApp Action

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Request Body

name
string
required
Action display name. Example: My Whatsapp Action
description
string
required
Action purpose. Example: Send WhatsApp when user requests messaging
type
string
required
Action type: "SEND_WHATSAPP"
is_active
boolean
Enable/disable action
action_timing
string
required
When to trigger: "during"
phone_number
string
Override phone number (optional)
webhook
object
required
WhatsApp webhook configuration
to
string
required
Recipient WhatsApp number. Example: "12817126508"
from
string
required
Sender WhatsApp ID. Example: "650175178190170"
template_name
string
required
WhatsApp template name. Example: "call_permession_request"
body_params
string[]
Template body parameters []
header_params
string[]
Template header parameters []
button_params
string[]
Template button parameters []
language_code
string
Template language. Example: "en"
mandatory
boolean
Require WhatsApp response before proceeding

Response

201 Created - WhatsApp action created successfully
ctx_id
string
Request context ID
data
object
action_id
string
New WhatsApp action ID
name
string
Action name
type
string
”SEND_WHATSAPP”
400 Bad Request - Invalid WhatsApp template or numbers 401 Unauthorized - Invalid token