Reagir a um post do canal

POST /newsletter/reaction

Envia, altera ou remove uma reação de um post do canal.

Observações:

  • serverid identifica o post alvo
  • reaction define o emoji
  • envie reaction vazio para remover a reação
  • reactionmessageid é opcional; se omitido, o WhatsApp gera o ID da reação

Autenticação

[
  {
    "token": []
  }
]
{
  "token": {
    "name": "token",
    "type": "apiKey",
    "in": "header"
  }
}

Corpo da requisição

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "jid",
          "serverid"
        ],
        "properties": {
          "jid": {
            "type": "string",
            "description": "JID do canal. Aceita o formato completo `120363123456789012@newsletter` ou apenas o identificador numérico.",
            "example": "120363123456789012@newsletter"
          },
          "serverid": {
            "type": "integer",
            "example": 12345
          },
          "reaction": {
            "type": "string",
            "example": "🔥"
          },
          "reactionmessageid": {
            "type": "string",
            "example": "3EB0AABBCCDD"
          }
        }
      }
    }
  }
}

Respostas

{
  "200": {
    "description": "Reação aplicada com sucesso",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "required": [
            "response"
          ],
          "properties": {
            "response": {
              "type": "boolean",
              "example": true
            }
          }
        }
      }
    }
  },
  "400": {
    "description": "Payload inválido ou faltando `serverid`",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "string",
              "example": "serverid is required"
            }
          }
        }
      }
    }
  },
  "401": {
    "description": "Instância não autenticada ou cliente não encontrado",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "string",
              "example": "client not found"
            }
          }
        }
      }
    }
  },
  "500": {
    "description": "Erro interno ao reagir ao post",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "string",
              "example": "connection closed"
            }
          }
        }
      }
    }
  }
}

Guias relacionados

Autenticação · Erros e retries · Server URL