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

# Report a missed call

> Reports a missed call from a customer and triggers the same side effects as a Telnyx-detected missed call: caller phone normalization, customer match-or-create, upcoming reservation lookup, and WhatsApp template dispatch (`MISSED_CALL` or `MISSED_CALL_WITH_RESERVATION`).

Use this endpoint when the integrating partner already detects missed calls through their own PBX or telco integration and wants to bypass Telnyx provisioning. The restaurant must have the `MISSED_CALLS` feature enabled and an approved WhatsApp template for the relevant message type.

Idempotency
- Pass `external_call_id` to make replays safe. A second request with the same `external_call_id` for the same restaurant returns `outcome: SKIPPED_DUPLICATE` without re-sending the WhatsApp message.
- Idempotency is scoped to the partner API and never collides with Telnyx-originated call ids.

Cooldown
- A 6-hour per-caller cooldown is enforced. Repeat calls within that window return `outcome: SKIPPED_COOLDOWN` and do not dispatch a message.

Outcome semantics
- A `201` response with a `SKIPPED_*` outcome is **not** an error. The platform received the report and intentionally chose not to dispatch the WhatsApp message (feature disabled, suppression, no template, etc.).
- A `502` response means an unexpected internal failure occurred while dispatching the WhatsApp message. Retry the same payload with the same `external_call_id` to recover safely.



## OpenAPI

````yaml https://app.eat-now.io/api/partner/v1/openapi.json post /api/partner/v1/missed-calls
openapi: 3.0.3
info:
  title: EatNow Partner API
  version: v1
  description: >-
    Version 1 of the EatNow partner API.


    This API is designed for trusted partner integrations that need
    restaurant-scoped access to availability, reservation management, and
    operational reference data.


    Authentication

    - Use `Authorization: Bearer <token>` with a partner API token created from
    the EatNow dashboard.

    - Access is controlled by credential scopes and each request is resolved to
    a single restaurant.


    Base URL

    - The server URL in this document is the canonical base URL for the current
    environment.


    Errors

    - Errors follow a consistent envelope with `error.code`, `error.message`,
    and `error.request_id`.

    - Validation, authentication, authorization, conflicts, and not-found cases
    all use the same top-level error shape.


    Rate limits

    - Partner API traffic is rate limited. Clients should treat `429` responses
    as retryable and back off accordingly.


    Public endpoints

    - `GET /api/partner/v1` and `GET /api/partner/v1/openapi.json` are public.

    - All business endpoints require Bearer authentication.
servers:
  - url: https://app.eat-now.io
security: []
tags:
  - name: Meta
    description: Platform metadata and schema endpoints
  - name: Authentication
    description: Credential validation and auth context endpoints
  - name: Availability
    description: Bookable slot search and exact slot validation
  - name: Catalog
    description: Reference data for restaurant tables, rooms, prescribers, and discounts
  - name: Reservations
    description: Reservation lookup, search, update, and cancellation
  - name: Missed Calls
    description: Report missed calls and trigger WhatsApp follow-up templates
paths:
  /api/partner/v1/missed-calls:
    post:
      tags:
        - Missed Calls
      summary: Report a missed call
      description: >-
        Reports a missed call from a customer and triggers the same side effects
        as a Telnyx-detected missed call: caller phone normalization, customer
        match-or-create, upcoming reservation lookup, and WhatsApp template
        dispatch (`MISSED_CALL` or `MISSED_CALL_WITH_RESERVATION`).


        Use this endpoint when the integrating partner already detects missed
        calls through their own PBX or telco integration and wants to bypass
        Telnyx provisioning. The restaurant must have the `MISSED_CALLS` feature
        enabled and an approved WhatsApp template for the relevant message type.


        Idempotency

        - Pass `external_call_id` to make replays safe. A second request with
        the same `external_call_id` for the same restaurant returns `outcome:
        SKIPPED_DUPLICATE` without re-sending the WhatsApp message.

        - Idempotency is scoped to the partner API and never collides with
        Telnyx-originated call ids.


        Cooldown

        - A 6-hour per-caller cooldown is enforced. Repeat calls within that
        window return `outcome: SKIPPED_COOLDOWN` and do not dispatch a message.


        Outcome semantics

        - A `201` response with a `SKIPPED_*` outcome is **not** an error. The
        platform received the report and intentionally chose not to dispatch the
        WhatsApp message (feature disabled, suppression, no template, etc.).

        - A `502` response means an unexpected internal failure occurred while
        dispatching the WhatsApp message. Retry the same payload with the same
        `external_call_id` to recover safely.
      operationId: createPartnerMissedCall
      requestBody:
        required: true
        description: >-
          Missed call report payload. The caller phone number is required; the
          rest is optional and improves replay safety and observability.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerApiMissedCallCreateRequest'
            examples:
              withE164:
                summary: Caller in E.164 format with idempotency key
                value:
                  caller_phone_number: '+33612345678'
                  external_call_id: pbx-call-9f3a2
                  occurred_at: '2026-05-10T14:23:00+02:00'
              nationalFormat:
                summary: >-
                  Caller in national format — normalized using the restaurant's
                  country
                value:
                  caller_phone_number: '0612345678'
                  external_call_id: pbx-call-9f3a3
              minimal:
                summary: Minimal payload
                value:
                  caller_phone_number: '+33612345678'
      responses:
        '201':
          description: >-
            Missed call processed. Inspect `data.outcome` to know whether a
            WhatsApp message was dispatched.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiMissedCallCreateResponse'
              examples:
                sent:
                  summary: WhatsApp message dispatched
                  value:
                    data:
                      id: ckl3m2b9t0000abcd1234efgh
                      outcome: SENT
                      caller_phone_number: '+33612345678'
                      customer_id: ckl3customer0000
                      reservation_id: ckl3reservation0000
                      template_type: MISSED_CALL_WITH_RESERVATION
                      created_at: '2026-05-10T14:23:01.245Z'
                duplicate:
                  summary: Replay of an already-processed call
                  value:
                    data:
                      id: null
                      outcome: SKIPPED_DUPLICATE
                      caller_phone_number: '+33612345678'
                      customer_id: null
                      reservation_id: null
                      template_type: null
                      created_at: null
                cooldown:
                  summary: Cooldown window still active for this caller
                  value:
                    data:
                      id: ckl3m2b9t0000abcd1234efgi
                      outcome: SKIPPED_COOLDOWN
                      caller_phone_number: '+33612345678'
                      customer_id: null
                      reservation_id: null
                      template_type: null
                      created_at: '2026-05-10T15:01:00.000Z'
        '400':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '403':
          description: >-
            Credential lacks the `MISSED_CALLS_WRITE` scope required for this
            endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '422':
          description: >-
            Business-rule validation failed. Returned when the `MISSED_CALLS`
            feature is not enabled for the restaurant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '502':
          description: >-
            Internal failure while dispatching the WhatsApp message. The
            MissedCall row is recorded as FAILED and the request is safe to
            retry with the same `external_call_id`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
      security:
        - PartnerBearerToken: []
