Skip to main content

POST /api/v1/public/campaigns//conditions/

Adds a new condition to a campaign. Conditions allow you to create branching logic in your campaign flow. Auth: X-API-Key

Path Parameters

  • id (integer, required): Campaign ID

Request Body

Available Condition Types

  • HAS_EMAIL: Check if the prospect has an email address
  • HAS_EMAIL_PREMIUM: Check if the prospect has a premium email (Gmail, Outlook, etc.)
  • ACCEPTED_INVITE: Check if the prospect accepted the LinkedIn connection request
  • ALREADY_CONNECTED: Check if the prospect is already connected on LinkedIn

Flow Management Fields

  • parent_step_id (integer, optional): ID of the step that comes before this condition
  • yes_child_step_id (integer, optional): ID of the step to execute if condition is true
  • no_child_step_id (integer, optional): ID of the step to execute if condition is false

Response

Example

Building Conditional Flows

Here’s an example of how to create a conditional campaign flow:

1. Create initial LinkedIn invite

2. Create a condition to check if they have email

3. Create email step for prospects with email (YES path)

4. Create LinkedIn message for prospects without email (NO path)

This creates a flow: LinkedIn Invite → Check if has email → Email (if yes) OR LinkedIn Message (if no)