---
title: "Migrate messages"
method: POST
path: "/v3/migration/{target_channel_url}"
tags: ["Message"]
---

# Migrate messages

`POST /v3/migration/{target_channel_url}`

## Request

- Base URL: `https://api-APP_ID.sendbird.com`
- URL: `https://api-APP_ID.sendbird.com/v3/migration/{target_channel_url}`
- Auth: none declared

## Migrate messages

Using our migration API, you can migrate the messages from another system into a Sendbird system's [channel](https://sendbird.com/docs/chat/v3/platform-api/guides/channel-types) which consists of users, messages, and other chat-related data.

> To turn on this feature, [contact our support team](https://dashboard.sendbird.com/settings/contact_us). 
  

There are three things to do in advance before the migration. Follow the instructions below:

1. Register the users of your current chat solution to your Sendbird application. You can migrate the users into the Sendbird system using the [user creation API](https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-create-a-user).
    
2. Create either an [open](https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-create-a-channel) or a [group](https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-create-a-channel) channel to migrate the messages of your chat solution. The Sendbird system doesn't create a channel for your migration automatically.
    
3. The maximum number of migrated messages per call is 100. To avoid the failure during your migration, you must adjust the number of messages to process at once via the API.
    

https://sendbird.com/docs/chat/platform-api/v3/message/migration/migrate-messages#1-migrate-messages

## Path parameters

- `target_channel_url` string, required

## Headers

- `api-token` string

## Request body

- MigrateMessagesRequest
  - `messages` MigrateMessagesRequestMessagesInner[]
    - union
      - MigrateMessagesTextMessageRequest
        - `user_id` string, required
        - `message_type` 'MESG', required
        - `message` string, required
        - `timestamp` integer, required
        - `custom_type` string
        - `mentioned_user_ids` string[]
        - `data` string
        - `dedup_id` string
        - `sorted_metaarray` object[]
      - MigrateMessagesFileMessageRequest
        - `user_id` string, required
        - `message_type` 'FILE', required
        - `url` string, required
        - `timestamp` integer, required
        - `file_name` string
        - `file_size` integer
        - `file_type` string
        - `thumbnails` MigrateMessagesFileMessageRequestThumbnailsInner[]
          - union
            - string
            - object
        - `require_auth` boolean
        - `custom_type` string
        - `custom_field` string
        - `mentioned_user_ids` string[]
        - `dedup_id` string
        - `sorted_metaarray` object[]
      - MigrateMessagesAdminMessageRequest
        - `message_type` 'ADMM', required
        - `message` string, required
        - `timestamp` integer, required
        - `custom_type` string
        - `is_silent` boolean
        - `mentioned_user_ids` string[]
        - `data` string
        - `dedup_id` string
        - `sorted_metaarray` object[]
  - `update_read_ts` boolean
  - `rewind_read_ts` boolean

## Response `200`

Successful response

- EmptyObjectResponse

## Changes

- **2025-07-27** `073cffd0bd87`: 3 info
  - added the new optional request property `messages`
  - added the new optional request property `rewind_read_ts`
  - added the new optional request property `update_read_ts`
- **2025-07-27** `7a85bad03e90`: 1 warning, 3 info
  - deleted the `header` request parameter `Api-Token`
  - api operation id `migrateMessagesByUrl` removed and replaced with `migrateMessages`
  - added the new optional `header` request parameter `api-token`
  - added the media type `application/json` for the response with the status `200`
- **2023-11-10** `135d8b0705d4`: 1 info
  - the `header` request parameter `Api-Token` became optional
- **2022-06-29** `4012275aa67d`: 2 info
  - api tag `Message` added
  - api tag `Migration` removed
- **2022-02-16** `c42164095c7c`: 1 breaking
  - the `header` request parameter `Api-Token` became required

[Operation history](https://skmtc.dev/sendbird/apis/sendbird-platform-sdk/changes/v3/migration/:target_channel_url/post.md)

---

[API](https://skmtc.dev/sendbird/apis/sendbird-platform-sdk.md) - [All operations](https://skmtc.dev/sendbird/apis/sendbird-platform-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/sendbird/apis/sendbird-platform-sdk/revisions/9e53a5288df0?raw)
