geodirectory/create-listing creates a new directory listing.
Call geodirectory/list-listing-fields first. This is not politeness — the accepted keys genuinely cannot be known without it.
At a glance
| Ability | geodirectory/create-listing |
| Toolset | GeoDirectory — toolset/geodirectory |
| Group | GeoDirectory › Listings |
| Requires | AcrossAI Pro, plus GeoDirectory active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Pro 0.9.16 and later |
Why the schema has to be read
GeoDirectory fields are defined per site and per listing type. There is no fixed schema to know in advance, which is why geodirectory/list-listing-fields is the call before any listing write: it returns the accepted keys, and each row’s name — its htmlvar_name — is what you write under.
On a default install the required set is title, content, post_category and street. On a real directory it is whatever the site decided, and a missing required field is a rejection rather than a partial save.
The address is the input people get wrong most. There is no address parameter: GeoDirectory explodes the address into street, city, region, country and zip, and those are the parameters.
City is auto-filled from the site default location when omitted, which is convenient on a single-city directory and wrong on any other.
Latitude and longitude are writable only when the address field has show_latlng enabled. Otherwise GeoDirectory geocodes from the address and ignores what you sent.
Site-defined fields go in the fields object keyed by htmlvar_name. They are sent as flat top-level parameters underneath, which is what GeoDirectory expects.
Not idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
post_type | string | No | Listing type, for example gd_place. Defaults to the site default. See geodirectory/get-directory-overview for the valid values. |
title | string | Usually | Listing title. post_title is an alias. |
content | string | Usually | Listing description. post_content is an alias. |
status | string | No | Post status. Publishing needs publish_posts. |
author | integer | No | Owner user ID. A different owner needs edit_others_posts. |
post_category | array | Usually | Category term IDs. |
post_tags | string | No | Comma-separated tag names. |
street | string | Usually | Street address. There is no address parameter. |
city | string | No | City. Auto-filled from the site default when omitted. |
region | string | No | Region or state. |
country | string | No | Country. |
zip | string | No | Postal code. |
latitude | number | No | Writable only when the address field has show_latlng enabled. |
longitude | number | No | Same condition as latitude. |
fields | object | No | Site-defined custom fields keyed by htmlvar_name. |
What comes back
| Name | Type | What it is |
|---|---|---|
listing | object | The created listing. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present 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:
Add a new restaurant listing.
It resolves to one call:
{
"ability": "geodirectory/create-listing",
"parameters": {
"title": "The Avon Kitchen",
"content": "Seasonal British cooking near the harbour.",
"post_category": [12],
"street": "14 Avon Street",
"city": "Bristol",
"fields": { "phone": "0117 496 0000" }
}
}Worth knowing
- Read the field schema first. The accepted keys are site-defined.
- No
addressparameter — the address is exploded into parts. - Omitting the city fills it from the site default location.
- Coordinates only stick when the address field allows them.
Related abilities
- GeoDirectory List Listing Fields — required before this
- GeoDirectory Update Listing — change it afterwards
- GeoDirectory Get Listing Package — which fields a package allows
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category