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

# Send Meta agent event

> Tell the agent something happened, such as an order shipped or a payment received, and it messages the customer about it. Meta queues it: read the event to follow the outcome.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/events
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
tags:
  - name: Inbox
  - name: Chats
  - name: Messages
  - name: Contacts
  - name: Custom channels
  - name: Segments
  - name: Suppressions
  - name: Assistants
  - name: Agents
  - name: Skills
  - name: Knowledge
  - name: AI
  - name: Broadcasts
  - name: Email sending
  - name: WhatsApp
  - name: WhatsApp Meta agent
  - name: Tables
  - name: Records
  - name: Views
  - name: Pages
  - name: Connections
  - name: Workspace
  - name: Sub-organizations
  - name: Analytics and logs
  - name: Workflows
paths:
  /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/events:
    post:
      tags:
        - WhatsApp Meta agent
      summary: Send Meta agent event
      description: >-
        Tell the agent something happened, such as an order shipped or a payment
        received, and it messages the customer about it. Meta queues it: read
        the event to follow the outcome.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the org
          name: org_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the connection
          name: connection_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the WhatsApp phone number the Meta agent runs on
          name: phone_number_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWhatsAppMetaAgentEventSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateWhatsAppMetaAgentEventSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppMetaAgentEventAcceptedSchema'
components:
  schemas:
    CreateWhatsAppMetaAgentEventSchema:
      type: object
      properties:
        to:
          type: string
          pattern: ^\+\d{6,15}$
          description: >-
            The customer number in E.164 format. They must already have a
            conversation with the business.
          example: '+15551234567'
        event:
          type: object
          properties:
            type:
              type: string
              minLength: 1
              maxLength: 256
              description: Your own name for the event.
              example: order_shipped
            description:
              type: string
              minLength: 1
              maxLength: 1024
              description: What happened, for the agent to read.
            payload:
              type: string
              maxLength: 4096
              description: The event data as a JSON string.
              example: '{"order_id":"1042","carrier":"DHL"}'
          required:
            - type
            - description
            - payload
      required:
        - to
        - event
    WhatsAppMetaAgentEventAcceptedSchema:
      type: object
      properties:
        status:
          type: string
        agent_event_id:
          type: string
      required:
        - status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````