Lytics Flows API

Create and manage flows that orchestrate multi-step audience journeys.

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /flow List all flows and their versions · Get flows #
Ask an LLM
“Which journey flows exist on my account?”
“Can I list only the latest version of each flow?”
Tell an agent
List all my flows with every version.
List my flows with latest set to {latest}.
POST /flow Create or update a flow by id in the body · Create or update flow #
Ask an LLM
“How do I create a new customer journey flow with an entry segment?”
“Can I upsert a flow when its id is only in the request body?”
Tell an agent
Create flow {id} labelled {label} entering from segment {entry_segment_id}.
Save flow {id} with steps {steps} and root step {root_step_id}.
GET /flow/state List possible flow state values · Get flow states #
Ask an LLM
“What step slugs and personalization keys can flows produce on my account?”
“Which flow state values are available to personalize against?”
Tell an agent
List every possible flow state value.
Show the flow step slugs and personalization keys for account {account_id}.
DELETE /flow/{name} Delete a flow and all its versions · Delete flow #
Ask an LLM
“How do I delete a flow entirely, every version included?”
“Does removing a flow by name wipe all of its versions?”
Tell an agent destructive · confirm first
Delete flow {name} and all of its versions.
Remove every version of flow {name}.
GET /flow/{name} Get a flow by name · Get flow #
Ask an LLM
“Can I fetch a single flow and all its versions by its name?”
“What does the newest version of a named flow look like?”
Tell an agent
Show flow {name} with all its versions.
Get flow {name} with latest set to {latest}.
POST /flow/{name} Create or update a flow addressed by name · Create or update flow by name #
Ask an LLM
“Can I save a flow using its name in the URL as the id?”
“Is it possible to allow re-entry when saving a flow by name?”
Tell an agent
Save flow {name} with steps {steps}.
Update flow {name} to allow re-entry {reentry_allowed} after {reentry_delay}.
DELETE /flow/{name}/{version} Delete a single flow version · Delete flow version #
Ask an LLM
“Can I delete just one version of a flow and keep the others?”
“Is it possible to remove a bad flow version only?”
Tell an agent destructive · confirm first
Delete only version {version} of flow {name}.
Remove flow {name} version {version}, keeping the rest.
GET /flow/{name}/{version} Get one version of a flow · Get flow version #
Ask an LLM
“Can I look at an older version of a flow?”
“What did a specific numbered version of my flow contain?”
Tell an agent
Show version {version} of flow {name}.
Fetch flow {name} at version {version}.
POST /flow/{name}/{version}/{step}/work Create the work for a flow step · Create flow step work #
Ask an LLM
“How do I create the job work behind one step of a flow version?”
“Can a single flow step be given its own work to run?”
Tell an agent
Create the work for step {step} of flow {name} version {version}.
Set up work for flow {name} v{version} step {step}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lytics:lytics-flows-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lytics-flows-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@lytics.com
    name: Lytics Support
    url: https://support.lytics.com/hc/en-us
  description: Version 2 of the Lytics API
  termsOfService: https://www.lytics.com/terms-of-service/
  title: Lytics Flows API
  version: '2.0'
servers:
- url: https://api.lytics.io/v2
tags:
- description: Create and manage flows that orchestrate multi-step audience journeys.
  name: Flows
