> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plura.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Send to Workflow

> Enroll a lead into an automated journey. You can create a new lead and enroll them simultaneously, or enroll an existing lead by their UUID.

**Note:** Provide either `record` (for new leads) or `lead_id` (for existing leads) — never both.

**Finding your Journey ID:** Extract it from your workspace URL — `app.plura.ai/[workspace]/journey/[JOURNEY-ID]/flow/[flow-id]`. The Journey ID is the UUID after `/journey/`. Use the Journey ID, not the Flow ID.




## OpenAPI

````yaml /api-reference/openapi.yaml post /lead/sendtoworkflow
openapi: 3.0.3
info:
  title: Plura AI API
  description: >-
    Complete REST API reference for building powerful integrations with Plura
    AI.
  version: '1.7'
  contact:
    url: https://docs.plura.ai
servers:
  - url: https://api.plura.ai/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /lead/sendtoworkflow:
    post:
      tags:
        - Workflows
      summary: Send to Workflow
      description: >
        Enroll a lead into an automated journey. You can create a new lead and
        enroll them simultaneously, or enroll an existing lead by their UUID.


        **Note:** Provide either `record` (for new leads) or `lead_id` (for
        existing leads) — never both.


        **Finding your Journey ID:** Extract it from your workspace URL —
        `app.plura.ai/[workspace]/journey/[JOURNEY-ID]/flow/[flow-id]`. The
        Journey ID is the UUID after `/journey/`. Use the Journey ID, not the
        Flow ID.
      operationId: sendToWorkflow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - workflow_id
              properties:
                workflow_id:
                  type: string
                  description: Journey ID from your workspace URL (not the Flow ID)
                  example: 98249779-79ae-462f-a0cf-7ce5129cc093
                record:
                  $ref: '#/components/schemas/LeadRecord'
                  description: >-
                    Lead data for creating a new lead. Provide this OR lead_id,
                    not both.
                lead_id:
                  type: string
                  description: Existing lead UUID. Provide this OR record, not both.
                  example: 307fc241-8398-4740-8122-cf6a59f3b86e
            examples:
              new_lead:
                summary: Create new lead and enroll
                value:
                  workflow_id: 98249779-79ae-462f-a0cf-7ce5129cc093
                  record:
                    phone: '17145551234'
                    first_name: John
                    last_name: Smith
                    email: johnsmith@mail.com
                    company: Acme Corp
              existing_lead:
                summary: Enroll existing lead
                value:
                  workflow_id: 98249779-79ae-462f-a0cf-7ce5129cc093
                  lead_id: 307fc241-8398-4740-8122-cf6a59f3b86e
      responses:
        '200':
          description: Lead enrolled successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  lead_id:
                    type: string
                    example: 307fc241-8398-4740-8122-cf6a59f3b86e
                  workflow_assigned:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Lead successfully added to workflow
        '400':
          description: Bad request — check JSON format and required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                status: failed
                message: Could not find or create lead, please try again!
        '401':
          description: Unauthorized — verify your API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Journey not found — check your workflow_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    LeadRecord:
      type: object
      required:
        - phone
      properties:
        phone:
          type: string
          description: Phone number in E.164 format (digits only, with country code)
          example: '17145551234'
        first_name:
          type: string
          example: John
        last_name:
          type: string
          example: Smith
        email:
          type: string
          format: email
          example: johnsmith@mail.com
        company:
          type: string
          example: Acme Corp
    Error:
      type: object
      properties:
        status:
          type: string
          example: failed
        message:
          type: string
          example: Human-readable error description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key from Settings → API Keys in your workspace

````