tickets/create-ticket adds a ticket to a post through Event Tickets’ own save path rather than by writing meta, so capacity and stock are initialised the way the plugin expects to find them.
Supply a name and a post and you get a free ticket; add a price, a sale window and a capacity model to shape it.
At a glance
| Ability | tickets/create-ticket |
| Toolset | Event Tickets — toolset/event-tickets |
| Group | Event Tickets › Tickets |
| Requires | Event Tickets, 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 Abilities Manager 0.0.34 and later |
How it works
Not every post type can carry tickets. The plugin keeps a list, and a post type outside it is refused with the valid ones named — which is more useful than a generic failure and saves a trip to tickets/list-ticket-providers.
The provider decides what kind of ticket this is. RSVP is always available; paid tickets need Tickets Commerce switched on; the WooCommerce and EDD providers need Event Tickets Plus. Omit provider for the site default.
Choose the capacity mode deliberately. own is the simple case. global and capped only make sense once the event has a shared pool, and a ticket created in one of those modes before the pool exists is a confusing thing to inherit.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
post_id | integer | Yes | The event, page or other ticketed post. |
name | string | Yes | The ticket name shown to buyers. |
description | string | No | Ticket description. |
price | string | No | Price. Use "0" or omit for a free ticket. |
capacity | integer | No | How many can be sold. Use -1 for unlimited. |
capacity_mode | string | No | own keeps independent stock; global draws from the event pool; capped draws from the pool up to a limit; unlimited has no cap. |
shared_cap | integer | No | The limit when capacity_mode is capped. |
start_date | string | No | When the ticket goes on sale, e.g. 2026-11-01. |
end_date | string | No | When sales close. |
provider | string | No | Provider class to create through. Omit for the site default. |
What comes back
| Name | Type | What it is |
|---|---|---|
ticket | object | The created ticket, read back from the plugin. |
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 £25 early-bird ticket to this event, 50 available, closing on 1 December.
It resolves to one call:
{
"ability": "tickets/create-ticket",
"parameters": {
"post_id": 412,
"name": "Early bird",
"price": "25",
"capacity": 50,
"capacity_mode": "own",
"end_date": "2026-12-01"
}
}Worth knowing
- Not idempotent — each call adds another ticket, and two tickets with the same name is a confusing thing for a buyer to see.
- A post type that cannot carry tickets is refused by name. That is a guard, not a bug.
- Paid tickets need a provider that can take money. Check
tickets/list-ticket-providersfirst.
Related abilities
- List Ticket Providers — check what is active first
- Update Ticket — change it afterwards
- Get Capacity Report — the pool a shared ticket would draw from
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category