Surf Session Finder Admin API

The admin API from Surf Session Finder — 17 operation(s) for admin.

GitHub OpenAPI

Operations 19

GET /api/admin/pools Get All Pools #
POST /api/admin/generate-verification-code/{email} Generate Verification Code For Admin #
GET /api/admin/session-levels Get All Session Levels #
POST /api/admin/session-levels Create Session Level #
PUT /api/admin/session-levels/{level_name} Update Session Level #
DELETE /api/admin/session-levels/{level_name} Delete Session Level #
GET /api/admin/notifications Get Recent Notifications #
POST /api/admin/scrape-sessions Scrape Sessions For Cron #
POST /api/admin/send-notifications Send Notifications For Cron #
POST /api/admin/run-full-schedule Run Full Schedule For Cron #
GET /api/admin/preferences Get All User Preferences #
DELETE /api/admin/preferences/{preference_id} Delete User Preference #
GET /api/admin/sessions Get Sessions #
GET /api/admin/users Get All Users #
POST /api/admin/notifications/{notification_id}/resend Resend Notification #
POST /api/admin/login Admin Login #
GET /api/admin/statistics Get Statistics #
GET /api/admin/stats Get Enhanced Stats #
GET /api/admin/cf-d1-mirror Cf Mirror #

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/surfsessionfinder-com:surfsessionfinder-com-admin-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

surfsessionfinder-com-admin-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SRF Session Finder Admin API
  description: API for managing surf session notifications and preferences
  version: 1.0.0
tags:
- name: Admin
paths:
  /api/admin/pools:
    get:
      tags:
      - Admin
      summary: Get All Pools
      description: Get all pools for admin panel dropdowns
      operationId: get_all_pools_api_admin_pools_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/admin/generate-verification-code/{email}:
    post:
      tags:
      - Admin
      summary: Generate Verification Code For Admin
      description: Generate verification code for admin access without sending email
      operationId: generate_verification_code_for_admin_api_admin_generate_verification_code__email__post
      parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
          title: Email
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/session-levels:
    get:
      tags:
      - Admin
      summary: Get All Session Levels
      description: Get all session levels with additional info for admin
      operationId: get_all_session_levels_api_admin_session_levels_get
      parameters:
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Admin
      summary: Create Session Level
      description: Create a new session level
      operationId: create_session_level_api_admin_session_levels_post
      parameters:
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Level Data
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/session-levels/{level_name}:
    put:
      tags:
      - Admin
      summary: Update Session Level
      description: Update an existing session level
      operationId: update_session_level_api_admin_session_levels__level_name__put
      parameters:
      - name: level_name
        in: path
        required: true
        schema:
          type: string
          title: Level Name
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Level Data
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Admin
      summary: Delete Session Level
      description: Delete a session level
      operationId: delete_session_level_api_admin_session_levels__level_name__delete
      parameters:
      - name: level_name
        in: path
        required: true
        schema:
          type: string
          title: Level Name
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/notifications:
    get:
      tags:
      - Admin
      summary: Get Recent Notifications
      description: Get recent notifications sent
      operationId: get_recent_notifications_api_admin_notifications_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 50
          title: Limit
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/scrape-sessions:
    post:
      tags:
      - Admin
      summary: Scrape Sessions For Cron
      description: 'Endpoint for Railway Cron Jobs to trigger session scraping.

        This should be called by Railway Cron Jobs on a schedule (e.g., every 6 hours).'
      operationId: scrape_sessions_for_cron_api_admin_scrape_sessions_post
      parameters:
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/send-notifications:
    post:
      tags:
      - Admin
      summary: Send Notifications For Cron
      description: 'Endpoint for Railway Cron Jobs to trigger notification sending.

        This should be called by Railway Cron Jobs on a schedule (e.g., daily at 6 AM).'
      operationId: send_notifications_for_cron_api_admin_send_notifications_post
      parameters:
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/run-full-schedule:
    post:
      tags:
      - Admin
      summary: Run Full Schedule For Cron
      description: 'Endpoint for Railway Cron Jobs to run both scraping and notifications.

        This is a convenience endpoint that runs both tasks in sequence.'
      operationId: run_full_schedule_for_cron_api_admin_run_full_schedule_post
      parameters:
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/preferences:
    get:
      tags:
      - Admin
      summary: Get All User Preferences
      description: Get all user preferences for admin panel
      operationId: get_all_user_preferences_api_admin_preferences_get
      parameters:
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/preferences/{preference_id}:
    delete:
      tags:
      - Admin
      summary: Delete User Preference
      description: Delete/deactivate user preference
      operationId: delete_user_preference_api_admin_preferences__preference_id__delete
      parameters:
      - name: preference_id
        in: path
        required: true
        schema:
          type: integer
          title: Preference Id
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/sessions:
    get:
      tags:
      - Admin
      summary: Get Sessions
      description: Get available sessions
      operationId: get_sessions_api_admin_sessions_get
      parameters:
      - name: for_date
        in: query
        required: false
        schema:
          type: string
          title: For Date
      - name: min_spots
        in: query
        required: false
        schema:
          type: integer
          default: 0
          title: Min Spots
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/users:
    get:
      tags:
      - Admin
      summary: Get All Users
      description: Get all users with their preferences
      operationId: get_all_users_api_admin_users_get
      parameters:
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/notifications/{notification_id}/resend:
    post:
      tags:
      - Admin
      summary: Resend Notification
      description: Resend a notification by its ID (admin action).
      operationId: resend_notification_api_admin_notifications__notification_id__resend_post
      parameters:
      - name: notification_id
        in: path
        required: true
        schema:
          type: integer
          title: Notification Id
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/login:
    post:
      tags:
      - Admin
      summary: Admin Login
      operationId: admin_login_api_admin_login_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: Data
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/statistics:
    get:
      tags:
      - Admin
      summary: Get Statistics
      description: Get daily statistics for last N days (users, preferences, notifications, verification codes)
      operationId: get_statistics_api_admin_statistics_get
      parameters:
      - name: days
        in: query
        required: false
        schema:
          type: integer
          default: 7
          title: Days
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/stats:
    get:
      tags:
      - Admin
      summary: Get Enhanced Stats
      description: Get enhanced system statistics
      operationId: get_enhanced_stats_api_admin_stats_get
      parameters:
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminStatsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/cf-d1-mirror:
    get:
      tags:
      - Admin
      summary: Cf Mirror
      description: Bulk mirror endpoint for Cloudflare D1 sync. Queries MySQL and pushes data to CF Worker.
      operationId: cf_mirror_api_admin_cf_d1_mirror_get
      parameters:
      - name: authorization
        in: header
        required: true
        schema:
          type: string
          title: Authorization
      - name: X-Pool-ID
        in: header
        required: true
        schema:
          type: string
          title: X-Pool-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AdminStatsResponse:
      properties:
        total_users:
          type: integer
          title: Total Users
        active_preferences:
          type: integer
          title: Active Preferences
        notifications_sent_today:
          type: integer
          title: Notifications Sent Today
        last_check:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Check
        total_sessions_today:
          type: integer
          title: Total Sessions Today
        total_sessions_tomorrow:
          type: integer
          title: Total Sessions Tomorrow
      type: object
      required:
      - total_users
      - active_preferences
      - notifications_sent_today
      - last_check
      - total_sessions_today
      - total_sessions_tomorrow
      title: AdminStatsResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError