Chat / Platform API
Current version: v3
    Chat Platform API v3
    Chat Platform API
    Chat
    Platform API
    Home
    /
    Chat
    /
    Platform API
    /
    Report

    Report a user

    Reports a user who sends an offensive message in a channel.


    HTTP request

    POST https://api-{application_id}.sendbird.com/v3/report/users/{offending_user_id}
    

    Parameters

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    offending_user_id

    string

    Specifies the unique ID of a user who has sent an offensive message.


    Request body

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

    Properties
    RequiredTypeDescription

    channel_type

    string

    Specifies the type of channel. Acceptable values are open_channels and group_channels.

    channel_url

    string

    Specifies the URL of a channel.

    report_category

    string

    Specifies the category which indicates the reason for reporting. Acceptable values are suspicious, harassing, inappropriate, spam, and custom. If this property is set to custom, the custom_report_category_name must be specified.

    OptionalTypeDescription

    reporting_user_id

    string

    Specifies the unique ID of the user who reports another user.

    report_description

    string

    Specifies additional information to include in the report.

    custom_report_category_name

    string

    Specifies the name of the custom report category. Maximum length is 50 characters.

    {
        "channel_type": "group_channels",
        "channel_url": "sendbird_group_channel_15458190_3ce474cfbb465c513de1728c7283bec63f00deea",
        "report_category": "spam"
    }
    

    Response

    If successful, this action returns a report resource on the user in the response body.

    In the case of an error, an error object is returned. A detailed list of error codes is available here.