top of page

Moshtix Ticket API – Real Time Event Data & Ticketing for US Venues

Access real-time event data, ticket availability & sales reporting with the Moshtix API. Streamline US event operations for organizers & venues.

API football


What Is the Moshtix Ticket API?

The Moshtix Ticket API is a GraphQL-based developer interface that lets event organizers, venues, promoters, and app developers programmatically manage events, ticket types, sales data, and order processing all from a single endpoint. Whether you're building a custom sports app, a concert ticketing platform, or integrating real-time ticket data into an existing product, the Moshtix Ticket API gives you the flexibility to do it at scale.


Unlike traditional REST APIs, the Moshtix API is a GraphQL API that uses a single HTTP POST endpoint (api.moshtix.com/v1/graphql) to process all API requests. Moshtix This means US developers can build leaner, faster integrations that request only the data they actually need.





How the Moshtix Ticket API Works


The Moshtix API is an "Open" API, meaning anyone can use it, and it is also used by all of Moshtix's internally developed modern products helping ensure it is fit for purpose and working correctly, since its proper function is critical to their own business. Moshtix.


What's great about the API is that you request only the data you want, which means fewer requests and smaller response payloads compared to a traditional API. 


Authentication: Getting Your Token


The login mutation is used to obtain a JSON Web Token (JWT) for authentication, which can then be used for subsequent requests. 


Login Mutation (Get JWT Token):


mutation {

  login(username: "your-username", password: "your-password")
}

Once authenticated, pass the token in your viewer wrapper:


query {
  viewer(token: "your-token-here") {
    getEvents {
      items {
        name
        startDate
      }
    }
  }
}


Core API Capabilities


1. Query Events & Ticket Types

The getEvents query is the backbone of most Moshtix Ticket API integrations. The getEvents query method has many attributes and arguments available, so you can write a complex query Moshtix or a minimal one depending on your needs.


Full Event Query with Ticket Types:


query {
  viewer {
    getEvents(pageIndex: 0, pageSize: 15, sortBy: STARTDATE, sortByDirection: ASC) {
      totalCount
      pageInfo {
        hasPreviousPage
        hasNextPage
        pageIndex
        pageSize
      }
      items {
        name
        teaser
        startDate
        venue {
          name
          address {
            locality
          }
        }
        genre {
          name
        }
        ticketTypes(pageIndex: 0, pageSize: 10) {
          items {
            name
            ticketPrice
          }
        }
      }
    }
  }
}

Minimal Event Query (Name + Date only):


query {
  viewer {
    getEvents {
      items {
        name
        startDate
      }
    }
  }
}

2. Create & Manage Events (Mutations)

The Moshtix Ticket API supports full event creation through GraphQL mutations. When mutating (making changes to) objects, you only need to provide the objects and attributes that you want to change, rather than the entire object meaning less complexity for client applications and smaller request payloads compared to a traditional API.


mutation {
  viewer(token: "your-token-here") {
    saveEvent(event: {
      id: null,
      approved: false,
      name: "Summer Sports Fest 2025",
      teaser: "Annual summer sporting event.",
      startDate: "2025-07-04T18:00:00.000Z",
      endDate: "2025-07-04T23:00:00.000Z",
      venue: { id: 274 },
      maxTicketsPerOrder: 10,
      ticketTypes: {
        items: [
          {
            id: -1,
            name: "General Admission",
            ticketPrice: 30.99,
            salesStartDate: "2025-06-01T00:00:00.000Z",
            salesCloseDate: "2025-07-04T17:00:00.000Z"
          },
          {
            id: -2,
            name: "VIP Admission",
            ticketPrice: 89.99,
            salesStartDate: "2025-06-01T00:00:00.000Z",
            salesCloseDate: "2025-07-04T17:00:00.000Z"
          }
        ]
      }
    }) {
      id
      name
    }
  }
}

3. Webhook Integration for Real-Time Events

Rather than polling the API repeatedly, the recommended approach is using webhooks. The Moshtix API can be used to configure webhook subscriptions for when an event is saved and when an order is saved. Webhook subscriptions are scoped to a single client account.


Webhook triggers include:

  • Event Saved — fires when an event or any of its objects is created or modified

  • Order Saved — fires when a ticket is sold, refunded, reissued, or cancelled.


Sample Webhook Payload (Order Saved):


{
  "eventType": "order-saved-prepare-full-message",
  "contextId": 37228036,
  "data": {
    "id": 37228036,
    "channel": "ONLINE",
    "customer": {
      "email": "fan@example.com",
      "firstName": "Jane",
      "lastName": "Smith"
    },
    "event": {
      "id": 132218,
      "name": "Summer Sports Fest 2025",
      "startDate": "2025-07-04T18:00:00.000Z"
    },
    "tickets": {
      "items": [
        {
          "id": 29734124,
          "valid": true,
          "barcode": "F2D705C60392480385CD7BEF6C0A70DF",
          "totalCost": 30.99
        }
      ]
    }
  }
}

