Platform API
Data Export

Data Export

The Data Export API allows you to retrieve message, channel, user and failed webhook data from your app and export the results to CSV or JSON formatted files. This API is designed to retrieve the data state of target objects at the moment of being exported, not the activities during the time frame in the past. The start_ts and end_ts in the request indicate the time frame for the creation time of objects, which means channels, messages, users, or failed webhooks created in-between the two timestamps will be the target of the data export. Therefore, if you want to keep track of day-to-day data state, implement your code to make periodic API requests.

Note: Data Export is also available in the Sendbird Dashboard. Since it is one of Sendbird’s premium features, you can use Data Export both in API platform and dashboard by contacting our sales team.


Limitations

Refer to the following limitations before using the Data Export API.

  • The maximum period of message data export is 31 days. ( end_ts - start_ts <= 2678400000)
  • The maximum period of failed webhook data export is 2 days. ( end_ts - start_ts <= 172800000)
  • Except message and failed webhook data, user and channel data export don’t have a limitation of period to export data. However, it is recommended to set the period of all data types under 7 days since the amount of the data may affect the data export process.
  • The maximum number of user IDs in the sender_ids property is 10.
  • start_ts and end_ts are required for message and failed webhook data export.
  • The URL link to data export results expires 7 days after its creation.

Data types

Data Export API provides the following three types of target objects.

Message

Exports all messages and related information, including text, file and admin messages sent between start_ts and end_ts regardless of user activities in channels. Deleted and updated messages are included as well if they aren’t deleted through the GDPR API or deleted after the message retention period passed.

Channel

Exports data of target channels which were created in-between the start_ts and end_ts. The data contains channel related information such as the number of messages or group channel members.

User

Exports data of users who were created in-between the start_ts and end_ts. The data itself doesn’t indicate the activities of users, but you can assume those with the provided data.

Failed webhook

Exports data of webhooks that your server failed to receive from Sendbird server, and which were created in-between the start-ts and end_ts.

Note: Move to Data export results to see the detailed information about exported content in the result files.


How to use

Refer to the following instructions to export data.

Step 1: Register and schedule a data export

  1. Use POST /export/{data_type} to register and schedule a data export by signifying the target data type.
  2. Set start_ts and end_ts. The data whose creation time is in-between the time frame will be the target data.
  3. A request_id will be returned through the response.

Step 2: Retrieve the data export results

  1. Use the reuqest_id received from Step 1 and make a request with GET /export/{data_type}/{request_id}.
  2. In the response, you will receive one of the following five types of export status:
    - scheduled: Indicates your request has been scheduled but the export hasn't started yet.
    - exporting: Indicates that data is being exported.
    - done: Indicates the data export is successfully done and returns with a link to a zip file containing export results.
    - no data: Indicates there is no result that matches with the request.
    - failed: Indicates the server encounters an unexpected exception while trying to process the request.
  3. When the value of status is done, a URL link to data export results will be included in the response. The link expires 7 days after the value of status is changed to done.

Note: Implement your code to make an API call repeatedly until the status in the response is done.


Resource representation

Property nameTypeDescription

start_ts

long

The starting timestamp of a period for target objects' creation date, in Unix milliseconds format. The creation time of messages, channels, and users will be in-between the start_ts and end_ts.

end_ts

long

The ending timestamp of a period for target objects' creation date, in Unix milliseconds format. The creation time of messages, channels, and users will be in-between the start_ts and end_ts.

status

string

The current status of a data export, which is represented in scheduled, exporting, done, failed, or no data.

request_id

string

The value returned through the response when registering data export and used when making a request to retrieve the export status.

format

string

The format of the file to export the messages to. The supported formats are json and csv. (Default: json)

csv_delimiter

string

A single character delimiter to separate the values in each row of the csv file which stores two-dimensional arrays of the exported message data. (Default: ,)

timezone

string

The timezone to be applied to a data export, such as UTC, Asia/Seoul, Europe/London, etc. (Default: UTC)

created_at

long

The timestamp of when a data export was created, in Unix milliseconds format.

channel_urls[]

array

One or more URLs of channels to export the messages from. This property is effective only when the type of data to export is either messages or channels. If the type is users, this property is not effective. (Default: all channels)

file

nested object

The information of the zip file created from a data export.

file.url

string

