Sending a message to a chat
The method is available for all models.
If you are using an API Key token, one of the accesses in the list is required to call the method
- communication â Customer communication
- all-methods â Full account management
Sends a message to the chat with the buyer.
, Limit: 1,000 requests per hour |
---|
Request
POST
https://api.partner.market.yandex.ru/businesses/{businessId}/chats/message
Path parameters
Name |
Description |
businessId* |
Type: integer<int64> Cabinet ID. To find out, use the request GET campaigns. âšī¸ What is a cabinet and a store on the Market?
Min value: |
Query parameters
Name |
Description |
chatId* |
Type: integer<int64> The chat ID. Min value: |
Body
application/json
{
"message": "string"
}
Name |
Description |
message* |
Type: string The text of the message. Min length: Max length: |
Responses
200 OK
An empty answer. Means that the message has been sent.
Body
application/json
{
"status": "OK"
}
Name |
Description |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiResponseStatusType
The type of response. Possible values:
OK
â there are no mistakes.ERROR
â an error occurred while processing the request.
Type |
Description |
Enum: |
400 Bad Request
The request contains incorrect data. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiErrorDTO
The general error format.
Name |
Description |
code* |
Type: string The error code. |
message |
Type: string Description of the error. |
401 Unauthorized
The authorization data is not specified in the request. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
403 Forbidden
The authorization data is incorrect or access to the resource is prohibited. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
404 Not Found
The requested resource was not found. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
420 Method Failure
The resource access limit has been exceeded. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error of Yandex. Market. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.