AimRank Authentication API

The Authentication API from AimRank — 10 operation(s) for authentication.

Operations 10

POST /api/v1/auth/register Register #
POST /api/v1/auth/login Login #
POST /api/v1/auth/refresh Refresh Token #
GET /api/v1/auth/me Get Me #
POST /api/v1/auth/logout Logout #
POST /api/v1/auth/verify-email Verify Email #
POST /api/v1/auth/resend-verification Resend Verification #
POST /api/v1/auth/forgot-password Forgot Password #
POST /api/v1/auth/reset-password Reset Password #
GET /api/v1/auth/referral-stats Get Referral Stats #

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/aimrank-io:aimrank-io-authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

aimrank-io-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AimRank Authentication API
  description: Ranking-as-a-Service API — Turn binary comparisons into calibrated rankings with Glicko-2, Bradley-Terry, TrueSkill, and cross-domain transfer learning. Includes webhooks, API keys, RLHF exports, and embeddable widgets.
  version: 4.12.0
tags:
- name: Authentication
paths:
  /api/v1/auth/register:
    post:
      tags:
      - Authentication
      summary: Register
      description: Register a new user. Rate limited to prevent abuse.
      operationId: register_api_v1_auth_register_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/login:
    post:
      tags:
      - Authentication
      summary: Login
      description: Login with email and password. Rate limited to prevent brute force attacks.
      operationId: login_api_v1_auth_login_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body_login_api_v1_auth_login_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Token'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/refresh:
    post:
      tags:
      - Authentication
      summary: Refresh Token
      description: 'Refresh access token using refresh token.


        Resolves the refresh token in priority order:

        1. HttpOnly `aimrank_refresh` cookie (browser sessions — the normal case)

        2. Request body `refresh_token` (programmatic clients sending JSON)

        3. Query string `refresh_token` (legacy)


        Returns 401 if none of these produce a valid token — callers should

        treat that as "session is gone, redirect to /login".'
      operationId: refresh_token_api_v1_auth_refresh_post
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/_RefreshBody'
              - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Token'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/me:
    get:
      tags:
      - Authentication
      summary: Get Me
      description: Get current user profile.
      operationId: get_me_api_v1_auth_me_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
  /api/v1/auth/logout:
    post:
      tags:
      - Authentication
      summary: Logout
      description: 'Logout — blacklist tokens and clear HttpOnly cookies.


        If the blacklist write fails (e.g., Redis is down), we return 503

        instead of pretending logout succeeded. The frontend should treat

        the pre-logout state as still-valid and retry. Silent swallowing

        here would mean a stolen token stays usable until JWT expiry

        (up to 24h) even though the user thinks they''re logged out.'
      operationId: logout_api_v1_auth_logout_post
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/LogoutRequest'
              - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/verify-email:
    post:
      tags:
      - Authentication
      summary: Verify Email
      description: Verify email address using the token sent on registration.
      operationId: verify_email_api_v1_auth_verify_email_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyEmailRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/resend-verification:
    post:
      tags:
      - Authentication
      summary: Resend Verification
      description: Resend email verification link.
      operationId: resend_verification_api_v1_auth_resend_verification_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResendVerificationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/forgot-password:
    post:
      tags:
      - Authentication
      summary: Forgot Password
      description: Request a password reset link.
      operationId: forgot_password_api_v1_auth_forgot_password_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForgotPasswordRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/reset-password:
    post:
      tags:
      - Authentication
      summary: Reset Password
      description: Reset password using the token from the reset email.
      operationId: reset_password_api_v1_auth_reset_password_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResetPasswordRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/referral-stats:
    get:
      tags:
      - Authentication
      summary: Get Referral Stats
      description: Get the current user's referral statistics.
      operationId: get_referral_stats_api_v1_auth_referral_stats_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
components:
  schemas:
    _RefreshBody:
      properties:
        refresh_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Refresh Token
      type: object
      title: _RefreshBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Token:
      properties:
        access_token:
          type: string
          title: Access Token
        refresh_token:
          type: string
          title: Refresh Token
        token_type:
          type: string
          title: Token Type
          default: bearer
        requires_2fa:
          type: boolean
          title: Requires 2Fa
          default: false
      type: object
      required:
      - access_token
      - refresh_token
      title: Token
    ResetPasswordRequest:
      properties:
        token:
          type: string
          title: Token
        new_password:
          type: string
          minLength: 10
          title: New Password
      type: object
      required:
      - token
      - new_password
      title: ResetPasswordRequest
    ForgotPasswordRequest:
      properties:
        email:
          type: string
          format: email
          title: Email
      type: object
      required:
      - email
      title: ForgotPasswordRequest
    UserResponse:
      properties:
        id:
          type: string
          title: Id
        email:
          type: string
          title: Email
        username:
          type: string
          title: Username
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        avatar_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Avatar Url
        bio:
          anyOf:
          - type: string
          - type: 'null'
          title: Bio
        is_active:
          type: boolean
          title: Is Active
          default: true
        is_verified:
          type: boolean
          title: Is Verified
          default: false
        role:
          type: string
          title: Role
          default: user
        subscription_tier:
          type: string
          title: Subscription Tier
          default: free
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
      - id
      - email
      - username
      - created_at
      title: UserResponse
    LogoutRequest:
      properties:
        refresh_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Refresh Token
      type: object
      title: LogoutRequest
    Body_login_api_v1_auth_login_post:
      properties:
        grant_type:
          anyOf:
          - type: string
            pattern: ^password$
          - type: 'null'
          title: Grant Type
        username:
          type: string
          title: Username
        password:
          type: string
          format: password
          title: Password
        scope:
          type: string
          title: Scope
          default: ''
        client_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Id
        client_secret:
          anyOf:
          - type: string
          - type: 'null'
          format: password
          title: Client Secret
      type: object
      required:
      - username
      - password
      title: Body_login_api_v1_auth_login_post
    UserCreate:
      properties:
        email:
          type: string
          format: email
          title: Email
        password:
          type: string
          minLength: 10
          title: Password
        username:
          anyOf:
          - type: string
            maxLength: 50
            minLength: 3
          - type: 'null'
          title: Username
        name:
          anyOf:
          - type: string
            maxLength: 100
            minLength: 1
          - type: 'null'
          title: Name
        accepted_terms:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Accepted Terms
        referral_code:
          anyOf:
          - type: string
          - type: 'null'
          title: Referral Code
      type: object
      required:
      - email
      - password
      title: UserCreate
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    ResendVerificationRequest:
      properties:
        email:
          type: string
          format: email
          title: Email
      type: object
      required:
      - email
      title: ResendVerificationRequest
    VerifyEmailRequest:
      properties:
        token:
          type: string
          title: Token
      type: object
      required:
      - token
      title: VerifyEmailRequest
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key