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

# Ingest a client into a pipeline

> Push a lead into a Salesflow pipeline through one of its API input nodes.

The client is looked up by `client_id` or `phone_number` and created when
it does not exist yet; it then enters the stage the input node points to.
The input node must be of type **API** and active. Set `update` to refresh
the stored contact fields when the client already exists.



## OpenAPI

````yaml POST /api/v2/public/salesflow/ingest/{input_node_uuid}
openapi: 3.1.0
info:
  title: Dialtu Public API
  version: '2.0'
  description: >-
    Programmatic access to your Dialtu account: schedule AI voice calls, create
    contacts, push leads into Salesflow pipelines, book calendar appointments
    and read WhatsApp conversation history.


    Every request is authenticated with an API key created in the dashboard
    under **Settings → API Keys**, sent as `Authorization: Bearer pk_...`.
servers:
  - url: https://api.dialtu.com
    description: Production
  - url: https://api.stg.dialtu.com
    description: Staging
security:
  - ApiKeyBearer: []
tags:
  - name: Calls
    description: Schedule outbound AI voice calls.
  - name: Clients
    description: Create contacts in your account.
  - name: Salesflow
    description: Push leads into a pipeline through an API input node.
  - name: Salesflow pipelines
    description: Read a pipeline's stages and add, move or remove clients.
  - name: Calendar
    description: Check bookable capacity, book appointments and manage waiting lists.
  - name: WhatsApp
    description: Read-only conversation history and transcripts.
paths:
  /api/v2/public/salesflow/ingest/{input_node_uuid}:
    post:
      tags:
        - Salesflow
      summary: Ingest a client into a pipeline
      description: >-
        Push a lead into a Salesflow pipeline through one of its API input
        nodes.


        The client is looked up by `client_id` or `phone_number` and created
        when

        it does not exist yet; it then enters the stage the input node points
        to.

        The input node must be of type **API** and active. Set `update` to
        refresh

        the stored contact fields when the client already exists.
      operationId: ingestSalesflowClient
      parameters:
        - in: path
          name: input_node_uuid
          schema:
            description: >-
              UUID of the pipeline's API input node. Copy it from the input
              node's settings in the Salesflow editor.
            title: Input Node Uuid
            type: string
          required: true
          description: >-
            UUID of the pipeline's API input node. Copy it from the input node's
            settings in the Salesflow editor.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesflowIngestSchema'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesflowIngestResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesflowIngestErrorResponse'
        '401':
          description: Missing, malformed or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetailErrorResponse'
              examples:
                missing_header:
                  summary: No Authorization header
                  value:
                    detail: Unauthorized
                invalid_key:
                  summary: Unknown or revoked key
                  value:
                    detail: Invalid or expired API key. Please check your credentials.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesflowIngestErrorResponse'
        '422':
          description: The request did not match the documented schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestValidationError'
              example:
                detail:
                  - type: missing
                    loc:
                      - body
                      - payload
                      - phone_number
                    msg: Field required
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesflowIngestErrorResponse'
      security:
        - ApiKeyBearer: []
components:
  schemas:
    SalesflowIngestSchema:
      description: Request schema for ingesting a client into a Salesflow pipeline.
      examples:
        - data:
            campaign: spring
            source: landing-page
          email: ana@example.com
          first_name: Ana
          last_name: García
          phone_number: '+525512345678'
          update: true
      properties:
        client_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: ID of an existing client. Either this or `phone_number` is required.
          title: Client Id
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Phone number, preferably E.164. The client is looked up by it and
            created when not found.
          title: Phone Number
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Given name (used on create, or on update when `update=true`).
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Family name.
          title: Last Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          description: Email address.
          title: Email
        company:
          anyOf:
            - type: string
            - type: 'null'
          description: Company or organization name.
          title: Company
        timezone:
          anyOf:
            - type: string
            - type: 'null'
          description: IANA timezone of the contact, e.g. `America/Bogota`.
          title: Timezone
        area_code:
          anyOf:
            - type: string
            - type: 'null'
          description: Country calling code stored alongside the phone number.
          title: Area Code
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: Free-form custom fields, available to agents as prompt variables.
          title: Data
        update:
          default: false
          description: >-
            When the client already exists, overwrite its stored fields with the
            values sent.
          title: Update
          type: boolean
      title: SalesflowIngestSchema
      type: object
    SalesflowIngestResponse:
      description: Success response for Salesflow client ingestion.
      properties:
        status:
          const: success
          description: Response status
          title: Status
          type: string
        client_id:
          description: ID of the client
          title: Client Id
          type: integer
        pipeline_id:
          description: ID of the pipeline
          title: Pipeline Id
          type: integer
        stage_id:
          description: ID of the target stage
          title: Stage Id
          type: integer
        message:
          description: Human-readable message
          title: Message
          type: string
      required:
        - status
        - client_id
        - pipeline_id
        - stage_id
        - message
      title: SalesflowIngestResponse
      type: object
    SalesflowIngestErrorResponse:
      description: Error response for Salesflow client ingestion.
      properties:
        status:
          const: error
          description: Error status
          title: Status
          type: string
        error_code:
          description: Machine-readable error code
          title: Error Code
          type: string
        message:
          description: Human-readable error message
          title: Message
          type: string
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Additional error details. For INGEST_ROLLED_BACK: the batch summary
            and per-row results, so every failing row can be fixed at once.
          title: Details
      required:
        - status
        - error_code
        - message
      title: SalesflowIngestErrorResponse
      type: object
    DetailErrorResponse:
      description: 'Plain error body: `{"detail": "..."}`. No `error_code` is included.'
      properties:
        detail:
          description: Human-readable reason for the failure.
          title: Detail
          type: string
      required:
        - detail
      title: DetailErrorResponse
      type: object
    RequestValidationError:
      title: RequestValidationError
      type: object
      description: >-
        Returned when the request body, query string or path could not be parsed
        against the documented schema. Fix the listed fields and retry.
      properties:
        detail:
          type: array
          title: Detail
          description: One entry per invalid field.
          items:
            $ref: '#/components/schemas/RequestValidationErrorItem'
      required:
        - detail
    RequestValidationErrorItem:
      title: RequestValidationErrorItem
      type: object
      properties:
        loc:
          type: array
          title: Loc
          description: >-
            Where the problem is: the first element is `body`, `query` or
            `path`, followed by the field path.
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          type: string
          title: Msg
          description: What is wrong with the value.
        type:
          type: string
          title: Type
          description: >-
            Machine-readable validation error type, e.g. `missing` or
            `int_parsing`.
      required:
        - loc
        - msg
        - type
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: pk_...
      description: >-
        API key created in the dashboard under **Settings → API Keys**. Send it
        as `Authorization: Bearer pk_...`.

````