Create keyword
Create an opt-in keyword with a reply, optionally with a coupon.
POST https://cotlet.dev/api/v1/postscript/keywords
Uses Acquisition > Keywords > Create Keyword and Save Keyword. The name is visible to subscribers. With a coupon, Postscript's Include coupon in reply is turned on with a percent or dollar amount; without one, the reply is added as an action. Anyone who texts the word is added to your SMS list and gets the reply, so it reaches people. More than two keywords need the Growth, Professional or Enterprise plan. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| keyword string required | string | The word people text, for example VIPACCESS. |
| reply string | string | Reply text sent after opt-in. |
| coupon_type enum | enum | percent or amount. Leave out for no coupon. |
| coupon_value number | number | Percent or dollar amount of the coupon. |
Request
curl -X POST https://cotlet.dev/api/v1/postscript/keywords \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword":"VIPACCESS","reply":"You are in! Here is 15% off, a day before the public.","coupon_type":"percent","coupon_value":15}' result = client.call("postscript", "create_keyword", {"keyword":"VIPACCESS","reply":"You are in! Here is 15% off, a day before the public.","coupon_type":"percent","coupon_value":15}) const result = await cotlet.call('postscript', 'create_keyword', {"keyword":"VIPACCESS","reply":"You are in! Here is 15% off, a day before the public.","coupon_type":"percent","coupon_value":15}); cotlet call postscript create_keyword --data '{"keyword":"VIPACCESS","reply":"You are in! Here is 15% off, a day before the public.","coupon_type":"percent","coupon_value":15}' Example response
{
"keyword": "VIPACCESS",
"reply": "You are in! Here is 15% off, a day before the public.",
"coupon": {
"type": "percent",
"value": 15
}
}