> ## 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.

# Add many clients to a waiting list

> Bulk version of ``POST /entries`` for one list: up to 500 rows, one
atomic write, a result per row.

**Authentication**: Public API Key (Bearer token)

Runs the same engine as the dashboard spreadsheet import: contacts are
matched by phone (then email) and created when unknown, rows are deduped
within the batch, and a (client, service) pair that is already waiting is
reported as ``already_waiting`` and left untouched — so re-sending a batch
is safe. With ``skip_invalid: false`` (default) any row error refuses the
whole batch with ``IMPORT_HAS_ERRORS``; with ``true`` the valid rows are
written and the rest come back with their errors.



## OpenAPI

````yaml POST /api/v2/public/calendar/waitlist/entries/batch
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/calendar/waitlist/entries/batch:
    post:
      tags:
        - Calendar
      summary: Add many clients to one waiting list in a single call
      description: >-
        Bulk version of ``POST /entries`` for one list: up to 500 rows, one

        atomic write, a result per row.


        **Authentication**: Public API Key (Bearer token)


        Runs the same engine as the dashboard spreadsheet import: contacts are

        matched by phone (then email) and created when unknown, rows are deduped

        within the batch, and a (client, service) pair that is already waiting
        is

        reported as ``already_waiting`` and left untouched — so re-sending a
        batch

        is safe. With ``skip_invalid: false`` (default) any row error refuses
        the

        whole batch with ``IMPORT_HAS_ERRORS``; with ``true`` the valid rows are

        written and the rest come back with their errors.
      operationId: createWaitlistEntriesBatch
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicWaitlistBatchCreateSchema'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicWaitlistBatchCreateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCalendarErrorResponse'
        '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/PublicCalendarErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCalendarErrorResponse'
        '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/PublicCalendarErrorResponse'
      security:
        - ApiKeyBearer: []
components:
  schemas:
    PublicWaitlistBatchCreateSchema:
      description: Body of ``POST /calendar/waitlist/entries/batch``.
      properties:
        waitlist_id:
          description: Target waiting list
          title: Waitlist Id
          type: integer
        entries:
          description: Up to 500 rows per call
          items:
            $ref: '#/components/schemas/PublicWaitlistBatchRowSchema'
          maxItems: 500
          minItems: 1
          title: Entries
          type: array
        default_region:
          anyOf:
            - type: string
            - type: 'null'
          description: ISO-3166 alpha-2 applied to phones without a country code, e.g. `CO`
          title: Default Region
        skip_invalid:
          default: false
          description: >-
            true: write the valid rows and report the rest; false (default):
            refuse the whole batch when any row has errors
          title: Skip Invalid
          type: boolean
        existing_clients_only:
          default: false
          description: 'true: never create contacts; unknown phones/emails are errors'
          title: Existing Clients Only
          type: boolean
      required:
        - waitlist_id
        - entries
      title: PublicWaitlistBatchCreateSchema
      type: object
    PublicWaitlistBatchCreateResponse:
      description: Response for ``POST /calendar/waitlist/entries/batch``.
      properties:
        status:
          const: success
          default: success
          description: Always `success`.
          title: Status
          type: string
        data:
          $ref: '#/components/schemas/PublicWaitlistBatchDataSchema'
          description: Batch result.
      required:
        - data
      title: PublicWaitlistBatchCreateResponse
      type: object
    PublicCalendarErrorResponse:
      description: Error envelope shared by every public calendar endpoint.
      properties:
        status:
          const: error
          default: error
          description: Always `error`.
          title: Status
          type: string
        error_code:
          description: Machine-readable error code; branch on this, never on `message`.
          title: Error Code
          type: string
        message:
          description: Human-readable explanation.
          title: Message
          type: string
        details:
          anyOf:
            - {}
            - type: 'null'
          description: Extra context, e.g. `valid_service_names` or the offending `field`.
          title: Details
      required:
        - error_code
        - message
      title: PublicCalendarErrorResponse
      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
    PublicWaitlistBatchRowSchema:
      description: >-
        One row of ``POST /calendar/waitlist/entries/batch``. Same fields as a

        spreadsheet import row: the contact is matched by ``phone`` (or
        ``email``)

        and created when unknown; services are named by ``service_names`` or

        ``service_ids`` (ids are resolved against the target list).
      properties:
        phone:
          anyOf:
            - type: string
            - type: 'null'
          description: Phone, E.164 preferred; national numbers use `default_region`
          title: Phone
        first_name:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          description: Given name, used only when the contact is created.
          title: First Name
        last_name:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          description: Family name, used only when the contact is created.
          title: Last Name
        email:
          anyOf:
            - maxLength: 255
              type: string
            - type: 'null'
          description: Email; matches an existing contact when the phone does not.
          title: Email
        service_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: Services by id
          title: Service Ids
        service_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Services by exact name (case-insensitive)
          title: Service Names
        priority:
          anyOf:
            - maximum: 3
              minimum: 0
              type: integer
            - type: 'null'
          description: 0 urgent, 1 high, 2 normal (default), 3 low
          title: Priority
        preferred_professional_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: calendar_profile_id the client would rather wait for
          title: Preferred Professional Id
        earliest_date:
          anyOf:
            - type: string
            - type: 'null'
          description: YYYY-MM-DD
          title: Earliest Date
        latest_date:
          anyOf:
            - type: string
            - type: 'null'
          description: YYYY-MM-DD
          title: Latest Date
        time_preference:
          anyOf:
            - type: string
            - type: 'null'
          description: any | morning | afternoon | evening
          title: Time Preference
        notes:
          anyOf:
            - maxLength: 2000
              type: string
            - type: 'null'
          description: Free-text note on the entry.
          title: Notes
      title: PublicWaitlistBatchRowSchema
      type: object
    PublicWaitlistBatchDataSchema:
      properties:
        waitlist_id:
          description: The list the rows were written to.
          title: Waitlist Id
          type: integer
        clients_created:
          description: Contacts created by this call.
          title: Clients Created
          type: integer
        entries_created:
          description: Waiting-list entries created by this call.
          title: Entries Created
          type: integer
        skipped:
          description: Rows not written (errors, duplicates, already waiting)
          title: Skipped
          type: integer
        summary:
          additionalProperties: true
          description: Row counts per status
          title: Summary
          type: object
        rows:
          description: One result per row sent, in order.
          items:
            $ref: '#/components/schemas/PublicWaitlistBatchRowResultSchema'
          title: Rows
          type: array
      required:
        - waitlist_id
        - clients_created
        - entries_created
        - skipped
      title: PublicWaitlistBatchDataSchema
      type: object
    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
    PublicWaitlistBatchRowResultSchema:
      properties:
        index:
          description: 0-based position in `entries`
          title: Index
          type: integer
        status:
          description: >-
            ok | will_create_client | already_waiting | error |
            skip:duplicate_in_file
          title: Status
          type: string
        errors:
          description: Why the row was refused, if it was.
          items:
            type: string
          title: Errors
          type: array
        warnings:
          description: Non-blocking notes, e.g. a duplicate service dropped.
          items:
            type: string
          title: Warnings
          type: array
        phone:
          anyOf:
            - type: string
            - type: 'null'
          description: E.164 once normalised
          title: Phone
        email:
          anyOf:
            - type: string
            - type: 'null'
          description: Email as sent, trimmed.
          title: Email
        client_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: Matched or created contact
          title: Client Id
      required:
        - index
        - status
      title: PublicWaitlistBatchRowResultSchema
      type: object
  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_...`.

````