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

Start free trial

Create Ticket

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

Abilitytickets/create-ticket
ToolsetEvent Tickets — toolset/event-tickets
GroupEvent Tickets › Tickets
RequiresEvent Tickets, active on the site
Capabilitymanage_options
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

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

NameTypeRequiredWhat it is
post_idintegerYesThe event, page or other ticketed post.
namestringYesThe ticket name shown to buyers.
descriptionstringNoTicket description.
pricestringNoPrice. Use "0" or omit for a free ticket.
capacityintegerNoHow many can be sold. Use -1 for unlimited.
capacity_modestringNoown keeps independent stock; global draws from the event pool; capped draws from the pool up to a limit; unlimited has no cap.
shared_capintegerNoThe limit when capacity_mode is capped.
start_datestringNoWhen the ticket goes on sale, e.g. 2026-11-01.
end_datestringNoWhen sales close.
providerstringNoProvider class to create through. Omit for the site default.

What comes back

NameTypeWhat it is
ticketobjectThe created ticket, read back from the plugin.
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:

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-providers first.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading