{"openapi":"3.1.0","info":{"title":"Lytics (BYOK) API","version":"0.1.0","description":"Lytics (BYOK) lets an AI assistant read your own Lytics data through the Lytics API with a key you supply (API token). Read-only: 10 tools (list_segments, get_segment, list_tables, list_schema_fields, list_flows, list_streams, list_data_models, list_jobs, list_reports, list_ml_models). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-lytics.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-lytics/docs"},"termsOfService":"https://connectorbay.com/byok-lytics/terms"},"servers":[{"url":"https://byok-lytics.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-lytics/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_segments":{"post":{"operationId":"list_segments","summary":"List audience segments (and goals, aspects, conversions) with size, kind, table and the segment query. Filterable by kin","description":"List audience segments (and goals, aspects, conversions) with size, kind, table and the segment query. Filterable by kind and validity. Use for \"How big are my Lytics audience segments\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"kind":{"anyOf":[{"enum":["segment","goal","aspect","conversion","managed","all"],"type":"string"},{"type":"null"}],"default":null,"description":"Kind filter: segment, goal, aspect, conversion, managed or all.","title":"Kind"},"valid":{"anyOf":[{"enum":["true","false","all"],"type":"string"},{"type":"null"}],"default":null,"description":"Validity filter: true, false or all.","title":"Valid"},"table":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only segments on this table, for example user.","title":"Table"}},"title":"list_segmentsArguments","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_segment":{"post":{"operationId":"get_segment","summary":"Get one segment by id or slug, with its size (when sizes is true), query text, kind and dates. Use for \"How many profile","description":"Get one segment by id or slug, with its size (when sizes is true), query text, kind and dates. Use for \"How many profiles are in the Lytics segment all\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"segment_id":{"description":"Segment id or slug (see list_segments).","maxLength":100,"title":"Segment Id","type":"string"},"sizes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"True to include the segment size.","title":"Sizes"}},"required":["segment_id"],"title":"get_segmentArguments","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_tables":{"post":{"operationId":"list_tables","summary":"List the schema tables of the account (for example user) with their live and draft ids. Use for \"Which tables are in my ","description":"List the schema tables of the account (for example user) with their live and draft ids. Use for \"Which tables are in my Lytics schema\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_tablesArguments","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_schema_fields":{"post":{"operationId":"list_schema_fields","summary":"List the profile fields of a table with type, description, identifier and PII flags, and merge operation. Use for \"What ","description":"List the profile fields of a table with type, description, identifier and PII flags, and merge operation. Use for \"What fields are on the Lytics user table and which are PII\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"table":{"description":"Table name, usually 'user' for profiles.","maxLength":60,"title":"Table","type":"string"},"filter":{"anyOf":[{"enum":["scalar","nonscalar","all"],"type":"string"},{"type":"null"}],"default":null,"description":"Which fields: scalar, nonscalar or all.","title":"Filter"}},"required":["table"],"title":"list_schema_fieldsArguments","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_flows":{"post":{"operationId":"list_flows","summary":"List flows (journeys) with label, state, version, entry segment and re-entry settings. Step details are not returned. Us","description":"List flows (journeys) with label, state, version, entry segment and re-entry settings. Step details are not returned. Use for \"Which Lytics flows are running\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"latest":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to return only the latest version of each item.","title":"Latest"}},"title":"list_flowsArguments","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_streams":{"post":{"operationId":"list_streams","summary":"List data streams with message counts, average event size, last received time and the tables they feed. Use for \"Which d","description":"List data streams with message counts, average event size, last received time and the tables they feed. Use for \"Which data streams feed Lytics and when did they last receive data\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_streamsArguments","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_data_models":{"post":{"operationId":"list_data_models","summary":"List data models (warehouse tables mapped into Lytics) with status, health, size, table and last update. Use for \"What d","description":"List data models (warehouse tables mapped into Lytics) with status, health, size, table and last update. Use for \"What data models are synced into Lytics and are they healthy\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"sizes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include record store sizes.","title":"Sizes"}},"title":"list_data_modelsArguments","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_jobs":{"post":{"operationId":"list_jobs","summary":"List import and export jobs with name, workflow, status and dates. Job configuration is not returned. Use for \"Which Lyt","description":"List import and export jobs with name, workflow, status and dates. Job configuration is not returned. Use for \"Which Lytics jobs are running and what is their status\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workflow":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only jobs of this workflow slug.","title":"Workflow"},"show_completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include completed jobs.","title":"Show Completed"}},"title":"list_jobsArguments","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_reports":{"post":{"operationId":"list_reports","summary":"List saved reports with label and description. Use for \"What reports are saved in Lytics\".","description":"List saved reports with label and description. Use for \"What reports are saved in Lytics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_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_ml_models":{"post":{"operationId":"list_ml_models","summary":"List machine-learning models with name, state, health, source and target segment, and whether they are deployed. Use for","description":"List machine-learning models with name, state, health, source and target segment, and whether they are deployed. Use for \"Which Lytics ML models are active and healthy\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_ml_modelsArguments","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}}}}