---
title: Validate and replace Smartlead API key overnight
description: Do you ever forget to update your Smartlead API key in different apps? Fix it with this automation
---

[![Afonto](https://afonto.com/hs-fs/hubfs/Afonto%20Word%20Logo%20-%20transparent-1.png?width=140&height=44&name=Afonto%20Word%20Logo%20-%20transparent-1.png "Afonto")](https://afonto.com)

[![Afonto Word Logo](https://afonto.com/hs-fs/hubfs/Afonto%20Word%20Logo.png?width=140&height=44&name=Afonto%20Word%20Logo.png "Afonto Word Logo")](https://afonto.com)

- [Free Stuff](https://afonto.com/content)
- [Testimonials](https://afonto.com/testimonials)
- [Lead Gen](https://afonto.com)
    - [Who we serve](https://afonto.com/icp)
    - [28 day timeline](https://afonto.com/leadgen/gettingstarted)
- [Consulting](https://afonto.com/consulting)
- [Pricing](https://afonto.com/pricing)

[Contact Us](https://afonto.com/contact)

[Contact Us](https://afonto.com/contact)

[Contact Us](https://afonto.com/contact)

- [Free Stuff](https://afonto.com/content)
- [Testimonials](https://afonto.com/testimonials)
- [Lead Gen](https://afonto.com)
  
  
  
  
  
  
  
  
  
    - [Who we serve](https://afonto.com/icp)
    - [28 day timeline](https://afonto.com/leadgen/gettingstarted)
- [Consulting](https://afonto.com/consulting)
- [Pricing](https://afonto.com/pricing)

[Contact Us](https://afonto.com/contact)

<https://afonto.com/automations> 100 Free Automations

# Validate and replace Smartlead API key overnight

By [**Noel Maniraguha**](https://afonto.com/automations/author/noelmaniraguha) on December, 2024

![Validate and replace Smartlead API key overnight](https://afonto.com/hs-fs/hubfs/Validate%20and%20replace%20Smartlead%20API%20key%20overnight.png?width=1000&height=400&name=Validate%20and%20replace%20Smartlead%20API%20key%20overnight.png)

Do you ever forget to update your Smartlead API key in different apps? Fix it with this automation

This automation has 3 components.   
1. Updating your Smartlead API key regularly (to prevent hackers)  
2. Syncing your Smartlead API key with your Clay account  
3. Storing your Smartlead API key in (make), ensuring that key changes affect all automation

Yes, this automation is great... But if you don't use it, I still highly recommend following the Data Store step below. This will ensure that you never run into authorization errors across all scenarios.

![Afonto Profile Picture](https://afonto.com/hs-fs/hubfs/Afonto%20Profile%20Picture.png?width=778&height=777&name=Afonto%20Profile%20Picture.png)

Validate and replace Smartlead API key overnight

Download Blueprint

Insert the blueprint in [make](https://www.make.com/en/register?pc=noelm) (new scenario)

---

# **Manual Changes**

### Add API key to a datastore

We use a data store in Make as it's easy to retrieve and update. 

![](https://afonto.com/hs-fs/hubfs/image-png-Dec-25-2024-04-48-31-6078-AM.png?width=270&height=132&name=image-png-Dec-25-2024-04-48-31-6078-AM.png)

Follow the Image below on how to create a data store:

![](https://afonto.com/hs-fs/hubfs/image-png-Dec-25-2024-04-49-58-6101-AM.png?width=1211&height=522&name=image-png-Dec-25-2024-04-49-58-6101-AM.png)

Once completed, add your Smartlead API key in the first section

key = "Smartlead"  
![](https://afonto.com/hs-fs/hubfs/image-png-Dec-25-2024-04-53-53-4455-AM.png?width=140&height=88&name=image-png-Dec-25-2024-04-53-53-4455-AM.png)

API Key = your Smartlead API key  
![](https://afonto.com/hs-fs/hubfs/image-png-Dec-25-2024-04-53-44-5359-AM.png?width=150&height=87&name=image-png-Dec-25-2024-04-53-44-5359-AM.png)

BONUS: you can retrieve your API key across all Smartlead automations with this same process. Use a data store module to "get a record" then input "API key" in any Smartlead module  
![](https://afonto.com/hs-fs/hubfs/image-png-Dec-25-2024-07-58-14-6438-AM.png?width=708&height=334&name=image-png-Dec-25-2024-07-58-14-6438-AM.png)

### Add API key to a datastore

Now that you've added your API key, you can easily retrieve it from the Datastore within the automation.

![Screenshot 2024-12-24 225435](https://afonto.com/hs-fs/hubfs/Screenshot%202024-12-24%20225435.png?width=415&height=280&name=Screenshot%202024-12-24%20225435.png)

### Undocumented Clay/Smartlead APIs

Both Clay and Smartlead don't have these APIs on their docs, so we'll need to use a workaround. Login to both applications by using your username and password.

![Screenshot 2024-12-24 225631](https://afonto.com/hs-fs/hubfs/Screenshot%202024-12-24%20225631.png?width=413&height=164&name=Screenshot%202024-12-24%20225631.png)

### Clay Undocumented API

To leverage undocumented APIs you will need to log in to Clay which will give you your Clay token. This token will be used in the modules following the Clay log-in, for example:

 

![](https://t12612847.p.clickup-attachments.com/t12612847/6f97a247-604a-40ed-9104-7b1bd9ad0db2/image.png)

 

In order to find the {INSERT\_COOKIE\_DETAILS} you need to

Click "inspect element" ➝ go to the "Network" tab ➝ click the "Fetch/XHR" button

Look for the request headers section

![](https://t12612847.p.clickup-attachments.com/t12612847/06800fa5-c960-4bf5-8f84-ee0c88c7ec75/image.png)

When you open this tab, there will be a section called "Cookie". This Cookie has 2 parts, the first part will remain static and it is what we will paste in the automation for ({INSERT\_COOKIE\_DETAILS}

The 2nd section is dynamic, and that's what we get from logging in (the token)... If you're unsure where the split occurs, simply run your Make module (Get Clay Token) and look at the output as it will contain a token; now you can take the first half from the header cookies, excluding your 

![](https://t12612847.p.clickup-attachments.com/t12612847/0297b6a5-d886-4715-8ea4-b590283ba417/image.png)

---

### Set a schedule

The schedule you set depends on your needs. If many people have access to your keys, you could go "daily" but "weekly" or "on-demand" works just fine for most cases

![Set Schedule](https://afonto.com/hs-fs/hubfs/Set%20Schedule.png?width=319&height=150&name=Set%20Schedule.png)

 

Topics: [Smartlead](https://afonto.com/automations/tag/smartlead) [Clay](https://afonto.com/automations/tag/clay) [Make](https://afonto.com/automations/tag/make) [Automations with Clay](https://afonto.com/automations/tag/automations-with-clay)

- [**Top 10 Automations ⌵**](https://afonto.com/automations/top-10-automations) 
    - [Smartlead client database (agency)](https://afonto.com/automations/smartlead-client-database-agency)
    - [High bounce & low leads monitoring](https://afonto.com/automations/high-bounce-low-leads-monitoring)
    - [Daily Campaign Monitoring](https://afonto.com/automations/daily-campaign-monitoring)
    - [Reply notifications (agency)](https://afonto.com/automations/reply-notifications-agency)
    - [Reply notifications (simple)](https://afonto.com/automations/reply-notifications-simple)
    - [Automated weekly reports](https://afonto.com/automations/automated-weekly-reports)
    - [Tasks for email disconnects](https://afonto.com/automations/tasks-for-email-disconnects)
    - [Smartlead calendar sync](https://afonto.com/automations/smartlead-calendar-sync)
- [Honorable Mentions ⌵](https://afonto.com/automations/honorable-mentions) 
    - [Campaign monitoring and database](https://afonto.com/automations/campaign-monitoring-and-database)
    - [High bounce and low leads (alternatives)](https://afonto.com/automations/high-bounce-and-low-leads-alternatives)
    - [Make.com scenario backups](https://afonto.com/automations/make.com-scenario-backups)
    - [Automated weekly reports (alternatives)](https://afonto.com/automations/automated-weekly-reports-alternatives)
    - [Smartlead client database](https://afonto.com/automations/smartlead-client-database)
    - [Automate responses to OOO emails](https://afonto.com/automations/automate-responses-to-ooo-emails)
    - [Smartlead calendar sync (alternatives)](https://afonto.com/automations/smartlead-calendar-sync-alternatives)
    - [Sync HubSpot and Smartlead properties](https://afonto.com/automations/sync-hubspot-and-smartlead-properties)
    - [Send Smartlead emails from Slack](https://afonto.com/automations/send-smartlead-emails-from-slack)
    - [Auto-add DKIM, DMARC & open tracking](https://afonto.com/automations/auto-add-dkim-dmarc-open-tracking)
- [Airtable Workspace ⌵](https://afonto.com/automations/airtable-workspace) 
    - [Duplicate Airtable workspace](https://afonto.com/automations/duplicate-airtable-workspace)
    - [Log campaign analytics trends in Airtable](https://afonto.com/automations/log-campaign-analytics-trends-in-airtable)
    - [Create top-level campaign analytics in Airtable](https://afonto.com/automations/create-top-level-campaign-analytics-in-airtable)
    - [Create a Smartlead client database in Airtable](https://afonto.com/automations/create-a-smartlead-client-database-in-airtable)
    - [Client Onboarding Automation (Airtable Form)](https://afonto.com/automations/airtable-client-onboarding-automation)
    - [Notification for Smartlead replies (Airtable Database)](https://afonto.com/automations/notification-for-smartlead-replies-airtable-database)
    - [Store OLD engaged leads in Airtable](https://afonto.com/automations/create-top-level-campaign-analytics-in-airtable-0)
    - [Add OLD email accounts to Airtable](https://afonto.com/automations/add-old-email-accounts-to-airtable)
    - [Add NEW email accounts in Airtable](https://afonto.com/automations/add-new-email-accounts-in-airtable)
- [Clickup Workspace ⌵](https://afonto.com/automations/clickup-agency-workspace) 
    - [Duplicate Clickup workspace](https://afonto.com/automations/duplicate-clickup-workspace)
    - [Send campaign copy to Smartlead](https://afonto.com/automations/send-campaign-copy-to-smartlead)
    - [Create copywriting spintax](https://afonto.com/automations/create-copywriting-spintax)
    - [Store OLD engaged leads in Clickup](https://afonto.com/automations/store-old-engaged-leads-in-clickup)
    - [Store NEW engaged leads in Clickup](https://afonto.com/automations/store-new-engaged-leads-in-clickup)
- [Real Time Notifications ⌵](https://afonto.com/automations/real-time-notifications) 
    - [Notification for Smartlead replies](https://afonto.com/automations/notification-for-smartlead-replies)
    - [Notification for 'thread' replies](https://afonto.com/automations/notification-for-thread-replies)
    - [Notifications for untracked replies](https://afonto.com/automations/notifications-for-untracked-replies)
    - [Enrich Smartlead contacts using Clay](https://afonto.com/automations/enrich-smartlead-contacts-using-clay)
    - [Tasks for email disconnects (alternatives)](https://afonto.com/automations/tasks-for-email-disconnects-alternatives)
- [Smartlead External Scripts ⌵](https://afonto.com/automations/smartlead-external-scripts) 
    - [Hide tabbed sections](https://afonto.com/automations/hide-tabbed-sections)
    - [Change app colors](https://afonto.com/automations/change-app-colors)
    - [Change header colors](https://afonto.com/automations/change-header-colors)
    - [Change drawer colors](https://afonto.com/automations/change-drawer-colors)
    - [Change app functionality](https://afonto.com/automations/change-app-functionality)
- [Hubspot Dealmaker ⌵](https://afonto.com/automations/hubspot-dealmaker) 
    - [Create Hubspot deals when Smartlead category changes](https://afonto.com/automations/auto-create-hubspot-deals-when-smartlead-category-changes)
    - [Log all Smartlead emails to Hubspot](https://afonto.com/automations/log-all-smartlead-emails-to-hubspot)
    - [Add client dropdown field to Hubspot](https://afonto.com/automations/add-client-dropdown-field-to-hubspot)
    - [Create tasks for calendar events](https://afonto.com/automations/create-tasks-for-calendar-events)
    - [Hubspot 2-way sync (lead category)](https://afonto.com/automations/hubspot-2-way-sync-lead-category)
    - [Sync HubSpot and Smartlead properties](https://afonto.com/automations/sync-hubspot-and-smartlead-properties)
- [Automations with Clay ⌵](https://afonto.com/automations/automations-with-clay) 
    - [Duplicate master campaign table in Clay](https://afonto.com/automations/duplicate-clay-master-campaign-table)
    - [Research new clients across the internet](https://afonto.com/automations/research-new-clients-across-the-internet)
    - [Validate and replace Smartlead API key overnight](https://afonto.com/automations/validate-and-replace-smartlead-api-key)
    - [Create a research-based meeting recap](https://afonto.com/automations/create-a-research-based-meeting-recap)
    - [Duplicate Clay table and move to client folder](https://afonto.com/automations/duplicate-clay-table-and-move-to-client-folder)
    - [Export Clay table data to Google Sheets](https://afonto.com/automations/export-clay-table-data-to-google-sheets)
    - [Clay client onboarding SOPs](https://afonto.com/automations/clay-client-onboarding-sops)
    - [Enrich Smartlead contacts using Clay](https://afonto.com/automations/enrich-smartlead-contacts-using-clay)
    - [Automate responses to OOO emails](https://afonto.com/automations/automate-responses-to-ooo-emails)
- [Beyond The Basics ⌵](https://afonto.com/automations/beyond-the-basics) 
    - [Export all Smartlead positive replies to Sheets](https://afonto.com/automations/export-all-smartlead-positive-replies-to-sheets)
    - [Retroactively assign SDRs to Smartlead contacts](https://afonto.com/automations/retroactively-assign-sdrs-to-smartlead-contacts)
    - [Export existing Smartlead users to Google Sheets](https://afonto.com/automations/export-existing-smartlead-users-to-google-sheets)
    - [Add and remove users from Smatlead with the API](https://afonto.com/automations/add-and-remove-users-from-smatlead-with-the-api)
    - [Smartlead client onboarding SOPs](https://afonto.com/automations/smartlead-client-onboarding-sops)
    - [Clay client onboarding SOPs](https://afonto.com/automations/clay-client-onboarding-sops)
    - [Campaign backups & restore](https://afonto.com/automations/campaign-backups-restore)
    - [Duplicate subsequence in Smartlead](https://afonto.com/automations/duplicate-subsequence-in-smartlead)
    - [Add client dropdown field to Hubspot](https://afonto.com/automations/add-client-dropdown-field-to-hubspot)
    - [Add BCC address & custom tracking](https://afonto.com/automations/add-bcc-address-custom-tracking)
    - [Create tasks for calendar events](https://afonto.com/automations/create-tasks-for-calendar-events)
    - [Hubspot 2-way sync (lead category)](https://afonto.com/automations/hubspot-2-way-sync-lead-category)
    - [Auto-categorize leads with AI](https://afonto.com/automations/auto-categorize-leads-with-ai)

[Get paid by Afonto](https://afonto.com/partner)

Previous post

[← Create a research-based meeting recap](https://afonto.com/automations/create-a-research-based-meeting-recap)

<https://afonto.com/automations>

Next post

[Research new clients across the internet →](https://afonto.com/automations/research-new-clients-across-the-internet)

#### Subscribe to our newsletter

<https://www.linkedin.com/in/noelmaniraguha/> <https://www.youtube.com/@noelmaniraguha> <https://afonto.com/content>

 About Us

- [Lead Generation](https://afonto.com)
- [Hourly Consulting](https://afonto.com/consulting)
- [Partner With Us](https://afonto.com/partner)

 Free Content

- [Unlimited Leads](https://afonto.com/leads)
- [100 Automations](https://afonto.com/automations)
- [Google Reviews](https://g.co/kgs/GGP4PXs)

 Copyright © 2026 Afonto, Inc.

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Noel Maniraguha",
    "url" : "https://afonto.com/automations/author/noelmaniraguha"
  },
  "dateModified" : "2024-12-29T00:55:57.916Z",
  "datePublished" : "2024-12-25T05:00:51.000Z",
  "headline" : "Validate and replace Smartlead API key overnight",
  "mainEntityOfPage" : {
    "@id" : "https://afonto.com/automations/validate-and-replace-smartlead-api-key",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://afonto.com/hubfs/Afonto%20Word%20Logo.png"
    },
    "name" : "Noel Maniraguha"
  }
}
```