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

# Send conversion events

> Sends the original Meta Conversions API payload using the stored token of
a current connection in your project. First discover or create the dataset
through GET or POST /{business_account_id}/dataset. No extra phone_number_id
query parameter is required. The WABA in the body does not establish ownership.

Batches and test_event_code pass through unchanged. Meta status codes and
response bodies are preserved. Sends are synchronous, without automatic
retries. Acceptance does not guarantee ad attribution. The connection token
must have the permissions and dataset access required by Meta.




## OpenAPI

````yaml /api/meta/whatsapp/openapi-whatsapp.yaml post /{dataset_id}/events
openapi: 3.1.0
info:
  title: Kapso Meta Proxy API
  version: 1.0.0
  description: >
    Kapso's Meta Proxy API provides a unified interface to WhatsApp Business
    Platform with enhanced features and Kapso-specific extensions.


    This API acts as a proxy layer between your application and WhatsApp,
    adding:

    - Simplified authentication with project-level API keys

    - Enhanced message metadata and tracking

    - Conversation management capabilities

    - Voice call integration

    - Extended contact and template management


    ## Base URL


    All API requests are made to: `https://api.kapso.ai/meta/whatsapp/v24.0`


    ## Authentication


    The API supports authentication via **X-API-Key header** (recommended):


    ```

    X-API-Key: your_project_api_key

    ```


    Alternative: Bearer token authentication is also supported for backward
    compatibility:


    ```

    Authorization: Bearer your_access_token

    ```


    Note: X-API-Key is the recommended authentication method for the Meta Proxy
    API.
  contact:
    name: Kapso Support
    url: https://kapso.ai
    email: dev@kap.so
servers:
  - url: https://api.kapso.ai/meta/whatsapp/v24.0
    description: Production server
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Messages
    description: Send and retrieve WhatsApp messages
  - name: Conversations
    description: Manage WhatsApp conversations
  - name: Contacts
    description: Manage WhatsApp contacts
  - name: Templates
    description: Manage message templates
  - name: Media
    description: Upload and retrieve media files
  - name: Calls
    description: Manage voice calls
  - name: Settings
    description: Account settings and configuration
  - name: Business Profile
    description: Business profile management
  - name: Phone Numbers
    description: Phone number management
  - name: Flows
    description: WhatsApp Flow management (Beta)
  - name: Block Users
    description: Block and unblock WhatsApp users
  - name: Usernames
    description: Reserve and manage WhatsApp business usernames
  - name: Conversion events
    description: Discover WhatsApp datasets and report conversions to Meta
paths:
  /{dataset_id}/events:
    post:
      tags:
        - Conversion events
      summary: Send conversion events
      description: >
        Sends the original Meta Conversions API payload using the stored token
        of

        a current connection in your project. First discover or create the
        dataset

        through GET or POST /{business_account_id}/dataset. No extra
        phone_number_id

        query parameter is required. The WABA in the body does not establish
        ownership.


        Batches and test_event_code pass through unchanged. Meta status codes
        and

        response bodies are preserved. Sends are synchronous, without automatic

        retries. Acceptance does not guarantee ad attribution. The connection
        token

        must have the permissions and dataset access required by Meta.
      operationId: sendConversionEvents
      parameters:
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
          description: Dataset ID returned by WABA dataset discovery or creation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              required:
                - data
              properties:
                data:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                test_event_code:
                  type: string
      responses:
        '200':
          description: Meta event submission response, passed through unchanged
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Meta rejected the event payload; its error response is preserved
        '401':
          description: >-
            Invalid credentials or dataset WABA outside the authenticated
            project
        '404':
          description: >-
            Dataset not discovered through Kapso, or no current connection to
            its WABA
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >
        Project API key for authentication. This is the recommended
        authentication method.


        Get your API key from the Kapso dashboard under Integrations > API keys.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        Bearer token authentication (alternative method).

        Note: X-API-Key authentication is recommended for the Meta Proxy API.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.