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

# Send a form by email or WhatsApp

> Dispatches the form invitation to a list of recipients. The form must belong to the caller company and be open and active.



## OpenAPI

````yaml /openapi-v1.json post /v1/forms/{id}/invitations
openapi: 3.0.0
info:
  title: Woku Client API v1
  description: >-
    Public REST API for programmatic management of woku Voice-of-Customer
    programs: trackers, VoC instruments (NPS, woku, CES, CSAT), action plans,
    support tickets, multi-channel sending and response capture. Requests are
    company-scoped by the API key; never send a company id.
  version: 1.0.0
  contact:
    name: Woku
    url: https://woku.app
    email: team@woku.app
servers:
  - url: https://clientapi.woku.app
    description: Production
security: []
tags: []
paths:
  /v1/forms/{id}/invitations:
    post:
      tags:
        - v1 - invitations
      summary: Send a form by email or WhatsApp
      description: >-
        Dispatches the form invitation to a list of recipients. The form must
        belong to the caller company and be open and active.
      operationId: V1InvitationsController_sendFormInvitations
      parameters:
        - name: X-Woku-Idempotency-Key
          in: header
          description: >-
            Client-generated key to make a send safe to retry. A retry with the
            same key returns the original result instead of dispatching again.
          required: false
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: Form id
          schema:
            type: string
            format: ObjectId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1CreateInvitationsBodyDto'
      responses:
        '202':
          description: Per-recipient dispatch summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1InvitationsResultDto'
        '400':
          description: Validation error, or the form is closed or inactive
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseDto'
        '403':
          description: Form does not belong to the caller company
        '404':
          description: Form not found
      security:
        - bearer: []
components:
  schemas:
    V1CreateInvitationsBodyDto:
      type: object
      properties:
        channel:
          type: string
          description: Delivery channel for the invitations
          enum:
            - email
            - whatsapp
          example: whatsapp
        recipients:
          description: >-
            Recipients: email addresses for the email channel, phone numbers
            (digits, country code included, e.g. 56912345678) for whatsapp
          example:
            - '56912345678'
          maxItems: 100
          type: array
          items:
            type: string
        language:
          type: string
          description: Language of the invitation template
          enum:
            - es
            - en
          example: es
      required:
        - channel
        - recipients
    V1InvitationsResultDto:
      type: object
      properties:
        channel:
          type: string
          enum:
            - email
            - whatsapp
        accepted:
          description: Recipients whose invitation was dispatched (or queued)
          type: array
          items:
            type: string
        rejected:
          description: Recipients whose invitation was not dispatched, with reason
          type: array
          items:
            $ref: '#/components/schemas/V1RejectedInvitationDto'
      required:
        - channel
        - accepted
        - rejected
    ValidationErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
        message:
          description: Array of validation error messages
          example:
            - email must be a valid email
            - password must be at least 8 characters
          type: array
          items:
            type: string
        error:
          type: string
          description: Error type
          example: Bad Request
      required:
        - statusCode
        - message
        - error
    V1RejectedInvitationDto:
      type: object
      properties:
        recipient:
          type: string
          description: Recipient as received in the request
        reason:
          type: string
          description: Why the invitation was not dispatched
          enum:
            - invalid_recipient
            - quarantined
            - insufficient_credits_or_blocked
            - send_failed
      required:
        - recipient
        - reason
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: Company secret API key.

````