30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Create Contact Form

Supplying only a title is the right way to use this. You get Contact Form 7’s own default template — name, email, subject, message and a submit button — which is a working form, and then you shape it with contact-form-7/add-form-field.

Supply a template only if you already know the tag syntax. Hand-writing form markup is where most Contact Form 7 mistakes start.

At a glance

Abilitycontact-form-7/create-form
ToolsetContact Form 7 — toolset/contact-form-7
GroupContact Form 7 › Forms
RequiresContact Form 7, active on the site
Capabilitymanage_options, plus edit_contact_forms
SafetyWrites data
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

Creating a form does not publish it anywhere. Contact Form 7 forms only reach a visitor through their shortcode, so the last step is always contact-form-7/get-form-shortcode and pasting the result into a page.

The mail and mail_2 objects are optional. Omit them and you get Contact Form 7’s defaults, which send to the site admin address — correct often enough to be worth leaving alone until you know better.

The response includes the new form’s configuration errors, so a template with a problem in it is visible immediately rather than after the first failed submission.

Input

NameTypeRequiredWhat it is
titlestringYesForm title, shown in the admin list.
localestringNoForm locale, e.g. en_US.
templatestringNoForm template markup. Omit for Contact Form 7’s default template.
formstringNoDeprecated alias of template, accepted so existing callers keep working.
mailobjectNoThe notification mail template.
mail_2objectNoThe autoresponder mail template.
messagesobjectNoValidation and status messages.
additional_settingsstringNoRaw additional-settings block.

What comes back

NameTypeWhat it is
formobjectThe created form, including its id and shortcode.
config_errorsarrayAnything Contact Form 7’s validator flags on the new form.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Create a contact form called “Partnership enquiries” using the default template.

It resolves to one call:

{
  "ability": "contact-form-7/create-form",
  "parameters": {
    "title": "Partnership enquiries"
  }
}

Worth knowing

  • Not idempotent — calling it twice gives you two forms with the same title and different ids, which is a genuinely confusing state to be in.
  • The form is invisible until its shortcode is on a page. Creating it is not publishing it.
  • Prefer the default template plus contact-form-7/add-form-field over hand-written markup.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading