Skip to main content
POST
https://prod-contactswing-fastapi-962560522883.us-central1.run.app
/
v2
/
_actions
Create Aircall 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>",
  "webhook": {
    "from": 123,
    "to": 123,
    "mandatory": true
  },
  "tags": [
    "<string>"
  ]
}
'
{
  "ctx_id": "<string>",
  "data": {
    "action_id": "<string>",
    "name": "<string>",
    "type": "<string>"
  }
}

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Request Body

name
string
required
Action display name. Example: My Aircall Action
description
string
Action purpose. Example: Test
action_timing
string
required
When to trigger: "DURING"
type
string
required
Action type: "AIRCALL"
webhook
object
required
Aircall webhook configuration
from
integer
required
Source number ID. Example: 1768408427
to
integer
required
Destination number ID. Example: 1768408427
mandatory
boolean
Require Aircall response before proceeding
tags
string[]
Call tags []

Response

201 Created - Aircall action created successfully
ctx_id
string
Request context ID
data
object
action_id
string
New Aircall action ID
name
string
Action name
type
string
”AIRCALL”
400 Bad Request - Invalid Aircall number IDs or configuration 401 Unauthorized - Invalid token