Lytics Flows API

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

Operations 9

GET /flow Get flows #
POST /flow Create or update flow #
GET /flow/state Get flow states #
DELETE /flow/{name} Delete flow #
GET /flow/{name} Get flow #
POST /flow/{name} Create or update flow by name #
DELETE /flow/{name}/{version} Delete flow version #
GET /flow/{name}/{version} Get flow version #
POST /flow/{name}/{version}/{step}/work Create flow step work #

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-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:
    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
    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.SplitAffinityKV:
      properties:
        affinity:
          type: string
        label:
          type: string
        next:
          type: integer
        priority:
          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.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.SplitConditionKV:
      properties:
        conditions:
          type: string
        label:
          type: string
        next:
          type: integer
        priority:
          type: integer
      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.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.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.SplitProbKV:
      properties:
        next:
          type: integer
        prob:
          type: number
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: Authorization
      type: apiKey