Send Message
http
POST /api/v1/seller/messageBase URL: https://buyer-chat-api.wildberries.ru · Module: communications · Section: Buyers Chat · Specification doc ↗
Sends message to the buyer.
Request limit per one seller account:
| Type | Period | Limit | Interval | Burst |
|---|---|---|---|---|
| Personal | 10 s | 10 requests | 1 s | 10 requests |
| Service | 10 s | 10 requests | 1 s | 10 requests |
| Base with secret | 10 s | 10 requests | 1 s | 10 requests |
| Base | 1 h | 1 request | 1 h | 1 request |
Request body
multipart/form-data — schema object, required
replySignstring(required) — Chat signature. Can be obtained from chat information or event data if the event contains the"isNewChat": truefield.messagestring— Message text. Maximum of 1000 symbols.filestring<binary>[]— Files, in JPEG, PDF, or PNG format, maximum size — 5 MB each. Maximum of total file size — 30 MB.
Responses
| Code | Description | Schema |
|---|---|---|
200 | Success | MessageResponse |
400 | Bad request | PostV1SellerMessageResponse400 |
401 | Unauthorized | object |
402 | Payment required | object |
403 | Access denied | object |
429 | Too many requests | object |
Structure 200:
errorsstring[]— File upload errors, if anyresultobjectaddTimeinteger<int64>— Date and time the chat was createdchatIDstring— Chat IDsignstring— Chat signature
Structure 400:
statusnumber— HTTP status codetitlestring— Error titleoriginstring— WB internal service IDdetailstring— Error detailsrequestIdstring— Unique request IDerrorstring— Error text
Structure 401:
titlestring— Error titledetailstring— Error detailscodestring— Internal error coderequestIdstring— Unique request IDoriginstring— WB internal service IDstatusnumber— HTTP status codestatusTextstring— Text of the HTTP status codetimestampstring— Request date and time
Structure 402:
titlestring— Error titledetailstring— Error details. The error is only returned to services from the Solutions for business Catalog
Structure 403:
titlestring— Error titledetailstring— Error detailscodestring— Internal error coderequestIdstring— Request IDoriginstring— WB internal service IDstatusnumber— HTTP status codestatusTextstring— Text of the HTTP status codetimestampstring— Request date and time
Structure 429:
titlestring— Error titledetailstring— Error detailscodestring— Internal error coderequestIdstring— Unique request IDoriginstring— WB internal service IDstatusnumber— HTTP status codestatusTextstring— Text of the HTTP status codetimestampstring— Request date and time
Call examples
Arguments are shown as parameter names — substitute your own values. Languages whose client does not expose this operation are omitted.
python
from wb_api_client.communications import Configuration, ApiClient
from wb_api_client.communications.api import CommunicationsApi
cfg = Configuration(access_token="<your WB JWT>")
api = CommunicationsApi(ApiClient(cfg))
result = api.post_v1_seller_message(reply_sign=..., message=..., file=...)
print(result)ts
import {
Configuration,
CommunicationsApi,
} from "@valeryverkhoturov/wb-api-client/communications";
const cfg = new Configuration({});
cfg.setAccessToken("<your WB JWT>");
const api = new CommunicationsApi(cfg);
const { data } = await api.postV1SellerMessage(replySign, message, file);
console.log(data);go
import (
"context"
"fmt"
wbcommunications "github.com/ValeryVerkhoturov/wb-api-client-go/communications"
)
cfg := wbcommunications.NewConfiguration()
cfg.SetAccessToken("<your WB JWT>")
client := wbcommunications.NewAPIClient(cfg)
result, _, err := client.CommunicationsAPI.PostV1SellerMessage(context.Background()).ReplySign(replySign).Message(message).File(file).Execute()
if err != nil {
panic(err)
}
fmt.Printf("%+v\n", result)java
import io.github.valeryverkhoturov.wbapi.communications.ApiClient;
import io.github.valeryverkhoturov.wbapi.communications.SecretString;
import io.github.valeryverkhoturov.wbapi.communications.api.CommunicationsApi;
ApiClient client = new ApiClient();
client.setAccessToken(new SecretString("<your WB JWT>"));
CommunicationsApi api = new CommunicationsApi(client);
System.out.println(api.postV1SellerMessage(replySign, message, _file));php
use ValeryVerkhoturov\WbApiClient\Communications\Configuration;
use ValeryVerkhoturov\WbApiClient\Communications\SecretString;
use ValeryVerkhoturov\WbApiClient\Communications\Api\CommunicationsApi;
use GuzzleHttp\Client;
$config = (new Configuration())
->setAccessTokenSecret(new SecretString('<your WB JWT>'));
$api = new CommunicationsApi(new Client(), $config);
print_r($api->postV1SellerMessage($reply_sign));bsl
#Использовать "wb-api-client"
Настройки = Новый Конфигурация();
Настройки.УстановитьТокен("<your WB JWT>");
Клиент = Новый CommunicationsApi(Настройки);
Сообщить(Клиент.PostV1SellerMessage(replySign).Тело);csharp
using ValeryVerkhoturov.WbApiClient.Communications.Api;
using ValeryVerkhoturov.WbApiClient.Communications.Client;
var config = new Configuration();
config.AccessTokenSecret = new SecretString("<your WB JWT>");
var api = new CommunicationsApi(config);
Console.WriteLine(api.PostV1SellerMessage(replySign));rust
use wb_api_client::communications::apis::{configuration::Configuration, communications_api};
#[tokio::main]
async fn main() {
let mut cfg = Configuration::new();
cfg.set_access_token("<your WB JWT>");
let result = communications_api::post_v1_seller_message(&cfg, reply_sign, message, file).await;
println!("{:#?}", result);
}