{"openapi":"3.1.0","info":{"title":"Segment (BYOK) API","version":"0.1.0","description":"Segment (BYOK) lets an AI assistant read your own Segment data through the Segment API with a key you supply (Segment Public API access token). Read-only: 11 tools (get_workspace, list_spaces, list_tracking_plans, list_tracking_plan_rules, list_functions, get_daily_mtu_usage, get_daily_source_mtu_usage, get_daily_api_call_usage, get_events_volume, list_source_catalog, list_computed_traits). The...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-segment.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-segment/docs"},"termsOfService":"https://connectorbay.com/byok-segment/terms"},"servers":[{"url":"https://byok-segment.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-segment/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/get_workspace":{"post":{"operationId":"get_workspace","summary":"Show the Segment workspace the token belongs to: id, slug and name. Workspaces in the EU region use a different API host","description":"Show the Segment workspace the token belongs to: id, slug and name. Workspaces in the EU region use a different API host and are not reachable with this connector. Use for \"Which Segment workspace is this token for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_workspaceArguments","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_spaces":{"post":{"operationId":"list_spaces","summary":"List the Engage spaces of the workspace with id, slug and name. Use for \"What Engage spaces does my Segment workspace ha","description":"List the Engage spaces of the workspace with id, slug and name. Use for \"What Engage spaces does my Segment workspace have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"title":"list_spacesArguments","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_tracking_plans":{"post":{"operationId":"list_tracking_plans","summary":"List tracking plans of the workspace (live plans, templates and libraries) with name, slug, type and update time. Use fo","description":"List tracking plans of the workspace (live plans, templates and libraries) with name, slug, type and update time. Use for \"Which tracking plans do we have in Segment\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"type":{"anyOf":[{"enum":["ENGAGE","LIVE","PROPERTY_LIBRARY","RULE_LIBRARY","TEMPLATE"],"type":"string"},{"type":"null"}],"default":null,"description":"Only plans of this type: ENGAGE, LIVE, PROPERTY_LIBRARY, RULE_LIBRARY or TEMPLATE (default all).","title":"Type"},"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"title":"list_tracking_plansArguments","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_tracking_plan_rules":{"post":{"operationId":"list_tracking_plan_rules","summary":"List the event and property rules of one tracking plan (rule type, key, JSON schema, version and dates). Use for \"What e","description":"List the event and property rules of one tracking plan (rule type, key, JSON schema, version and dates). Use for \"What events and properties does my Segment tracking plan allow\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"tracking_plan_id":{"description":"Id of the tracking plan (from list_tracking_plans).","maxLength":200,"title":"Tracking Plan Id","type":"string"},"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"required":["tracking_plan_id"],"title":"list_tracking_plan_rulesArguments","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_functions":{"post":{"operationId":"list_functions","summary":"List Segment Functions of one resource type (source, destination or insert functions) with name, description and creatio","description":"List Segment Functions of one resource type (source, destination or insert functions) with name, description and creation time. Use for \"Which source functions are set up in my Segment workspace\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"resource_type":{"description":"Kind of function to list.","enum":["DESTINATION","INSERT_DESTINATION","INSERT_SOURCE","INSERT_TRANSFORMATION","SOURCE"],"title":"Resource Type","type":"string"},"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"required":["resource_type"],"title":"list_functionsArguments","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_daily_mtu_usage":{"post":{"operationId":"get_daily_mtu_usage","summary":"Get the workspace's monthly tracked users (MTU) counts per day for one month, split into anonymous, identified and never","description":"Get the workspace's monthly tracked users (MTU) counts per day for one month, split into anonymous, identified and never-identified users. Use for \"How many monthly tracked users did my Segment workspace have in September 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"period":{"description":"Start of the usage month as an ISO 8601 date, for example 2026-09-01.","maxLength":20,"title":"Period","type":"string"},"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"required":["period"],"title":"get_daily_mtu_usageArguments","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_daily_source_mtu_usage":{"post":{"operationId":"get_daily_source_mtu_usage","summary":"Get monthly tracked users (MTU) counts per day and per source for one month. Use for \"Which Segment sources contribute m","description":"Get monthly tracked users (MTU) counts per day and per source for one month. Use for \"Which Segment sources contribute most tracked users this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"period":{"description":"Start of the usage month as an ISO 8601 date, for example 2026-09-01.","maxLength":20,"title":"Period","type":"string"},"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"required":["period"],"title":"get_daily_source_mtu_usageArguments","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_daily_api_call_usage":{"post":{"operationId":"get_daily_api_call_usage","summary":"Get the number of API calls the workspace sent to Segment per day for one month. Use for \"How many API calls did my Segm","description":"Get the number of API calls the workspace sent to Segment per day for one month. Use for \"How many API calls did my Segment workspace use per day in September 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"period":{"description":"Start of the usage month as an ISO 8601 date, for example 2026-09-01.","maxLength":20,"title":"Period","type":"string"},"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"required":["period"],"title":"get_daily_api_call_usageArguments","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_events_volume":{"post":{"operationId":"get_events_volume","summary":"Get the number of events received by the workspace in a time window, bucketed by day, hour or minute, optionally grouped","description":"Get the number of events received by the workspace in a time window, bucketed by day, hour or minute, optionally grouped by source, event name or event type. Use for \"How many events did Segment receive per day last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"granularity":{"description":"Bucket size: DAY, HOUR or MINUTE.","enum":["DAY","HOUR","MINUTE"],"title":"Granularity","type":"string"},"start_time":{"description":"Start of the window (inclusive) as ISO 8601, for example 2026-10-01T00:00:00Z.","maxLength":40,"title":"Start Time","type":"string"},"end_time":{"description":"End of the window (exclusive) as ISO 8601; the docs advise lagging one minute behind the clock.","maxLength":40,"title":"End Time","type":"string"},"group_by":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated dimensions to group by: eventName, eventType, source.","title":"Group By"},"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"required":["granularity","start_time","end_time"],"title":"get_events_volumeArguments","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_source_catalog":{"post":{"operationId":"list_source_catalog","summary":"List the catalog of source types Segment supports (name, slug, description, categories, status). It is a public catalog,","description":"List the catalog of source types Segment supports (name, slug, description, categories, status). It is a public catalog, not your own sources. Use for \"Which source types can I connect to Segment\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"title":"list_source_catalogArguments","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_computed_traits":{"post":{"operationId":"list_computed_traits","summary":"List the computed traits defined in one Engage space with name, key, enabled flag, status and definition. Use for \"What ","description":"List the computed traits defined in one Engage space with name, key, enabled flag, status and definition. Use for \"What computed traits are defined in my Segment space\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"space_id":{"description":"Id of the Engage space (from list_spaces).","maxLength":200,"title":"Space Id","type":"string"},"count":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many items to return per page (1 to 1000).","title":"Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Opaque cursor from the previous answer's data.pagination.next to fetch the following page.","title":"Cursor"}},"required":["space_id"],"title":"list_computed_traitsArguments","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}}}}