Overview
After prospect is created and enriched, we can start generating content for them. Using predefined templates for the content generation, we can create personalized messages for the prospects.You can request content generation right after the prospect is created, it will wait for the enrichment process to complete before starting the content generation.
waiting then generating and finally completed.
Content generation process
The content generation process is triggered by creating a new content generation request. The system will use the prospect data to personalize the content and generate the message. You can get content using two methods:- Polling: You can check the status of the content generation request using the
/content/{id}endpoint. - Webhooks: You can set up a webhook to receive the content when it is ready.
Webhooks
To get a webhook, you need to provide a callback URL in thecallback field when creating the content generation request.
The system will send a POST request to this URL with the content meta information when the status changes to completed.
It will not contain the content itself, but only the metadata about the content.
Webhook signing
On your request, we can enable webhook signing to ensure the integrity of the data sent to your callback URL.
X-Webhook-Signature header containing a HMAC SHA256 signature of the payload. You can verify this signature using your webhook secret key.
We are signing the payload using the following method:
- Create a string from the JSON payload.
- Create a HMAC SHA256 hash of the string using your webhook secret key.
- Next, we encode the hash as a hexadecimal string and prepend it with
sha256=. - The resulting string is the value of the
X-Webhook-Signatureheader.