GetMyHotels Notifications API

The notifications API from GetMyHotels — 5 operation(s) for notifications.

GitHub OpenAPI

Operations 6

GET /v1/notifications List my in-app notifications #
GET /v1/notifications/unread-count Count my unread notifications #
POST /v1/notifications/read-all Mark every notification read #
POST /v1/notifications/{publicId}/read Mark one notification read #
GET /v1/notifications/preferences Read my notification preferences #
PUT /v1/notifications/preferences Update my notification preferences #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/getmyhotels-com:getmyhotels-com-notifications-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

getmyhotels-com-notifications-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GetMyHotels REST Notifications API
  version: 1.0.0
  description: REST surface for the native GetMyHotels apps. Every route is a thin transport over the shared tRPC routers — inputs are validated with the same Zod schemas the web client uses, and responses are returned verbatim. Authentication uses Better Auth bearer session tokens issued by the /api/auth/* endpoints (not part of this spec). Native clients send X-GMH-App-Version and X-GMH-Platform on every request; versions below the configured floor receive a typed 426 UpgradeRequiredError.
servers:
- url: https://api.getmyhotels.com
  description: Production API
tags:
- name: Notifications
paths:
  /v1/notifications:
    get:
      tags:
      - Notifications
      summary: List my in-app notifications
      description: Runs `notification.list`, newest first. `unreadOnly=true` limits it to unread ones. Returns `{ notifications, page, limit }`; each notification is `{ publicId, type, category, priority, title, body, data, actionUrl, imageUrl, readAt, createdAt, expiresAt }`. `type` includes `price_drop`, `rebook_alert` and `booking_auto_rebooked` among others — render unknown types with a generic icon. `data` is a JSON-encoded string or null; `actionUrl` is a site-relative or absolute link to open on tap.
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: integer
          minimum: 1
          default: 1
          example: 1
        required: false
        name: page
        in: query
      - schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
          example: 20
        required: false
        name: limit
        in: query
      - schema:
          type: boolean
        required: false
        name: unreadOnly
        in: query
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                description: Verbatim JSON output of the `notification.list` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
        '400':
          description: Request validation failed or the router rejected the input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid bearer session token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '426':
          description: Reported X-GMH-App-Version is below the supported minimum — the app must update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequiredError'
        '500':
          description: Unexpected server error (opaque; details stay in logs)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      operationId: getV1Notifications
      x-operation-id-source: derived
  /v1/notifications/unread-count:
    get:
      tags:
      - Notifications
      summary: Count my unread notifications
      description: Runs `notification.unreadCount`. Returns `{ count }` for the inbox badge; it counts exactly what `GET /v1/notifications?unreadOnly=true` lists.
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                description: Verbatim JSON output of the `notification.unreadCount` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
        '400':
          description: Request validation failed or the router rejected the input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid bearer session token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '426':
          description: Reported X-GMH-App-Version is below the supported minimum — the app must update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequiredError'
        '500':
          description: Unexpected server error (opaque; details stay in logs)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      operationId: getV1NotificationsUnreadCount
      x-operation-id-source: derived
  /v1/notifications/read-all:
    post:
      tags:
      - Notifications
      summary: Mark every notification read
      description: Runs `notification.markAllRead`. Returns `{ count }`, how many were unread. Takes no input, so this route accepts no request body.
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                description: Verbatim JSON output of the `notification.markAllRead` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
        '400':
          description: Request validation failed or the router rejected the input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid bearer session token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '426':
          description: Reported X-GMH-App-Version is below the supported minimum — the app must update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequiredError'
        '500':
          description: Unexpected server error (opaque; details stay in logs)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      operationId: postV1NotificationsReadAll
      x-operation-id-source: derived
  /v1/notifications/{publicId}/read:
    post:
      tags:
      - Notifications
      summary: Mark one notification read
      description: 'Runs `notification.markRead`; owner-only. Idempotent — returns `{ success: true, alreadyRead }`.'
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          minLength: 1
          maxLength: 36
        required: true
        name: publicId
        in: path
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                description: Verbatim JSON output of the `notification.markRead` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
        '400':
          description: Request validation failed or the router rejected the input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid bearer session token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '426':
          description: Reported X-GMH-App-Version is below the supported minimum — the app must update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequiredError'
        '500':
          description: Unexpected server error (opaque; details stay in logs)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      operationId: postV1NotificationsByPublicIdRead
      x-operation-id-source: derived
  /v1/notifications/preferences:
    get:
      tags:
      - Notifications
      summary: Read my notification preferences
      description: 'Runs `notification.listEmailPreferences` and `notification.listInAppPreferences`. Returns `{ email: [{ code, enabled }], inApp: [{ code, enabled }] }`. Email codes are `onboarding`, `reminder`, `win_back`, `partner`, `price_alert` and `rebook_alert`; the in-app list carries `price_alert`. Everything defaults to enabled. Booking, account and refund emails always send and are not listed.'
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                description: Verbatim JSON output of the `notification.listEmailPreferences` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
        '400':
          description: Request validation failed or the router rejected the input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid bearer session token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '426':
          description: Reported X-GMH-App-Version is below the supported minimum — the app must update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequiredError'
        '500':
          description: Unexpected server error (opaque; details stay in logs)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      operationId: getV1NotificationsPreferences
      x-operation-id-source: derived
    put:
      tags:
      - Notifications
      summary: Update my notification preferences
      description: 'Runs `notification.updatePreferences`. Upserts each `{ channel, type, enabled }` and leaves unlisted ones alone, so send only the toggles that changed. Use `channel: "email"` with an email code from `GET /v1/notifications/preferences` and `channel: "in_app"` with an in-app code. Turning `rebook_alert` off on any channel stops rebook watches for new bookings. Returns `{ success: true, count }`.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                preferences:
                  type: array
                  items:
                    type: object
                    properties:
                      channel:
                        type: string
                        enum:
                        - email
                        - push
                        - sms
                        - in_app
                      type:
                        type: string
                        minLength: 1
                        maxLength: 50
                      enabled:
                        type: boolean
                    required:
                    - channel
                    - type
                    - enabled
                  minItems: 1
              required:
              - preferences
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                description: Verbatim JSON output of the `notification.updatePreferences` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
        '400':
          description: Request validation failed or the router rejected the input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid bearer session token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '426':
          description: Reported X-GMH-App-Version is below the supported minimum — the app must update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequiredError'
        '500':
          description: Unexpected server error (opaque; details stay in logs)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      operationId: putV1NotificationsPreferences
      x-operation-id-source: derived
components:
  schemas:
    UpgradeRequiredError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
              - UPGRADE_REQUIRED
            message:
              type: string
            minVersion:
              type: string
              example: 1.2.0
            platform:
              type:
              - string
              - 'null'
          required:
          - code
          - message
          - minVersion
          - platform
      required:
      - error
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
              example: Booking not found
            domainCode:
              type: string
              example: NON_REFUNDABLE_CONSENT_REQUIRED
            issues:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                  message:
                    type: string
                required:
                - path
                - message
          required:
          - code
          - message
      required:
      - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Better Auth session token. Obtain it from the native /api/auth/* endpoints (Better Auth bearer plugin — out of scope for this spec, see #922).'
x-provenance:
  method: harvested
  publisher: GetMyHotels
  source: https://api.getmyhotels.com/v1/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)