Configuring an Endpoint
To set up a webhook:- Navigate to your Workspace Settings → Developers → Webhooks.
- Click Add Endpoint.
- Provide an HTTPS endpoint URL (e.g.,
https://api.yourcompany.com/webhooks/corgtex). - Select the specific events you want to subscribe to.
- Save the configuration. Corgtex will provide a Signing Secret that you must securely store on your receiving server.
Example Event Payload
When an event triggers, Corgtex sends a POST request with a standardized JSON payload:Security: Verifying Signatures
Corgtex signs every webhook payload. You are strongly encouraged to verify the signature on your receiving server to ensure the payload was genuinely sent by Corgtex and has not been tampered with. The signature is sent in thex-corgtex-signature HTTP header.
It is generated by computing an HMAC with the SHA-256 hash function, using your endpoint’s Signing Secret as the key and the raw request body as the message.
Webhook Deliveries and Event Replay
Corgtex does not just fire-and-forget. The platform records the success or failure of each delivery attempt. If your receiving server goes down and returns a 500 error, you can navigate to the Webhooks dashboard, view the failedWebhookDelivery log, and click Replay to manually resend the event once your server is healthy again. This guarantees that you never permanently drop a critical business event like an approved spend request.