thincms_create_lead_magnet
Create a lead magnet to offer a downloadable resource in exchange for a form submission, capturing leads from your audience.
Instructions
Create a new lead magnet. A lead magnet is a downloadable resource offered in exchange for a form submission (e.g., newsletter signup).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | URL slug (auto-generated from title if omitted) | |
| title | Yes | Lead magnet title (required) | |
| siteId | No | Override the active site for this single call. Pass to target a specific tenant without mutating shared active-site state — the right pattern when running concurrent agent sessions managing different tenants. Must match a siteId from your THINCMS_SITES config (use thincms_list_sites to inspect). When omitted, the call uses the active site set by thincms_switch_site. | |
| ctaText | No | CTA button text shown on the resources page (default: 'Get this resource'). Examples: 'Join the webinar', 'Take the survey', 'Download the guide'. | |
| enabled | No | Enable/disable lead magnet (default: true) | |
| mediaId | No | Media ID of the downloadable file | |
| formSlug | No | Form slug to associate with this lead magnet | |
| sortOrder | No | Sort order for listing | |
| landingUrl | No | Custom landing URL override. When set, resource cards link here instead of /resources/:slug. Use for standalone pages (e.g., '/webinar'). | |
| description | No | Description of the lead magnet | |
| thumbnailUrl | No | Thumbnail image URL | |
| confirmProductionWrite | No | Acknowledge that this call may write to a configured production site (THINCMS_PRODUCTION_SITE_IDS env var). Required for any POST/PUT/PATCH/DELETE against a production-listed site; ignored otherwise. The error message lists which site triggered the requirement and recommends thincms_snapshot before any production write. |