/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    Overview

    Copy link

    Your Sendbird application provides core functionalities that ensure optimal performance of your chat service. The Chat API allows you to manage multiple Sendbird applications as well as your apps.

    You can use one Sendbird application per app regardless of the platform. For example, your app released in both Android and iOS systems would require only one Sendbird application. If multiple apps share a single user base, we recommend using one Sendbird application.


    Resource representation

    Copy link

    The following table shows the list of properties in an application resource.

    Property nameTypeDescription

    app_id

    string

    The unique ID of the application.

    app_name

    string

    The name of the application.

    api_token

    string

    The credential of the application for accessing the Chat API. It is an opaque string which should be submitted to Sendbird server for application identification when requesting.

    created_at

    long

    The time when the credentials were registered to Sendbird server.

    plan

    string

    The subscription plan of the application. Valid values are free and enterprise.

    message_retention_hours

    int

    The length of time in hours that the messages are retained for. The maximum message retention period is six months, or 4,380 hours. (Default: 4380)

    * If you wish to adjust the maximum message retention period, contact our sales team.

    display_past_message

    boolean

    Indicates whether to display past messages to new members of a group channel. If true, the entire message history of the channel is shown to those newly joining the channel. (Default: false)

    allow_links

    boolean

    Indicates whether to allow clickable links in a message within the application. (Default: true)

    max_message_length

    int

    The maximum length of a message allowed to be sent within the application. Valid values are 50, 100, 200, 500, 1,000, 5,000, 10,000, and 20,000. (Default: 5,000)

    user_messages_per_channel

    int

    The maximum number of messages that a user is allowed to send to a channel during the time set by user_messages_per_channel_duration. The value of -1 indicates that the system limit is imposed. The system allows a user to send up to 5 messages per second. (Default: -1)

    user_messages_per_channel_duration

    int

    The time period in seconds during which user_messages_per_channel is applied. For example, if user_messages_per_channel is set to 7 and user_messages_per_channel_duration is set to 3, users can send up to seven messages for every three seconds. (Default: 1)


    Actions

    Copy link

    The following table shows a list of actions supported for your application. The API endpoints are relative to the base URL allocated to your Sendbird application. The base URL for the following endpoints are https://api-{application_id}.sendbird.com/v3.

    Note: To find the application ID and base URL of your application, sign in to Sendbird Dashboard, go to Settings > Application > General, and then check Application ID and API request URL.

    List of actions for setting up an application

    Copy link
    ActionHTTP request

    Get global application settings

    GET /applications/settings_global
    Retrieves global application settings that are applied to channels within the application.

    Update global application settings

    PUT /applications/settings_global
    Updates the global application settings that are applied to all channels within the application.

    List of actions that require only master API token authentication

    Copy link
    ActionHTTP request

    List secondary API tokens

    GET /applications/api_tokens
    Retrieves a list of secondary API tokens. Only a request with the master API token can list up API tokens.

    Get a secondary API token

    GET /applications/api_tokens/{api_token}
    Retrieves information of the secondary API token. Only a request with the master API token can view information on any of the secondary API tokens.

    Generate a secondary API token

    POST /applications/api_tokens
    Generates a secondary API token. Only a request with the master API token can generate a new secondary API token.

    Revoke a secondary API token

    DELETE /applications/api_tokens/{api_token}
    Revokes a secondary API token.

    List of actions that require API token authentication

    Copy link
    ActionHTTP request

    Get an IP whitelist

    GET /application/settings/ip_whitelist
    Retrieves a list of all the allowed IP ranges and addresses.

    Add an IP to a whitelist

    PUT /application/settings/ip_whitelist
    Adds allowed IP ranges and addresses to the application’s settings.

    Delete IPs from a whitelist

    DELETE /application/settings/ip_whitelist
    Deletes all allowed IP ranges and addresses.

    Check push notifications

    GET /applications/push/settings
    Shows whether the push notifications feature is turned on for an application.

    Turn on push notifications

    PUT /applications/push/settings
    Determines whether to turn on the push notifications feature for an application.

    List push configurations

    GET /applications/push/{push_type}
    Retrieves a list of push configurations of an application.

    Get a push configuration

    GET /applications/push/{push_type}/{provider_id}
    Retrieves a specific push configuration of an application. The type of a push configuration is one of fcm, huawei, or apns.

    Remove a push configuration

    DELETE /applications/push/{push_type}/{provider_id}
    Cancels the registration of the push configuration of an application. The type of a push configuration is one of fcm, huawei, or apns.

    Add an FCM push configuration

    POST /applications/push/fcm
    Registers a FCM push configuration. To send push notifications to Android devices, you should first register the FCM push configuration.

    Update an FCM push configuration

    PUT /applications/push/fcm/{provider_id}
    Updates a specific FCM push configuration.

    Add an HMS push configuration

    POST /applications/push/hms
    Registers an HMS push configuration. To send push notifications to Android devices for HMS, you should first register the HMS push configuration.

    Update an HMS push configuration

    PUT /applications/push/hms/{provider_id}
    Updates a specific HMS push configuration.

    Add an APNs push configuration

    POST /applications/push/apns
    Registers an APNs push configuration. To send push notifications to iOS devices, you should first register the APNs push configuration.

    Update an APNs push configuration

    PUT /applications/push/apns/{provider_id}
    Updates a specific APNs push configuration.

    Delete an APNs certificate

    DELETE /applications/push/apns/cert/{provider_id}
    Deletes the APNs certificate.

    List push notification content templates

    GET /applications/push/message_templates
    Retrieves a list of push notification content templates of an application.

    Get a push notification content template

    GET /applications/push/message_templates/{template_name}
    Retrieves information on the specified push notification content template of an application.

    Update a push notification content template

    PUT /applications/push/message_templates/{template_name}
    Updates information on the specified push notification content template of an application.

    List auto event messages

    GET /applications/settings/auto_event_message
    Retrieves a list of auto event messages that are sent in a specified application and indicates which ones are in use.

    Configure auto event message settings

    PUT /applications/settings/auto_event_message
    Determines whether to automatically send event messages to group channels when events take place in an application.