Saga Labs Auth API

The auth API from Saga Labs — 21 operation(s) for auth.

Business capability
Customer Sign-In AE-160.10

Operations 23

POST /api/v1/auth/signup Signup #
POST /api/v1/auth/login Login #
POST /api/v1/auth/refresh Refresh #
POST /api/v1/auth/logout Logout #
GET /api/v1/auth/me Me #
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 #
POST /api/v1/auth/change-password Change Password #
GET /api/v1/auth/sessions List Sessions #
DELETE /api/v1/auth/sessions Revoke All Sessions #
DELETE /api/v1/auth/sessions/{session_id} Revoke Session #
POST /api/v1/auth/2fa/setup Totp Setup #
POST /api/v1/auth/2fa/enable Totp Enable #
POST /api/v1/auth/2fa/disable Totp Disable #
POST /api/v1/auth/2fa/verify Totp Verify #
POST /api/v1/auth/2fa/recovery-codes/regenerate Totp Regenerate Recovery Codes #
GET /api/v1/auth/2fa/status Totp Status #
GET /api/v1/auth/passkeys List Passkeys #
PATCH /api/v1/auth/passkeys/{credential_id} Rename Passkey #
DELETE /api/v1/auth/passkeys/{credential_id} Delete Passkey #
POST /api/v1/auth/passkeys/session Register Passkey Session #

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/docoapi:docoapi-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

docoapi-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DocoAPI Auth API
  description: FastAPI-first API documentation SaaS
  version: 0.1.0
