Welcome to Smartlead’s Developer documentation. You’re here because you want to automate the day lights out of your outbound.
Smartlead’s API is very powerful and gives you flexibility to do almost everything you can do using the interface. You’ll find all that power on this page.
So lets goooo!
Head to your settings section. Click on the “Activate API button”
If your plan has API access, your API key will be provided to you here. Do not share this with anyone. This is the key that acts as an identity to your account, think of it as your username & password combined.
All our API’s point to our dedicated domain https://server.smartlead.ai/api/v1
Using the API key in step 2 you can make requests to our system.
You will need to attach the API key as a query string to all the requests listed below under the query parameter ?api_key=yourApiKey
Your API key is rate limited to 10 requests every 2 seconds
API Reference 🛬 GET
curl <https://server.smartlead.ai/api/v1/campaigns?api_key=API_KEY>
A campaign refers to an outreach sequence you want to run to a list of leads with certain conditions.
A lead in the API is the same as the lead in your app. They are the recipient of your email / the person you’re trying to contact. Aka the people you provide value to with the awesome products/services you have to sell to them
Whenever you need to update a campaign or a lead
When someone no longer wants to hear from you, they unsubscribe, aka the no more touchy zone.
STARTED: The lead is scheduled to start and is yet to receive the 1st email in the sequence.
COMPLETED: The lead has received all the emails in the campaign.
BLOCKED: A lead is blocked when the email sent is bounced or if added in the global block list
INPROGRESS: The lead has last received atleast one email in the sequence.
This endpoint fetches a campaign based on its id.
API Reference 🛬 GET
curl <https://server.smartlead.ai/api/v1/campaigns/{campaign_id}?api_key={API_KEY}>
The above request yields the below JSON response
Response - JSON of campaign
{
"id": 372
"user_id": 124
"created_at": "2022-05-26T03:47:31.448094+00:00"
"updated_at": "2022-05-26T03:47:31.448094+00:00"
"status": "ACTIVE" // ENUM (DRAFTED/ACTIVE/COMPLETED/STOPPED/PAUSED)
"name": "My Epic Campaign"
"track_settings": "DONT_REPLY_TO_AN_EMAIL" // ENUM (DONT_EMAIL_OPEN/DONT_LINK_CLICK/DONT_REPLY_TO_AN_EMAIL)
"scheduler_cron_value": "{ tz: 'Australia/Sydney', days: [ 1, 2, 3, 4, 5 ], endHour: '23:00', startHour: '10:00' }"
"min_time_btwn_emails": 10 // minutes
"max_leads_per_day": 10
"stop_lead_settings": "REPLY_TO_AN_EMAIL" // ENUM (REPLY_TO_AN_EMAIL/CLICK_ON_A_LINK/OPEN_AN_EMAIL)
"unsubscribe_text": "Don't Contact Me",
"client_id": 23 // null if the campaign is not attached to a client,
"enable_ai_esp_matching": true, // leads will be matched with similar ESP mailboxes IF they exist, else normal sending occurs
"send_as_plain_text": true, // emails for this campaign are sent as plain text (parsing out any html)
"follow_up_percentage": 40% // the follow up percetange allocated - it is assumed 60% is new leads
}
Parameter | Description |
---|---|
campaign_id | The ID of the campaign you want to fetch |