### GET /leads/{email} Source: https://help.smartlead.ai/a0d223bdd3154a77b3735497aad9419f Fetches lead data based on their email address. ```APIDOC ## GET /leads/{email} ### Description Fetches a lead's data using the email address. ### Method GET ### Endpoint /leads/{email} ### Parameters #### Path Parameters - **email** (string) - Required - The email address of the lead. ### Response #### Success Response (200) - **lead** (object) - Lead data schema. #### Response Example { "id": "lead_999", "email": "lead@example.com", "name": "John Doe" } ``` -------------------------------- ### Example Email Sent Webhook Response (JSON) Source: https://help.smartlead.ai/Email-Sent-d178e38d71a24e24a92383b7222d46c2?pvs=25 This is an example of a complete webhook response for the 'EMAIL_SENT' event, demonstrating the actual data that might be received. ```json { "campaign_status": "COMPLETED", "client_id": 111, "stats_id": "id", "from_email": "sample@test.com", "to_email": "test@gmail.com", "to_name": "David Carroll", "time_sent": "2023-09-25T17:27:27.234+00:00", "event_timestamp": "2023-09-25T17:27:27.234+00:00", "campaign_name": "OR Tracker", "campaign_id": 111, "sequence_number": 1, "custom_subject": "OR", "custom_email_message": "
Opening
", "sent_message_body": "
Opening
", "sent_message": { "message_id": "", "html": "
Opening
", "text": "Opening", "time": "2023-09-25T17:27:27.234+00:00" }, "subject": "OR", "message_id": "", "secret_key": "secret key", "app_url": "https://app.smartlead.ai/app/master-inbox", "ui_master_inbox_link": "https://app.smartlead.ai/app/master-inbox", "description": "Email 1 sent to test@gmail.com for campaign - OR Tracker", "metadata": { "webhook_created_at": "2023-09-26T10:19:49.535Z" }, "webhook_url": "https://webhook.site/5168fasf-0sss-465a-8114-1111da474a77", "webhook_id": 111, "webhook_name": "Testing new webhooks", "event_type": "EMAIL_SENT" } ``` -------------------------------- ### GET /campaigns Source: https://help.smartlead.ai/a0d223bdd3154a77b3735497aad9419f Retrieves a list of all campaigns associated with the authenticated account. ```APIDOC ## GET /campaigns ### Description Fetches all the campaigns in your account. ### Method GET ### Endpoint https://server.smartlead.ai/api/v1/campaigns ### Parameters #### Query Parameters - **api_key** (string) - Required - Your unique API key ### Response #### Success Response (200) - **campaigns** (array) - List of campaign objects #### Response Example [ { "id": "12345", "name": "Campaign A" }, { "id": "67890", "name": "Campaign B" } ] ``` -------------------------------- ### GET /campaigns Source: https://help.smartlead.ai/API-Documentation-a0d223bdd3154a77b3735497aad9419f?pvs=25 Lists all campaigns in your account. This endpoint provides an overview of all your active and inactive campaigns. ```APIDOC ## List all Campaigns ### Description This endpoint fetches all the campaigns in your account. ### Method GET ### Endpoint `/campaigns` ### Request Example ```bash curl -X GET https://server.smartlead.ai/api/v1/campaigns?api_key=yourApiKey ``` ### Response #### Success Response (200) - **campaigns** (array) - An array of JSON objects, each representing an email campaign. #### Response Example ```json [ { "id": "cmp_12345", "name": "Summer Sale Campaign", "status": "active" }, { "id": "cmp_67890", "name": "New Product Launch", "status": "draft" } ] ``` ``` -------------------------------- ### GET /campaigns/{campaign_id} Source: https://help.smartlead.ai/a0d223bdd3154a77b3735497aad9419f Fetches detailed information about a specific campaign using its unique identifier. ```APIDOC ## GET /campaigns/{campaign_id} ### Description Fetches a campaign based on its unique ID. ### Method GET ### Endpoint https://server.smartlead.ai/api/v1/campaigns/{campaign_id} ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The ID of the campaign to fetch #### Query Parameters - **api_key** (string) - Required - Your unique API key ### Response #### Success Response (200) - **campaign** (object) - The campaign data object #### Response Example { "id": "12345", "name": "Outreach Campaign", "status": "active" } ``` -------------------------------- ### GET /campaigns/{campaign_id}/sequence Source: https://help.smartlead.ai/API-Documentation-a0d223bdd3154a77b3735497aad9419f?pvs=25 Fetches the sequence data for a specific campaign. This includes the steps and content of the outreach sequence. ```APIDOC ## Fetch Campaign Sequence By Campaign ID ### Description This endpoint fetches a campaign’s sequence data. ### Method GET ### Endpoint `/campaigns/{campaign_id}/sequence` ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The ID of the campaign whose sequence data you want to fetch. ### Request Example ```bash curl -X GET https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/sequence?api_key=yourApiKey ``` ### Response #### Success Response (200) - **campaign_sequence** (object) - JSON object containing the campaign's sequence data. #### Response Example ```json { "steps": [ { "step_number": 1, "type": "email", "subject": "Welcome!", "body": "Hello {{first_name}}, Welcome to our service!" } ] } ``` ``` -------------------------------- ### LINK_CLICKED Event Payload Source: https://help.smartlead.ai/Event-s-Include-a8959d234e984b63b25bb9f6fed28539?pvs=25 Details the JSON structure for the LINK_CLICKED webhook event. ```APIDOC ## LINK_CLICKED Event ### Description This event is triggered when a recipient clicks a link within an email. ### Method POST ### Endpoint `/webhook/link_clicked` (Example - actual endpoint may vary) ### Request Body - **from_email** (string) - The mailbox used to send the email. - **to_email** (string) - The email address of the recipient. - **to_name** (string) - The name of the recipient. - **time_clicked** (string) - The timestamp when the link was clicked (ISO 8601 format). - **link_clicked** (string) - The URL of the link that was clicked. - **campaign_name** (string) - The name of the campaign. - **campaign_id** (string) - The unique identifier for the campaign. ### Request Example ```json { "from_email": "sender@example.com", "to_email": "recipient@example.com", "to_name": "Recipient Name", "time_clicked": "2023-10-27T10:15:00Z", "link_clicked": "https://example.com/product", "campaign_name": "Product Launch", "campaign_id": "camp_44556" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the webhook reception (e.g., "success"). #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### GET /campaigns/{id}/email-accounts Source: https://help.smartlead.ai/a0d223bdd3154a77b3735497aad9419f Fetches all email accounts associated with a specific campaign. ```APIDOC ## GET /campaigns/{id}/email-accounts ### Description Fetches all the email accounts used for sending emails to leads in the specified campaign. ### Method GET ### Endpoint /campaigns/{id}/email-accounts ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the campaign. ### Response #### Success Response (200) - **email_accounts** (array) - List of email_account objects. #### Response Example [ { "id": "acc_123", "email": "test@example.com" } ] ``` -------------------------------- ### EMAIL_OPENED Event Payload Source: https://help.smartlead.ai/Event-s-Include-a8959d234e984b63b25bb9f6fed28539?pvs=25 Details the JSON structure for the EMAIL_OPENED webhook event. ```APIDOC ## EMAIL_OPENED Event ### Description This event is triggered when a recipient opens an email. ### Method POST ### Endpoint `/webhook/email_opened` (Example - actual endpoint may vary) ### Request Body - **from_email** (string) - The mailbox used to send the email. - **to_email** (string) - The email address of the recipient. - **to_name** (string) - The name of the recipient. - **time_opened** (string) - The timestamp when the email was opened (ISO 8601 format). - **campaign_name** (string) - The name of the campaign. - **campaign_id** (string) - The unique identifier for the campaign. ### Request Example ```json { "from_email": "sender@example.com", "to_email": "recipient@example.com", "to_name": "Recipient Name", "time_opened": "2023-10-27T10:00:00Z", "campaign_name": "Summer Promotion", "campaign_id": "camp_12345" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the webhook reception (e.g., "success"). #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### EMAIL_REPLIED Event Payload Source: https://help.smartlead.ai/Event-s-Include-a8959d234e984b63b25bb9f6fed28539?pvs=25 Details the JSON structure for the EMAIL_REPLIED webhook event. ```APIDOC ## EMAIL_REPLIED Event ### Description This event is triggered when a recipient replies to an email. ### Method POST ### Endpoint `/webhook/email_replied` (Example - actual endpoint may vary) ### Request Body - **event_type** (string) - The type of event, fixed to "EMAIL_REPLY". - **subject** (string) - The subject line of the reply. - **from_email** (string) - The mailbox used to send the original email. - **to_email** (string) - The email address of the recipient who replied. - **to_name** (string) - The name of the recipient. - **time_replied** (string) - The timestamp when the email was replied to (ISO 8601 format). - **reply_body** (string) - The full content of the reply (can be HTML). - **preview_text** (string) - The plain text version of the latest reply. - **campaign_name** (string) - The name of the campaign. - **campaign_id** (string) - The unique identifier for the campaign. - **sequence_number** (integer) - The sequence number of the email in the campaign that triggered this event. ### Request Example ```json { "event_type": "EMAIL_REPLY", "subject": "Re: Your Inquiry", "from_email": "sender@example.com", "to_email": "recipient@example.com", "to_name": "Recipient Name", "time_replied": "2023-10-27T11:30:00Z", "reply_body": "

