Skip to main content
POST
https://prod-contactswing-fastapi-962560522883.us-central1.run.app
/
v2
/
_campaign
/
create_with_touchpoint
Create Campaign with Email Touchpoint
curl --request POST \
  --url https://prod-contactswing-fastapi-962560522883.us-central1.run.app/v2/_campaign/create_with_touchpoint \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "<string>",
  "company_plan_id": "<string>",
  "workspace_id": "<string>",
  "business_goal": "<string>",
  "touchpoint": {
    "name": "<string>",
    "type": "<string>",
    "status": "<string>",
    "start_at": "<string>",
    "assistant_id": 123,
    "customer_details": [
      {
        "id": "<string>",
        "email": "<string>"
      }
    ],
    "additional_settings": {
      "execution_days": [
        "<string>"
      ],
      "start_hour": 123,
      "end_hour": 123,
      "time_zone": "<string>",
      "email": "<string>",
      "from_emails": [
        "<string>"
      ],
      "email_medium": "<string>"
    },
    "email_subject": "<string>",
    "email_body": "<string>",
    "variables": "<string>"
  }
}
'
{
  "ctx_id": "<string>",
  "data": {
    "id": "<string>",
    "name": "<string>",
    "status": "<string>"
  }
}

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Request Body

name
string
required
Campaign display name
type
string
Campaign type.
company_plan_id
string
Campaign type.
workspace_id
string
Campaign type.
business_goal
string
The business goal of the campaign.
touchpoint
object
required
The touchpoint object.
name
string
required
The name of the touchpoint.
type
string
required
The type of the touchpoint. e.g. EMAIL.
status
string
required
The status of the touchpoint. e.g. scheduled.
start_at
string
required
ISO 8601 scheduled date for the touchpoint.
assistant_id
integer
required
The ID of the assistant to be used.
customer_details
array
required
An array of customer details objects.
id
string
required
The customer’s ID.
email
string
required
The customer’s email address.
additional_settings
object
required
Additional settings for the touchpoint.
execution_days
string[]
required
Array of days when the campaign will be executed. e.g. ["mon", "tue"]
start_hour
integer
required
The start hour for the campaign execution.
end_hour
integer
required
The end hour for the campaign execution.
time_zone
string
required
The timezone for the campaign execution. e.g. Asia/Kolkata.
email
string
required
The email address to be used.
from_emails
string[]
required
The email addresses from which the emails will be sent.
email_medium
string
required
The email medium to be used. e.g. SEND_GRID.
email_subject
string
required
The subject of the email.
email_body
string
required
The body of the email in HTML format.
variables
string

Response

201 Created - Campaign created successfully
ctx_id
string
Request context ID
data
object
id
string
Campaign ID
name
string
Campaign name
status
string
Campaign status
400 Bad Request - Invalid input