Moshtix Ticket API Feature Comparison Table



Feature

Moshtix Ticket API

Traditional REST Ticketing APIs

API Type

GraphQL (single endpoint)

Multiple REST endpoints

Data Fetching

Request only fields you need

Returns full fixed payloads

Authentication

JWT (login or long-lived token)

API key / OAuth

Event Creation

Supported via mutations

Varies by provider

Webhooks

Yes (event-saved, order-saved)

Limited or polling required

Pagination

Built-in cursor-based pagination

Varies

Ticket Types

GA, VIP, discounted, hidden types

Basic tier support

Fee Calculation

API method for pre-calculating fees

Manual

Open API

Yes — same API used internally

Often private/partner-only

Test Environment

$0 ticket types for sandbox testing

Varies


Who Uses the Moshtix Ticket API in the USA?


The Moshtix Ticket API is widely used by:


Sports Tech Companies : building fan engagement apps, mobile ticketing, and venue management tools for

stadiums and arenas across the US.


Event Promoters & Producers :  who need to manage high-volume ticket sales, run promo codes, and get real-time reporting for concerts, festivals, and sporting events.


Venue & Stadium Operators :  needing customized ticket sales flows, capacity tracking, and box office integration within a single platform.


App Developers & Agencies  (like SportsFirst) : integrating Moshtix with existing mobile apps, CRMs, and event management platforms to deliver seamless attendee experiences.


Ticket Fee Calculation via API

Moshtix fee structures are tiered based on the base price of a ticket the fees for a $10 ticket might be different from those for a $100 ticket or a $500 ticket. When setting prices in the API, the base price must be provided, which then has fees added to determine the total ticket price for customers.


Calculate Fees Before Creating a Ticket:


query {
  viewer(token: "your-token-here") {
    getTicketFees(clientId: 6080, ticketPrice: 20, hard: false) {
      feeTotal
      basePrice
      ticketPrice
    }
  }
}

Best Practices for Developers


Use Webhooks Over Polling. Moshtix encourages developers to implement event-driven integrations using webhooks instead of polling the API at regular intervals, as polling can have a negative impact on performance. 


Test with $0 Ticket Types. $0 ticket types can be used for testing to avoid using real money; otherwise, paid transactions can be refunded using the Refunds and Exchanges page of the Moshtix Control Room. 


Never Publish Test Events. You should never "Approve/Publish" test events, as they will be searchable on the Moshtix website. Use the "Preview URL" for the event if you need to test purchasing tickets to trigger webhooks.


Paginate Correctly. All lists/arrays of objects in the API are represented as "connection" objects with pagination support. Always implement pagination loops to retrieve complete datasets.


FAQs


What is the Moshtix Ticket API used for? 


The Moshtix Ticket API is used to programmatically create and manage events, list ticket types, process ticket sales, and receive real-time order notifications via webhooks. It's ideal for sports apps, ticketing platforms, and venue management tools in the USA.


Is the Moshtix Ticket API a REST or GraphQL API? 


It is a GraphQL API. All requests are sent via a single HTTP POST endpoint at api.moshtix.com/v1/graphql, which means developers can request only the specific data fields they need.


How do I authenticate with the Moshtix Ticket API? 


You authenticate using a JWT token obtained through the login mutation. For long-running integrations, Moshtix can provide long-lasting programmatic tokens scoped to a specific client account.


Does the Moshtix Ticket API support webhooks?

 

Yes. The API supports webhook subscriptions for two key events: when an event is saved and when an order is saved (ticket purchased, refunded, or cancelled). Webhooks are the recommended integration approach over polling.


Can I create events and ticket types via the API? 


Yes. The saveEvent mutation allows you to create events with full configurations including multiple ticket types (GA, VIP, discounted), allocation groups, capacity limits, and offer codes.


Is the Moshtix Ticket API free to use?

 

The API itself is open, but ticketing fees are tiered based on ticket price. Use the getTicketFees query to calculate fees programmatically before creating ticket types. Contact SportsFirst or Moshtix directly for detailed pricing.


How do I handle pagination in the Moshtix Ticket API? 


The API uses connection-based pagination with pageIndex and pageSize arguments. You increment the pageIndex on each request until hasNextPage returns false.


What ticket types does Moshtix support? 


Moshtix supports General Admission, VIP, discounted tickets via offer codes, and hidden ticket types that are revealed with a code all manageable through the API.


Can I integrate the Moshtix Ticket API into a mobile sports app? 


Absolutely. SportsFirst specializes in building mobile sports apps with Moshtix Ticket API integration for US clients — from real-time ticket availability to post-event analytics.


Where can I find the full Moshtix API documentation? 


The official documentation is at developer.moshtix.com. You can also use their GraphQL Playground to explore and test queries interactively.













Are you looking to hire a qualified sports app development company?

Are you looking to hire a qualified sports app development company or want to discuss sports APIs?

Thanks for submitting!

bottom of page