Operation

POST /exports

Enqueues a Google Sheets export job. The response contains the new report's id and status (pending). Poll GET /exports/{id} until status=completed and use download_url for the Drive spreadsheet URL. Google Sheets exports always create a new spreadsheet, since the sheet is a live document the caller may have changed. A run already in flight never blocks a new one: an identical request starts its own export. Prefer report_type values ending in _sheets; legacy *_excel types also create Google Sheets, not Excel files.

Operation ID: createExportReport · Tags: Reports

Parameters

This operation does not define any parameters.

Request Body

Required: Yes
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "report_type": {
            "type": "string",
            "enum": [
              "hot_advertisers_sheets",
              "hot_advertisers_excel",
              "commission_drops_sheets",
              "commission_rate_drops_sheets",
              "epc_ecr_drops_sheets",
              "epc_ecr_gains_sheets",
              "top_advertisers_sheets",
              "monthly_network_status_sheets",
              "deals_excel",
              "deals_sheets",
              "advertisers_sheets",
              "pipeline_sheets",
              "opportunities_sheets",
              "portfolio_sheets",
              "rejected_stopped_sheets",
              "transactions_sheets",
              "clicks_sheets",
              "contacts_sheets",
              "publishers_sheets",
              "networks_sheets",
              "agencies_sheets",
              "status_changes_sheets",
              "terms_sheets",
              "users_sheets"
            ],
            "description": "Which export to build."
          },
          "search_params": {
            "type": "object",
            "additionalProperties": true,
            "description": "Optional search filters mirrored from the /reports UI."
          },
          "index_params": {
            "type": "object",
            "additionalProperties": true,
            "description": "Optional sort/faceting parameters mirrored from the /reports UI."
          }
        },
        "required": [
          "report_type"
        ]
      }
    }
  }
}

Responses

Content Types

  • application/json
{
  "description": "Export report queued (or returned via dedupe)",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "export": {
            "type": "object",
            "description": "Generative export report (Google Sheets) summary.",
            "properties": {
              "id": {
                "type": "integer"
              },
              "report_type": {
                "type": "string",
                "enum": [
                  "hot_advertisers_sheets",
                  "hot_advertisers_excel",
                  "commission_drops_sheets",
                  "commission_rate_drops_sheets",
                  "epc_ecr_drops_sheets",
                  "epc_ecr_gains_sheets",
                  "top_advertisers_sheets",
                  "monthly_network_status_sheets",
                  "deals_excel",
                  "deals_sheets",
                  "advertisers_sheets",
                  "pipeline_sheets",
                  "opportunities_sheets",
                  "portfolio_sheets",
                  "rejected_stopped_sheets",
                  "transactions_sheets",
                  "clicks_sheets",
                  "contacts_sheets",
                  "publishers_sheets",
                  "networks_sheets",
                  "agencies_sheets",
                  "status_changes_sheets",
                  "terms_sheets",
                  "users_sheets"
                ]
              },
              "display_name": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "completed",
                  "failed"
                ]
              },
              "status_display": {
                "type": "string"
              },
              "parameters": {
                "type": "object",
                "additionalProperties": true
              },
              "filename": {
                "type": "string",
                "nullable": true
              },
              "download_url": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "For file exports, a presigned S3 GET URL valid for download_expires_in_seconds. For Google Sheets exports, the spreadsheet in the caller's Drive, which does not expire and so comes with no download_expires_in_seconds."
              },
              "download_expires_in_seconds": {
                "type": "integer",
                "nullable": true
              },
              "error_message": {
                "type": "string",
                "nullable": true
              },
              "progress": {
                "type": "object",
                "nullable": true,
                "description": "Set on chunked export parents; reports completed-vs-total chunk counts.",
                "properties": {
                  "parts_ready": {
                    "type": "integer"
                  },
                  "total_parts": {
                    "type": "integer"
                  }
                }
              },
              "parent_report_id": {
                "type": "integer",
                "nullable": true
              },
              "chunked_export": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "started_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "completed_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "status_url": {
                "type": "string",
                "format": "uri",
                "nullable": true
              }
            },
            "required": [
              "id",
              "report_type",
              "status"
            ]
          },
          "deduped": {
            "type": "boolean",
            "description": "True when the create request was answered by a previously-completed identical export within the dedupe window. Always false for Google Sheets exports, which never reuse a previous run."
          }
        },
        "required": [
          "export"
        ]
      }
    }
  }
}

{
  "$ref": "#/components/responses/BadRequest"
}

{
  "$ref": "#/components/responses/Unauthorized"
}

{
  "$ref": "#/components/responses/UnprocessableEntity"
}

API Playground

The in-page tester only supports GET. For POST, use the sample curl below or the dedicated resource docs (e.g. Contacts, Link Builder). Sign in to enable live testing with your API key.

Action Method Endpoint Description
Kick off a generative export report POST /api/v1/exports OpenAPI operationId: createExportReport.

Example request (replace YOUR_API_KEY or sign in above):

curl -X POST "https://app.hienergy.ai/api/v1/exports" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
  -H "Content-Type: application/json" \
  -d '{}'
Ask Dex AIIntegration help

If this page feels TLDR, ask Dex AI.

Dex AI speaks your language, and all the other languages you may not. It will write the integration for you with the right endpoint and headers in one plain-English answer.