Create an event destination
to try read requests with your account, or paste an API key into the Authorization field. Create an API key in the Partner Portal.
Registers an HTTPS endpoint that receives your organization's quote and case events, such as quote.financing.updated and case.updated. Prets sends each event as a POST with Authorization: Bearer {bearerSecret}, and retries deliveries that time out or get a 429 or 5xx response for up to 24 hours.
Returns the destination with its bearerSecret. Store the secret now: it is shown only once. Returns 409 when your organization already has an event destination.
application/json- body
Register an HTTPS endpoint that receives outbound events for the authenticated organization.
destinationId?stringOptional client-supplied id. Server-generated when omitted.
^whk_[0-9A-HJKMNP-TV-Z]{26}$name*stringHuman-readable label for this destination within the organization.
1 <= length <= 128url*stringPublic HTTPS endpoint that will receive event deliveries. Plain HTTP is rejected.
^((%[0-9A-Fa-f]{2}|[-()_.!~*';/?:@&=+$,A-Za-z0-9])+)([).!';/?:,])?$length <= 2048The created event destination, with its bearer secret shown only this once
application/json- response
Created destination plus the bearer secret, returned cleartext exactly once. Subsequent reads omit the secret.
destinationId*stringStable destination id. Client-supplied at create, or server-generated when omitted.
^whk_[0-9A-HJKMNP-TV-Z]{26}$name*stringHuman-readable label for this destination within the organization.
1 <= length <= 128url*stringPublic HTTPS endpoint that will receive event deliveries. Plain HTTP is rejected.
^((%[0-9A-Fa-f]{2}|[-()_.!~*';/?:@&=+$,A-Za-z0-9])+)([).!';/?:,])?$length <= 2048createdAt*stringWhen the destination was registered
date-timeupdatedAt*stringWhen the destination name or URL last changed
date-timebearerSecret*stringBearer secret returned cleartext exactly once when minted. Sent on every delivery as Authorization: Bearer {secret}. Cannot be retrieved later.
^whsec_[A-Za-z0-9_-]{43}$bearerAuthAuthorizationBearer <token>curl -X POST 'https://api.prets.app/v1/events/destinations' \ -H 'Content-Type: application/json' \ -d '{ "name": "Production", "url": "https://example.com/prets/events"}'{ "destinationId": "whk_01ARZ3NDEKTSV4RRFFQ69G5FAV", "name": "Production", "url": "https://example.com/prets/events", "createdAt": "2026-06-01T12:00:00.000Z", "updatedAt": "2026-06-01T12:00:00.000Z", "bearerSecret": "whsec_3XvK2nQ8mB7pR1sT4uW6yZ0aE5gH9jLcV2bN1xM4qP8"}