Update message hook

​

Changes a message hook's name, url or token. Fields you leave out keep their value.

Path Parameters

  • Identifier of the channel.

  • Identifier of the message hook.

Body

required
application/json
  • Sent back as Authorization: Token <token> on every delivery.

Responses

  • application/json
  • application/json
Request Example for patch/channels/{channel_id}/message_hooks/{hook_id}/
curl https://api.landbot.io/v1/channels/1/message_hooks/1/ \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token YOUR_AGENT_TOKEN' \
  --data '{
  "token": "new-secret-value"
}'
{
  "success": true,
  "hook": {
    "id": 23,
    "url": "https://api.test.com/landbot/",
    "token": "1234567890qwerty",
    "name": "1234 Hook",
    "channel_id": 37,
    "created_at": 1606743214.897625,
    "updated_at": 1606743896.563929
  }
}