Flowise leads API

The leads API from Flowise — 2 operation(s) for leads.

OpenAPI Specification

flowise-leads-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Flowise APIs assistants leads API
  version: 1.0.0
  description: 'Flowise REST API for managing AI agent flows, chatflows, assistants, document stores, tools, variables, and predictions.

    Bearer token authentication uses an API key generated in the Flowise admin UI. The default server is your local or hosted Flowise instance at /api/v1.

    '
  license:
    name: Apache 2.0
    url: https://github.com/FlowiseAI/Flowise/blob/main/LICENSE.md
  contact:
    name: FlowiseAI
    email: support@flowiseai.com
servers:
- url: http://localhost:3000/api/v1
  description: Local Flowise server
- url: https://{instance}.flowiseai.com/api/v1
  description: Flowise Cloud instance
  variables:
    instance:
      default: app
tags:
- name: leads
paths:
  /leads:
    post:
      tags:
      - leads
      security:
      - bearerAuth: []
      operationId: createLead
      summary: Create a new lead in a chatflow
      description: Create a new lead associated with a specific chatflow
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Lead'
        required: true
      responses:
        '200':
          description: Lead created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
        '400':
          description: Invalid request body
        '422':
          description: Validation error
        '500':
          description: Internal server error
  /leads/{id}:
    get:
      tags:
      - leads
      security:
      - bearerAuth: []
      summary: Get all leads for a specific chatflow
      description: Retrieve all leads associated with a specific chatflow
      operationId: getAllLeadsForChatflow
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
        description: Chatflow ID
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Lead'
        '400':
          description: Invalid ID provided
        '404':
          description: Leads not found
        '500':
          description: Internal server error
components:
  schemas:
    Lead:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the lead
          example: cfd531e0-82fc-11e9-bc42-526af7764f64
        name:
          type: string
          description: Name of the lead
          example: John Doe
        email:
          type: string
          description: Email address of the lead
          example: john.doe@example.com
        phone:
          type: string
          description: Phone number of the lead
          example: '+1234567890'
        chatflowid:
          type: string
          description: ID of the chatflow the lead is associated with
          example: 7c4e8b7a-7b9a-4b4d-9f3e-2d28f1ebea02
        chatId:
          type: string
          description: ID of the chat session the lead is associated with
          example: d7b0b5d8-85e6-4f2a-9c1f-9d9a0e2ebf6b
        createdDate:
          type: string
          format: date-time
          description: Date and time when the lead was created
          example: '2024-08-24T14:15:22Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT