---
title: "Sync Messages"
method: GET
path: "/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-sync"
tags: ["Message Store"]
---

# Sync Messages

`GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/message-sync`

Synchronizes messages.

## Path parameters

- `accountId` string, required
- `extensionId` string, required

## Query parameters

- `conversationId` integer
- `dateFrom` string, date-time
- `dateTo` string, date-time
- `direction` MessageDirectionEnum[]
- `distinctConversations` boolean
- `messageType` MessageTypeEnum[]
- `recordCount` integer
- `syncToken` string
- `syncType` 'FSync' | 'ISync' — Type of message synchronization request: - FSync -- full sync - ISync -- incremental sync
- `voicemailOwner` string[]

## Response `200`

Success

- GetMessageSyncResponse
  - `uri` string, uri — Link to the message sync resource
  - `records` GetMessageInfoResponse[], required — List of message records with synchronization information
    - `id` integer — Internal identifier of a message
    - `uri` string, uri — Canonical URI of a message
    - `extensionId` string — Internal identifier of an extension
    - `attachments` MessageAttachmentInfo[] — List of message attachments
      - `id` integer — Internal identifier of a message attachment
      - `uri` string, uri — Canonical URI of a message attachment
      - `type` 'AudioRecording' | 'AudioTranscription' | 'Text' | 'SourceDocument' | 'RenderedDocument' | 'MmsAttachment' — Type of message attachment
      - `contentType` string — MIME type for a given attachment, for instance 'audio/wav'
      - `vmDuration` integer — Supported for `Voicemail` only. Duration of a voicemail in seconds
      - `fileName` string — Name of a file attached
      - `size` integer — Size of attachment in bytes
      - `height` integer — Attachment height in pixels if available
      - `width` integer — Attachment width in pixels if available
    - `availability` 'Alive' | 'Deleted' | 'Purged' — Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly
    - `conversationId` integer — SMS and Pager only. Identifier of a conversation the message belongs to
    - `conversation` ConversationInfo — SMS and Pager only. Information about a conversation the message belongs to
      - `id` string — Internal identifier of a conversation
      - `uri` string, uri — Deprecated. Link to a conversation resource
    - `creationTime` string, date-time — Message creation date/time in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z
    - `deliveryErrorCode` string — SMS only. Delivery error code returned by gateway
    - `direction` 'Inbound' | 'Outbound' — Text message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound
    - `faxPageCount` integer — Fax only. Page count in a fax message
    - `faxResolution` 'High' | 'Low' — Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi
    - `from` MessageStoreCallerInfoResponseFrom — Sender information
      - `extensionNumber` string — Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message
      - `extensionId` string — Internal identifier of an extension
      - `location` string — Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers)
      - `name` string — Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then
      - `phoneNumber` string — Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS
    - `lastModifiedTime` string, date-time — The date/time when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z
    - `messageStatus` 'Queued' | 'Sent' | 'Delivered' | 'DeliveryFailed' | 'SendingFailed' | 'Received' — Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned. If, for outbound message, a status for at least one recipient is 'Queued', then the 'Queued' value is returned. If a status for at least one recipient is 'SendingFailed', then the 'SendingFailed' value is returned. In other cases the 'Sent' status is returned
    - `pgToDepartment` boolean — Pager only. `true` if at least one of the message recipients is 'Department' extension
    - `priority` 'Normal' | 'High' — Message priority
    - `readStatus` 'Read' | 'Unread' — Message read status
    - `smsDeliveryTime` string, date-time — SMS only. Date/time when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if a carrier sends a delivery receipt to RingCentral
    - `smsSendingAttemptsCount` integer — SMS only. Number of attempts made to send an outbound SMS to the Gateway (if Gateway is temporary unavailable)
    - `subject` string — Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment
    - `to` MessageStoreCallerInfoResponseTo[] — Recipient information
      - `extensionNumber` string — Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager messages
      - `extensionId` string
      - `location` string — Contains party location (city, state) if one can be determined from a phone number. This property is filled only when `phoneNumber` is not empty and a server can calculate location information from it (for example, this information is unavailable for US toll-free numbers)
      - `target` boolean — The `true` value specifies that message is sent exactly to this recipient. Returned in the `to` field for group MMS. Useful if one extension has several phone numbers'
      - `messageStatus` 'Queued' | 'Sent' | 'Delivered' | 'DeliveryFailed' | 'SendingFailed' | 'Received' — Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned. If, for outbound message, a status for at least one recipient is 'Queued', then the 'Queued' value is returned. If a status for at least one recipient is 'SendingFailed', then the 'SendingFailed' value is returned. In other cases the 'Sent' status is returned
      - `faxErrorCode` 'AllLinesInUse' | 'Undefined' | 'NoFaxSendPermission' | 'NoInternationalPermission' | 'NoFaxMachine' | 'NoAnswer' | 'LineBusy' | 'CallerHungUp' | 'NotEnoughCredits' | 'SentPartially' | 'InternationalCallingDisabled' | 'DestinationCountryDisabled' | 'UnknownCountryCode' | 'NotAccepted' | 'InvalidNumber' | 'CallDeclined' | 'TooManyCallsPerLine' | 'CallFailed' | 'RenderingFailed' | 'TooManyPages' | 'ReturnToDBQueue' | 'NoCallTime' | 'WrongNumber' | 'ProhibitedNumber' | 'InternalError' | 'FaxSendingProhibited' | 'ThePhoneIsBlacklisted' | 'UserNotFound' | 'ConvertError' | 'DBGeneralError' | 'SkypeBillingFailed' | 'AccountSuspended' | 'ProhibitedDestination' | 'InternationalDisabled'
      - `name` string — Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then
      - `phoneNumber` string — Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS
      - `recipientId` string — Internal identifier of a message recipient
    - `type` 'Fax' | 'SMS' | 'VoiceMail' | 'Pager' | 'Text' — Message type
    - `vmTranscriptionStatus` 'NotAvailable' | 'InProgress' | 'TimedOut' | 'Completed' | 'CompletedPartially' | 'Failed' | 'Unknown' — Voicemail only. Status of a voicemail to text transcription. If 'VoicemailToText' feature is not activated for account, the 'NotAvailable' value is returned
    - `coverIndex` integer — Cover page identifier. If coverIndex is set to '0' (zero) cover page is not attached. For the list of available cover page identifiers (1-13) please call the Fax Cover Pages method. If not specified, the default cover page is attached (which is configured in 'Outbound Fax Settings')
    - `coverPageText` string — Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols
  - `syncInfo` SyncInfoMessages, required — Sync type, token and time
    - `syncType` 'FSync' | 'ISync' — Type of message synchronization request: - FSync -- full sync - ISync -- incremental sync
    - `syncToken` string — Synchronization token
    - `syncTime` string, date-time — Last synchronization date/time in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z
    - `olderRecordsExist` boolean

---

[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/revisions/8d602198ec97/schema)
