{
  "service": "smartlead_ai",
  "displayName": "Smartlead",
  "categories": [
    "Marketing"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "SMARTLEAD_API_KEY",
      "description": "Smartlead API key sent as the api_key query parameter. Generate it from Smartlead Settings > API Keys in https://app.smartlead.ai."
    }
  ],
  "homepageUrl": "https://www.smartlead.ai",
  "actions": [
    {
      "id": "smartlead_ai.get_campaign",
      "service": "smartlead_ai",
      "name": "get_campaign",
      "description": "Get one Smartlead campaign by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "integer",
            "minimum": 1,
            "description": "The Smartlead campaign identifier."
          },
          "include_tags": {
            "type": "boolean",
            "description": "Whether to include campaign tags in the campaign response."
          }
        },
        "additionalProperties": false,
        "required": [
          "campaign_id"
        ],
        "description": "The input payload for retrieving a Smartlead campaign."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "description": "The Smartlead campaign identifier."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The campaign name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The campaign status returned by Smartlead."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The datetime when the campaign was created."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The datetime when the campaign was last updated."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "client_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "description": "The associated client identifier when present."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "tag_id": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "description": "The Smartlead tag identifier."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tag_name": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "The Smartlead tag name."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tag_color": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "The Smartlead tag color."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": true,
                  "description": "A Smartlead campaign tag."
                },
                "description": "The campaign tags when requested."
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw campaign object returned by Smartlead."
              }
            },
            "additionalProperties": true,
            "description": "A Smartlead campaign."
          },
          "raw": {
            "description": "The raw response returned by Smartlead."
          }
        },
        "additionalProperties": false,
        "description": "The response returned when retrieving a Smartlead campaign."
      }
    },
    {
      "id": "smartlead_ai.list_campaign_leads",
      "service": "smartlead_ai",
      "name": "list_campaign_leads",
      "description": "List Smartlead leads in a campaign with optional status and engagement filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "integer",
            "minimum": 1,
            "description": "The Smartlead campaign identifier."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "The pagination offset."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "The number of leads to return, from 1 to 100."
          },
          "status": {
            "type": "string",
            "enum": [
              "STARTED",
              "INPROGRESS",
              "COMPLETED",
              "PAUSED",
              "STOPPED"
            ],
            "description": "The Smartlead campaign lead status."
          },
          "lead_category_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Only return leads in this Smartlead lead category."
          },
          "emailStatus": {
            "type": "string",
            "enum": [
              "is_opened",
              "is_clicked",
              "is_replied",
              "is_bounced",
              "is_unsubscribed",
              "is_spam",
              "is_accepted",
              "not_replied",
              "is_sender_bounced"
            ],
            "description": "The Smartlead lead email engagement status."
          },
          "created_at_gt": {
            "type": "string",
            "description": "Only return leads created after this timestamp.",
            "format": "date-time"
          },
          "last_sent_time_gt": {
            "type": "string",
            "description": "Only return leads last sent after this timestamp.",
            "format": "date-time"
          },
          "event_time_gt": {
            "type": "string",
            "description": "Only return leads with events after this timestamp.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "campaign_id"
        ],
        "description": "The input payload for listing Smartlead campaign leads."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "total_leads": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The total number of matching leads when provided."
              },
              {
                "type": "null"
              }
            ]
          },
          "offset": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The offset returned by Smartlead."
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The limit returned by Smartlead."
              },
              {
                "type": "null"
              }
            ]
          },
          "leads": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "campaign_lead_map_id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The Smartlead campaign-lead mapping identifier."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lead_category_id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The Smartlead lead category identifier."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The lead status in the campaign."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The datetime when the lead was added to the campaign."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lead": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "description": "The Smartlead lead identifier."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "email": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The lead email address."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "first_name": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The lead first name."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "last_name": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The lead last name."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "phone_number": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The lead phone number."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "company_name": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The lead company name."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "website": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The lead website."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "location": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The lead location."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "linkedin_profile": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The lead LinkedIn profile URL."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "company_url": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The lead company URL."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "custom_fields": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {},
                              "additionalProperties": true,
                              "description": "Custom fields attached to the lead."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "is_unsubscribed": {
                          "anyOf": [
                            {
                              "type": "boolean",
                              "description": "Whether the lead is globally unsubscribed."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": true,
                      "description": "A Smartlead lead contact."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw campaign lead object returned by Smartlead."
                }
              },
              "additionalProperties": true,
              "description": "A Smartlead lead inside a campaign."
            },
            "description": "The Smartlead campaign leads returned by the API."
          },
          "raw": {
            "description": "The raw response returned by Smartlead."
          }
        },
        "additionalProperties": false,
        "description": "The response returned when listing Smartlead campaign leads."
      }
    },
    {
      "id": "smartlead_ai.list_campaigns",
      "service": "smartlead_ai",
      "name": "list_campaigns",
      "description": "List Smartlead campaigns with optional client and tag filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Only return campaigns for this Smartlead client identifier."
          },
          "include_tags": {
            "type": "boolean",
            "description": "Whether to include campaign tags in each campaign."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Smartlead campaigns."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "campaigns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The Smartlead campaign identifier."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The campaign name."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The campaign status returned by Smartlead."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The datetime when the campaign was created."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The datetime when the campaign was last updated."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "client_id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The associated client identifier when present."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "tag_id": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "description": "The Smartlead tag identifier."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tag_name": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The Smartlead tag name."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tag_color": {
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "The Smartlead tag color."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": true,
                    "description": "A Smartlead campaign tag."
                  },
                  "description": "The campaign tags when requested."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw campaign object returned by Smartlead."
                }
              },
              "additionalProperties": true,
              "description": "A Smartlead campaign."
            },
            "description": "The Smartlead campaigns returned by the API."
          },
          "raw": {
            "description": "The raw response returned by Smartlead."
          }
        },
        "additionalProperties": false,
        "description": "The response returned when listing Smartlead campaigns."
      }
    },
    {
      "id": "smartlead_ai.list_email_accounts",
      "service": "smartlead_ai",
      "name": "list_email_accounts",
      "description": "List Smartlead email accounts with optional connection and warmup filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "The pagination offset."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "The number of accounts to return, from 1 to 100."
          },
          "isInUse": {
            "type": "string",
            "enum": [
              "true",
              "false"
            ],
            "description": "A boolean query value represented as a string."
          },
          "emailWarmupStatus": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ],
            "description": "The Smartlead email warmup status filter."
          },
          "isSmtpSuccess": {
            "type": "string",
            "enum": [
              "true",
              "false"
            ],
            "description": "A boolean query value represented as a string."
          },
          "isWarmupBlocked": {
            "type": "string",
            "enum": [
              "true",
              "false"
            ],
            "description": "A boolean query value represented as a string."
          },
          "esp": {
            "type": "string",
            "enum": [
              "GMAIL",
              "OUTLOOK",
              "SMTP"
            ],
            "description": "The Smartlead email service provider filter."
          },
          "username": {
            "type": "string",
            "minLength": 1,
            "description": "Filter email accounts by username with partial matching."
          },
          "client_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Only return email accounts for this Smartlead client."
          },
          "fetch_campaigns": {
            "type": "string",
            "enum": [
              "true",
              "false"
            ],
            "description": "A boolean query value represented as a string."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Smartlead email accounts."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "email_accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The Smartlead email account identifier."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "from_name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The display name used for outgoing emails."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "from_email": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The sending email address."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "username": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The email account username."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The email account type returned by Smartlead."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "client_id": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The associated client identifier when present."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "campaign_count": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The number of campaigns using this account."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_smtp_success": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "description": "Whether SMTP connectivity is successful."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warmup_details": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "The warmup details returned by Smartlead."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw email account object returned by Smartlead."
                }
              },
              "additionalProperties": true,
              "description": "A Smartlead email account."
            },
            "description": "The Smartlead email accounts returned by the API."
          },
          "raw": {
            "description": "The raw response returned by Smartlead."
          }
        },
        "additionalProperties": false,
        "description": "The response returned when listing Smartlead email accounts."
      }
    }
  ]
}
