Skip to main content
POST
/
webhooks
Criar Webhook
curl --request POST \
  --url https://api.wapizap.com/api/v2/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "instanceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "url": "https://seusite.com/webhook",
  "events": [
    "messages.upsert",
    "messages.update"
  ],
  "headers": {},
  "secret": "<string>",
  "retryOnFailure": true
}
'
{
  "id": "<string>",
  "url": "<string>",
  "events": [
    "<string>"
  ],
  "headers": {},
  "secret": "<string>",
  "retryOnFailure": true,
  "isActive": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
instanceId
string<uuid>
required
url
string<uri>
required
Example:

"https://seusite.com/webhook"

events
enum<string>[]
required
Available options:
messages.upsert,
messages.update,
messages.delete,
message.send,
contacts.upsert,
contacts.update,
presence.update,
groups.upsert,
groups.update,
groups.participants.update
Example:
["messages.upsert", "messages.update"]
headers
object

Headers customizados

secret
string

Segredo para verificar assinatura

retryOnFailure
boolean
default:true

Response

201 - application/json

Webhook criado

id
string
url
string<uri>
events
string[]
headers
object
secret
string
retryOnFailure
boolean
isActive
boolean