The URL of the zip file containing the result files for downloading.

file.expires_at

long

The time at which the zip file expires, in Unix milliseconds format. (Default: 7 days starting from the timestamp of file creation)

sender_ids[]

array

The IDs of the users which are used to filter the messages by its sender for the export. This property is effective only when the type of data to export is messages, and can be specified up to 10 IDs in the request. (Default: all messages sent by any user)

user_ids[]

array

The IDs of the users which are used to export their information. This property is effective only when the type of data to export is users. (Default: all users)


Actions

  • API endpoints are relative to the base URL allocated to your application. In this page, the /export endpoint refers to https://api-{application_id}.sendbird.com/v3/export.

Note: If you want to know the ID and base URL of your application, sign in to your dashboard, go to the Settings > Application > General, and then check the Application ID and API request URL.

ActionHTTP request

List data exports by message, channel, or user

GET /export/{data_type}
Retrieves a list of message, channel or user data exports.

View a data export

GET /export/{data_type}/{request_id}
Retrieves the message, channel or user data export information.

Register and schedule a data export

POST /export/{data_type}
Registers and schedules a message, channel, or user data export.


List data exports by message, channel, or user

Retrieves a list of message, channel or user data exports

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/export/{data_type}

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

data_type

string

Specifies the type of a data export to retrieve. Acceptable values are messages, channels, users, and failed_webhooks.

OptionalTypeDescription

token

string

Specifies a page token that indicates the starting index of a chunk of results to retrieve. If not specified, the index is set as 0.

limit

int

Specifies the number of data exports to return per page. Acceptable values are 1 to 100, inclusive. (Default: 10)

Query string example
Light Color Skin
Copy
?token=&limit=3

Response

If successful, this action returns a list of data export resources in the response body.

Status: 200 OK
Light Color Skin
Copy
{
    "exported_data": [
        {
            "request_id": "1ed107739a77414",
            "status": "scheduled",
            "format": "csv",
            "csv_delimiter": "|",
            "timezone": "US/Pacific",
            "created_at": 1544406267000,
            "start_ts": 1544367600000,
            "end_ts": 1544453999000,            
            "channel_urls": [
                "public_chat_room_031", "public_chat_room_032"
            ],
            "sender_ids": [
                "Tom", "Jeff", "Rommel"
            ]       
        },
        {
            "request_id": "76578f9a2bfc469",
            "status": "exporting",
            "format": "csv",
            "csv_delimiter": ",",
            "timezone": "Europe/London",
            "created_at": 1539830900000,
            "start_ts": 153883800000,
            "end_ts": 1539442799000,            
            "channel_urls": [
                "public_chat_room_001", "public_chat_room_002"
            ]   
        },
        {
            "request_id": "ae54def5f11043d",
            "status": "done",
            "format": "json",
            "timezone": "Asia/Seoul",
            "created_at": 1503112356286,
            "start_ts": 1544367600000,
            "end_ts": 1544453999000,
            "channel_urls": [
                "public_chat_room_101", "public_chat_room_102"
            ],
            "file": {   // The 'file' appears only when the status is 'done'.
                "url": "https://sendbird-us-1.s3-us-west-2.amazonaws.com/c17699fb9539453.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=decd2b8870da04168304d41c087ef373a11ac6cf2c4a4e9f1ed22f17717d837d&X-Amz-Date=20181210T014509Z&X-Amz-Credential=AKIAJMXOUSBABZBO45LA%2F20181210%2Fus-west-2%2Fs3%2Faws4_request",
                "expires_at": 1549506234580     // 7 days from the timestamp of file creation.
            }
        }
    ],
    "next": "YdFDRsFRQ1AIRaBXX1RcE2d0FUZSUlkJFVQRHB863DAgNn8eABABBBNFX11fUlsWde53"
}
Property nameTypeDescription

exported_data[]

list

A list of data exports.

next

string

The value for the token parameter to retrieve the next page in the result set.


View a data export

Retrieves information on a message, channel or user data export.

HTTP request

Light Color Skin
Copy
GET https://api-{application_id}.sendbird.com/v3/export/{data_type}/{request_id}

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

data_type

string

Specifies the type of a targeted data export. Acceptable values are messages, channels, users, and failed_webhooks.

request_id

string

Specifies the unique ID of a data export to retrieve.

Response

If successful, this action returns a data export resource and export status in the response body. When the value of status is done, a URL link to data export results will be included in the response.

messages
channels
users
failed_webhooks
Light Color Skin
Copy
{
    "request_id": "afb8aeefc334465",
    "data_type": "messages",
    "status": "done",
    "format": "csv",
    "created_at": 1578897175000,
    "end_ts": 1578927599000,
    "start_ts": 1577718000000,
    "channel_custom_types": [],
    "sender_ids": [
        "Tom", "Jeff", "Rommel"
    ],
    "channel_urls": ["public_chat_room_031", "public_chat_room_032"]
    "csv_delimiter": ",",
    "file": {
        "url": "https://sendbird-us-1.s3.amazonaws.com/rfd34edfc3d4422.zip?AWSAccessKeyId=AKDKEKFCSDSMJDK2PZCA&Expires=1579502105&Signature=RZ%2FcTbRMpDtOEwxmDFjIJV%2Fuolg%e1",
        "expires_at": 1579502105432
    },
    "timezone": "US/Pacific" 
} 
Light Color Skin
Copy
{
    "request_id": "0ec2888013c0416",
    "data_type": "channels",
    "status": "done",
    "format": "csv",
    "created_at": 1580803229000,
    "end_ts": 1563150300000,
    "start_ts": 1560558300000,
    "channel_urls": [],
    "exclude_channel_urls": [
        "public_chat_room_045", "public_chat_room_054", "public_chat_room_076"
    ,]
    "csv_delimiter": ",",
    "file": {
        "url": "https://sendbird-us-1.s3.amazonaws.com/afb8aeefc53da3.zip?AWSAccessKeyId=SDFEIVDKCDEJDK2PZCA&Expires=1579509851&Signature=RZ%2FcTbRMdfasdEOEwxmDFjIJV%2Fuolg%l3",
        "expires_at": 1581408076981
    },
    "timezone": "US/Pacific" 
} 
Light Color Skin
Copy
{
    "request_id": "0ec2888013c0416",
    "data_type": "users",
    "status": "done",
    "format": "csv",
    "created_at": 1580803229000,
    "end_ts": 1563150300000,
    "start_ts": 1560558300000,
    "user_ids": [
        "Julia", "Ellen", "Debbie", "Kay"
    ],
    "csv_delimiter": ",",
    "file": {
        "url": "https://sendbird-us-1.s3.amazonaws.com/beafa3dg3dedf65.zip?AWSAccessKeyId=DFDF2DFECFDE3DZCA&Expires=1579503574&Signature=AZ%2dFcTbAMpDtOEwRdeFjdfAV%2Fuolg%5d",
        "expires_at": 1581408066245
    },
    "timezone": "US/Pacific" 
} 
Light Color Skin
Copy
{
    "request_id": "c4cf11cd53af4c9",
    "data_type": "failed_webhooks",
    "status": "done",
    "format": "csv",
    "created_at": 1598591593000,
    "end_ts": 1598540400000,
    "start_ts": 1598367600000,
    "csv_delimiter": "|",
    "file": {
        "url": "https://sendbird-us-1.s3.amazonaws.com/beafa3dg3dedf65.zip?AWSAccessKeyId=DFDF2DFECFDE3DZCA&Expires=1579503574&Signature=AZ%2dFcTbAMpDtOEwRdeFjdfAV%2Fuolg%5d",
        "expires_at": 1599109993000
    },
    "timezone": "US/Pacific" 
} 

Register and schedule a data export

Registers and schedules a message, channel, or user data export.

HTTP request

Light Color Skin
Copy
POST https://api-{application_id}.sendbird.com/v3/export/{data_type}

Parameters

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

data_type

string

Specifies the type of data to export. Acceptable values are messages, channels, users, and failed webhooks.

Request body

The following table lists the properties of an HTTP request that this action supports.

Properties
RequiredTypeDescription

start_ts

long

Specifies the starting timestamp of a period for target objects' creation date, in Unix milliseconds format. The creation time of messages, channels, and users will be in-between the start_ts and end_ts.

end_ts

long

Specifies the ending timestamp of a period for target objects' creation date, in Unix milliseconds format. The creation time of messages, channels, and users will be in-between the start_ts and end_ts.

OptionalTypeDescription

