> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eventory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add event to tracking

> Registers an event so that Eventory starts collecting market data for it.
Supply exactly one source: a Viagogo pair (`event_url` + `viagogo_event_id`)
or a Ticketmaster pair (`ticketmaster_event_url` + `ticketmaster_event_id`).

Data for a newly added event accumulates over time; the first calls to the
event endpoints may return empty statistics.

**Cost:** 1 credit.




## OpenAPI

````yaml /openapi.yaml post /eventory/data/events/add
openapi: 3.1.0
info:
  title: Eventory API
  version: '1.0'
  description: >
    Every HTTP endpoint of the Eventory platform, reached through the single
    public

    gateway at `https://api.eventory.ai`. The real-time notification stream is a

    WebSocket and is documented separately under **Real-time stream**.


    Authenticate every request with the `apikey` header. Each endpoint lists its

    credit cost; see **Credits & access** for how billing works.
  contact:
    name: Eventory
    url: https://eventory.ai
servers:
  - url: https://api.eventory.ai
    description: Production
security:
  - apiKey: []
tags:
  - name: Market Data
    description: |
      Historical and aggregated marketplace data for events and artists, plus
      full-text search over the Eventory catalog. Polling API.
      **1 credit per request** (sales list scales with rows requested).
  - name: Live Availability
    description: >
      On-demand scrape of the current ticket availability for one event on one
      of

      the eleven supported platforms. **5 credits per request.**
  - name: Watchlist
    description: |
      Manage the events your account monitors. The watchlist drives the
      real-time stream. **Free.**
  - name: Account
    description: Your plan and credit usage, live from billing. **Free.**
paths:
  /eventory/data/events/add:
    post:
      tags:
        - Market Data
      summary: Add event to tracking
      description: >
        Registers an event so that Eventory starts collecting market data for
        it.

        Supply exactly one source: a Viagogo pair (`event_url` +
        `viagogo_event_id`)

        or a Ticketmaster pair (`ticketmaster_event_url` +
        `ticketmaster_event_id`).


        Data for a newly added event accumulates over time; the first calls to
        the

        event endpoints may return empty statistics.


        **Cost:** 1 credit.
      operationId: addEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventsAddRequest'
            examples:
              viagogo:
                summary: Viagogo event
                value:
                  event_url: >-
                    https://www.viagogo.com/Concert-Tickets/Rock-and-Pop/Artist-Tickets/E-160973997
                  viagogo_event_id: '160973997'
              ticketmaster:
                summary: Ticketmaster event
                value:
                  ticketmaster_event_url: https://www.ticketmaster.com/event/0200642CF18CAA24
                  ticketmaster_event_id: 0200642CF18CAA24
      responses:
        '200':
          description: Upstream acknowledgement. Extra keys may be present.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsAddResponse'
              example:
                status: success
                data:
                  event_id: 5b1c6c3e-2f5c-4c1e-9a4e-1c2d3e4f5a6b
        '400':
          description: >-
            Validation failed (both or neither source supplied, non-numeric
            Viagogo id, bad URL).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataApiError'
              example:
                status: error
                code: INVALID_REQUEST
                message: provide a viagogo or ticketmaster event
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          $ref: '#/components/responses/DataUpstream'
components:
  schemas:
    EventsAddRequest:
      type: object
      description: Exactly one source mode. Never both, never neither.
      properties:
        event_url:
          type: string
          format: uri
          description: Viagogo event URL. Required with `viagogo_event_id`.
        viagogo_event_id:
          type: string
          pattern: ^\d+$
          description: >-
            Numeric Viagogo event id (without the `E-` prefix). Required with
            `event_url`.
        ticketmaster_event_url:
          type: string
          format: uri
          description: Ticketmaster event URL. Required with `ticketmaster_event_id`.
        ticketmaster_event_id:
          type: string
          description: Ticketmaster event id. Required with `ticketmaster_event_url`.
        event_id:
          type: string
          format: uuid
          description: Optional existing Eventory event UUID to attach the source to.
    EventsAddResponse:
      type: object
      additionalProperties: true
      properties:
        status:
          type:
            - string
            - 'null'
        data:
          type:
            - object
            - 'null'
          additionalProperties: true
    DataApiError:
      type: object
      description: Error envelope of the Market Data API.
      required:
        - status
        - code
        - message
      properties:
        status:
          type: string
          const: error
        code:
          type: string
          enum:
            - INVALID_VIAGOGO_ID
            - INVALID_REQUEST
            - MISSING_URL
            - EVENT_NOT_FOUND
            - ARTIST_NOT_FOUND
            - BAD_UPSTREAM_REQUEST
            - UPSTREAM_AUTH_FAILED
            - EDGE_UPSTREAM_ERROR
            - EDGE_UNAVAILABLE
            - EDGE_TIMEOUT
            - INTERNAL_ERROR
        message:
          type: string
    GatewayError:
      type: object
      description: >
        Envelope for every failure decided by the gateway (auth, ACL, billing,

        rate limit, unknown route, upstream 5xx). Key on `code`; `message` is
        prose

        and may change.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthenticated
                - invalid_credentials
                - forbidden
                - no_subscription
                - limit_reached
                - no_billing_account
                - plan_unavailable
                - payment_required
                - invalid_parameter
                - rate_limited
                - not_found
                - service_unavailable
            message:
              type: string
  responses:
    Unauthenticated:
      description: No credential was sent, or the key was rejected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          examples:
            missing:
              value:
                error:
                  code: unauthenticated
                  message: Authentication is required to access this resource.
            invalid:
              value:
                error:
                  code: invalid_credentials
                  message: The provided credentials are invalid.
    PaymentRequired:
      description: Billing denied the request. See `code`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          examples:
            limit:
              value:
                error:
                  code: limit_reached
                  message: You have reached your usage limit.
            subscription:
              value:
                error:
                  code: no_subscription
                  message: No active subscription.
    Forbidden:
      description: >-
        The key is valid but not granted this route. Contact support to enable
        it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            error:
              code: forbidden
              message: You do not have access to this resource.
    RateLimited:
      description: More than 30 requests in the current minute. Back off.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            error:
              code: rate_limited
              message: Rate limit exceeded.
    DataUpstream:
      description: >-
        The data backend rejected the request, failed, or timed out.
        `INTERNAL_ERROR`, `EDGE_UNAVAILABLE`, and `EDGE_TIMEOUT` are safe to
        retry once with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DataApiError'
          example:
            status: error
            code: EDGE_UPSTREAM_ERROR
            message: Upstream returned an unexpected payload
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: Your Eventory API key. Sent as the `apikey` request header.

````