Connect Codex to Lemlist
Set up in minutes
Choose where it runs
On your computer through your own Codex, or hosted in the cloud. The rest of setup adapts to your choice:
Pick what it can do in Lemlist
A preset of real Lemlist operations. Each one becomes a tool the agent can call, and it can't touch anything outside the list.
Connect Lemlist
One sign-in. The agent acts through your account, scoped to the operations you picked.
Add your personal MCP link
The last step mints a private MCP URL for this agent and walks you through exactly this, with your real link filled in. The page flips to Connected the moment your Codex first calls in. Codex connects when a session starts — run codex, or restart a running one (in the Codex app, Restart).
Run this in your terminal. The Codex app shares its config, so it gets the server too
<your-link> is your personal server URL — setup mints it for you.
Tools Codex gets
Lemlist
176 toolsCreates a new lead and adds it to a specific campaign. Never updates an existing lead. (POST /campaigns/{campaignId}/leads/).
Enriches data by finding emails, phone numbers, or LinkedIn information from various inputs. (POST /enrich).
Searches the people database using filters, keywords, and pagination. (POST /database/people).
Creates a webhook that receives real-time POST callbacks for selected events. (POST /hooks).
Retrieves a specific lead by their email address. (GET /leads/{email}).
Retrieves information about your team. (GET /team).
Retrieves a list of all team members and their associated campaigns. (GET /team/senders).
Retrieves the remaining credits balance for your team's account. (GET /team/credits).
Retrieves all information for a specific user by their ID. (GET /users/{userId}).
Retrieves the connected channels (email, LinkedIn, WhatsApp) and their availability for the authenticated user. (GET /user/channels).
Connects a new SMTP/IMAP email account to your team. (POST /user/email-accounts).
Disconnects an email account from your team. (DELETE /user/email-accounts/{emailAccountId}).
Tests the SMTP and IMAP connection of an email account. (POST /user/email-accounts/{emailAccountId}/test).
Creates a new campaign with auto-generated sequence and schedule. (POST /campaigns).
Retrieves detailed information about a specific campaign by ID. (GET /campaigns/{campaignId}).
Retrieves a paginated list of all campaigns in your team. (GET /campaigns).
Updates the settings and configuration of an existing campaign. (PATCH /campaigns/{campaignId}).
Retrieves validation statutes for a campaign, including errors that block launching and warnings about daily limits, DNS issues, etc. (GET /campaigns/{campaignId}/statutes).
Starts or resumes a paused campaign. (POST /campaigns/{campaignId}/start).
Pauses a running campaign without affecting scheduled leads. (POST /campaigns/{campaignId}/pause).
Skips one step of a running campaign for every lead. (POST /campaigns/{campaignId}/steps/{stepId}/skip).
Duplicates an existing campaign with all its sequences, schedules, and templates. (POST /campaigns/{campaignId}/duplicate).
Retrieves performance statistics for a specific campaign. (GET /v2/campaigns/{campaignId}/stats).
Retrieves performance statistics for multiple campaigns in a single request. (POST /v2/campaigns/stats/batch).
Initiates an asynchronous export of campaign statistics to a CSV file. (GET /campaigns/{campaignId}/export/start).
Checks the status of an asynchronous campaign export. (GET /campaigns/{campaignId}/export/{exportId}/status).
Configures email notification delivery when a campaign export completes. (PUT /campaigns/{campaignId}/export/{exportId}/email/{email}).
Exports leads from a campaign with flexible filtering and format options. (GET /v2/campaigns/{campaignId}/export/leads).
Exports leads from a campaign with flexible filtering and format options. (GET /campaigns/{campaignId}/export/leads).
Retrieves aggregated reports and statistics for one or multiple campaigns. (GET /campaigns/reports).
Retrieves all sequences and their steps for a specific campaign. (GET /campaigns/{campaignId}/sequences).
Creates a step or condition within a campaign sequence. (POST /sequences/{sequenceId}/steps).
Updates an existing step within a sequence. (PATCH /sequences/{sequenceId}/steps/{stepId}).
Deletes a specific step from a sequence. (DELETE /sequences/{sequenceId}/steps/{stepId}).
Lists the branches of a condition step, in execution order. (GET /sequences/{sequenceId}/steps/{stepId}/branches).
Adds a branch to a condition step and returns it. (POST /sequences/{sequenceId}/steps/{stepId}/branches).
Rewrites the execution priority of a condition step's branches. (PATCH /sequences/{sequenceId}/steps/{stepId}/branches).
Renames a branch and/or changes what it tests. (PATCH /sequences/{sequenceId}/steps/{stepId}/branches/{branchSequenceId}).
Removes a branch and the sub-tree behind it. (DELETE /sequences/{sequenceId}/steps/{stepId}/branches/{branchSequenceId}).
Creates variant B of an A/B test on a step, prefilled from variant A. (POST /sequences/{sequenceId}/steps/{stepId}/ab-test).
Returns variant B (subject, content, config) of the A/B test on a step. (GET /sequences/{sequenceId}/steps/{stepId}/ab-test).
Edits variant B content and config of the A/B test on a step. (PATCH /sequences/{sequenceId}/steps/{stepId}/ab-test).
Deletes a variant of the A/B test and ends the test. (DELETE /sequences/{sequenceId}/steps/{stepId}/ab-test).
Selects the winning A/B test variant, applied to all remaining leads. (POST /sequences/{sequenceId}/steps/{stepId}/ab-test/winner).
Lists the team's library message templates, newest first. (GET /message-templates).
Lists the distinct tags of the team's library message templates, alphabetically. (GET /message-templates/tags).
Returns one library message template with its body. (GET /message-templates/{templateId}).
Lists the team's snippets by name. (GET /snippets).
Returns one snippet with its content. (GET /snippets/{snippetId}).
Creates a new schedule with customizable timing and timezone settings. (POST /schedules).
Retrieves details of a specific schedule. (GET /schedules/{scheduleId}).
Retrieves all schedules for your team. (GET /schedules).
Updates an existing schedule's parameters. (PATCH /schedules/{scheduleId}).
Deletes a specific schedule. (DELETE /schedules/{scheduleId}).
Retrieves all schedules associated with a specific campaign. (GET /campaigns/{campaignId}/schedules/).
Associates a schedule with a campaign. (POST /campaigns/{campaignId}/schedules/{scheduleId}).
Retrieves leads from a specific campaign, optionally filtered by state. (GET /campaigns/{campaignId}/leads/).
Retrieves a lead using their email address or lead ID. (GET /leads).
Updates an existing lead's information in a specific campaign. (PATCH /campaigns/{campaignId}/leads/{leadId}).
Removes a lead from a campaign or unsubscribes it permanently. (DELETE /campaigns/{campaignId}/leads/{leadId}).
Adds new custom variables to a lead. (POST /leads/{leadId}/variables).
Updates the values of custom variables on a lead. (PATCH /leads/{leadId}/variables).
Erases the values of custom variables on a lead. (DELETE /leads/{leadId}/variables).
Unsubscribes a lead from a lemlist campaign. (DELETE /campaigns/{campaignId}/leads/{email}).
Pauses a lead's activity in all campaigns or a specific campaign. (POST /leads/pause/{leadId}).
Resumes a paused lead in all campaigns or a specific campaign. (POST /leads/start/{leadId}).
Manually launches (reviews) a single lead in its campaign. (POST /leads/review/{leadId}).
Marks a lead as interested across all campaigns. (POST /leads/interested/{leadIdOrEmail}).
Marks a lead as not interested across all campaigns. (POST /leads/notinterested/{leadIdOrEmail}).
Marks a lead as interested in a specific campaign. (POST /campaigns/{campaignId}/leads/{leadIdOrEmail}/interested).
Marks a lead as not interested in a specific campaign. (POST /campaigns/{campaignId}/leads/{leadIdOrEmail}/notinterested).
Skips one step of a running campaign for a single lead. (POST /campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/skip).
Personalizes the message of one campaign step for a single lead. (PUT /campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/personalization).
Removes a lead's personalization of one campaign step. (DELETE /campaigns/{campaignId}/leads/{leadIdOrEmail}/steps/{stepId}/personalization).
Links a campaign to a filter of your connected CRM and imports its records as leads, now and as the filter picks up new ones. (POST /campaigns/{campaignId}/leads/import).
Uploads an audio file for voice message steps in campaign sequences. (POST /leads/audio).
Creates a new company or updates an existing one based on domain or LinkedIn URL. (POST /companies).
Retrieves companies from your CRM. Use `idsOrDomains` to fetch specific companies by ID or domain in a single request (max 100), or omit it to get a paginated list of all companies. (GET /companies).
Deletes a lemlist company. Use `force=true` to detach attached contacts before deletion. (DELETE /companies/{companyId}).
Merges up to 10 lemlist companies into one survivor, moving everything attached to the deleted companies onto it. (POST /companies/merge).
Retrieves all company lists for the team, with optional name filtering. (GET /companies/lists).
Creates a new static company list. (POST /companies/lists).
Add companies to a static company list, or remove them with ?action=remove. (POST /companies/lists/{listId}/entities).
Creates a new note attached to a specific company. (POST /companies/{companyId}/notes).
Retrieves all notes associated with a specific company. (GET /companies/{companyId}/notes).
Creates a new contact or updates an existing one based on email or LinkedIn URL. (POST /contacts).
Retrieves a specific contact by their ID or email address. (GET /contacts/{idOrEmail}).
Retrieves contacts from your CRM. Use `idsOrEmails` to fetch specific contacts by ID or email in a single request (max 100), or omit it to search/list contacts by name, email, contact list, or campaign membership. (GET /contacts).
Deletes a lemlist contact by id or email. Cascades to leads, opportunities, lists, inbox and activities. (DELETE /contacts/{idOrEmail}).
Merges up to 10 lemlist contacts into one survivor, moving everything attached to the deleted contacts onto it. (POST /contacts/merge).
Retrieves all contact lists for the team, with optional name filtering. (GET /contacts/lists).
Creates a new static contact list. (POST /contacts/lists).
Add contacts to a static contact list, or remove them with ?action=remove. (POST /contacts/lists/{listId}/entities).
Exports contacts or companies from a CRM list as a CSV file. (GET /contacts/export).
Retrieves all inbox conversations for your team. (GET /inbox).
Retrieves all messages exchanged with a specific contact. (GET /inbox/{contactId}).
Sends an email to a contact through the lemlist inbox. Set replyToActivityId to reply within an existing thread (reuses the thread's subject and CC). (POST /inbox/email).
Sends a LinkedIn message to a contact through the lemlist inbox. (POST /inbox/linkedin).
Sends a WhatsApp message to a contact through the lemlist inbox. (POST /inbox/whatsapp).
Sends an SMS message to a contact through the lemlist inbox. (POST /inbox/sms).
List all labels available to your team. (GET /inbox/labels).
Get info of a specific label. (GET /inbox/labels/{labelId}).
Creates a new label available to the team. (POST /inbox/labels).
Attaches one or more labels to one or more conversations. (POST /inbox/conversations/labels/{contactId}).
Removes one or more labels from one conversation. (DELETE /inbox/conversations/labels/{contactId}).
Lists all non-deleted drafts for a specific contact. (GET /inbox/{contactId}/drafts).
Retrieves a single draft with its full content, including attachments. (GET /inbox/{contactId}/drafts/{draftId}).
Creates a new draft for a specific contact. The source is automatically set to "api". (POST /inbox/{contactId}/drafts).
Partially updates an existing draft. Only the provided fields will be updated. (PATCH /inbox/{contactId}/drafts/{draftId}).
Soft-deletes a draft by setting its deletedAt timestamp. (DELETE /inbox/{contactId}/drafts/{draftId}).
Create a manual task (opportunity) associated with a contact/company or lead. (POST /tasks).
Searches your team's tasks with the filters of the Tasks page, and returns every status. (GET /v2/tasks).
Lists every field you can use in the advancedFilters tree of Search Tasks. (GET /v2/tasks/filters).
Retrieves all pending tasks assigned to your team members. (GET /tasks).
Modifies aspects of an existing task including assignment, scheduling, and status. (PATCH /tasks).
Marks one or more tasks as ignored. (POST /tasks/ignore).
Retrieves the history of all campaign activities and steps performed (optionally filtered by activity type and campaign). (GET /activities).
Deletes the call recording and transcript associated with an activity. (DELETE /activities/{activityId}/recording-transcript).
Retrieves the team members whose CRM account is connected to lemlist. (GET /team/crmUsers).
Retrieves the filters of your team's connected CRM that leads can be imported from. (GET /crm/filters).
Retrieves a paginated list of all unsubscribed variables (emails, domains, LinkedIn URLs, phone numbers). (GET /v2/unsubscribes/variables).
Retrieves a specific unsubscribed variable by its value. (GET /v2/unsubscribes/variables/{value}).
Unsubscribes a single variable. Idempotent — returns the existing record if already unsubscribed. (POST /v2/unsubscribes/variables/{value}).
Unsubscribes up to 10,000 variables in a single request. (POST /v2/unsubscribes/variables).
Re-subscribes a variable, removing it from the unsubscribe list. (DELETE /v2/unsubscribes/variables/{value}).
Exports all unsubscribed variables as CSV (default) or JSON. (GET /v2/unsubscribes/exports/variables).
Checks whether a contact is unsubscribed (do-not-contact). (GET /v2/unsubscribes/contacts/{contactId}).
Marks a contact as unsubscribed (do-not-contact). (POST /v2/unsubscribes/contacts/{contactId}).
Re-subscribes a contact, removing the do-not-contact flag. (DELETE /v2/unsubscribes/contacts/{contactId}).
Exports all contacts with their subscription status as CSV (default) or JSON. (GET /v2/unsubscribes/exports/contacts).
Adds an email address or domain to your unsubscribe list. (POST /unsubscribes/{email}).
Retrieves unsubscribe information for a specific email address. (GET /unsubscribes/{email}).
Retrieves a list of all unsubscribed emails and domains. (GET /unsubscribes).
Removes an email address from your unsubscribe list. (DELETE /unsubscribes/{email}).
Exports all unsubscribed emails and domains to a CSV file. (GET /unsubs/export).
Deletes a specific webhook. (DELETE /hooks/{hookId}).
Retrieves all webhooks configured for your team. (GET /hooks).
Searches the companies database using filters, keywords, and pagination. (POST /database/companies).
Retrieves available filters for searching the people and companies database. (GET /database/filters).
Retrieves the People Database personas saved by your team. (GET /database/personas).
Creates a People Database persona for your team. (POST /database/personas).
Deletes a People Database persona. (DELETE /database/personas/{personaId}).
Starts an AI contact-sourcing run for one or more accounts. (POST /contact-sourcing).
Reads a contact-sourcing run by ID, or the latest run of an account. (GET /contact-sourcing).
Turns one contact-sourcing recommendation into a lemlist contact. (POST /contact-sourcing/contacts).
Performs batch enrichment for up to 500 entities to find emails, phone numbers, or LinkedIn data. (POST /v2/enrichments/bulk).
Enriches an existing lead in lemlist with additional data. (POST /leads/{leadId}/enrich).
Retrieves the results of a completed enrichment request. (GET /enrich/{enrichId}).
Lists the enrichment providers your team can place in a waterfall, for one enrichment type. (GET /v2/enrichments/providers).
Saves your own API key for an external enrichment provider, connecting it for your waterfalls. (PUT /v2/enrichments/providers/{providerId}/connection).
Removes the API key of an external enrichment provider; lemlist stops calling it on your account. (DELETE /v2/enrichments/providers/{providerId}/connection).
Lists your team's enrichment waterfalls — the default waterfall of each type, plus every custom waterfall. (GET /v2/enrichments/waterfalls).
Returns one enrichment waterfall of your team, default or custom. (GET /v2/enrichments/waterfalls/{waterfallId}).
Updates the name or provider order of an enrichment waterfall. (PATCH /v2/enrichments/waterfalls/{waterfallId}).
Hands a default enrichment waterfall back to lemlist, restoring its random provider order. (PUT /v2/enrichments/waterfalls/{waterfallId}/reset).
Starts lemwarm email deliverability improvement for a specific user mailbox. (POST /lemwarm/{userMailboxId}/start).
Pauses lemwarm email deliverability improvement for a specific user mailbox. (POST /lemwarm/{userMailboxId}/pause).
Retrieves lemwarm email deliverability settings for a specific user mailbox. (GET /lemwarm/{userMailboxId}/settings).
Updates lemwarm email deliverability settings for a specific user mailbox. (PATCH /lemwarm/{userMailboxId}/settings).
Retrieves your Signal Agents (watch lists) with pagination and optional filtering by signal type and status. (GET /watchlist).
Creates a new Signal Agent (watch list). (POST /watchlist).
Updates an existing Signal Agent (watch list). (PATCH /watchlist).
Deletes a Signal Agent (watch list). (DELETE /watchlist).
Retrieves the configuration history of a Signal Agent — each past config version with its active period and stats. (GET /watchlist/history).
Retrieves paginated signals detected by your Signal Agents with filtering and sorting capabilities. (GET /watchlist/signals).
Marks one or several signals as handled or ignored. (PUT /watchlist/signals).
Pushes a contact- or company-level external signal into a Signal Agent. (POST /watchlist/{watchListId}/external-signals).
Lists the signal types available to your team, each with a title and description. (GET /watchlist/library).
Lists, per signal type, the filters you can set on a Signal Agent. (GET /watchlist/filters).
Autocompletes allowed values for a Signal Agent filter (job titles, industries, locations, company sizes, and more). (GET /watchlist/filter-values).
Lists all deliverability alert configurations for your team. (GET /deliverability/alerts).
Creates a new deliverability alert that monitors a warm-up or outreach metric and notifies you through the configured channels when the threshold is breached. (POST /deliverability/alerts).
Retrieves a single deliverability alert configuration by its ID. (GET /deliverability/alerts/{alertId}).
Updates a deliverability alert's threshold, evaluation window, notification channels, scope filter, or enabled state. (PATCH /deliverability/alerts/{alertId}).
Permanently deletes a deliverability alert configuration. The historical alert occurrences this configuration produced are not removed. (DELETE /deliverability/alerts/{alertId}).
Lists all available fields for contacts and companies. (GET /fields).
About Codex
Frequently asked questions
More ways to connect
Open your Codex agent in one click.
NoClick runs Codex for you with Lemlist wired in as tools. Connect your account and run.