API ReferenceView as MarkdownOpenAPI

Events

View as Markdown

Events are ticketed events: dates, ticket tiers with prices, a venue and, optionally, a seating plan with seats to choose from. Venues and seating plans are set up once and reused across events.

Endpoints that need a token: the site owner creates it in their admin (Developers > API reference). AI assistants: how to ask the user for one.

21 endpoints in 5 parts: Event, Seating Plan, Ticket, Venue, AI builder.

List all events

The events page, or the events as JSON with ?ionic. Each event with its venue, dates and pictures only.

Optional user

Works without a token; with a user token the answer is personal.

Returns

Returns a list of Event objects.

Status codes

200 500

GET/events
curl -X GET 'http://smartman.max-media.io/events?ionic=true'
Response
[
  {
    "name": "Example",
    "venue": "6543210fedcba98765432100",
    "description": "Text shown on the site.",
    "medias": [
      {
        "media": "6543210fedcba98765432100",
        "gcs_url": "example-item",
        "gcs_480_30_url": "example-item",
        "gcs_720_30_url": "example-item",
        "gcs_1080_30_url": "example-item",
        "duration": 1,
        "vimeo_uri": "example",
        "vimeo_picture": "example",
        "vimeo_url": "example-item",
        "youtube_url": "example-item",
        "youtube_picture": "example",
        "thumbnail": "example",
        "_id": "6543210fedcba98765432100"
      }
    ],
    "dates": [
      {
        "date": "2026-11-04T12:00:00.000Z",
        "_id": "6543210fedcba98765432100",
        "seating_plan": {
          "id": "example",
          "sections": "example"
        }
      }
    ],
    "owner_id": "6543210fedcba98765432100",
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z",
    "tier_1": {
      "name": "Example",
      "price": 0
    },
    "tier_2": {
      "name": "Example",
      "price": 0
    },
    "tier_3": {
      "name": "Example",
      "price": 0
    },
    "tier_4": {
      "name": "Example",
      "price": 0
    },
    "tier_5": {
      "name": "Example",
      "price": 0
    },
    "tier_6": {
      "name": "Example",
      "price": 0
    }
  }
]

Create an event

Creates an event. Answers 201 with the event.

User token

Needs the token of a signed-in user.

Returns

Returns the Event object.

Status codes

201 400 401 500

POST/events
curl -X POST 'http://smartman.max-media.io/events?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "venue": "6543210fedcba98765432100",
  "description": "Text shown on the site.",
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "dates": [
    {
      "date": "2026-11-04T12:00:00.000Z",
      "_id": "6543210fedcba98765432100",
      "seating_plan": {
        "id": "example",
        "sections": "example"
      }
    }
  ],
  "owner_id": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "tier_1": {
    "name": "Example",
    "price": 0
  },
  "tier_2": {
    "name": "Example",
    "price": 0
  },
  "tier_3": {
    "name": "Example",
    "price": 0
  },
  "tier_4": {
    "name": "Example",
    "price": 0
  },
  "tier_5": {
    "name": "Example",
    "price": 0
  },
  "tier_6": {
    "name": "Example",
    "price": 0
  }
}

Retrieve an event

An event's page, or JSON with ?ionic. With its venue. 404 when there is no such event.

Optional user

Works without a token; with a user token the answer is personal.

Path parameters
idstringRequired

The ID of the event.

Returns

Returns the Event object.

Status codes

200 404 500

GET/events/:id
curl -X GET 'http://smartman.max-media.io/events/{id}?ionic=true'
Response
{
  "name": "Example",
  "venue": "6543210fedcba98765432100",
  "description": "Text shown on the site.",
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "dates": [
    {
      "date": "2026-11-04T12:00:00.000Z",
      "_id": "6543210fedcba98765432100",
      "seating_plan": {
        "id": "example",
        "sections": "example"
      }
    }
  ],
  "owner_id": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "tier_1": {
    "name": "Example",
    "price": 0
  },
  "tier_2": {
    "name": "Example",
    "price": 0
  },
  "tier_3": {
    "name": "Example",
    "price": 0
  },
  "tier_4": {
    "name": "Example",
    "price": 0
  },
  "tier_5": {
    "name": "Example",
    "price": 0
  },
  "tier_6": {
    "name": "Example",
    "price": 0
  }
}

Update an event

Updates an event. Answers the event, or 404.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the event.

Returns

Returns the Event object.

Status codes

200 400 401 404 500

PATCH/events/:id
curl -X PATCH 'http://smartman.max-media.io/events/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "venue": "6543210fedcba98765432100",
  "description": "Text shown on the site.",
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "dates": [
    {
      "date": "2026-11-04T12:00:00.000Z",
      "_id": "6543210fedcba98765432100",
      "seating_plan": {
        "id": "example",
        "sections": "example"
      }
    }
  ],
  "owner_id": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "tier_1": {
    "name": "Example",
    "price": 0
  },
  "tier_2": {
    "name": "Example",
    "price": 0
  },
  "tier_3": {
    "name": "Example",
    "price": 0
  },
  "tier_4": {
    "name": "Example",
    "price": 0
  },
  "tier_5": {
    "name": "Example",
    "price": 0
  },
  "tier_6": {
    "name": "Example",
    "price": 0
  }
}

