Articles on: Automation & API's

Send a single use coupon URL via email/text by GoHighLevel

With GoHighlevel, you can create an action called "Custom Webhook"*.
Here, we can create a single-use coupon through an API call. The URL for this is: https://api.coupontools.com/v3/singleuse/create
We then need to add two Header items, X-Client-Id and X-Client-Secret.
Their respective values can be found at https://docs.coupontools.com/api/overview#authentication


The raw body needs to contain the campaign example:
{
"campaign": "cam_xxxx"
}


With the xxxx being the campaign id. This can be found by another API call list of all coupons, in the coupon builder's url or you can request to show the id's within the campaign overview.You can find more details here: https://docs.coupontools.com/api/coupon#create-single-use

You can save the response from the webhook and use it later within the automation. You can easily access this within GoHighLevel. Within the Email/SMS "message" body, you can find a dropdown called "Custom Values". In the dropdown, select "Custom Webhook" -> the name of the custom webhook -> response -> single_use_url. The result will look like this: {{ custom_webhook.1.response.single_use_url }}



Example Webhook callback:

Updated on: 12/10/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!