tags:
- name: Auth
paths:
  /api/v1/auth/signup:
    post:
      tags:
      - Auth
      summary: Signup
      operationId: signup_api_v1_auth_signup_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreate'
        required: true
      responses:
        '201':
          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/login:
    post:
      tags:
      - Auth
      summary: Login
      operationId: login_api_v1_auth_login_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserLogin'
        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:
      - Auth
      summary: Refresh
      operationId: refresh_api_v1_auth_refresh_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshRequest'
        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/logout:
    post:
      tags:
      - Auth
      summary: Logout
      description: Revoke refresh token session(s).
      operationId: logout_api_v1_auth_logout_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogoutRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/auth/me:
    get:
      tags:
      - Auth
      summary: Me
      operationId: me_api_v1_auth_me_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserOut'
      security:
      - HTTPBearer: []
  /api/v1/auth/verify-email:
    post:
      tags:
      - Auth
      summary: Verify Email
      description: Verify a user's email address using the token from the verification email.
      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:
      - Auth
      summary: Resend Verification
      description: Resend email verification link. Always returns 200 (enumeration-safe).
      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:
      - Auth
      summary: Forgot Password
      description: Initiate password reset. Always returns 200 (enumeration-safe).
      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:
      - Auth
      summary: Reset Password
      description: Reset user password using a valid reset token.
      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/change-password:
    post:
      tags:
      - Auth
      summary: Change Password
      description: Change password for authenticated user. Revokes all sessions.
      operationId: change_password_api_v1_auth_change_password_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/auth/sessions:
    get:
      tags:
      - Auth
      summary: List Sessions
      description: List all active (non-revoked, non-expired) sessions for the current user.
      operationId: list_sessions_api_v1_auth_sessions_get
      security:
      - HTTPBearer: []
      parameters:
      - name: current_jti
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Current Jti
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionsListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Auth
      summary: Revoke All Sessions
      description: Revoke all sessions for the current user, optionally keeping the current session.
      operationId: revoke_all_sessions_api_v1_auth_sessions_delete
      security:
      - HTTPBearer: []
      parameters:
      - name: current_jti
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Current Jti
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/sessions/{session_id}:
    delete:
      tags:
      - Auth
      summary: Revoke Session
      description: Revoke a specific session. Must belong to current user.
      operationId: revoke_session_api_v1_auth_sessions__session_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/2fa/setup:
    post:
      tags:
      - Auth
      summary: Totp Setup
      description: Generate a TOTP secret + QR URI. Does NOT save to DB — call /2fa/enable to confirm.
      operationId: totp_setup_api_v1_auth_2fa_setup_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotpSetupResponse'
      security:
      - HTTPBearer: []
  /api/v1/auth/2fa/enable:
    post:
      tags:
      - Auth
      summary: Totp Enable
      description: Verify first TOTP code, save secret, generate + return recovery codes (one-time).
      operationId: totp_enable_api_v1_auth_2fa_enable_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TotpEnableRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecoveryCodesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/auth/2fa/disable:
    post:
      tags:
      - Auth
      summary: Totp Disable
      description: Disable 2FA. Requires current TOTP code or a recovery code.
      operationId: totp_disable_api_v1_auth_2fa_disable_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TotpCodeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/auth/2fa/verify:
    post:
      tags:
      - Auth
      summary: Totp Verify
      description: 'Login interstitial: exchange temp_token + TOTP/recovery code for full tokens.'
      operationId: totp_verify_api_v1_auth_2fa_verify_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TotpVerifyRequest'
        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/2fa/recovery-codes/regenerate:
    post:
      tags:
      - Auth
      summary: Totp Regenerate Recovery Codes
      description: Regenerate recovery codes. Requires current TOTP code.
      operationId: totp_regenerate_recovery_codes_api_v1_auth_2fa_recovery_codes_regenerate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TotpCodeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecoveryCodesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/auth/2fa/status:
    get:
      tags:
      - Auth
      summary: Totp Status
      description: Return current 2FA status and remaining recovery codes count.
      operationId: totp_status_api_v1_auth_2fa_status_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotpStatusResponse'
      security:
      - HTTPBearer: []
  /api/v1/auth/passkeys:
    get:
      tags:
      - Auth
      summary: List Passkeys
      description: List current user's registered passkeys.
      operationId: list_passkeys_api_v1_auth_passkeys_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PasskeysListResponse'
      security:
      - HTTPBearer: []
  /api/v1/auth/passkeys/{credential_id}:
    patch:
      tags:
      - Auth
      summary: Rename Passkey
      description: Rename a passkey.
      operationId: rename_passkey_api_v1_auth_passkeys__credential_id__patch
      security:
      - HTTPBearer: []
      parameters:
      - name: credential_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Credential Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PasskeyRenameRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Auth
      summary: Delete Passkey
      description: Delete a passkey. Blocks deletion if it's the only auth method.
      operationId: delete_passkey_api_v1_auth_passkeys__credential_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: credential_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Credential Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/passkeys/session:
    post:
      tags:
      - Auth
      summary: Register Passkey Session
      description: 'Bridge endpoint: register passkey login into DocoAPI user_sessions for session tracking.'
      operationId: register_passkey_session_api_v1_auth_passkeys_session_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PasskeySessionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
