Trigger a web push notification when a new message is sent

POST /chat/web-push/new-chat-message/{id_message}/ambassador/{id_ambassador}

Headers

  • X-Popsell-Brand integer Required

    The id of the target brand

Path parameters

  • id_message string Required

    The id of the message

  • id_ambassador string Required

    The id of the ambassador

Responses

  • 200 application/json

    Returns the web push notification

    Hide response attribute Show response attribute object
    • success boolean
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

  • 404

    Not found - The message or the ambassador does not exist

POST /chat/web-push/new-chat-message/{id_message}/ambassador/{id_ambassador}
curl \
 --request POST 'https://domain.tld/api/v2/chat/web-push/new-chat-message/{id_message}/ambassador/{id_ambassador}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "X-Popsell-Brand: 3"
Response examples (200)
{
  "success": true
}
Response examples (401)
{
  "message": "Unauthorized."
}