components:
  schemas:
    PartnerApiMissedCallCreateRequest:
      type: object
      properties:
        caller_phone_number:
          type: string
          minLength: 3
          maxLength: 40
          description: >-
            Caller phone number. E.164 format (`+33612345678`) is recommended.
            National-format strings are accepted and will be normalized using
            the restaurant's country.
        external_call_id:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            Partner-supplied unique id for this call. Replaying with the same
            value within the same restaurant returns `outcome:
            SKIPPED_DUPLICATE` without re-sending the WhatsApp message.
            Recommended for any retry-safe integration.
        occurred_at:
          type: string
          format: date-time
          description: >-
            ISO-8601 timestamp of the missed call. Defaults to the request time.
            Used as the cutoff for the 6-hour per-caller cooldown.
      required:
        - caller_phone_number
      description: >-
        Payload to report a missed call. Triggers the same side effects
        (customer match, reservation lookup, WhatsApp template dispatch) as a
        Telnyx-detected call.
    PartnerApiMissedCallCreateResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PartnerApiMissedCallCreateData'
      required:
        - data
    PartnerApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/PartnerApiErrorCode'
            message:
              type: string
            request_id:
              type: string
            details:
              type: object
              additionalProperties:
                nullable: true
          required:
            - code
            - message
            - request_id
      required:
        - error
    PartnerApiMissedCallCreateData:
      type: object
      properties:
        id:
          type: string
          nullable: true
          description: >-
            Identifier of the persisted MissedCall row. `null` when the request
            resolved without writing a row, e.g. on `SKIPPED_DUPLICATE` or
            `SKIPPED_FEATURE_DISABLED`.
        outcome:
          type: string
          enum:
            - SENT
            - SKIPPED_FEATURE_DISABLED
            - SKIPPED_NO_CALLER_ID
            - SKIPPED_DUPLICATE
            - SKIPPED_COOLDOWN
            - SKIPPED_SUPPRESSED
            - SKIPPED_NO_WA_INTEGRATION
            - SKIPPED_INSUFFICIENT_BALANCE
            - SKIPPED_NO_TEMPLATE
          description: >-
            Result of the missed-call handling pipeline. Only `SENT` indicates a
            WhatsApp message was actually dispatched. All `SKIPPED_*` values are
            non-error decisions taken by the platform.
        caller_phone_number:
          type: string
          nullable: true
          description: >-
            The caller phone number after E.164 normalization. `null` when
            normalization failed (`SKIPPED_NO_CALLER_ID`).
        customer_id:
          type: string
          nullable: true
        reservation_id:
          type: string
          nullable: true
          description: >-
            Identifier of the upcoming reservation matched to this caller, if
            any. Drives the `MISSED_CALL_WITH_RESERVATION` template selection.
        template_type:
          type: string
          nullable: true
          enum:
            - MISSED_CALL
            - MISSED_CALL_WITH_RESERVATION
            - null
          description: >-
            Type of WhatsApp template that was selected. `null` when no message
            was dispatched.
        created_at:
          type: string
          nullable: true
          format: date-time
      required:
        - id
        - outcome
        - caller_phone_number
        - customer_id
        - reservation_id
        - template_type
        - created_at
    PartnerApiErrorCode:
      type: string
      enum:
        - AUTHENTICATION_REQUIRED
        - INVALID_AUTHENTICATION
        - INSUFFICIENT_SCOPE
        - VALIDATION_ERROR
        - RESOURCE_NOT_FOUND
        - RESOURCE_CONFLICT
        - RATE_LIMITED
        - INTERNAL_ERROR
  securitySchemes:
    PartnerBearerToken:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: >-
        Restaurant-scoped partner API token passed as `Authorization: Bearer
        <token>`.
      x-default: your_token_here

````