Obter webhook
curl --request GET \
--url https://api.upag.io/v1/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/webhooks/{webhookId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/webhooks/{webhookId}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Endpoints
Obter webhook
Consulta um webhook pelo ID
GET
https://api.upag.io
/
v1
/
webhooks
/
{webhookId}
Obter webhook
curl --request GET \
--url https://api.upag.io/v1/webhooks/{webhookId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/webhooks/{webhookId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/webhooks/{webhookId}';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Permissão:
Webhook inexistente, excluído ou de outra conta retorna
webhook.read
Endpoint
curl https://api.upag.dev/v1/webhooks/aa0e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer sk_test_your_api_key"
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const webhook = await upag.webhooks.retrieve('aa0e8400-e29b-41d4-a716-446655440000');
Em produção use
https://api.upag.io/v1 com sk_live_.... O SDK escolhe o host pela chave.Parâmetros
string (uuid)
required
ID do webhook.
Resposta
200 OK
Response
{
"id": "aa0e8400-e29b-41d4-a716-446655440000",
"description": "Order events",
"active": true,
"url": "https://example.com/webhooks",
"headers": { "X-Custom": "value" },
"events": ["charge.paid"],
"secret": "whsec_abc123...",
"createdAt": "2026-03-18T09:00:00.000Z",
"updatedAt": "2026-03-18T09:00:00.000Z"
}
404 (WEBHOOK_NOT_FOUND).