WebhookSubscriptionCreateRequest
entityWebhookEntity (string)obrigatório
Valores possíveis: [OPT_IN_CREATED, OPT_IN_RECURRENCE_UPDATED, SCHEDULE_ACCESS_REQUEST, COLLECTION_CONTRACT_CREATION, COLLECTION_CONTRACT, COLLATERALIZED_CREDIT_CONTRACT, COLLATERALIZED_CREDIT_ESCROW_ACCOUNT]
Exemplo
COLLECTION_CONTRACTwebhookUrlstring<uri>obrigatório
Public HTTPS callback URL. Localhost, private, link-local, metadata and ambiguous IP targets, as well as URLs with embedded credentials, are rejected for SSRF protection.
Exemplo
https://example.com/destrava/webhooksauth object
Configuração opcional de autenticação de saída enviada nas entregas de webhook.
typeWebhookAuthType (string)obrigatório
Valores possíveis: [BASIC, BEARER, API_KEY]
Exemplo
API_KEYloginstring
Username for BASIC or API-key header name. Required for BASIC and API_KEY. API-key header names must be valid HTTP field names and cannot replace Authorization, transport headers, or Destrava signature headers.
Exemplo
X-Webhook-KeyWebhookSubscriptionCreateRequest
{
"entity": "COLLECTION_CONTRACT",
"webhookUrl": "https://example.com/destrava/webhooks",
"auth": {
"type": "API_KEY",
"login": "X-Webhook-Key"
}
}