How it works
Cernel provides two developer capabilities under Settings > Developer:- API lets you authenticate requests to the Public API using a unique token tied to your organization.
- Webhooks send HTTP POST notifications to your endpoints whenever key events happen in Cernel.
Why you would use this
Automate product syncing
Push products from your ERP, PIM, or custom backend into Cernel without manual imports.
React to enrichment in real time
Get notified the moment AI-generated content is ready, so your systems can pull and publish it automatically.
Step-by-step guide
Managing your API token
1
Open API settings
Go to Settings > API. You’ll see your API token (masked by default), the last refresh date, and a link to the API documentation.
2
Copy your token
Click the copy icon next to the token field to copy it to your clipboard. Click Show to reveal the full token if you need to verify it.
3
Refresh your token (if needed)
Click New key to generate a new token. A confirmation dialog will warn you that the current token will stop working immediately.
4
View API documentation
Click Visit Documentation to open the full API reference in a new tab. This includes all available endpoints, request formats, and response schemas.
Configuring webhooks
1
Open webhook settings
Go to Settings > Webhooks. You’ll see three webhook types, each with a URL field and a test button.
2
Enter your endpoint URL
For each webhook you want to enable, enter the URL where Cernel should send POST requests. The URL must start with
http:// or https://.3
Test the webhook
Click Test Webhook to send a sample payload to your endpoint. Cernel will confirm whether the test succeeded or failed.
If the test succeeds, your endpoint is correctly configured and ready to receive live events.
Webhook event types
Cernel supports three webhook events:
Each webhook sends a POST request with the event data as a JSON payload to your configured URL.
Advanced configuration
Using webhooks with the API pipeline
Using webhooks with the API pipeline
Webhooks pair naturally with the Public API integration. Push products in via API, let automations enrich them, then receive webhook notifications when results are ready. See Building a custom product pipeline for a full walkthrough.
Webhook reliability
Webhook reliability
If your endpoint returns an error or is unreachable, Cernel automatically retries the delivery. Each event is attempted up to 8 times: the first retry follows about 5 seconds after the initial failure, and the delay grows with each subsequent attempt, so the final retries are spread over a longer window. A delivery is considered successful once your endpoint returns a 2xx status code.
Verifying webhook authenticity
Verifying webhook authenticity
Every webhook Cernel sends includes an
X-Signature-SHA256 header so you can confirm the request genuinely came from Cernel and wasn’t altered in transit. The signature is an HMAC-SHA256 of the request body, keyed on your API token (the same token from Settings > API).To verify a request:1
Re-serialize the payload
Serialize the received JSON body the same way Cernel does: with sorted keys and compact separators (no spaces). In Python:
json.dumps(payload, separators=(",", ":"), sort_keys=True).2
Compute the HMAC
Compute an HMAC-SHA256 over that serialized body, using your API token as the secret key, then Base64-encode the result.
3
Compare
Compare your computed value against the
X-Signature-SHA256 header. If they match, the request is authentic. Reject the request if they differ.Security considerations
Security considerations
Webhook URLs are stored in your organization settings. Only admin users can view or modify them. Always serve your webhook endpoint over HTTPS, verify the
X-Signature-SHA256 header on every request (see above), and keep the endpoint behind authentication on your end to prevent unauthorized requests.Frequently asked questions
Where do I find my API token?
Where do I find my API token?
Go to Settings > API. Your token is displayed there (masked by default). Click Show to reveal the full value, or click the copy icon to copy it.
Can I have multiple API tokens?
Can I have multiple API tokens?
No. Each organization has one API token at a time. Refreshing generates a new token and invalidates the previous one.
Why isn't my webhook receiving events?
Why isn't my webhook receiving events?
Check that your URL is correct and reachable. Use the Test Webhook button to verify. Make sure your endpoint returns a 2xx status code. If the test succeeds but live events don’t arrive, confirm that the relevant actions (enrichment, product creation) are actually happening.
Can I configure webhooks for other events?
Can I configure webhooks for other events?
Currently, Cernel supports three webhook events: Attribute Result, Product Updated, and Product Created. More event types may be added in future updates.
What’s next
Public API
Set up a full API integration for pushing products programmatically.
Automations
Auto-enrich products pushed via API with automations.
