Skip to main content
POST
Create Data Extraction Action

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Request Body

name
string
required
Action display name. Example: My Data Extraction Action
description
string
User prompt/description. Example: "Trigger this action if the user requests data extraction."
action_timing
string
required
When to trigger: "DURING"
type
string
required
Action type: "SINGLEDATAEXTRACTION"
webhook
object
required
Data extraction webhook configuration
mandatory
boolean
Require user response before proceeding
name
string
Data field name
description
string
User prompt/description. Example: "user interested on buying the product"
type
string
Response type: "yes/no"
sync_data
boolean
Sync extracted data automatically
sync_module
string
Target module: "customers"
sync_field
string
Database field to store data: "customer_timezone"

Response

201 Created - Data extraction action created successfully
ctx_id
string
Request context ID
data
object
action_id
string
New extraction action ID
name
string
Action name
type
string
”SINGLEDATAEXTRACTION”
400 Bad Request - Invalid webhook configuration 401 Unauthorized - Invalid token