{"openapi":"3.1.0","info":{"title":"lemlist (BYOK) API","version":"0.1.0","description":"lemlist (BYOK) lets an AI assistant read your own lemlist data through the lemlist API with a key you supply (lemlist API key (sent as the Basic-auth password, empty username)). Read-only: 10 tools (list_campaigns, get_campaign, get_campaign_stats, get_campaign_reports, list_campaign_leads, list_schedules, list_message_templates, list_snippets, get_team, get_team_credits). The BYOK key travels...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-lemlist.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-lemlist/docs"},"termsOfService":"https://connectorbay.com/byok-lemlist/terms"},"servers":[{"url":"https://byok-lemlist.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-lemlist/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_campaigns":{"post":{"operationId":"list_campaigns","summary":"List campaigns of the team with name, status, creator, timezone and error flag, newest first by default. Use for \"Which ","description":"List campaigns of the team with name, status, creator, timezone and error flag, newest first by default. Use for \"Which lemlist campaigns are running\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"version":{"anyOf":[{"const":"v2","type":"string"},{"type":"null"}],"default":"v2","description":"API version; leave as v2.","title":"Version"},"status":{"anyOf":[{"enum":["running","draft","archived","ended","paused","errors"],"type":"string"},{"type":"null"}],"default":null,"description":"Filter by campaign status.","title":"Status"},"sort_order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction by creation date: asc or desc.","title":"Sort Order"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many campaigns to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many campaigns to skip, for paging.","title":"Offset"}},"title":"list_campaignsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_campaign":{"post":{"operationId":"get_campaign","summary":"Get one campaign with status, creator, timezone, labels, sender mailboxes and errors. Use for \"Show details of this leml","description":"Get one campaign with status, creator, timezone, labels, sender mailboxes and errors. Use for \"Show details of this lemlist campaign\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_id":{"description":"Campaign id (cam_...), from list_campaigns.","maxLength":200,"title":"Campaign Id","type":"string"}},"required":["campaign_id"],"title":"get_campaignArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_campaign_stats":{"post":{"operationId":"get_campaign_stats","summary":"Get performance statistics of one campaign for a date range: leads launched, reached, opened, answered, messages sent, d","description":"Get performance statistics of one campaign for a date range: leads launched, reached, opened, answered, messages sent, delivered, clicked, replied, meetings booked, split by channel. Use for \"What are the open and reply rates of this lemlist campaign in September 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_id":{"description":"Campaign id (cam_...), from list_campaigns.","maxLength":200,"title":"Campaign Id","type":"string"},"start_date":{"description":"Start of the range, ISO 8601, for example 2026-09-01T00:00:00Z.","maxLength":200,"title":"Start Date","type":"string"},"end_date":{"description":"End of the range, ISO 8601, for example 2026-09-30T23:59:59Z.","maxLength":200,"title":"End Date","type":"string"}},"required":["campaign_id","start_date","end_date"],"title":"get_campaign_statsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_campaign_reports":{"post":{"operationId":"get_campaign_reports","summary":"Get aggregated reports for one or more campaigns: lead counts, emails sent, opened, clicked, replied, LinkedIn activity,","description":"Get aggregated reports for one or more campaigns: lead counts, emails sent, opened, clicked, replied, LinkedIn activity, interested and not interested. Use for \"Compare reply counts across my lemlist campaigns\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_ids":{"description":"Comma-separated campaign ids (cam_...).","maxLength":500,"title":"Campaign Ids","type":"string"}},"required":["campaign_ids"],"title":"get_campaign_reportsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_campaign_leads":{"post":{"operationId":"list_campaign_leads","summary":"List leads of a campaign with id, contact id, state and creation date (no personal details); filter by state. Use for \"H","description":"List leads of a campaign with id, contact id, state and creation date (no personal details); filter by state. Use for \"How many leads of this lemlist campaign are interested\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_id":{"description":"Campaign id (cam_...), from list_campaigns.","maxLength":200,"title":"Campaign Id","type":"string"},"state":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Filter by lead state, for example scanned, contacted, interested or notInterested.","title":"State"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many leads to return (1 to 500).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many leads to skip, for paging.","title":"Offset"}},"required":["campaign_id"],"title":"list_campaign_leadsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_schedules":{"post":{"operationId":"list_schedules","summary":"List the sending schedules of the team with name, timezone, hours and weekdays. Use for \"What sending schedules do we ha","description":"List the sending schedules of the team with name, timezone, hours and weekdays. Use for \"What sending schedules do we have in lemlist\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many schedules per page.","title":"Limit"}},"title":"list_schedulesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_message_templates":{"post":{"operationId":"list_message_templates","summary":"List the library message templates with name, subject, body, tags and creation date; searchable by name. Use for \"Which ","description":"List the library message templates with name, subject, body, tags and creation date; searchable by name. Use for \"Which email templates do we have in lemlist\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Case-insensitive part of the template name.","title":"Search"},"tags":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated tags; templates with any of them are kept.","title":"Tags"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (1 to 100).","title":"Limit"}},"title":"list_message_templatesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_snippets":{"post":{"operationId":"list_snippets","summary":"List the team's snippets (reusable text fragments) with name, content and creation date. Use for \"What snippets do we ha","description":"List the team's snippets (reusable text fragments) with name, content and creation date. Use for \"What snippets do we have in lemlist\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Case-insensitive part of the snippet name.","title":"Search"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items per page (1 to 100).","title":"Limit"}},"title":"list_snippetsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_team":{"post":{"operationId":"get_team","summary":"Get the lemlist team: id, name, agency flag and custom domain. Use for \"What is my lemlist team\".","description":"Get the lemlist team: id, name, agency flag and custom domain. Use for \"What is my lemlist team\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_teamArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_team_credits":{"post":{"operationId":"get_team_credits","summary":"Get the remaining enrichment credits of the team (total, subscription, gifted, paid, freemium). This call itself costs n","description":"Get the remaining enrichment credits of the team (total, subscription, gifted, paid, freemium). This call itself costs nothing. Use for \"How many lemlist credits do I have left\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_team_creditsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}