Skip to main content
POST
https://prod-contactswing-fastapi-962560522883.us-central1.run.app
/
v2
/
_actions
Create Real Time Booking Action
curl --request POST \
  --url https://prod-contactswing-fastapi-962560522883.us-central1.run.app/v2/_actions \
  --header 'Authorization: <authorization>'
{
  "ctx_id": "<string>",
  "data": {
    "action_id": "<string>",
    "name": "<string>"
  }
}

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Request Body

name
string
required
Action display name. Example: My Real-time Booking Action
description
string
required
Action purpose. Example: Trigger this action if user wants to book a slot.
action_timing
string
required
When to trigger: "DURING" | "AFTER" | "BEFORE"
type
string
required
Action type: "APPOINTMENT"
webhook
array
required
Array of webhook configurations []

Webhook Object

webhook[].email
string
required
Google Calendar email for booking
webhook[].type
string
required
"google" calendar integration
webhook[].mandatory
boolean
Require booking confirmation
webhook[].timezone
string
IANA timezone. Example: "Africa/Algiers"
webhook[].buffer_time
integer
Buffer minutes between bookings
webhook[].booking_timings
object
Weekly availability schedule

Response

201 Created - Action created successfully
ctx_id
string
Request context ID
data
object
action_id
string
New action ID
name
string
Action name
400 Bad Request - Invalid webhook array or missing required fields 401 Unauthorized - Invalid token