format

string

Specifies the format of the file to export the messages to. Acceptable values are json and csv. (Default: json)

csv_delimiter

string

Sets a single character delimiter to separate the values in each row of the csv file which stores two-dimensional arrays of the exported message data. You can also set a horizontal tab (\t), a line feed (\n), or a space (' ') as a delimiter. This property is only effective when the value of the format is csv. (Default: ,)

timezone

string

Specifies the timezone to be applied to the timestamp of the exported messages. For example, US/Pacific, Asisa/Seoul, Europe/London, etc. (Default: UTC)

sender_ids[]

array

Specifies an array of the IDs of the users which are used to filter the messages by its sender for the export. This property is effective only when the data_type parameter is set to messages, and can be specified up to 10 IDs in the request. (Default: all messages sent by any user)

exclude_sender_ids[]

array

Specifies an array of the IDs of the users which are used to exclude their sent messages from the export. This property is effective only when the data_type parameter is set to messages, and can be specified up to 10 IDs. (Default: all messages sent by any user)

channel_urls[]

array

Specifies an array of one or more URLs of channels to export the messages from. This property is effective only when the data_type parameter is set to messages or channels. (Default: all channels)

exclude_channel_urls[]

array

Specifies an array of one or more URLs of channels to exclude when exporting the messages. This property is effective only when the data_type parameter is set to messages or channels. (Default: include all channels)

user_ids[]

array

Specifies an array of the IDs of the users to export their information. This property is effective only when the data_type parameter is set to users. (Default: all users)

show_read_receipt

boolean

Determines whether to include information about the read receipts of each channel in the exported data. The read receipt indicates the timestamps of when each user has last read the messages in the channel, in Unix milliseconds. (Default: true)

show_channel_metadata

boolean

Determines whether to include channel metadata in the result files.

neighboring_message_limit

int

Specifies the maximum number of other users’ messages to be exported, which took place after the specified message of a user filtered by the sender_ids property. Even if there may be more messages that took place, if the quantity exceeds the number of the neighboring_message_limit, they are omitted. Only the messages that took place right after the specified message will be counted and exported. This can be used to better analyze the context. Acceptable values are 1 to 10, inclusive. (Default: 0)

messages
channels
users
failed_webhooks
Light Color Skin
Copy
# Request body example
{
    "start_ts": 1544367600000,
    "end_ts": 1544453999000,
    "format": "csv",
    "csv_delimiter": "|",
    "timezone": "US/Pacific",
    "channel_urls": ["public_chat_room_031", "public_chat_room_032"],
    "sender_ids": ["Tom", "Jeff", "Rommel"]
}
Light Color Skin
Copy
# Request body example
{
    "start_ts": 1544363800000,
    "end_ts": 1544454567000,
    "format": "csv",
    "csv_delimiter": "*",
    "timezone": "US/Pacific",
    "exclude_channel_urls": ["public_chat_room_045", "public_chat_room_054", "public_chat_room_076"]
}
Light Color Skin
Copy
# Request body example
{
    "start_ts": 1573441000000,
    "end_ts": 1573447986849,
    "format": "json", 
    "timezone": "US/Pacific",
    "user_ids": ["Julia", "Ellen", "Debbie", "Kay"]
}
Light Color Skin
Copy
# Request body example
{
    "start_ts": 1598367600000,
    "end_ts": 1598540400000,
    "format": "csv",
    "csv_delimiter": "|",
    "timezone": "US/Pacific"
}

Response

If successful, this action returns a data export resource in the response body.