paths:
  /flow:
    get:
      description: Get all flows for an account. Each version of each flow is returned unless latest=true.
      parameters:
      - description: The account ID. Defaults to the user's default account.
        in: query
        name: account_id
        schema:
          type: string
      - description: Return only the latest version of each flow
        in: query
        name: latest
        schema:
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/models.ApiResponse'
                - properties:
                    data:
                      items:
                        $ref: '#/components/schemas/models.Flow'
                      type: array
                  type: object
          description: Flow List
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      summary: Get flows
      tags:
      - Flows
      operationId: getFlow
      x-operation-id-source: derived
    post:
      description: Create a new flow or update an existing one. The flow id is taken from the request body.
      parameters:
      - description: The account ID. Defaults to the user's default account.
        in: query
        name: account_id
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.Flow'
        description: The flow configuration
        required: true
        x-originalParamName: flow
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/models.ApiResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/models.Flow'
                  type: object
          description: Updated Flow
        '201':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/models.ApiResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/models.Flow'
                  type: object
          description: Created Flow
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      summary: Create or update flow
      tags:
      - Flows
      operationId: postFlow
      x-operation-id-source: derived
  /flow/state:
    get:
      description: Get all possible flow state values (step slugs / personalization keys) for the account.
      parameters:
      - description: The account ID. Defaults to the user's default account.
        in: query
        name: account_id
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/models.ApiResponse'
                - properties:
                    data:
                      items:
                        type: string
                      type: array
                  type: object
          description: Flow State List
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      summary: Get flow states
      tags:
      - Flows
      operationId: getFlowState
      x-operation-id-source: derived
  /flow/{name}:
    delete:
      description: Delete all versions of a flow by name.
      parameters:
      - description: The account ID. Defaults to the user's default account.
        in: query
        name: account_id
        schema:
          type: string
      - description: The flow name
        in: path
        name: name
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiResponse'
          description: Api Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      summary: Delete flow
      tags:
      - Flows
      operationId: deleteFlowByName
      x-operation-id-source: derived
    get:
      description: Get a flow by name. All versions are returned unless latest=true.
      parameters:
      - description: The account ID. Defaults to the user's default account.
        in: query
        name: account_id
        schema:
          type: string
      - description: The flow name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: Return only the latest version of the flow
        in: query
        name: latest
        schema:
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/models.ApiResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/models.Flow'
                  type: object
          description: Flow
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      summary: Get flow
      tags:
      - Flows
      operationId: getFlowByName
      x-operation-id-source: derived
    post:
      description: Create a new flow or update an existing one. When the body has no id, the name path param is used as the flow id.
      parameters:
      - description: The account ID. Defaults to the user's default account.
        in: query
        name: account_id
        schema:
          type: string
      - description: The flow name (used as the flow id when the body has no id)
        in: path
        name: name
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.Flow'
        description: The flow configuration
        required: true
        x-originalParamName: flow
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/models.ApiResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/models.Flow'
                  type: object
          description: Updated Flow
        '201':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/models.ApiResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/models.Flow'
                  type: object
          description: Created Flow
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      summary: Create or update flow by name
      tags:
      - Flows
      operationId: postFlowByName
      x-operation-id-source: derived
  /flow/{name}/{version}:
    delete:
      description: Delete a single version of a flow by name and version.
      parameters:
      - description: The account ID. Defaults to the user's default account.
        in: query
        name: account_id
        schema:
          type: string
      - description: The flow name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: The flow version
        in: path
        name: version
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiResponse'
          description: Api Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      summary: Delete flow version
      tags:
      - Flows
      operationId: deleteFlowByNameByVersion
      x-operation-id-source: derived
    get:
      description: Get a specific version of a flow by name and version.
      parameters:
      - description: The account ID. Defaults to the user's default account.
        in: query
        name: account_id
        schema:
          type: string
      - description: The flow name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: The flow version
        in: path
        name: version
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/models.ApiResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/models.Flow'
                  type: object
          description: Flow
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      summary: Get flow version
      tags:
      - Flows
      operationId: getFlowByNameByVersion
      x-operation-id-source: derived
  /flow/{name}/{version}/{step}/work:
    post:
      description: Create the work for a given step of a flow version.
      parameters:
      - description: The account ID. Defaults to the user's default account.
        in: query
        name: account_id
        schema:
          type: string
      - description: The flow name
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: The flow version
        in: path
        name: version
        required: true
        schema:
          type: integer
      - description: The flow step id
        in: path
        name: step
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/models.ApiResponse'
                - properties:
                    data:
                      $ref: '#/components/schemas/models.Work'
                  type: object
          description: Work
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ApiErrorResponse'
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      summary: Create flow step work
      tags:
      - Flows
      operationId: postFlowByNameByVersionByStepWork
      x-operation-id-source: derived
