Create a form coupon
paperform_create_couponDestructive
WRITE: create a coupon code on a form, with a fixed discountAmount or a discountPercentage (not both), an optional target (price or subscription) and expiry. Respondents can use it at checkout as soon as it is enabled. Undo: paperform_update_coupon with enabled=false. Paperform: POST /forms/{slug_or_id}/coupons.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The new coupon code, e.g. SPRING20. | |
| form | Yes | The form's slug, custom slug or id (from paperform_list_forms). | |
| target | No | What the discount applies to: the one-off price or a subscription. | |
| enabled | No | Whether respondents can use the coupon. | |
| expiresAt | No | When the coupon expires (ISO 8601 with a timezone), or null for no expiry. | |
| discountAmount | No | A fixed discount, in the form's currency (e.g. 10 = 10.00). | |
| discountPercentage | No | A percentage discount, 0-100. |