components:
  schemas:
    PasskeySessionRequest:
      properties:
        refresh_token:
          type: string
          title: Refresh Token
      type: object
      required:
      - refresh_token
      title: PasskeySessionRequest
    UserLogin:
      properties:
        email:
          type: string
          format: email
          title: Email
        password:
          type: string
          title: Password
      type: object
      required:
      - email
      - password
      title: UserLogin
    TotpStatusResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
        recovery_codes_remaining:
          type: integer
          title: Recovery Codes Remaining
      type: object
      required:
      - enabled
      - recovery_codes_remaining
      title: TotpStatusResponse
    PasskeyOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        created_at:
          type: string
          format: date-time
          title: Created At
        last_used_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Used At
      type: object
      required:
      - id
      - name
      - created_at
      title: PasskeyOut
    PasskeysListResponse:
      properties:
        passkeys:
          items:
            $ref: '#/components/schemas/PasskeyOut'
          type: array
          title: Passkeys
      type: object
      required:
      - passkeys
      title: PasskeysListResponse
    ResendVerificationRequest:
      properties:
        email:
          type: string
          title: Email
      type: object
      required:
      - email
      title: ResendVerificationRequest
    LogoutRequest:
      properties:
        refresh_token:
          type: string
          title: Refresh Token
        everywhere:
          type: boolean
          title: Everywhere
          default: false
      type: object
      required:
      - refresh_token
      title: LogoutRequest
    RefreshRequest:
      properties:
        refresh_token:
          type: string
          title: Refresh Token
      type: object
      required:
      - refresh_token
      title: RefreshRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RecoveryCodesResponse:
      properties:
        recovery_codes:
          items:
            type: string
          type: array
          title: Recovery Codes
        message:
          type: string
          title: Message
      type: object
      required:
      - recovery_codes
      - message
      title: RecoveryCodesResponse
    TotpSetupResponse:
      properties:
        secret:
          type: string
          title: Secret
        qr_uri:
          type: string
          title: Qr Uri
        manual_entry_key:
          type: string
          title: Manual Entry Key
      type: object
      required:
      - secret
      - qr_uri
      - manual_entry_key
      title: TotpSetupResponse
    SessionOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        device_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Device Id
        ip_address:
          anyOf:
          - type: string
          - type: 'null'
          title: Ip Address
        user_agent:
          anyOf:
          - type: string
          - type: 'null'
          title: User Agent
        last_activity_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Activity At
        created_at:
          type: string
          format: date-time
          title: Created At
        is_current:
          type: boolean
          title: Is Current
      type: object
      required:
      - id
      - created_at
      - is_current
      title: SessionOut
    UserOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          title: Email
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
        role:
          type: string
          title: Role
        created_at:
          type: string
          format: date-time
          title: Created At
        display_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Display Name
        is_verified:
          type: boolean
          title: Is Verified
          default: false
        has_password:
          type: boolean
          title: Has Password
          default: false
      type: object
      required:
      - id
      - email
      - workspace_id
      - role
      - created_at
      title: UserOut
    UserCreate:
      properties:
        email:
          type: string
          format: email
          title: Email
        password:
          type: string
          title: Password
        workspace_name:
          type: string
          title: Workspace Name
      type: object
      required:
      - email
      - password
      - workspace_name
      title: UserCreate
    ResetPasswordRequest:
      properties:
        token:
          type: string
          title: Token
        new_password:
          type: string
          title: New Password
      type: object
      required:
      - token
      - new_password
      title: ResetPasswordRequest
    ChangePasswordRequest:
      properties:
        current_password:
          type: string
          title: Current Password
        new_password:
          type: string
          minLength: 8
          title: New Password
      type: object
      required:
      - current_password
      - new_password
      title: ChangePasswordRequest
    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
    TotpCodeRequest:
      properties:
        code:
          type: string
          title: Code
      type: object
      required:
      - code
      title: TotpCodeRequest
    Token:
      properties:
        access_token:
          type: string
          title: Access Token
          default: ''
        refresh_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Refresh Token
        token_type:
          type: string
          title: Token Type
          default: bearer
        requires_2fa:
          type: boolean
          title: Requires 2Fa
          default: false
        temp_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Temp Token
      type: object
      title: Token
    ForgotPasswordRequest:
      properties:
        email:
          type: string
          title: Email
      type: object
      required:
      - email
      title: ForgotPasswordRequest
    VerifyEmailRequest:
      properties:
        token:
          type: string
          title: Token
      type: object
      required:
      - token
      title: VerifyEmailRequest
    TotpEnableRequest:
      properties:
        secret:
          type: string
          title: Secret
        code:
          type: string
          title: Code
      type: object
      required:
      - secret
      - code
      title: TotpEnableRequest
    SessionsListResponse:
      properties:
        sessions:
          items:
            $ref: '#/components/schemas/SessionOut'
          type: array
          title: Sessions
      type: object
      required:
      - sessions
      title: SessionsListResponse
    TotpVerifyRequest:
      properties:
        temp_token:
          type: string
          title: Temp Token
        code:
          type: string
          title: Code
      type: object
      required:
      - temp_token
      - code
      title: TotpVerifyRequest
    PasskeyRenameRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
      type: object
      required:
      - name
      title: PasskeyRenameRequest
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer