Skip to main content
Permission: Send gifts · Workspace: required (from goody_workspaces_list) Creates a paused autogift rule — a recurring gift that sends automatically when a recipient hits a birthday, work anniversary, or onboarding milestone. There are two ways to supply the gift contents — pick exactly one:
  • (A) Clone a recently-sent gift batch with source_order_batch_id. The cart, card, message, From name, payment method, and shipping are all pulled from that batch.
  • (B) Build from scratch (no prior send) — a cart plus card_id, message, and payment_method_id.
The rule is created paused. Call goody_autogift_rules_activate once the user confirms — activation is what commits the recurring spend.

Parameters

Required

workspace_id
string
required
Workspace UUID — from goody_workspaces_list. The rule is created in this workspace.
event_type
string
required
The occasion that triggers a send — one of birthday, work_anniversary, or onboarding.
contact_list_id
string
An existing contact list — from goody_contact_lists_list or goody_contact_lists_create. Mutually exclusive with contact_ids; supply exactly one.
contact_ids
string[]
Contact UUIDs to gift. The tool creates an implicit list from them. Mutually exclusive with contact_list_id; supply exactly one.
source_order_batch_id
string
The gift batch to clone, from goody_order_batches_list. Mutually exclusive with a from-scratch cart; supply exactly one.

From-scratch path

Supply these instead of source_order_batch_id to build the gift without a prior send.
product_id
string
A single product to gift, from goody_products_search. Use this or cart.
cart
object
Multiple products to gift. Use this or product_id.
card_id
string
Greeting card UUID — from goody_cards_list.
message
string
The gift-card message. Personalization tags (e.g. the recipient’s first name) are filled per-recipient at send time.
from_name
string
The “From” name recipients see. Defaults to the authenticated user.
payment_method_id
string
The autopay payment method the rule charges on activation — from goody_payment_methods_list. Recommended. Without it the rule is created but won’t activate.
international_shipping_tier
string
Shipping tier to apply for recipients outside the US.
alcohol_age_verification_attested
boolean
Required true when the cart contains alcohol.
settings
object
Rule settings.

Optional (both paths)

tenure_min
integer
Lowest years of service the rule applies to. Meaningful for work_anniversary.
tenure_max
integer
Highest years of service the rule applies to. Meaningful for work_anniversary.
anchor_date_send_option
string
When to send relative to the occasion — send_on_anchor_date, send_before_anchor_date, or send_after_anchor_date.
anchor_date_number_of_days_delta
integer
How many days before or after the occasion to send. Required when the send option is before or after.
anchor_date_type
string
Which date the occasion anchors to — start_date or added_to_hris_date. Only for onboarding.
allow_occasion_mismatch
boolean
default:"false"
Clone path only. When the source card’s occasion doesn’t match the event type, the request is rejected; set true to override.

Returns

autogift_rule
object
The newly created, paused rule.

Example

"Set up a $50 birthday autogift for my Clients list with the Cold Brew Kit and a birthday card."
Confirm the gift first with goody_autogift_rules_preview, then turn it on with goody_autogift_rules_activate. To group recipients into a reusable list, use goody_contact_lists_create.