Skip to main content
POST
/
integration
/
webhook
/
create
Cadastrar Webhook
curl --request POST \
  --url https://api.multchats.com/v2/integration/webhook/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "integrationId": "<string>",
  "url": "<string>",
  "method": "GET",
  "type": "MESSAGE_SENT_AND_RECEIVED",
  "headers": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "delayMinutes": 1,
  "transferType": "ALL"
}
'
{
  "success": true,
  "response": {
    "webhook": {
      "id": "<string>",
      "integrationId": "<string>",
      "url": "<string>",
      "method": "<string>",
      "type": "<string>",
      "headers": "<array>",
      "delayMinutes": 123,
      "transferType": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
integrationId
string
required

ID da integração

Pattern: ^c[a-z0-9]{24}$
url
string<uri>
required

URL do webhook

method
enum<string>
required

Método HTTP

Available options:
GET,
POST,
PUT,
DELETE,
PATCH
type
enum<string>
required

Tipo de evento que dispara o webhook

Available options:
MESSAGE_SENT_AND_RECEIVED,
MESSAGE_SENT,
MESSAGE_RECEIVED,
FIRST_MESSAGE_RECEIVED,
MESSAGE_IN_SERVICE,
CONNECTION_STATUS_UPDATE,
SERVICE_CONTINUITY_VERIFICATION
headers
object[]

Cabeçalhos HTTP adicionais

delayMinutes
integer

Atraso em minutos antes de disparar o webhook

Required range: x >= 0
transferType
enum<string>

Tipo de transferência para filtrar o disparo do webhook

Available options:
ALL,
USER,
AUTOMATION,
API,
AUTOMATION_AND_API

Response

Webhook cadastrado com sucesso

success
boolean
default:true

Indica se a operação foi bem-sucedida

response
object