components:
  schemas:
    models.Flow:
      properties:
        aid:
          type: integer
        created:
          format: date-time
          type: string
        description:
          type: string
        entry_condition:
          enum:
          - in_segment
          - on_segment_entry
          type: string
        entry_segment_id:
          type: string
        expires_at:
          format: date-time
          type: string
        id:
          type: string
        label:
          type: string
        modified:
          format: date-time
          type: string
        reentry_allowed:
          type: boolean
        reentry_condition:
          enum:
          - in_segment
          - on_segment_entry
          type: string
        reentry_delay:
          description: Nanoseconds to wait before a profile may re-enter the flow.
          type: integer
        root_step_id:
          type: integer
        state:
          enum:
          - draft
          - running
          - draining
          - deleted
          type: string
        state_modified_at:
          format: date-time
          type: string
        steps:
          items:
            $ref: '#/components/schemas/models.FlowStep'
          type: array
        version:
          type: integer
      type: object
    models.ApiErrorResponse:
      properties:
        errors:
          description: Lytics API Errors
          items:
            $ref: '#/components/schemas/lioerrors.ApiV2ErrorOut'
          type: array
        request_id:
          type: string
        status:
          description: HTTP Status Code
          type: integer
      type: object
    models.FlowStep:
      properties:
        affinity_config_id:
          type: string
        delay:
          description: Nanoseconds to wait at this step. Mutually exclusive with delay_until.
          type: integer
        delay_condition:
          type: string
        delay_until:
          $ref: '#/components/schemas/models.DelayUntil'
        delay_until_enters:
          items:
            type: string
          type: array
        id:
          type: integer
        label:
          type: string
        next:
          type: integer
        slug:
          type: string
        split_affinities:
          items:
            $ref: '#/components/schemas/models.SplitAffinityKV'
          type: array
        split_conditions:
          items:
            $ref: '#/components/schemas/models.SplitConditionKV'
          type: array
        split_probabilities:
          items:
            $ref: '#/components/schemas/models.SplitProbKV'
          type: array
        type_hint:
          enum:
          - work_export
          - delay
          - conditional
          - affinity
          - ab_testing
          - work_export_exit
          type: string
        work_config:
          type: object
        work_exit_step_ref:
          type: integer
        work_id:
          type: string
      type: object
    models.SplitConditionKV:
      properties:
        conditions:
          type: string
        label:
          type: string
        next:
          type: integer
        priority:
          type: integer
      type: object
    models.Work:
      properties:
        account_id:
          type: string
        aid:
          type: integer
        auth_ids:
          items:
            type: string
          type: array
        config:
          type: object
        created:
          format: date-time
          type: string
        description:
          type: string
        expires_at:
          format: date-time
          type: string
        id:
          type: string
        name:
          type: string
        tag:
          type: string
        updated:
          format: date-time
          type: string
        workflow:
          type: string
        workflow_id:
          type: string
      type: object
    models.DelayUntil:
      properties:
        day_of_week:
          enum:
          - 0
          - 1
          - 2
          - 3
          - 4
          - 5
          - 6
          type: integer
        kind:
          enum:
          - day_of_week
          - time_of_day
          type: string
        time_of_day:
          example: 09:30
          type: string
        timezone:
          example: America/New_York
          type: string
      type: object
    models.ApiResponse:
      properties:
        _meta:
          additionalProperties: true
          description: Response Metadata
          type: object
        data:
          description: Response Payload
          type: object
        request_id:
          type: string
        status:
          description: HTTP Status Code
          type: integer
      type: object
    models.SplitProbKV:
      properties:
        next:
          type: integer
        prob:
          type: number
      type: object
    models.SplitAffinityKV:
      properties:
        affinity:
          type: string
        label:
          type: string
        next:
          type: integer
        priority:
          type: integer
      type: object
    lioerrors.ApiV2ErrorOut:
      properties:
        code:
          description: Lytics Error Code
          enum:
          - UNKNOWN-000
          - BADREQ-001
          - JOB-BADREQ-002
          - NOTFOUND-003
          - JOB-NOTFOUND-004
          - WF-NOTFOUND-005
          - AUTH-NOTFOUND-006
          - AUTHTYPE-NOTFOUND-007
          - AUTH-BADREQ-008
          - TABLE-NOTFOUND-009
          - SCHEMA-NOTFOUND-010
          - SCHEMAVERSION-NOTFOUND-011
          - ENTITY-NOTFOUND-012
          - QUERY-NOTFOUND-013
          - STREAM-NOTFOUND-014
          - PROVIDER-BADREQ-015
          - PROVIDER-NOTFOUND-016
          - UNAUTHORIZED-017
          - SCHEMA-INVALID-018
          - INTERNAL-019
          - ROUTERULE-NOTFOUND-020
          - ACCOUNT-NOTFOUND-021
          - JOB-FAULT-022
          - USER-NOTFOUND-023
          - USER-BADREQ-024
          - JSON-BADREQ-025
          - FORBIDDEN-026
          type: string
        level:
          description: When the error was generated
          type: string
        message:
          description: A description of the error that occurred
          type: string
        timestamp:
          description: The time the error occurred
          format: date-time
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: Authorization
      type: apiKey