How to Generate Async Reports with Reports API for Video API How to Generate Async Reports with Reports API for Video API

How to Generate Async Reports with Reports API for Video API

Yukari Dumburs

Objective

This article explains how to create and retrieve asynchronous reports using Reports API, which recently added support for Video API. Please note that this feature is available for Unified accounts, but it is not supported in OpenTok environments. 

How to recognize if I’m using Vonage Video API Unified Environment or Vonage Video API OpenTok environment?

Applies To

  • Reports API
  • Video API (Unified)

Procedure

To generate a Video API report with Reports API, you must use the REST API.

1. Submit a request to generate an asynchronous report:

curl -X POST https://api.nexmo.com/v2/reports \
  -u $API_KEY:$API_SECRET \
  -H "Content-Type: application/json" \
  -d '{
    "product": "VIDEO-API",
    "account_id": "$API_KEY",
    "date_start": "2025-09-20T00:00:00Z",
    "date_end": "2025-09-30T23:59:59Z",
    "callback_url": "$CALLBACK_URL"
  }'

2. Check the status of the report:

You can either use the request_id from the response in Step 1 to check the status:

curl https://api.nexmo.com/v2/reports/$REQUEST_ID \
  -u $API_KEY:$API_SECRET 

Or check the callback response if you set callback_url in Step 1.

3. If the request_status is SUCCESS in the response in Step 2, you can download it. Use the provided download URL from download_report in the response in Step 2 to retrieve the report:

curl $DOWNLOAD_URL \
  -u $API_KEY:$API_SECRET \
  -o /Users/Username/Downloads/report.zip

 

Additional Information