messages
channels
users
failed_webhooks
Light Color Skin
Copy
# Status: 200 OK
{
    "request_id": "1ed107739a77414",
    "data_type": "messages",
    "status": "scheduled",
    "format": "csv",
    "csv_delimiter": "|",
    "timezone": "US/Pacific",
    "created_at": 1503112356286,
    "start_ts": 1544367600000,
    "end_ts": 1544453999000,
    "channel_urls": [ 
        "public_chat_room_031", "public_chat_room_032"
    ],
    "sender_ids": [
        "Tom", "Jeff", "Alek"
    ]
}
Light Color Skin
Copy
# Status: 200 OK
{
    "request_id": "b237ae4a8c1f437",
    "data_type": "channels",
    "status": "scheduled",
    "format": "csv",
    "csv_delimiter": "*",
    "timezone": "US/Pacific",
    "created_at": 1573717519000,
    "start_ts": 1544363800000,
    "end_ts": 1544454567000,
    "channel_urls": [],
    "exclude_channel_urls": [
        "public_chat_room_045", "public_chat_room_054", "public_chat_room_076"
    ] 
}
Light Color Skin
Copy
# Status: 200 OK
{
    "request_id": "c2f86f460f06472",
    "data_type": "users",
    "status": "scheduled",
    "format": "json",
    "timezone": "US/Pacific",
    "created_at": 1573716842000,
    "start_ts": 1573441000000,
    "end_ts": 1573447986849,
    "user_ids": [
        "Julia", "Ellen", "Debbie", "Kay"
    ]
}
Light Color Skin
Copy
# Status: 200 OK
{
    "request_id": "30ebf03d54f7446",
    "data_type": "failed_webhooks",
    "status": "scheduled",
    "format": "csv",
    "timezone": "US/Pacific"
    "created_at": 1598837387000,
    "start_ts": 1598367600000,
    "end_ts": 1598540400000,
    "csv_delimiter": "|",
}

Data export results

The type of contents in the export results is determined by the data type and file format in the request. This section only covers descriptions for contents in the CSV file and provides samples of JSON formatted result files. For the detailed explanation of properties in JSON files, refer to each Resource representation part in Messages, Open channel, Group channel, and Users.

Note: Since message, channel, and user data may be updated during the export, their current data state can be slightly different from the exported data.

Message

- CSV file

The zip file of message data export contains 3 folders as below. Each folder is classified by channel type while the channel_members folder is applicable for group channels only.

Structure of message export

Refer to the following tables to see the description of each property in the result files.

Channels
PropertyTypeDescription

channel_url

string

The unique URL of a channel.

channel_name

string

The name of a channel, or a channel topic.

message_count

int

The number of text, file and admin messages in a channel at the moment of being exported.

channel_created_at

string

The timestamp of when the channel was created, which is in-between the start_ts and end_ts, in Unix milliseconds format.

channel_custom_type

string

A custom channel type of a channel which is used for channel grouping.

channel_member_count

int

The number of members in a group channel at the moment of being exported.

Channel members
PropertyTypeDescription

channel_url

string

The unique URL of a channel where a member belongs.

member_id

string

The unique ID of a member.

member_nickname

string

The nickname of a member.

user_id

string

The unique user ID of a member.

nickname

string

The user nickname of a member.

profile_url

string

The URL of a user’s profile image.

metadata

string

An array of key-value items which store additional user information. For more information, see the User & Channel Metadata page.

last_seen_at

string

The time recorded when the user goes offline, to indicate when they were last online, in Unix milliseconds format. If the user is online, the value is set as 0.

state

string

Indicates whether or not a member has accepted an invitation, or whether or not a user was invited by a friend. Values can be: all, invited_only, joined_only, invited_by_friend, and invited_by_non_friend.

is_active

boolean

Indicates whether a user is currently active within the application. A value of false indicates that a user was deactivated at the moment of being exported.

Messages
PropertyTypeDescription

message_id

string

A unique identifier for the message.

channel_url

string

The unique URL of a channel where the message is sent to.

sender_id

string

The ID of a user who sent the message.

type

string

Indicates the type of a message. MESG is a user’s text message, FILE is a file message, and ADMM indicates either an auto-generated admin message or a message sent by admins from your dashboard.

message

string

MESG contains a user’s text message, FILE contains a URL of a file message, and ADMM contains a message from admins.

created_at

string

The timestamp of when the message was sent, which is in-between the start_ts and end_ts, in Unix milliseconds format.

message_custom_type

string

A custom message type which is used for message grouping.

- JSON file

Refer to the following JSON result samples according to channel type.

