Skip to main content

Add a chat

POST 

https://api.botsubscription.com/v1/bot:bot_id/:api_key/chats

Add a new chat to the bot.

Request

Path Parameters

    bot_id integerrequired

    The unique identifier of the bot.

    api_key stringrequired

    The API key of the bot.

Bodyrequired

    chat_id integerrequired

    The unique identifier of the chat.

    chat_name stringrequired

    The name of the chat.

    chat_type stringrequired

    The type of the chat. Must be one of 'private', 'group', 'supergroup', or 'channel'.

    Possible values: [group, supergroup, channel]

Responses

The chat has been successfully added.
Schema
    ok boolean
    Default value: true
    request_id string
    method string
    path string
    code integer
    Default value: 201
    result object
    chat_id integer

    The unique identifier of the chat.

    chat_name string

    The name of the chat.

    chat_type string

    The type of the chat. Must be one of 'private', 'group', 'supergroup', or 'channel'.

    Possible values: [group, supergroup, channel]

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.botsubscription.com");
request.Headers.Add("Accept", "application/json");
var content = new StringContent(string.Empty);
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.botsubscription.com
Parameters
— pathrequired
— pathrequired
Body required
{
  "chat_id": 0,
  "chat_name": "string",
  "chat_type": "group"
}
ResponseClear

Click the Send API Request button above and see the response here!