Manage Instant Form (create / duplicate / archive / reactivate)
adsap_manage_instant_formCreate, duplicate, archive or reactivate a Meta Instant Form: the lead form people fill in without leaving Facebook or Instagram. Use it when the user wants a lead ad and has no suitable form yet, or wants a changed version of an existing form. IMPORTANT: Meta never lets a form be edited or deleted once created, only archived, so dry_run defaults TRUE: call once to preview (free, creates nothing), show the user the summary, then call again with dry_run:false after they confirm. To 'edit' a form, duplicate it with the changed sections and archive the old one. Before create, ask the user for the questions. The privacy policy link (Meta requires one) and the thank-you screen (headline, optional text, button or no button) can be saved once per Facebook Page by the user in Adsap, on the Instant Forms page: leave privacy_policy and thank_you out, and the preview applies the saved defaults and lists them (defaults_used, defaults_applied): show them to the user. If the preview says they are missing, ask the user for them. Never invent a privacy link or a thank-you text, and suggest wording only if the user asks you to. Not available: conditional logic (Meta keeps it for its own interface), and, not built in Adsap yet, appointment, store locator and national ID questions and file downloads on the thank-you screen. The returned form_id goes into creative_spec.leadgen_form_id of adsap_create_ad, on an ad set whose conversion location is Instant Forms (or Website and Instant Forms) and that promotes the SAME Page. List a Page's forms with adsap_list_meta_assets (asset_type instant_forms).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form | No | create: name and questions are required; privacy_policy and thank_you come from the defaults saved for the Page when you leave them out. duplicate: a NEW name plus only the sections to replace; a section you send replaces the whole section, everything else is copied as is. | |
| action | Yes | create a new form; duplicate an existing one with changes (the only way to 'edit', since Meta never lets a form be modified); archive (hide it and block it from new ads); reactivate an archived form. | |
| dry_run | No | Default true = preview: checks everything with Meta and creates nothing. Call again with false only after the user confirms. A created form can NEVER be edited or deleted, only archived. | |
| form_id | No | Required for duplicate, archive and reactivate. | |
| page_id | No | Required for every action. Numeric id of the Facebook Page that owns the form. A form belongs to ONE Page and only works in ads that run for that Page. | |
| ad_account_id | Yes | Meta ad account (act_...) the Page is connected to. Used for access checks. |