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

# Get Agent Event Status

> Fetches the latest status of an agent event from Meta. Requires the Meta AI Agent to be enabled for your account and set up on the number.



## OpenAPI

````yaml GET /api/pub/wa/business-agent/events/{id}
openapi: 3.1.0
info:
  title: AdsEra REST API
  description: >-
    Welcome to the AdsEra REST API. Use our API to integrate powerful,
    multi-channel communication (Email and WhatsApp) directly into your
    applications. Automate transactional messages, trigger marketing campaigns,
    manage your audience, and track performance programmatically.
  contact:
    name: Shubham
    email: shubham@adsera.in
  version: 1.0.0
servers:
  - url: https://app.adsera.in
    description: Production Server
security:
  - AppIdAuth: []
    AppSecretAuth: []
paths:
  /api/pub/wa/business-agent/events/{id}:
    get:
      tags:
        - Meta AI Agent
      summary: Get Agent Event Status
      description: >-
        Fetches the latest status of an agent event from Meta. Requires the Meta
        AI Agent to be enabled for your account and set up on the number.
      operationId: getAgentEvent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The event `_id` from **Send an Agent Event**.
        - name: phoneId
          in: query
          required: true
          schema:
            type: string
          description: The Meta phone number ID of your WhatsApp number.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/BusinessAgentEvent'
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessAgentError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessAgentError'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessAgentError'
        '409':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessAgentError'
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessAgentError'
components:
  schemas:
    BusinessAgentEvent:
      type: object
      properties:
        _id:
          type: string
        phoneId:
          type: string
        to:
          type: string
        type:
          type: string
        description:
          type: string
        payload:
          type: string
        metaEventId:
          type: string
          nullable: true
        status:
          type: string
          description: Status from Meta, e.g. `accepted`.
        errorMessage:
          type: string
          nullable: true
        skippedReason:
          type: string
          nullable: true
        source:
          type: string
          example: api
        createdAt:
          type: string
          format: date-time
    BusinessAgentError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: string
          enum:
            - FEATURE_DISABLED
            - META_NOT_FOUND
            - NOT_ONBOARDED
            - INVALID_INPUT
            - TAKE_NOT_ALLOWED
            - SERVER_ERROR
        message:
          type: string
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          example: 500
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Internal Server Error!
  responses:
    Unauthorized:
      description: Unauthorized. The API keys are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 401
            success: false
            error: 'Unauthorized: Please provide valid API credentials.'
  securitySchemes:
    AppIdAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your application's unique ID.
    AppSecretAuth:
      type: apiKey
      in: header
      name: x-api-secret
      description: Your application's secret key.

````

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