Equity Rank Auth API

The auth API from Equity Rank — 5 operation(s) for auth.

GitHub OpenAPI

Operations 6

GET /api/auth/subscription Get Subscription #
POST /api/auth/capture-referral Capture Referral #
POST /api/auth/capture-attribution Capture Attribution #
GET /api/auth/preferences Get Preferences #
POST /api/auth/preferences Set Preferences #
POST /api/auth/signup-exit-survey Signup Exit Survey #

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/equity-rank-com:equity-rank-com-auth-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

equity-rank-com-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Equity Rank Com Auth API
  version: 0.1.0
  description: 'Operations tagged auth across 2 of this provider''s published API definitions: openapi.json, equity-rank-com-openapi.yml. Each path carries the servers of the definition it was published in.'
tags:
- name: Auth
paths:
  /api/auth/subscription:
    get:
      tags:
      - Auth
      summary: Get Subscription
      description: 'Returns the subscription status for the authenticated user.

        Admin and friends-and-family users get a synthetic active status.

        Returns null status fields if no subscription row exists yet.'
      operationId: get_subscription_api_auth_subscription_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/auth/capture-referral:
    post:
      tags:
      - Auth
      summary: Capture Referral
      description: 'Persist the er_ref cookie value at signup time so the Stripe webhook can

        auto-redeem on subscription start. Validates code format only — the actual

        redeem (with self-referral / dedup / cap checks) runs in the webhook via

        referral._redeem_referral_for_user.


        Idempotent: upsert by user_id; subsequent calls overwrite the pending code,

        which matches "newest share link wins" behavior in the cookie write site.'
      operationId: capture_referral_api_auth_capture_referral_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CaptureReferralRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Capture Referral Api Auth Capture Referral Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/auth/capture-attribution:
    post:
      tags:
      - Auth
      summary: Capture Attribution
      description: 'Persist the visitor''s first-touch acquisition source at sign-in so signups

        can be attributed to a channel (paid ad, programmatic SEO, referral, organic

        search, or direct). Without this, ad/SEO links carry utm_source / er_src but

        nothing records them, making paid spend impossible to measure.


        When the client has no stored attribution (cleared storage, second device),

        the source is derived server-side from the X-ER-Src header / er_src cookie /

        Referer, so the row always gets at least ''direct'' — never NULL.


        Writes use DB-level first-touch semantics (see _write_attribution): a real

        channel label is never overwritten by a later ''direct'', fixing the

        second-device downgrade path. Idempotent per user via the service-role key

        (bypasses RLS). Best-effort — attribution never blocks the user.'
      operationId: capture_attribution_api_auth_capture_attribution_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CaptureAttributionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Capture Attribution Api Auth Capture Attribution Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/auth/preferences:
    get:
      tags:
      - Auth
      summary: Get Preferences
      description: 'Returns the authenticated user''s UI preferences.


        Currently exposes `experience_mode` (''beginner'' | ''expert'' | None). None means

        the user has not chosen yet, so the frontend shows the first-run prompt. Stored

        on the subscriptions row (the same place as digest_opt_out / weekly_picks_email

        and other per-user flags). Best-effort: any read failure returns None so the

        client falls back to its local value rather than erroring.'
      operationId: get_preferences_api_auth_preferences_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Get Preferences Api Auth Preferences Get
      security:
      - HTTPBearer: []
    post:
      tags:
      - Auth
      summary: Set Preferences
      description: 'Persist the user''s UI experience level so it follows them across devices.


        Validates the enum server-side, then upserts onto the subscriptions row by

        user_id (creating a minimal row if none exists, mirroring capture-attribution).

        Uses the service-role key to bypass RLS.'
      operationId: set_preferences_api_auth_preferences_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetExperienceModeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Set Preferences Api Auth Preferences Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/auth/signup-exit-survey:
    post:
      tags:
      - Auth
      summary: Signup Exit Survey
      description: 'Stores an abandoned-signup survey response and notifies survey@equity-rank.com.

        No authentication required — called from the public signup page.'
      operationId: signup_exit_survey_api_auth_signup_exit_survey_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignupExitSurveyRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CaptureAttributionRequest:
      properties:
        source:
          anyOf:
          - type: string
          - type: 'null'
          title: Source
        utm_source:
          anyOf:
          - type: string
          - type: 'null'
          title: Utm Source
        utm_medium:
          anyOf:
          - type: string
          - type: 'null'
          title: Utm Medium
        utm_campaign:
          anyOf:
          - type: string
          - type: 'null'
          title: Utm Campaign
        utm_content:
          anyOf:
          - type: string
          - type: 'null'
          title: Utm Content
        referrer:
          anyOf:
          - type: string
          - type: 'null'
          title: Referrer
      type: object
      title: CaptureAttributionRequest
    CaptureReferralRequest:
      properties:
        code:
          type: string
          title: Code
      type: object
      required:
      - code
      title: CaptureReferralRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    SignupExitSurveyRequest:
      properties:
        reason:
          type: string
          title: Reason
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        partial_email:
          anyOf:
          - type: string
          - type: 'null'
          title: Partial Email
      type: object
      required:
      - reason
      title: SignupExitSurveyRequest
    SetExperienceModeRequest:
      properties:
        experience_mode:
          type: string
          title: Experience Mode
      type: object
      required:
      - experience_mode
      title: SetExperienceModeRequest
      description: Body for POST /api/auth/preferences — the user's UI experience level.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
x-refined-from:
- openapi.json
- equity-rank-com-openapi.yml