Sambodh IAS Auth API

The auth API from Sambodh IAS — 13 operation(s) for auth.

GitHub OpenAPI

Operations 13

POST /api/auth/register Register #
POST /api/auth/login Login #
POST /api/auth/google Google Login #
POST /api/auth/apple Apple Login #
POST /api/auth/logout Logout #
POST /api/auth/phone Set Phone #
POST /api/auth/refresh Refresh Token #
GET /api/auth/me Get Me #
PATCH /api/auth/me/preferences Update My Preferences #
POST /api/auth/delete-account Delete Account #
POST /api/auth/forgot-password Forgot Password #
POST /api/auth/reset-password Reset Password #
GET /api/auth/verify-email Verify Email #

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/sambodh-ias-in:sambodh-ias-in-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. 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

sambodh-ias-in-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SambodhIAS v2 Auth API
  version: 2.0.0
tags:
- name: Auth
paths:
  /api/auth/register:
    post:
      tags:
      - Auth
      summary: Register
      operationId: register_api_auth_register_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/login:
    post:
      tags:
      - Auth
      summary: Login
      operationId: login_api_auth_login_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/google:
    post:
      tags:
      - Auth
      summary: Google Login
      operationId: google_login_api_auth_google_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleLoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/apple:
    post:
      tags:
      - Auth
      summary: Apple Login
      description: 'Sign in with Apple — sibling of google_login (App Store guideline 4.8).


        The mobile app sends the raw identityToken from AppleAuthentication; we

        verify it against Apple''s JWKS (aud = our bundle id, iss = appleid.apple.com)

        and create/link the user exactly like the Google flow.'
      operationId: apple_login_api_auth_apple_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppleLoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/logout:
    post:
      tags:
      - Auth
      summary: Logout
      description: 'Mark the user''s open session as ended. Frontend fires this with

        sendBeacon on logout-button click so it never blocks sign-out.'
      operationId: logout_api_auth_logout_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogoutRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/phone:
    post:
      tags:
      - Auth
      summary: Set Phone
      description: 'Set / update the current user''s phone. Used by the post-Google-signup

        prompt (the one-tap flow can''t collect a phone inline) and profile edits.'
      operationId: set_phone_api_auth_phone_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/refresh:
    post:
      tags:
      - Auth
      summary: Refresh Token
      operationId: refresh_token_api_auth_refresh_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/me:
    get:
      tags:
      - Auth
      summary: Get Me
      operationId: get_me_api_auth_me_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/me/preferences:
    patch:
      tags:
      - Auth
      summary: Update My Preferences
      description: 'Persist the user''s UI/content language. Validated against the supported set;

        the client mirrors this into a cookie (web) / secure store (mobile) so the

        locale survives logout and is available before /auth/me resolves.'
      operationId: update_my_preferences_api_auth_me_preferences_patch
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreferencesRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/delete-account:
    post:
      tags:
      - Auth
      summary: Delete Account
      description: 'Permanently delete the authenticated user''s account and all their data.


        Password accounts must re-enter their password; Google-only accounts (no

        password) confirm explicitly. The single DELETE cascades across every v2.*

        table that references the user (migration 055) — assessments, attempts,

        memory, coverage, payments, sessions, etc. — while staff/audit rows

        (email_campaigns.sent_by, prompt_versions.edited_by) are anonymised, not

        removed. Deleting the row invalidates every token the user holds

        (get_current_user and /refresh both reload the user and 401 once it''s gone)

        and cascade-closes their sessions, so no separate revocation is needed.'
      operationId: delete_account_api_auth_delete_account_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteAccountRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/forgot-password:
    post:
      tags:
      - Auth
      summary: Forgot Password
      operationId: forgot_password_api_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/auth/reset-password:
    post:
      tags:
      - Auth
      summary: Reset Password
      operationId: reset_password_api_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/auth/verify-email:
    get:
      tags:
      - Auth
      summary: Verify Email
      operationId: verify_email_api_auth_verify_email_get
      parameters:
      - name: token
        in: query
        required: true
        schema:
          type: string
          title: Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AppleLoginRequest:
      properties:
        identity_token:
          type: string
          title: Identity Token
        full_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Full Name
        phone:
          anyOf:
          - type: string
          - type: 'null'
          title: Phone
        first_touch:
          anyOf:
          - $ref: '#/components/schemas/Touch'
          - type: 'null'
        last_touch:
          anyOf:
          - $ref: '#/components/schemas/Touch'
          - type: 'null'
      type: object
      required:
      - identity_token
      title: AppleLoginRequest
    PreferencesRequest:
      properties:
        preferred_language:
          anyOf:
          - type: string
          - type: 'null'
          title: Preferred Language
      type: object
      title: PreferencesRequest
    PhoneRequest:
      properties:
        phone:
          type: string
          title: Phone
      type: object
      required:
      - phone
      title: PhoneRequest
    LoginRequest:
      properties:
        email:
          type: string
          title: Email
        password:
          type: string
          title: Password
        last_touch:
          anyOf:
          - $ref: '#/components/schemas/Touch'
          - type: 'null'
      type: object
      required:
      - email
      - password
      title: LoginRequest
    ResetPasswordRequest:
      properties:
        token:
          type: string
          title: Token
        new_password:
          type: string
          title: New Password
      type: object
      required:
      - token
      - new_password
      title: ResetPasswordRequest
    DeleteAccountRequest:
      properties:
        password:
          anyOf:
          - type: string
          - type: 'null'
          title: Password
        confirm:
          type: boolean
          title: Confirm
          default: false
      type: object
      title: DeleteAccountRequest
    RefreshRequest:
      properties:
        refresh_token:
          type: string
          title: Refresh Token
      type: object
      required:
      - refresh_token
      title: RefreshRequest
    ForgotPasswordRequest:
      properties:
        email:
          type: string
          title: Email
      type: object
      required:
      - email
      title: ForgotPasswordRequest
    LogoutRequest:
      properties:
        session_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Id
      type: object
      title: LogoutRequest
    Touch:
      properties:
        source:
          anyOf:
          - type: string
          - type: 'null'
          title: Source
        medium:
          anyOf:
          - type: string
          - type: 'null'
          title: Medium
        campaign:
          anyOf:
          - type: string
          - type: 'null'
          title: Campaign
        term:
          anyOf:
          - type: string
          - type: 'null'
          title: Term
        content:
          anyOf:
          - type: string
          - type: 'null'
          title: Content
        referrer:
          anyOf:
          - type: string
          - type: 'null'
          title: Referrer
        landing_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Landing Path
      type: object
      title: Touch
      description: 'Per-touch acquisition attribution from the frontend. All fields

        optional — a direct-typed URL produces None for everything.'
    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
    RegisterRequest:
      properties:
        email:
          type: string
          title: Email
        password:
          type: string
          title: Password
        full_name:
          type: string
          title: Full Name
        phone:
          type: string
          title: Phone
        first_touch:
          anyOf:
          - $ref: '#/components/schemas/Touch'
          - type: 'null'
        last_touch:
          anyOf:
          - $ref: '#/components/schemas/Touch'
          - type: 'null'
      type: object
      required:
      - email
      - password
      - full_name
      - phone
      title: RegisterRequest
    GoogleLoginRequest:
      properties:
        id_token:
          type: string
          title: Id Token
        phone:
          anyOf:
          - type: string
          - type: 'null'
          title: Phone
        first_touch:
          anyOf:
          - $ref: '#/components/schemas/Touch'
          - type: 'null'
        last_touch:
          anyOf:
          - $ref: '#/components/schemas/Touch'
          - type: 'null'
      type: object
      required:
      - id_token
      title: GoogleLoginRequest