swarmtix_events_unpublish
Takes a published event off the public site and stops its ticket sales, keeping every order
swarmtix_events_unpublish
Takes a published event off the public site and stops its ticket sales. The event becomes a draft. Orders already placed are kept: nobody is refunded and nobody is emailed.
When you would reach for it
- Pausing sales while something is fixed.
- Taking an event down that was published by mistake.
- Before deleting a ticket type.
swarmtix_ticket_types_deleteonly works on an unpublished event.
Scope
events:publish
It needs the same permission as swarmtix_events_publish. The connection's user must be allowed to edit the event.
This tool is marked destructive, because it stops sales at once. It is idempotent: unpublishing an event that is not published changes nothing. Existing orders, tickets and attendees are not touched, and nobody is refunded or emailed.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
event | string | Yes | - | The event's id (a GUID) or its URL slug. |
Example call
{
"name": "swarmtix_events_unpublish",
"arguments": {
"event": "spring-summit-2027"
}
}What comes back
{
"eventId": "3b6f81ce-04a2-4d97-b5e8-7c10924af3d6",
"slug": "spring-summit-2027",
"status": "Draft",
"changed": true
}| Field | What it is |
|---|---|
status | Draft when this call unpublished the event. When the event was not published, the status it already had. |
changed | true when this call unpublished the event, false when there was nothing to do |
What happens when you call it
- The event is resolved through the edit gate.
- The stored status is read. If the event is not published, the call ends here with
changed: false. - Otherwise one column is written: the event's status goes from
PublishedtoDraft. This is what the dashboard's unpublish button does. - The status is read back and returned.
Troubleshooting
"The event's status changed while this call ran. Nothing was changed. Read it again with swarmtix_event_readiness and retry."
Somebody changed the status between the read and the write. Nothing was written. Read the event again and retry.
"The status was written, but a different status was read back right after, so another change landed at the same time. Read the event again to see its current status."
The write happened, but another change landed at the same moment. Read the event again to see its current status.
"Event not found, or this connection does not have access to it."
The event does not exist, it belongs to another organisation, or this organizer may read it but not edit it.
Use cases
- Pausing sales without losing any order
- Making an event editable again before removing a ticket type