Skip to main content
POST
Create API Action

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Request Body

name
string
required
Action display name. Example: My API Action
description
string
required
Action purpose. Example: Post API Action
action_timing
string
required
When to trigger: "DURING"
type
string
required
Action type: "WEBHOOK"
webhook
object
required
Webhook configuration object
url
string
required
Target API endpoint. Example: "https://api.publicapis.org/entries"
method
string
required
HTTP method. Example: "POST"
mandatory
boolean
Require confirmation before execution. Example: false
headers
object
Content-Type
string
Request headers. Example: {"Content-Type": "application/json"}
body
array
Request body definition. Example: [{"type":"static","values":{"data":"info"}}]
type
string
Webhook type. Example: "static"
values
object
data
string
Webhook data. Example: "Information"
static_body
string
Optional static body payload
required
string[]
List of required fields
response
object
Response handling configuration
prompt
string
run_before_call
boolean
Run pre-call logic. Example: false
type
string
Webhook type. Example: "static"

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
”WEBHOOK”
400 Bad Request - Invalid webhook configuration 401 Unauthorized - Invalid token