Thank you for your email. We will get back to you shortly.

", "preview_text": "Thank you for your email. We will get back to you shortly.", "campaign_name": "Follow-up Series", "campaign_id": "camp_11223", "sequence_number": 3 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the webhook reception (e.g., "success"). #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### GET /campaigns/{campaign_id}/email_accounts Source: https://help.smartlead.ai/API-Documentation-a0d223bdd3154a77b3735497aad9419f?pvs=25 Lists all email accounts associated with a specific campaign. This helps in managing which email addresses are used for sending. ```APIDOC ## List all email accounts per campaign ### Description This endpoint fetches all the email accounts used for sending emails to leads in the campaign. ### Method GET ### Endpoint `/campaigns/{campaign_id}/email_accounts` ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The ID of the campaign. ### Request Example ```bash curl -X GET https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/email_accounts?api_key=yourApiKey ``` ### Response #### Success Response (200) - **email_accounts** (array) - An array of JSON objects, each representing an email account. #### Response Example ```json [ { "id": "email_acc_abc", "email_address": "sender1@example.com", "provider": "gmail" }, { "id": "email_acc_def", "email_address": "sender2@example.com", "provider": "outlook" } ] ``` ``` -------------------------------- ### EMAIL_SENT Event Payload Source: https://help.smartlead.ai/Event-s-Include-a8959d234e984b63b25bb9f6fed28539?pvs=25 Details the JSON structure for the EMAIL_SENT webhook event. ```APIDOC ## EMAIL_SENT Event ### Description This event is triggered when an email is successfully sent to a recipient. ### Method POST ### Endpoint `/webhook/email_sent` (Example - actual endpoint may vary) ### Request Body - **from_email** (string) - The mailbox used to send the email. - **to_email** (string) - The email address of the recipient. - **to_name** (string) - The name of the recipient. - **time_sent** (string) - The timestamp when the email was sent (ISO 8601 format). - **campaign_name** (string) - The name of the campaign. - **campaign_id** (string) - The unique identifier for the campaign. ### Request Example ```json { "from_email": "sender@example.com", "to_email": "recipient@example.com", "to_name": "Recipient Name", "time_sent": "2023-10-27T09:55:00Z", "campaign_name": "Welcome Series", "campaign_id": "camp_67890" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the webhook reception (e.g., "success"). #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### GET /campaigns/{campaign_id} Source: https://help.smartlead.ai/API-Documentation-a0d223bdd3154a77b3735497aad9419f?pvs=25 Fetches a specific campaign by its ID. This endpoint allows you to retrieve detailed information about a single campaign. ```APIDOC ## Get Campaign By Id ### Description This endpoint fetches a campaign based on its id. ### Method GET ### Endpoint `/campaigns/{campaign_id}` ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The ID of the campaign you want to fetch. ### Request Example ```bash curl -X GET https://server.smartlead.ai/api/v1/campaigns/{campaign_id}?api_key=yourApiKey ``` ### Response #### Success Response (200) - **campaign** (object) - JSON object containing campaign details. #### Response Example ```json { "id": "cmp_12345", "name": "Summer Sale Campaign", "status": "active", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:30:00Z" } ``` ``` -------------------------------- ### Webhook Events Overview Source: https://help.smartlead.ai/Event-s-Include-a8959d234e984b63b25bb9f6fed28539?pvs=25 Smartlead webhooks send JSON payloads for various email campaign events. Each event includes specific data relevant to its occurrence. ```APIDOC ## Webhook Events Overview Smartlead webhooks provide real-time notifications for various email campaign activities. The following events are supported: ### Supported Events * **Email sent**: Triggered when an email is successfully sent. * **Email opened**: Triggered when a recipient opens an email. * **Email replied**: Triggered when a recipient replies to an email. * **Link clicked**: Triggered when a recipient clicks a link within an email. * **Lead unsubscribed**: Triggered when a lead opts out of receiving emails. * **Campaign completed**: Triggered when a campaign reaches its conclusion. * **Category updated**: Triggered when a lead's category is updated. ``` -------------------------------- ### POST /campaigns Source: https://help.smartlead.ai/a0d223bdd3154a77b3735497aad9419f Creates a new outreach campaign within the Smartlead account. ```APIDOC ## POST /campaigns ### Description Creates a new campaign. ### Method POST ### Endpoint https://server.smartlead.ai/api/v1/campaigns ### Parameters #### Query Parameters - **api_key** (string) - Required - Your unique API key #### Request Body - **name** (string) - Required - Name of the campaign ### Response #### Success Response (200) - **id** (string) - The ID of the newly created campaign #### Response Example { "id": "67890", "status": "created" } ``` -------------------------------- ### POST /campaigns Source: https://help.smartlead.ai/API-Documentation-a0d223bdd3154a77b3735497aad9419f?pvs=25 Creates a new campaign. This endpoint allows you to set up a new outreach sequence. ```APIDOC ## Create Campaign ### Description This endpoint creates a campaign. ### Method POST ### Endpoint `/campaigns` ### Parameters #### Request Body - **name** (string) - Required - The name of the campaign. - **settings** (object) - Optional - Campaign settings. ### Request Example ```json { "name": "New Product Launch", "settings": { "send_interval": 60, "time_zone": "UTC" } } ``` ### Response #### Success Response (200) - **campaign** (object) - JSON object representing the newly created campaign. #### Response Example ```json { "id": "cmp_67890", "name": "New Product Launch", "status": "draft", "created_at": "2023-10-27T11:00:00Z", "updated_at": "2023-10-27T11:00:00Z" } ``` ``` -------------------------------- ### Smartlead API Authentication Source: https://help.smartlead.ai/API-Documentation-a0d223bdd3154a77b3735497aad9419f?pvs=25 Learn how to obtain and use your API key for authenticating requests to the Smartlead API. All API requests must include your API key as a query parameter. ```APIDOC ## Authentication ### Step 1: Obtain API Key Head to your settings section in the Smartlead application and click the “Activate API button”. ### Step 2: API Key Usage Your API key will be provided in the settings section if your plan has API access. Attach this key as a query parameter to all API requests. ### Base URL All API endpoints are located at: `https://server.smartlead.ai/api/v1` ### Example Authentication `https://server.smartlead.ai/api/v1?api_key=yourApiKey` ### Rate Limits Your API key is rate limited to 10 requests every 2 seconds. ``` -------------------------------- ### POST /campaigns/{campaign_id}/settings Source: https://help.smartlead.ai/API-Documentation-a0d223bdd3154a77b3735497aad9419f?pvs=25 Updates the general settings for a campaign. This includes various configuration options. ```APIDOC ## Update Campaign General Settings ### Description This endpoint updates a campaign’s general settings. ### Method POST ### Endpoint `/campaigns/{campaign_id}/settings` ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The ID of the campaign to update. #### Request Body - **setting_name** (string) - Required - The name of the setting to update. - **setting_value** (any) - Required - The new value for the setting. ### Request Example ```json { "setting_name": "max_emails_per_day", "setting_value": 100 } ``` ### Response #### Success Response (200) - **campaign** (object) - JSON object representing the updated campaign. #### Response Example ```json { "id": "cmp_12345", "name": "Summer Sale Campaign", "max_emails_per_day": 100 } ``` #### Error Response (400) - **message** (string) - Error message indicating a bad request. ``` -------------------------------- ### POST /master-inbox/reply Source: https://help.smartlead.ai/a0d223bdd3154a77b3735497aad9419f Allows replying to a lead via the Master Inbox. ```APIDOC ## POST /master-inbox/reply ### Description Allows you to reply to a lead using the Master Inbox API. ### Method POST ### Endpoint /master-inbox/reply ### Request Body - **lead_id** (string) - Required - ID of the lead. - **message** (string) - Required - The reply content. ### Response #### Success Response (200) - **status** (string) - Success message. ``` -------------------------------- ### Manual Step Reached Webhook Source: https://help.smartlead.ai/Manual-Step-Reached-99aa4a20e2e247c3865f53f11c1a4b20?pvs=25 This endpoint is triggered when a lead reaches a manual step in a Smartlead campaign. It provides detailed information about the lead, campaign, and webhook event. ```APIDOC ## POST /webhooks/manual_step_reached ### Description This webhook is triggered when a lead reaches a manual step within a Smartlead campaign. It provides comprehensive details about the lead, the campaign they are in, and specific information related to the webhook event itself. ### Method POST ### Endpoint `/webhooks/manual_step_reached` ### Parameters #### Query Parameters None #### Request Body This endpoint does not expect a request body from the client. It is designed to send data *to* the client's configured webhook URL. ### Request Example None (This is a webhook, data is sent *to* your endpoint) ### Response #### Success Response (200) This endpoint does not return a response in the traditional sense, as it is a webhook that sends data. However, the receiving endpoint should ideally return a 200 OK status to acknowledge receipt. - **lead_name** (string) - Name of the lead - **lead_id** (string) - ID of the lead - **lead_email** (string) - Email of the lead - **sent_message_ids** (array of strings) - Array of all the sent message IDs - **campaign_status** (string) - Current status of the campaign - **campaign_name** (string) - Name of the campaign - **client_id** (string or null) - ID of the client the campaign belongs to - **campaign_id** (integer) - ID of the campaign - **current_sequence_number** (integer) - The sequence number this lead is on for the campaign - **secret_key** (string) - Your security key to verify requests - **app_url** (string) - URL to the campaign within the Smartlead app - **description** (string) - Full description of the event - **metadata** (object) - Contains additional metadata about the event - **webhook_created_at** (string) - Timestamp indicating when this webhook was created - **webhook_url** (string) - The configured endpoint URL for this webhook - **webhook_id** (integer) - Smartlead allocated ID for this webhook - **webhook_name** (string) - The name given to this webhook - **event_type** (string) - The type of event that occurred (e.g., "MANUAL_STEP_REACHED") #### Response Example ```json { "lead_name": "sukhvir 02 \n Kaur", "lead_id": "138084", "lead_email": "sukhvir.kau@batchservice.com", "sent_message_ids": [ "" ], "campaign_status": "ACTIVE", "campaign_name": "test56778", "client_id": null, "campaign_id": 353, "current_sequence_number": 1, "secret_key": "e0207d40-84ef-4ad6-89eb-7dbff8c0138d", "app_url": "https://app.smartlead.ai/app/email-campaign/353/lead-list", "description": "Manual step reached for Campaign - test56778 and lead email - sukhvir.kau@batchservice.com", "metadata": { "webhook_created_at": "2024-04-12T13:51:26.269Z" }, "webhook_url": "https://webhook.site/05076ec5-99ab-4277-b223-293df0b402e9", "webhook_id": 94, "webhook_name": "test", "event_type": "MANUAL_STEP_REACHED" } ``` ``` -------------------------------- ### Email Opened Webhook Event Source: https://help.smartlead.ai/Email-Opened-466fc579d2d942a688d52ec51b6e0ae6?pvs=25 This section details the structure of the response received when an email is opened, including all relevant fields and their descriptions. ```APIDOC ## Email Opened Webhook Event ### Description This endpoint provides details about when an email associated with a Smartlead campaign is opened by a recipient. It includes information about the webhook, the event, the recipient, and the campaign. ### Method POST ### Endpoint `/websites/help_smartlead_ai/email_opened` (Example - actual endpoint may vary) ### Parameters #### Query Parameters - **secret_key** (string) - Required - The secret key to identify the webhook is from Smartlead. #### Request Body - **webhook_id** (integer) - Unique identifier for the webhook. - **webhook_name** (string) - Name of the webhook. - **webhook_url** (string) - The URL that the event data will be posted to. - **stats_id** (integer) - ID of the event. - **event_type** (string) - Type of the event (e.g., 'email_opened'). - **event_timestamp** (string) - The time the event occurred (ISO 8601 format). - **from_email** (string) - Mailbox used to send the email. - **to_email** (string) - Lead's email address. - **to_name** (string) - Lead's name. - **subject** (string) - Subject of the email sent. - **campaign_id** (string) - Campaign ID for personal identification. - **campaign_name** (string) - Name of the campaign this event belongs to. - **campaign_status** (string) - Status of the campaign. - **sequence_number** (integer) - The sequence number that triggered this event. - **sent_message** (object) - Details about the message sent. - **message_id** (string) - Unique ID of the exact message sent. - **html** (string) - Body of the message sent (HTML format). - **text** (string) - Copy of the message in plain text. - **time** (string) - Time the email was sent. - **client_id** (string) - ID of the client attached to the campaign, if applicable. - **app_url** (string) - Link to the actual reply or interaction. - **description** (string) - An optional description of what the webhook is used for. - **metadata** (object) - Set of key-value pairs for additional information. - **webhook_created_at** (string) - The date and time the webhook was created. ### Request Example ```json { "webhook_id": 12345, "webhook_name": "My Opened Email Webhook", "webhook_url": "https://example.com/my_webhook_handler", "stats_id": 67890, "event_type": "email_opened", "event_timestamp": "2023-10-27T10:30:00Z", "from_email": "sender@example.com", "to_email": "lead@example.com", "to_name": "Lead Name", "subject": "Follow-up on our discussion", "campaign_id": "camp_abc123", "campaign_name": "Q4 Outreach", "campaign_status": "active", "sequence_number": 2, "sent_message": { "message_id": "msg_xyz789", "html": "

