ClosersHQ.io | Help
HomePricingBlogLogin
  • What is ClosersHQ?
  • EMAIL WARMING
    • Setup & Configuration Guide
      • Google Workspace (Gmail | G-suite)
      • Microsoft Office 365 (Outlook)
      • SMTP/IMAP (C-Panel & Other Custom Providers)
        • SMTP/IMAP Configuration Flow
        • Zoho IMAP & SMTP
        • Yahoo Mail SMTP & IMAP
        • AWS SES Configuration
        • SendGrid Configuration
        • MailGun Configuration
        • GSuite | Gmail SMTP/IMAP
        • Microsoft Office 365 SMTP & IMAP
    • How to Switch ON and OFF Email Warming
    • How to Configure Mailbox Warming Pattern
    • How to View Email Warmup Analytics
    • How to Create Inbox Filter
  • Email campaign
    • How It Works
    • How to Use Spintax in Cold Email
    • How to Create and Use Personalization in Emails
    • Email Signature - How to Set and Use Sender Variables
    • How to Edit Unsubscribe Text
    • How to Set Mailbox Sending Pattern and Daily Limits
    • How to Set up Custom Domain Tracking
    • How to Create and Use Email Templates
    • Blocklist - What It Entails and How to Manage It
    • How to Add a Team Member
  • API
    • API Documentation
    • Campaign API
    • Prospect API
  • Webhook
    • Webhook Event
Powered by GitBook
On this page
  • All scope endpoints
  • How to find the campaign ID for making API calls:
  • List all campaigns
  • Get the list of all campaigns on an account.
  • Add prospect to campaign:
  • Add a prospect is a campaign
  • Remove prospect from campaign:
  • Ad

Was this helpful?

  1. API

Campaign API

The campaign API allows you to make changes to a campaign programmatically.

PreviousAPI DocumentationNextProspect API

Last updated 1 year ago

Was this helpful?

Campaign scope endpoint:

The campaign API base URL is https://api.closershq.io/v1/campaign and requires authentication using the API key. about authentication.

All scope endpoints

Name
endpoint
Req. Type
Link to detail

List all campaigns

https://api.closershq.io/v1/campaign

GET

Add prospect to campaign

https://api.closershq.io/v1/campaign/prospect

POST

Remove prospect from campaign

https://api.closershq.io/v1/campaign/prospect

DELETE

How to find the campaign ID for making API calls:

There are 2 ways to find the campaign ID of any given campaign.

  • Make an API call to get all campaigns. The campaign ID is available in the API response.

  • Copy it from the campaign analytics URL on your dashboard, as shown below:

List all campaigns

The list all campaigns endpoint allows you to get the list of all campaigns on a particular account using the GET request.

Get the list of all campaigns on an account.

GET https://api.closershq.io/v1/campaign

Headers

Name
Type
Description

Authorization*

String

Bearer {{apiKey}}

{
  success: true,
  data: [] //an array of all campaigns
}

Add prospect to campaign:

This operation adds a prospect to an active or completed campaign. If the prospect doesn't already exist, the prospect is automatically created and added to the campaign.

This does not include draft campaigns or campaigns with errors.

Add a prospect is a campaign

POST https://api.closershq.io/v1/campaign/prospect

Headers

Name
Type
Description

Authorization*

String

Bearer {{apiKey}}

Request Body

Name
Type
Description

campaignId*

String

The ID of the campaign to send to

prospect*

String

an object containing the prospect to add

{
    // Response
}

The prospect object required in the request body should contain the details about the prospect to add to the campaign. Only the email field is required. Every other field is optional.

{
  "campaignId": "campaign-demo-second-nb1pnyf",
  "prospect": {
    "email": "james@amazon.com",
    "firstName": "James",
    "lastName": "Dan",
    "otherAttribute": {
       "city": "LA",
       "sportClub": "Barcelona"
    }
  }
}

The otherAttribute field is where you added other attributes about the prospect for personalizing email contents.

Remove prospect from campaign:

This operation removes a prospect from a campaign, effectively marking them as having completed the campaign.

DELETE https://api.closershq.io/campaign/prospect

Headers

Name
Type
Description

Authorization*

String

Bearer {{apiKey}}

Request Body

Name
Type
Description

campaignId*

String

The campaign ID to remove the prospect from

prospect

String

The prospect object to remove from the campaign

The prospect object required in the request body only requires an email field, as in below:

{
  "campaignId": "campaign-demo-second-nb1pnyf",
  "prospect": {
    "email": "james@amazon.com"
  }
}

Ad

Need help? Reach out to us via the chat box from your logged-in account or contact us via support@closershq.io

learn more
learn more
learn more
Learn more