curl --request POST \
--url https://api.myidvirtual.com/webhooks \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"method": "<string>",
"authorization": "<string>",
"events": [
{}
]
}
'{
"id": "webhook-id-123",
"url": "https://seu-servidor.com/webhook",
"method": "POST",
"authorization": "Bearer token123",
"events": ["payment.created", "payment.confirmed"],
"status": "active",
"createdAt": "2024-01-15T10:30:00.000Z"
}
Cria um novo webhook para receber notificações de eventos
curl --request POST \
--url https://api.myidvirtual.com/webhooks \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"method": "<string>",
"authorization": "<string>",
"events": [
{}
]
}
'{
"id": "webhook-id-123",
"url": "https://seu-servidor.com/webhook",
"method": "POST",
"authorization": "Bearer token123",
"events": ["payment.created", "payment.confirmed"],
"status": "active",
"createdAt": "2024-01-15T10:30:00.000Z"
}
{
"id": "webhook-id-123",
"url": "https://seu-servidor.com/webhook",
"method": "POST",
"authorization": "Bearer token123",
"events": ["payment.created", "payment.confirmed"],
"status": "active",
"createdAt": "2024-01-15T10:30:00.000Z"
}
curl --location --request POST 'http://localhost:3333/webhooks' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://seu-servidor.com/webhook",
"method": "POST",
"authorization": "Bearer token123",
"events": ["payment.created", "payment.confirmed"]
}'