---
updatedAt: 2026-04-24T16:37:26.000Z
agentTools:
  projectIndex: https://developers.cloudbeds.com/llms.txt
---

# Queue task to export multiple reports by ids as single Excel workbook

# OpenAPI definition

```json
{
  "info": {
    "description": "#### The Cloudbeds Data Insights API provides programmatic methods to access report data in [Data Insights](https://www.cloudbeds.com/measure-success/). With the Cloudbeds Data Insights API, you can:\n\n- Build custom reports to display Cloudbeds data.\n- Automate complex reporting tasks to save time.\n- Integrate your Cloudbeds data with other business applications.\n- Schedule your reports to your email in a custom frequency\n- Access stock/custom reports created by Cloudbeds\n- And many others\n- Export Request has a limit of 100000 records\n- Data and Summary requests has a limit of 100 records when the mode is Preview\n- Data and Summary requests has a limit of 12000 records when the mode is Run\n\n*Note: The API return application/json*.",
    "version": "1.1",
    "title": "Data Insights API",
    "termsOfService": "https://www.cloudbeds.com/terms/api/",
    "contact": {
      "email": "support@cloudbeds.com"
    },
    "license": {
      "name": "Cloudbeds",
      "url": "https://www.cloudbeds.com/"
    }
  },
  "components": {
    "securitySchemes": {
      "Authorization": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "##### Authorization refers to the process of granting a user or application access permissions to Cloudbeds data and features.\n\nTo authenticate your users, your App will need to implement an [authorization code flow](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1).\n[Cloudbeds API Authentication](https://hotels.cloudbeds.com/api/docs/#api-Authentication) lets you direct your users to an authorization dialog on Cloudbeds.\nFrom there, the primary Cloudbeds experience will show the authorization dialog and handle the authorization on behalf of your App.\nYour users will be able to authorize or decline.\nAfter the user makes their choice, Cloudbeds will redirect the user to your App, where you can exchange the authorization code for an access token (if the user authorized your App), or handle a rejection (if the user did not authorize your App).\n\nIf using a cloudbeds API key, you can pass it as a header with the following format: `X-API-KEY: <your_api_key>`\n\n###### Cloudbeds implements the [OAuth 2.0](https://integrations.cloudbeds.com/hc/en-us/articles/360006450433-OAuth-2-0) authorization framework."
      }
    },
    "schemas": {
      "ErrorContent": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error code"
          },
          "status": {
            "type": "string",
            "description": "Error status"
          },
          "description": {
            "type": "string",
            "description": "Error description"
          },
          "message": {
            "type": "object",
            "description": "Error message"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorContent"
          }
        }
      },
      "HTTPHeaders": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Date of the response"
          },
          "content_type": {
            "type": "string",
            "description": "Content type"
          },
          "content_length": {
            "type": "integer",
            "description": "Length of the content"
          },
          "connection": {
            "type": "string",
            "description": "Connection type"
          },
          "x_amzn_requestid": {
            "type": "string",
            "description": "Amazon request ID"
          }
        }
      },
      "ResponseMetadata": {
        "type": "object",
        "properties": {
          "RequestId": {
            "type": "string",
            "description": "Request ID"
          },
          "HTTPStatusCode": {
            "type": "integer",
            "description": "HTTP status code"
          },
          "HTTPHeaders": {
            "description": "HTTP headers",
            "allOf": [
              {
                "$ref": "#/components/schemas/HTTPHeaders"
              }
            ]
          },
          "RetryAttempts": {
            "type": "integer",
            "description": "Number of retry attempts"
          }
        }
      },
      "Email": {
        "type": "object",
        "properties": {
          "MessageId": {
            "type": "string",
            "description": "ID of the email sent"
          },
          "ResponseMetadata": {
            "$ref": "#/components/schemas/ResponseMetadata"
          }
        }
      },
      "QueueResult": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "url",
            "description": "Download URL of the generated report"
          },
          "format": {
            "type": "string",
            "description": "Format of the report",
            "example": "xlsx"
          },
          "view": {
            "type": "string",
            "description": "View of the report",
            "example": "raw"
          },
          "filename": {
            "type": "string",
            "description": "Name of the report",
            "example": "Report Name"
          },
          "generated_at": {
            "type": "string",
            "description": "Timestamp of the report"
          },
          "email": {
            "description": "Information about the email sent to the user, if one was sent.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Email"
              }
            ]
          },
          "emails": {
            "description": "Information about the emails sent to the user, if there were multiple emails sent.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Email"
            }
          }
        },
        "required": [
          "filename",
          "format",
          "url",
          "view"
        ]
      },
      "QueueResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "53cce75e-eed6-4040-8a98-8accf372947a"
          },
          "status": {
            "type": "string",
            "description": "Status of the task",
            "example": "PENDING"
          },
          "result": {
            "$ref": "#/components/schemas/QueueResult"
          },
          "error": {
            "type": "string",
            "description": "Error, if the task failed"
          }
        }
      }
    },
    "responses": {
      "BAD_REQUEST": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/datainsights/v1.1/reports/export/async": {
      "post": {
        "parameters": [
          {
            "in": "query",
            "name": "name",
            "required": false,
            "description": "Name of the workbook to generate",
            "schema": {
              "type": "string",
              "default": "Workbook",
              "minLength": 1,
              "maxLength": 32,
              "example": "Nightly report"
            }
          },
          {
            "in": "query",
            "name": "report_ids",
            "required": true,
            "explode": false,
            "style": "form",
            "description": "Report IDs",
            "schema": {
              "type": "array",
              "minItems": 1,
              "maxItems": 15,
              "items": {
                "type": "integer",
                "minimum": 1,
                "description": "Report Id",
                "example": "1"
              }
            }
          },
          {
            "in": "query",
            "name": "include_charts",
            "required": false,
            "description": "Flag to include charts in the export, defaults to True",
            "schema": {
              "type": "boolean",
              "default": true,
              "example": true
            }
          },
          {
            "in": "header",
            "name": "X-PROPERTY-ID",
            "required": true,
            "description": "Property id of the client",
            "schema": {
              "type": "integer",
              "writeOnly": true,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BAD_REQUEST"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Queue task to export multiple reports by ids as single Excel workbook",
        "tags": [
          "Reports"
        ],
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Reports",
      "description": "Operations on reports"
    }
  ],
  "openapi": "3.0.2",
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```