Get Public Link is a WordPress ability from Ninja Forms — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Get Public Link

Write
Ninja Forms Forms ninjaforms/get-public-link

Enable or disable a form's public link and return its shareable URL.

Requires the Ninja Forms plugin on WordPress 6.9+ for the Abilities API (all 32 abilities are registered only when the wp_register_ability() function exists, via NF_Abilities_Integration::load_abilities_api() running on plugins_loaded). Every ability is gated by the same ninja_forms_ability_can_manage_forms() permission callback, requiring the caller to hold WordPress's manage_options capability or Ninja Forms' own nf_edit_forms capability.

What it does

This ability toggles whether a form can be accessed anonymously via a public link — independent of being embedded on any page — and generates the URL when enabling it, using Ninja Forms' pretty-URL format /ninja-forms/{slug} with a random 6-character slug (public_link_key). Despite its 'get' name it's a mutating operation: enabling for the first time generates and stores a new slug. An AI assistant should surface the resulting public_link back to the user clearly so they can share it directly, e.g. via email or social media.

See it in action

You ask your AI assistant

"Turn on the public link for form 12 and give me the URL to share."

Inputs

Name Type Required Description
form_id integer Yes The numeric ID of the form.
enable boolean No true to enable the public link, false to disable it. Defaults to true.

Returns

An object with a 'success' boolean, a 'message', the full 'public_link' URL, the 'public_link_key' slug, and an 'enabled' flag.

Permission

The current user must have WordPress's 'manage_options' capability or Ninja Forms' own 'nf_edit_forms' capability (checked via the shared ninja_forms_ability_can_manage_forms() permission callback).

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.