curl --request PUT \
--url https://api.myidvirtual.com/webhooks/:id \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"method": "<string>",
"authorization": "<string>",
"events": [
{}
]
}
'{
"id": "webhook-id-123",
"url": "https://novo-servidor.com/webhook",
"method": "POST",
"authorization": "Bearer novo-token",
"events": ["payment.created"],
"status": "active",
"updatedAt": "2024-01-15T11:00:00.000Z"
}
Atualiza as configurações de um webhook
curl --request PUT \
--url https://api.myidvirtual.com/webhooks/:id \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"method": "<string>",
"authorization": "<string>",
"events": [
{}
]
}
'{
"id": "webhook-id-123",
"url": "https://novo-servidor.com/webhook",
"method": "POST",
"authorization": "Bearer novo-token",
"events": ["payment.created"],
"status": "active",
"updatedAt": "2024-01-15T11:00:00.000Z"
}
{
"id": "webhook-id-123",
"url": "https://novo-servidor.com/webhook",
"method": "POST",
"authorization": "Bearer novo-token",
"events": ["payment.created"],
"status": "active",
"updatedAt": "2024-01-15T11:00:00.000Z"
}
curl --location --request PUT 'http://localhost:3333/webhooks/webhook-id-123' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://novo-servidor.com/webhook",
"events": ["payment.created"]
}'