# Create Report POST https://api.hellosign.com/v3/report/create Content-Type: application/json Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. Reference: https://developer.hellosign.com/api/report/create ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Create Report version: endpoint_report.create paths: /report/create: post: operationId: create summary: Create Report description: >- Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. tags: - - subpackage_report parameters: - name: Authorization in: header description: Basic authentication of the form `Basic `. required: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/ReportCreateResponse' '400': description: failed_operation content: {} requestBody: content: application/json: schema: $ref: '#/components/schemas/ReportCreateRequest' components: schemas: ReportCreateRequestReportTypeItems: type: string enum: - value: user_activity - value: document_status - value: sms_activity ReportCreateRequest: type: object properties: end_date: type: string description: The (inclusive) end date for the report data in `MM/DD/YYYY` format. report_type: type: array items: $ref: '#/components/schemas/ReportCreateRequestReportTypeItems' description: >- The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). start_date: type: string description: >- The (inclusive) start date for the report data in `MM/DD/YYYY` format. required: - end_date - report_type - start_date ReportResponseReportTypeItems: type: string enum: - value: user_activity - value: document_status - value: sms_activity ReportResponse: type: object properties: success: type: string description: A message indicating the requested operation's success start_date: type: string description: The (inclusive) start date for the report data in MM/DD/YYYY format. end_date: type: string description: The (inclusive) end date for the report data in MM/DD/YYYY format. report_type: type: array items: $ref: '#/components/schemas/ReportResponseReportTypeItems' description: >- The type(s) of the report you are requesting. Allowed values are "user_activity" and "document_status". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). WarningResponse: type: object properties: warning_msg: type: string description: Warning message warning_name: type: string description: Warning name required: - warning_msg - warning_name ReportCreateResponse: type: object properties: report: $ref: '#/components/schemas/ReportResponse' warnings: type: array items: $ref: '#/components/schemas/WarningResponse' description: A list of warnings. required: - report ``` ## SDK Code Examples ```php PHP setUsername("YOUR_API_KEY"); $report_create_request = (new Dropbox\Sign\Model\ReportCreateRequest()) ->setStartDate("09/01/2020") ->setEndDate("09/01/2020") ->setReportType([ Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_USER_ACTIVITY, Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_DOCUMENT_STATUS, ]); try { $response = (new Dropbox\Sign\Api\ReportApi(config: $config))->reportCreate( report_create_request: $report_create_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling ReportApi#reportCreate: {$e->getMessage()}"; } ``` ```csharp C# using System; using System.Collections.Generic; using System.IO; using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; namespace Dropbox.SignSandbox; public class ReportCreateExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; var reportCreateRequest = new ReportCreateRequest( startDate: "09/01/2020", endDate: "09/01/2020", reportType: [ ReportCreateRequest.ReportTypeEnum.UserActivity, ReportCreateRequest.ReportTypeEnum.DocumentStatus, ] ); try { var response = new ReportApi(config).ReportCreate( reportCreateRequest: reportCreateRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling ReportApi#ReportCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } } } ``` ```typescript TypeScript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.ReportApi(); apiCaller.username = "YOUR_API_KEY"; const reportCreateRequest: models.ReportCreateRequest = { startDate: "09/01/2020", endDate: "09/01/2020", reportType: [ models.ReportCreateRequest.ReportTypeEnum.UserActivity, models.ReportCreateRequest.ReportTypeEnum.DocumentStatus, ], }; apiCaller.reportCreate( reportCreateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling ReportApi#reportCreate:"); console.log(error.body); }); ``` ```java Java package com.dropbox.sign_sandbox; import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; import java.math.BigDecimal; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; public class ReportCreateExample { public static void main(String[] args) { var config = Configuration.getDefaultApiClient(); ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); var reportCreateRequest = new ReportCreateRequest(); reportCreateRequest.startDate("09/01/2020"); reportCreateRequest.endDate("09/01/2020"); reportCreateRequest.reportType(List.of ( ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS )); try { var response = new ReportApi(config).reportCreate( reportCreateRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling ReportApi#reportCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ```ruby Ruby require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| config.username = "YOUR_API_KEY" end report_create_request = Dropbox::Sign::ReportCreateRequest.new report_create_request.start_date = "09/01/2020" report_create_request.end_date = "09/01/2020" report_create_request.report_type = [ "user_activity", "document_status", ] begin response = Dropbox::Sign::ReportApi.new.report_create( report_create_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling ReportApi#report_create: #{e}" end ``` ```python Python import json from datetime import date, datetime from pprint import pprint from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: report_create_request = models.ReportCreateRequest( start_date="09/01/2020", end_date="09/01/2020", report_type=[ "user_activity", "document_status", ], ) try: response = api.ReportApi(api_client).report_create( report_create_request=report_create_request, ) pprint(response) except ApiException as e: print("Exception when calling ReportApi#report_create: %s\n" % e) ``` ```go Report package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/report/create" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Basic :") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```swift Report import Foundation let headers = [ "Authorization": "Basic :", "Content-Type": "application/json" ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/report/create")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ```php PHP setUsername("YOUR_API_KEY"); $report_create_request = (new Dropbox\Sign\Model\ReportCreateRequest()) ->setStartDate("09/01/2020") ->setEndDate("09/01/2020") ->setReportType([ Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_USER_ACTIVITY, Dropbox\Sign\Model\ReportCreateRequest::REPORT_TYPE_DOCUMENT_STATUS, ]); try { $response = (new Dropbox\Sign\Api\ReportApi(config: $config))->reportCreate( report_create_request: $report_create_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling ReportApi#reportCreate: {$e->getMessage()}"; } ``` ```csharp C# using System; using System.Collections.Generic; using System.IO; using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; namespace Dropbox.SignSandbox; public class ReportCreateExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; var reportCreateRequest = new ReportCreateRequest( startDate: "09/01/2020", endDate: "09/01/2020", reportType: [ ReportCreateRequest.ReportTypeEnum.UserActivity, ReportCreateRequest.ReportTypeEnum.DocumentStatus, ] ); try { var response = new ReportApi(config).ReportCreate( reportCreateRequest: reportCreateRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling ReportApi#ReportCreate: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } } } ``` ```typescript TypeScript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.ReportApi(); apiCaller.username = "YOUR_API_KEY"; const reportCreateRequest: models.ReportCreateRequest = { startDate: "09/01/2020", endDate: "09/01/2020", reportType: [ models.ReportCreateRequest.ReportTypeEnum.UserActivity, models.ReportCreateRequest.ReportTypeEnum.DocumentStatus, ], }; apiCaller.reportCreate( reportCreateRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling ReportApi#reportCreate:"); console.log(error.body); }); ``` ```java Java package com.dropbox.sign_sandbox; import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; import java.math.BigDecimal; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; public class ReportCreateExample { public static void main(String[] args) { var config = Configuration.getDefaultApiClient(); ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); var reportCreateRequest = new ReportCreateRequest(); reportCreateRequest.startDate("09/01/2020"); reportCreateRequest.endDate("09/01/2020"); reportCreateRequest.reportType(List.of ( ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS )); try { var response = new ReportApi(config).reportCreate( reportCreateRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling ReportApi#reportCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ```ruby Ruby require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| config.username = "YOUR_API_KEY" end report_create_request = Dropbox::Sign::ReportCreateRequest.new report_create_request.start_date = "09/01/2020" report_create_request.end_date = "09/01/2020" report_create_request.report_type = [ "user_activity", "document_status", ] begin response = Dropbox::Sign::ReportApi.new.report_create( report_create_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling ReportApi#report_create: #{e}" end ``` ```python Python import json from datetime import date, datetime from pprint import pprint from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: report_create_request = models.ReportCreateRequest( start_date="09/01/2020", end_date="09/01/2020", report_type=[ "user_activity", "document_status", ], ) try: response = api.ReportApi(api_client).report_create( report_create_request=report_create_request, ) pprint(response) except ApiException as e: print("Exception when calling ReportApi#report_create: %s\n" % e) ``` ```go Default Example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/report/create" payload := strings.NewReader("{\n \"end_date\": \"09/01/2020\",\n \"report_type\": [\n \"user_activity\",\n \"document_status\"\n ],\n \"start_date\": \"09/01/2020\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Basic :") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```swift Default Example import Foundation let headers = [ "Authorization": "Basic :", "Content-Type": "application/json" ] let parameters = [ "end_date": "09/01/2020", "report_type": ["user_activity", "document_status"], "start_date": "09/01/2020" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/report/create")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```