Open channel
Group channel
Light Color Skin
Copy
{
    "messages": [
        {
            "message_id": 25702381,
            "type": "ADMM",         // Admin message
            "custom_type": "Movie",
            "channel_url": "love_movie_142ec6ff_f68e_4561_81d6_8d7c0dfbb584",        
            "mention_type" : "users",        
            "mentioned_users": []
            "is_removed": false,    // Indicates whether the message is deleted.       
            "message": "In August 2020, the new movie titled Vacation will be released!",
            "data": "",
            "created_at": 1593555177822,
            "updated_at": 0         // A value of 0 indicates this message hasn’t been updated.
        },
        ... # More messages
    ],
    "channel": {
        "name": "Movie_is_my_life",
        "channel_url": "love_movie_142ec6ff_f68e_4561_81d6_8d7c0dfbb584",
        "cover_url": "https:\/\/movie.com\/Vacation_Jeff_07.jpg",
        "custom_type": "Movie",
        "data": "",
        "is_ephemeral": false,
        "participant_count": 200,
        "max_length_message": 5000,          
        "created_at": 1552298781,   
        "operators": [
            {
                "user_id": "218798",
                "nickname": "Cindy",
                "profile_url": "http:\/\/movie.com\/Happy_cindy_07.jpg"
            },
        ],
        "freeze": "false",
    }
]  
Light Color Skin
Copy
{
    "messages": [
        { 
            "message_id": 25519156,      
            "type": "MESG",     // User message
            "custom_type": "",
            "channel_url": "sendbird_group_channel_2456458_de432c3ce17ff6fd79252e68a2ba9151a7a674fd",
            "user": {
                "user_id": "Cindyyyyyy5555",
                "nickname": "Cindy Kim",
                "profile_url": "https:\/\/file-staging.sendbird.com\/profile_images\90468a10a96b4fd68bbf357285b4d4dd.png",
                "metadata": {}
            },
            "mention_type": "users",
            "mentioned_users": [],
            "is_removed": false,    // Indicates whether the message is deleted.       
            "message": "I want to eat ice cream after watching this movie.",
            "translations": {},
            "data": "",
            "created_at" :1593417597832,
            "updated_at": 0,    // A value of 0 indicates this message hasn’t been updated.
            "silent": false     // Indicates whether to send the massage without any updates on its associated data.
        },
        ... # More messages
    ],
    "channel": {
        "name": "Dessert",   
        "channel_url": "dessert_for_today_2336458_de432c3ce17ff6fd79252e68a2ba9151a7a674fd",
        "cover_url": "https:\/\/sendbird.com\/datw\/cover\/icecream_05.jpg",
        "custom_type": "Food",
        "data": ""
        "is_distinct": false,
        "is_ephemeral": false,
        "is_public": false,
        "is_super": false,
        "is_ephemeral": false,
        "is_access_code_required": false,
        "member_count": 8,
        "joined_member_count": 8,
        "members": [
            {
                "user_id": "LoveNature",
                "state": "joined",
                "is_online": false,
                "is_active": true,
                "last_seen_at": 0,
                "role": "",
                "nickname": "Tree",
                "profile_url": "https:\/\/sendbird.com\/datw\/profiles\/profile_tree.png",
                "metadata": {}
            },
            ... # More members
        "max_length_message": 5000,
        "unread_message_count": 0,
        "unread_mention_count": 0,
        "last_message": {
        "custom_type": "",
        "mentioned_users": [],
        "created_at": 1593420059241,
        "freeze": false
        }

Channel

- CSV file

The zip file of channel data export contains 2 CSV formatted files as below.

Structure of channel export

Refer to the following table to see the description of each property in the result files.

Channels
PropertyTypeDescription

channel_url

string

The unique URL of the channel.

channel_name

string

The name of a channel, or the channel topic.

channel_created_at

string

The timestamp of when a channel was created, which is in-between the start_ts and end_ts, in Unix milliseconds format.

channel_member_count

string

The number of members in a group channel at the moment of being exported.

channel_custom_type

boolean

A custom channel type which is used for channel grouping.

message_count

string

The number of all messages including text, file and admin messages.

- JSON file

Refer to the following JSON result samples according to channel type.

Open channel
Group channel
Light Color Skin
Copy
{
    "open_channels": [
        {
            "name": "Friday night",
            "channel_url": "friday_night__8342_550fbdb6d52fb7a0b4346d98e94f1a006ad08a51",
            "cover_url": "https:\/\/sendbird.com\/datw\/cover\/cover_11.jpg",
            "custom_type": "Secret",
            "data": "",
            "is_ephemeral": false,
            "participant_count": 357,
            "max_length_message": 5000,
            "created_at": 1593501497,
            "operators": [
                {
                    "user_id": "961837",
                    "nickname": "Julia",
                    "profile_url": ""
                },
                ... # More members
            ],
            "freeze": false
        },
        ... # More channels
    ]
}
Light Color Skin
Copy
{
    "group_channels": [
        {
            "name": "Dog food",
            "channel_url": "sendbird_we_love_pets_13642189_a6551db32a30cd76d45c15f8",
            "cover_url": "https:\/\/sendbird.com\/datw\/cover\/cover_91.jpg",
            "custom_type": "Pet",
            "data": "",
            "is_distinct": false,
            "is_public": false,
            "is_super": false,
            "is_ephemeral": false,
            "is_access_code_required": false,
            "member_count": 20,
            "joined_member_count": 20,
            "members": [
                {
                    "user_id": "cindy57575775",
                    "name": "Cindy Kim",
                    "image": "https:\/\/sendbird.com\/datw\/profiles\/forever_datw.png",
                    "is_active": true,
                    "is_bot": false
                },
                ... # More members
            ],
            "max_length_message": 5000,
            "unread_message_count": 0,
            "unread_mention_count": 0,
            "last_message": null,
            "created_at": 1593156557,
            "freeze": false
        },
        ... # More channels
    ]
}

User

- CSV file

The zip file of user data export contains 2 CSV formatted files as below.

Structure of user export

Refer to the following table to see the description of each property in the result files.

Users
PropertyTypeDescription

user_id

string

The unique ID of a user.

nickname

string

The nickname of a user.

profile_url

string

The URL of a user’s profile image.

has_ever_logged_in

boolean

Indicates whether a user has ever logged into the application so far.

is_active

boolean

Indicates whether a user is currently active within the application. A value of false indicates that a user was deactivated at the moment of being exported.

last_seen_at

string

The time recorded when a user goes offline, to indicate when they were last online, in Unix milliseconds format. If a user is online, the value is set as 0.

metadata

nested object

An array of key-value items which store additional user information. For more information, see the User & Channel Metadata page.

session_tokens

list

A list of information of session tokens that identifies the user session and which have no validity after their own expiration time. Each of the items consists of two session_token and expires_at properties. The session_token is an opaque string and expires_at is a validation period of the session token.

access_token

string

An opaque string that identifies the user. It is recommended that every user has their own access token and provides it upon login for security.

- JSON file

Refer to the following JSON result samples according to user type.

Active users
Inactive users
Light Color Skin
Copy
{
    "active_users": [
        {
            "user_id": "hello_tree",
            "nickname": "Tree",
            "profile_url": "https:\/\/sendbird.com\/datw\/my_memory_july2020.png",
            "access_token": "",
            "has_ever_logged_in": true,
            "is_active": true,
            "last_seen_at": "2020-06-30 17:54:45+0900",
            "phone_number": null,
            "metadata": {}
        },
        ... # More active users
    ]
}
Light Color Skin
Copy
{
    "inactive_users": [
        {
            "user_id": "HelloKatherine",
            "nickname": "Katherine",        
            "profile_url": "https:\/\/sendbird.com\/datw\/be_happy.png",
            "access_token": "",
            "has_ever_logged_in": true,
            "is_active": false,
            "last_seen_at": "2020-06-30 17:54:45+0900",
            "phone_number": null,
            "metadata": {}
        },
        ... # More inactive users
    ]
}

Failed webhook

- CSV file

The zip file of failed webhook data export consists of folders organized based on date as below.

Structure of failed webhook export

Refer to the following table to see the description of each property in the result files.

Failed webhooks
PropertyTypeDescription

webhook_url

string

The URL of your webhook server to receive payloads for events.

status_code

int

The status code of the webhook that indicates the type of failure.

request_body

JSON string

The request body for this webhook.

time_millis

long

The timestamp of when the last request out of 3 retries was failed, in Unix milliseconds format.

- JSON file

Refer to the following JSON result samples.

Light Color Skin
Copy
{
    "failed_webhooks": [
        {
            "webhook_url": "https://example.com/chat/notifications",
            "status_code": 400,
            "request_body": "{\"category\":\"group_channel:message_send\",\"sender\":{\"nickname\":\"Andy\",\"user_id\":\"Cindy\", ... }",
            "time_millis": 1596567595437
        },
        ... # More failed webhooks
    ]
}