Skip to main content
POST
/
v2
/
_actions
Create Call Transfer Action
curl --request POST \
  --url https://prod-contactswing-fastapi-962560522883.us-central1.run.app/v2/_actions \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "action_timing": "<string>",
  "type": "<string>",
  "phone_number": "<string>",
  "webhook": {
    "extension_enabled": true
  },
  "speech": "<string>",
  "runBeforeCall": true
}
'
{
  "ctx_id": "<string>",
  "data": {
    "action_id": "<string>",
    "name": "<string>",
    "type": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.contactswing.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Request Body

name
string
required
Action display name. Example: My Call Transfer Action
description
string
required
Action purpose. Example: Transfer to human when user requests agent or is unhappy
action_timing
string
required
When to trigger: "DURING"
type
string
required
Action type: "CALL_TRANSFER"
phone_number
string
required
Destination phone number. Example: "12817126508"
webhook
object
Webhook configuration
extension_enabled
boolean
Enable extension support. Example: false
speech
string
Custom speech prompt before transfer
runBeforeCall
boolean
Execute actions before transfer

Webhook Configuration

webhook.extension_enabled
boolean
Enable extension dialing

Response

201 Created - Call transfer action created successfully
ctx_id
string
Request context ID
data
object
action_id
string
New transfer action ID
name
string
Action name
type
string
”CALL_TRANSFER”
400 Bad Request - Invalid phone number or missing fields 401 Unauthorized - Invalid token