{"openapi":"3.1.0","info":{"title":"LeadSquared (BYOK) API","version":"0.1.0","description":"LeadSquared (BYOK) lets an AI assistant read your own LeadSquared data through the LeadSquared API with a key you supply (LeadSquared access key). Read-only: 9 tools (list_lead_lists, get_list_member_count, list_activity_types, list_task_types, list_sales_groups, list_teams, get_sales_activity_settings, search_products, search_permission_templates). The BYOK key travels with each request, is used...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-leadsquared.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-leadsquared/docs"},"termsOfService":"https://connectorbay.com/byok-leadsquared/terms"},"servers":[{"url":"https://byok-leadsquared.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-leadsquared/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_lead_lists":{"post":{"operationId":"list_lead_lists","summary":"List lead lists (static, dynamic and refreshable) with description, type and member count. Use for \"What lead lists exis","description":"List lead lists (static, dynamic and refreshable) with description, type and member count. Use for \"What lead lists exist in LeadSquared and how many leads are in each\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"Your LeadSquared API host label: 'api' (Singapore), 'api-us11' (United States), 'api-in21' (India Mumbai), 'api-in22' (India Hyderabad), 'api-me61' (Middle East), 'api-ir31' (Ireland) or 'api-ca12' (Canada). A wrong region returns 401 naming the right host.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Region","type":"string"},"page_index":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page Index"},"list_type":{"anyOf":[{"enum":["0","1","2"],"type":"string"},{"type":"null"}],"default":null,"description":"Only lists of this type: 0 static, 1 dynamic, 2 refreshable.","title":"List Type"},"search_text":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only lists whose name contains this text.","title":"Search Text"}},"required":["region"],"title":"list_lead_listsArguments","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_list_member_count":{"post":{"operationId":"get_list_member_count","summary":"Get the number of leads in one lead list. Use for \"How many leads are in LeadSquared list 3c6f4134-8374-11e7-ab78-02de49","description":"Get the number of leads in one lead list. Use for \"How many leads are in LeadSquared list 3c6f4134-8374-11e7-ab78-02de49b06427\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"Your LeadSquared API host label: 'api' (Singapore), 'api-us11' (United States), 'api-in21' (India Mumbai), 'api-in22' (India Hyderabad), 'api-me61' (Middle East), 'api-ir31' (Ireland) or 'api-ca12' (Canada). A wrong region returns 401 naming the right host.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Region","type":"string"},"list_id":{"description":"Id of the list, from list_lead_lists.","maxLength":60,"title":"List Id","type":"string"}},"required":["region","list_id"],"title":"get_list_member_countArguments","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_activity_types":{"post":{"operationId":"list_activity_types","summary":"List activity types (email, web, custom and sales activities) with category (EventType), score, tags and description. Us","description":"List activity types (email, web, custom and sales activities) with category (EventType), score, tags and description. Use for \"What activity types are configured in LeadSquared\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"Your LeadSquared API host label: 'api' (Singapore), 'api-us11' (United States), 'api-in21' (India Mumbai), 'api-in22' (India Hyderabad), 'api-me61' (Middle East), 'api-ir31' (Ireland) or 'api-ca12' (Canada). A wrong region returns 401 naming the right host.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Region","type":"string"}},"required":["region"],"title":"list_activity_typesArguments","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_task_types":{"post":{"operationId":"list_task_types","summary":"List task types (appointments and to-dos) with category, colour, sequence, status and last modified details. Use for \"Wh","description":"List task types (appointments and to-dos) with category, colour, sequence, status and last modified details. Use for \"What task types can my team create in LeadSquared\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"Your LeadSquared API host label: 'api' (Singapore), 'api-us11' (United States), 'api-in21' (India Mumbai), 'api-in22' (India Hyderabad), 'api-me61' (Middle East), 'api-ir31' (Ireland) or 'api-ca12' (Canada). A wrong region returns 401 naming the right host.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Region","type":"string"},"column_name":{"anyOf":[{"enum":["TaskTypeId","TaskName","Category"],"type":"string"},{"type":"null"}],"default":null,"description":"Optional filter field: TaskTypeId, TaskName or Category.","title":"Column Name"},"column_value":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Value for the filter field (for Category: 0 appointments, 1 to-dos).","title":"Column Value"}},"required":["region"],"title":"list_task_typesArguments","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_sales_groups":{"post":{"operationId":"list_sales_groups","summary":"List sales groups with description, creation time and number of users; pass a user id to list only that user's groups. U","description":"List sales groups with description, creation time and number of users; pass a user id to list only that user's groups. Use for \"What sales groups does LeadSquared have and how big are they\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"Your LeadSquared API host label: 'api' (Singapore), 'api-us11' (United States), 'api-in21' (India Mumbai), 'api-in22' (India Hyderabad), 'api-me61' (Middle East), 'api-ir31' (Ireland) or 'api-ca12' (Canada). A wrong region returns 401 naming the right host.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Region","type":"string"},"user_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Optional user id: only groups this user belongs to.","title":"User Id"}},"required":["region"],"title":"list_sales_groupsArguments","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_teams":{"post":{"operationId":"list_teams","summary":"List teams, optionally as a parent and child hierarchy, with description, user count and parent team. Use for \"How are o","description":"List teams, optionally as a parent and child hierarchy, with description, user count and parent team. Use for \"How are our LeadSquared teams organised\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"Your LeadSquared API host label: 'api' (Singapore), 'api-us11' (United States), 'api-in21' (India Mumbai), 'api-in22' (India Hyderabad), 'api-me61' (Middle East), 'api-ir31' (Ireland) or 'api-ca12' (Canada). A wrong region returns 401 naming the right host.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Region","type":"string"},"get_hierarchical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to return teams as a parent and child tree.","title":"Get Hierarchical"}},"required":["region"],"title":"list_teamsArguments","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_sales_activity_settings":{"post":{"operationId":"get_sales_activity_settings","summary":"Get the sales activity settings: name, default currency, customer stage name and the custom field schema (mx_Custom_1 to","description":"Get the sales activity settings: name, default currency, customer stage name and the custom field schema (mx_Custom_1 to mx_Custom_15). Use for \"What custom fields does a LeadSquared sales activity have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"Your LeadSquared API host label: 'api' (Singapore), 'api-us11' (United States), 'api-in21' (India Mumbai), 'api-in22' (India Hyderabad), 'api-me61' (Middle East), 'api-ir31' (Ireland) or 'api-ca12' (Canada). A wrong region returns 401 naming the right host.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Region","type":"string"}},"required":["region"],"title":"get_sales_activity_settingsArguments","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/search_products":{"post":{"operationId":"search_products","summary":"Search the product catalog by SKU, name or description text, newest modified first, with SKU, name and description. Use ","description":"Search the product catalog by SKU, name or description text, newest modified first, with SKU, name and description. Use for \"Which products in LeadSquared match 'mobile'\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"Your LeadSquared API host label: 'api' (Singapore), 'api-us11' (United States), 'api-in21' (India Mumbai), 'api-in22' (India Hyderabad), 'api-me61' (Middle East), 'api-ir31' (Ireland) or 'api-ca12' (Canada). A wrong region returns 401 naming the right host.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Region","type":"string"},"search_text":{"description":"Text matching product SKU, name or description.","maxLength":100,"title":"Search Text","type":"string"},"page_index":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page Index"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Records per page (1 to 100).","title":"Page Size"}},"required":["region","search_text"],"title":"search_productsArguments","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/search_permission_templates":{"post":{"operationId":"search_permission_templates","summary":"Search permission templates by name text (names and descriptions only; the permission rules themselves are left out). Us","description":"Search permission templates by name text (names and descriptions only; the permission rules themselves are left out). Use for \"What permission templates exist in LeadSquared\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"region":{"description":"Your LeadSquared API host label: 'api' (Singapore), 'api-us11' (United States), 'api-in21' (India Mumbai), 'api-in22' (India Hyderabad), 'api-me61' (Middle East), 'api-ir31' (Ireland) or 'api-ca12' (Canada). A wrong region returns 401 naming the right host.","maxLength":200,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$","title":"Region","type":"string"},"search_text":{"description":"Text to search in template names; use a single space to list all.","maxLength":100,"title":"Search Text","type":"string"},"page_index":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page Index"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Records per page (1 to 100).","title":"Page Size"}},"required":["region","search_text"],"title":"search_permission_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}}}}