Hello Lead Name,

", "text": "Hello Lead Name,\n", "time": "2023-10-27T09:00:00Z", "client_id": "client_456" }, "app_url": "https://app.smartlead.ai/reply/123", "description": "Track opens for my main campaign.", "metadata": { "user_id": "user_001" }, "webhook_created_at": "2023-10-26T15:00:00Z" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the webhook reception (e.g., 'success'). - **message** (string) - A confirmation message. #### Response Example ```json { "status": "success", "message": "Webhook received and processed successfully." } ``` ### Deprecated Fields - **time_opened**: Deprecated, use `event_timestamp` instead. - **sent_message_body**: Deprecated, use `sent_message.html` instead. - **ui_master_inbox_link**: Deprecated, use `app_url` instead. ``` -------------------------------- ### Lead Unsubscribed Event JSON Structure Source: https://help.smartlead.ai/Event-s-Include-a8959d234e984b63b25bb9f6fed28539?pvs=25 Defines the JSON payload structure for the 'Lead unsubscribed' event. It includes the email of the unsubscribed lead and campaign information. ```json { "lead_email": "", "campaign_name": "", "campaign_id": "" } ``` -------------------------------- ### POST /campaigns/email-accounts Source: https://help.smartlead.ai/API-Documentation-a0d223bdd3154a77b3735497aad9419f?pvs=25 Adds an existing email account to a specified campaign to enable automated outreach. ```APIDOC ## POST /campaigns/email-accounts ### Description This endpoint allows you to link an email account to a campaign for outreach purposes. ### Method POST ### Endpoint /campaigns/email-accounts ### Parameters #### Request Body - **campaign_id** (string) - Required - The unique identifier of the campaign. - **email_account_id** (string) - Required - The unique identifier of the email account to be added. ### Request Example { "campaign_id": "cmp_12345", "email_account_id": "acc_67890" } ### Response #### Success Response (200) - **status** (string) - The result of the operation (e.g., "success"). - **message** (string) - A confirmation message. #### Response Example { "status": "success", "message": "Email account added to campaign successfully." } ``` -------------------------------- ### Category Updated Event JSON Structure Source: https://help.smartlead.ai/Event-s-Include-a8959d234e984b63b25bb9f6fed28539?pvs=25 Defines the JSON payload structure for the 'Category updated' event. It includes lead details, the new category, and campaign information. ```json { "lead_email": "ramesh@five2one.com.au", "lead_name": "Ramesh", "category": "Interested", "lead_category_id": 1, "campaign_name": "GOauth Testing 1", "campaign_id": 750 } ``` -------------------------------- ### POST /campaigns/{campaign_id}/sequence Source: https://help.smartlead.ai/API-Documentation-a0d223bdd3154a77b3735497aad9419f?pvs=25 Saves or updates the sequence for a campaign. This allows you to define the steps of your email outreach. ```APIDOC ## Save Campaign Sequence ### Description This endpoint saves a sequence within a campaign. ### Method POST ### Endpoint `/campaigns/{campaign_id}/sequence` ### Parameters #### Path Parameters - **campaign_id** (string) - Required - The ID of the campaign to save the sequence for. #### Request Body - **sequence** (array) - Required - An array of sequence step objects. - **type** (string) - Required - Type of step (e.g., 'email'). - **subject** (string) - Optional - Email subject. - **body** (string) - Optional - Email body. ### Request Example ```json { "sequence": [ { "type": "email", "subject": "Follow Up", "body": "Just checking in." } ] } ``` ### Response #### Success Response (200) - **message** (string) - Success message indicating the sequence was saved. #### Response Example ```json { "message": "Campaign sequence saved successfully." } ``` #### Error Response (404) - **message** (string) - Error message indicating the campaign was not found. ``` -------------------------------- ### Email Sent Event JSON Structure Source: https://help.smartlead.ai/Event-s-Include-a8959d234e984b63b25bb9f6fed28539?pvs=25 Defines the JSON payload structure for the 'Email sent' event. It includes details about the sender, recipient, time of sending, and campaign information. ```json { "from_email": "", "to_email": "", "to_name": "", "time_sent": "