---
title: "Create Message Store Report"
method: POST
path: "/restapi/v1.0/account/{accountId}/message-store-report"
tags: ["Message Exports"]
---

# Create Message Store Report

`POST /restapi/v1.0/account/{accountId}/message-store-report`

Creates a task to collect all account messages within the specified
time interval. Maximum number of simultaneous tasks per account is 2.

## Path parameters

- `accountId` string, required

## Request body

- CreateMessageStoreReportRequest
  - `dateTo` string, date-time — The end of the time range to collect message records in ISO 8601 format including timezone. Default is the current time
  - `dateFrom` string, date-time — The beginning of the time range to collect call log records in ISO 8601 format including timezone. Default is the current time minus 24 hours
  - `messageTypes` PicMessageTypeEnum[] — Types of messages to be collected. If not specified, all messages without message type filtering will be returned. Multiple values are accepted

## Response `202`

Success

- MessageStoreReport
  - `id` string — Internal identifier of a message store report task
  - `uri` string, uri — Canonical URI of a task
  - `status` 'Accepted' | 'Pending' | 'InProgress' | 'AttemptFailed' | 'Failed' | 'Completed' | 'Cancelled' — Status of a message store report task
  - `accountId` string — Internal identifier of an account
  - `extensionId` string — Internal identifier of an extension
  - `dateTo` string, date-time — The end of the time range to collect message records in ISO 8601 format including timezone
  - `dateFrom` string, date-time — The beginning of the time range to collect call log records in ISO 8601 format including timezone
  - `startTime` string, date-time — The time when this task was started
  - `finishTime` string, date-time — The time when this task was finished
  - `messageTypes` PicMessageTypeEnum[] — Type of messages to be collected.

## Other responses

- `400` — General response with **HTTP 400 "Bad request"** status.<br> Reasons: unparsable request, path, query or body parameters are invalid. The error description may contain reference to particular parameter(s) which haven't passed the validation.
- `500` — General response with **HTTP 500 "Internal Server Error"** status.<br> Reasons: general server-side error.
- `503` — General response with **HTTP 503 "Service not available"** status.<br> Reasons: server cannot process the request because of being overloaded, misconfiguration or other issues.

---

[API](https://skmtc.net/ringcentral/apis/ringcentral-api.md) · [All operations](https://skmtc.net/ringcentral/apis/ringcentral-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ringcentral/ringcentral-api/versions/8d602198ec97/schema)