Delete an event

Deletes an event. Answers the deleted event. Its tickets stay.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the event.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/events/:id
curl -X DELETE 'http://smartman.max-media.io/events/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all seating plans

The seating plans. Answers an array of every record.

Public

Public - no token needed.

Returns

Returns a list of SeatingPlan objects.

Status codes

200 500

GET/seating-plans
curl -X GET 'http://smartman.max-media.io/seating-plans?ionic=true'
Response
[
  {
    "name": "Example",
    "sections": [
      {
        "subsections": [],
        "section_type": "example",
        "name": "Example",
        "top": 1,
        "left": 1,
        "color": "#3557c4",
        "premium_color": "#3557c4",
        "rotation": 1,
        "max_seats": 1
      }
    ],
    "venue": "6543210fedcba98765432100",
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create a seating plan

Creates a seating plan. Answers 201 with the created record; 400 with the reason when a field is invalid.

User token

Needs the token of a signed-in user.

Returns

Returns the SeatingPlan object.

Status codes

201 400 401 500

POST/seating-plans
curl -X POST 'http://smartman.max-media.io/seating-plans?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "sections": [
    {
      "subsections": [],
      "section_type": "example",
      "name": "Example",
      "top": 1,
      "left": 1,
      "color": "#3557c4",
      "premium_color": "#3557c4",
      "rotation": 1,
      "max_seats": 1
    }
  ],
  "venue": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve a seating plan

One seating plan. 404 when there is no such record.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the seating plan.

Returns

Returns the SeatingPlan object.

Status codes

200 404 500

GET/seating-plans/:id
curl -X GET 'http://smartman.max-media.io/seating-plans/{id}?ionic=true'
Response
{
  "name": "Example",
  "sections": [
    {
      "subsections": [],
      "section_type": "example",
      "name": "Example",
      "top": 1,
      "left": 1,
      "color": "#3557c4",
      "premium_color": "#3557c4",
      "rotation": 1,
      "max_seats": 1
    }
  ],
  "venue": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update a seating plan

Updates a seating plan. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the seating plan.

Returns

Returns the SeatingPlan object.

Status codes

200 400 401 404 500

PATCH/seating-plans/:id
curl -X PATCH 'http://smartman.max-media.io/seating-plans/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "sections": [
    {
      "subsections": [],
      "section_type": "example",
      "name": "Example",
      "top": 1,
      "left": 1,
      "color": "#3557c4",
      "premium_color": "#3557c4",
      "rotation": 1,
      "max_seats": 1
    }
  ],
  "venue": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete a seating plan

Deletes a seating plan. Answers the deleted record, or 404. Records that point to it are not changed.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the seating plan.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/seating-plans/:id
curl -X DELETE 'http://smartman.max-media.io/seating-plans/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve an events date

An event date's page with its seating plan and ticket tiers. date_index is the date's position in the event's dates. 404 when there is no such event or date.

Optional user

Works without a token; with a user token the answer is personal.

Path parameters
idstringRequired

The ID of the events date.

date_indexstringRequired

The events date's date index.

Status codes

200 404 500

GET/events-date/:id/:date_index
curl -X GET 'http://smartman.max-media.io/events-date/{id}/{date_index}?ionic=true'
Response
{
  "name": "Example",
  "venue": "6543210fedcba98765432100",
  "description": "Text shown on the site.",
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "dates": [
    {
      "date": "2026-11-04T12:00:00.000Z",
      "_id": "6543210fedcba98765432100",
      "seating_plan": {
        "id": "example",
        "sections": "example"
      }
    }
  ],
  "owner_id": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "tier_1": {
    "name": "Example",
    "price": 0
  },
  "tier_2": {
    "name": "Example",
    "price": 0
  },
  "tier_3": {
    "name": "Example",
    "price": 0
  },
  "tier_4": {
    "name": "Example",
    "price": 0
  },
  "tier_5": {
    "name": "Example",
    "price": 0
  },
  "tier_6": {
    "name": "Example",
    "price": 0
  }
}

Retrieve a ticket

A ticket's page with its QR code. 404 when there is no such ticket. JSON with ?ionic.

Optional user

Works without a token; with a user token the answer is personal.

Path parameters
idstringRequired

The ID of the ticket.

Returns

Returns the Ticket object.

Status codes

200 404 500

GET/ticket/:id
curl -X GET 'http://smartman.max-media.io/ticket/{id}?ionic=true'
Response
{
  "event": "6543210fedcba98765432100",
  "date": 1,
  "section": 1,
  "subsection": 1,
  "row": 1,
  "seat": 1,
  "row_index_formated": 1,
  "seat_index_formated": 1,
  "lead_id": "6543210fedcba98765432100",
  "socket_id": "example",
  "status": "frozen",
  "expiration_time": "2026-11-04T12:00:00.000Z",
  "qr_code": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "tier": {
    "name": "Example",
    "price": 0
  }
}

Create a ticket

Holds, releases or sells seats for the visitor (tickets, freeze). Seats are held for the visitor until expiration_time, then released if not paid. 400 for an invalid section, date or seat, a seat already taken or a full section.

Optional user

Works without a token; with a user token the answer is personal.

Parameters
findIndexstring

The ticket's find index.

splicestring

The ticket's splice.

pushstring

The ticket's push.

ticketsstring

The ticket's tickets.

freeze_actionstring

The ticket's freeze action.

bought_by_adminstring

The ticket's bought by admin.

freezestring

The ticket's freeze.

Returns

Returns the Ticket object.

Status codes

201 400 500

POST/tickets
curl -X POST 'http://smartman.max-media.io/tickets?ionic=true' \
  -H 'Content-Type: application/json' \
  -d '{ "findIndex": "...", "splice": "...", "push": "...", "tickets": "...", "freeze_action": "..." }'
Response
{
  "event": "6543210fedcba98765432100",
  "date": 1,
  "section": 1,
  "subsection": 1,
  "row": 1,
  "seat": 1,
  "row_index_formated": 1,
  "seat_index_formated": 1,
  "lead_id": "6543210fedcba98765432100",
  "socket_id": "example",
  "status": "frozen",
  "expiration_time": "2026-11-04T12:00:00.000Z",
  "qr_code": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "tier": {
    "name": "Example",
    "price": 0
  }
}

List all venues

The venues. Answers an array of every venue. Reads no token.

Public

Public - no token needed.

Returns

Returns a list of Venue objects.

Status codes

200 500

GET/venues
curl -X GET 'http://smartman.max-media.io/venues?ionic=true'
Response
[
  {
    "name": "Example",
    "origin_address": "6543210fedcba98765432100",
    "address": "example",
    "medias": [
      {
        "media": "6543210fedcba98765432100",
        "gcs_url": "example-item",
        "gcs_480_30_url": "example-item",
        "gcs_720_30_url": "example-item",
        "gcs_1080_30_url": "example-item",
        "duration": 1,
        "vimeo_uri": "example",
        "vimeo_picture": "example",
        "vimeo_url": "example-item",
        "youtube_url": "example-item",
        "youtube_picture": "example",
        "thumbnail": "example",
        "_id": "6543210fedcba98765432100"
      }
    ],
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create a venue

Creates a venue. Answers 201 with the venue.

User token

Needs the token of a signed-in user.

Returns

Returns the Venue object.

Status codes

201 400 401 500

POST/venues
curl -X POST 'http://smartman.max-media.io/venues?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "origin_address": "6543210fedcba98765432100",
  "address": "example",
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve a venue

One venue. 404 when there is no such venue.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the venue.

Returns

Returns the Venue object.

Status codes

200 404 500

GET/venues/:id
curl -X GET 'http://smartman.max-media.io/venues/{id}?ionic=true'
Response
{
  "name": "Example",
  "origin_address": "6543210fedcba98765432100",
  "address": "example",
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update a venue

Updates a venue. Answers the venue, or 404.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the venue.

Returns

Returns the Venue object.

Status codes

200 400 401 404 500

PATCH/venues/:id
curl -X PATCH 'http://smartman.max-media.io/venues/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "origin_address": "6543210fedcba98765432100",
  "address": "example",
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete a venue

Deletes a venue. Answers the deleted venue. Its seating plans and events keep pointing at it.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the venue.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/venues/:id
curl -X DELETE 'http://smartman.max-media.io/venues/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Create a seating plan with AI

AI: designs a seating plan for one of the venues. Answers { action: 'JOB', async_job } at once; the admin polls GET /async-jobs/:id, and the result arrives in the chat as a message when the job ends. The AI work is charged to the account's credits.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the seating plan, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

aiVersionstring

Which version of the AI builder to use; leave it out for the current one.

item_idstring

The ID of the seating plan to change.

Status codes

200 401 500

POST/create-new-seating-plan
curl -X POST 'http://smartman.max-media.io/create-new-seating-plan?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "...", "aiVersion": "...", "item_id": "..." }'

Generate a seating plan with AI

AI: routes a request for a seating plan to create-new-seating-plan. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the seating plan, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/generate-seating-plan
curl -X POST 'http://smartman.max-media.io/generate-seating-plan?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "..." }'

Modify a seating plan with AI

AI: routes a change to a seating plan. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.

Admin token

Needs a site admin token.

Parameters
promptstring

What the AI should do with the seating plan, in plain words - any language.

item_datastring

The current seating plan, as JSON - the AI changes it and returns the result.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/modify-seating-plan
curl -X POST 'http://smartman.max-media.io/modify-seating-plan?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "item_data": "...", "chatId": "..." }'
↑↓ Navigate↵ GoEsc Close