POST
/
api
/
settings
cURL
curl --request POST \
  --url https://chatbot.menuia.com/api/settings \
  --header 'Content-Type: application/json' \
  --data '{
  "appkey": "<string>",
  "authkey": "<string>",
  "to": "<string>",
  "message": "<string>"
}'
{
  "status": 200,
  "message": "Sucesso"
}

Descrição

Este endpoint permite ativar ou desativar webhooks para chats ou grupos no sistema do chatbot. A operação é configurada pelo parâmetro statusWebhook.

Parâmetros

* appkey: Chave da aplicação.
* authkey: Chave de autenticação do usuário.
* type: Define o tipo de webhook, sendo "chat" ou "grupo".
* message: ID do dispositivo relacionado ao webhook.
* statusWebhook: Deve ser "true" para ativar ou "false" para desativar o webhook.

Exemplo de requisição:

Ativar um webhook:

{
  "appkey": "SUA_APPKEY_AQUI",
  "authkey": "SUA_AUTHKEY_AQUI",
  "type": "chat",
  "message": "ID_DISPOSITIVO_AQUI",
  "statusWebhook": "true"
}

Body

application/json

Parâmetros necessários para enviar uma mensagem.

The body is of type object.

Response

200
application/json

Sucesso.

The response is of type object.