Register a webhook
Register an HTTPS endpoint so CrazyGoldFish calls your server when a background job finishes, instead of you polling.
Rules
api_templateis a templateidfrom List webhook event templates. It cannot be changed later.endpoint_urlmust be a valid URL starting with lowercasehttps://. Plainhttp://is rejected withEnter a valid URL.- Each API user gets one webhook per event. A second one returns
400withWebhook already exists. - Keep the trailing slash on the path. Without it the API redirects, and most HTTP clients drop the request body when they follow a redirect.
- A successful registration returns
201, not200. - New webhooks are enabled straight away.
secret_hash is optional, but send one. CrazyGoldFish stores it encrypted and puts it back in the body of every delivery, so your receiver can compare it and reject anything that does not match. Keep your own copy: no endpoint ever reads the secret back to you.Troubleshooting
If registration returned201, your jobs finish, and your endpoint is reachable, but no delivery ever arrives, the account may not be set up for webhook delivery. Nothing is returned to you in that case, and no error appears on the job. Contact CrazyGoldFish and we will check the setup. In the meantime, poll for results.
Next step
Update a webhook
Authorizations
Access token from Get an access token.
Body
Template id of the event, read from List webhook event templates. Look the event up by name each time rather than hardcoding an id.
"ff4be808-b444-49b8-b7f3-9b78258e03b7"
Your receiver's address. It must be a valid URL starting with lowercase https://. Plain http:// is rejected.
"https://example.com/webhooks/crazygoldfish"
A random string you generate. CrazyGoldFish stores it encrypted and sends it back in the body of every delivery, so your receiver can compare it and reject anything else. Optional, but without it deliveries carry "secret_hash": null and you cannot tell a real delivery from a forged one.
"a-long-random-string-you-generate"
Response
The webhook is registered and enabled. The secret is stored encrypted and is not echoed back here.
A registered webhook. The secret is never returned by these endpoints.
Unique ID of the webhook. Use it in Get a webhook and Update a webhook.
"c5a71f30-6b82-4d19-9e4a-8f0d3b6c2157"
The event this webhook listens for, expanded. It cannot be changed after registration.
The HTTPS address CrazyGoldFish posts the event to.
"https://example.com/webhooks/crazygoldfish"