---
title: "Set Webhook"
method: POST
path: "/webhook/set/{instance}"
tags: ["Webhook Controller"]
---

# Set Webhook

`POST /webhook/set/{instance}`

## Request

- Base URL: `https://evolution-example`
- URL: `https://evolution-example/webhook/set/{instance}`
- Auth: API key in header `apikey`

Set Webhook for instance

## Path parameters

- `instance` string, required

## Request body

- object
  - `enabled` boolean, required: enable webhook to instance
  - `url` string, required: Webhook URL
  - `webhookByEvents` boolean, required: Enables Webhook by events
  - `webhookBase64` boolean, required: Sends files in base64 when available
  - `events` string[], required: Events to be sent to the Webhook

## Response `201`

Created

- object
  - `webhook` object
    - `instanceName` string: The name of the instance.
    - `webhook` object
      - `url` string: The URL of the webhook.
      - `events` string[]: List of events the webhook is subscribed to.
      - `enabled` boolean: Indicates whether the webhook is enabled.

## Changes

- **2024-11-25** (v2) `0666de64f49a`: 3 breaking, 2 warning
  - added the new required request property `enabled`
  - added the new required request property `webhookBase64`
  - added the new required request property `webhookByEvents`
  - removed the request property `webhook_base64`
  - …1 more
- **2024-11-25** (v2) `c153448703e5`: 3 breaking, 7 info
  - added the new required request property `events`
  - added the new required request property `url`
  - removed the success response with the status `200`
  - api operation id `setWebhook` was added
  - …6 more
- **2024-09-09** (v2) `0c4620ca5ed5`: 1 breaking, 5 warning, 5 info
  - removed the success response with the status `201`
  - removed the request property `enabled`
  - removed the request property `events`
  - removed the request property `url`
  - …7 more
- **2024-08-09** (v2) `996acfdb07ce`: 2 breaking, 2 warning, 4 info
  - added the new required request property `enabled`
  - removed the enum value `NEW_JWT_TOKEN` of the request property `events/items/`
  - removed the request property `webhook_base64`
  - removed the request property `webhook_by_events`
  - …4 more

[Operation history](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/changes/webhook/set/:instance/post.md)

---

[API](https://skmtc.dev/evolution-foundation/apis/evolution-api-3.md) - [All operations](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/llms.txt) - [OpenAPI document](https://skmtc.dev/evolution-foundation/apis/evolution-api-3/revisions/153363ee7f38?raw)
