> ## Documentation Index
> Fetch the complete documentation index at: https://docs.totalis.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Profile

> Get the authenticated Totalis user profile. Auto-creates a record on first call. Pass ?ref=<invite-code> on first login to auto-redeem an invite code (auto_redeemed and airdrop fields surface on success).



## OpenAPI

````yaml GET /v1/me
openapi: 3.0.3
info:
  title: Totalis RFQ API
  version: 2.1.0
  description: >-
    Public REST surface for the Totalis parlay RFQ platform — a decentralized
    request-for-quote marketplace for parlay bets across Kalshi and Polymarket,
    with on-chain Solana vault settlement.


    **Wire format**: snake_case JSON. All successful responses are wrapped in `{
    "data": ... }`; list endpoints add `meta` with cursor-based pagination.
    Errors use a `{ "error": { code, message, details? } }` envelope.


    **Authentication**: programmatic clients send `X-API-Key`; the web dashboard
    uses Privy JWTs (`Authorization: Bearer ...`). Any authenticated user can
    both place parlays and quote as a market maker — there is no separate MM
    role. Admin endpoints are out of scope for this public reference.


    **Rate limiting**: 100 req/min anonymous, 300 req/min authenticated.
    Responses include `X-RateLimit-*` headers. Request body limit: 256KB.


    **Pagination**: list endpoints use opaque cursor pagination. Pass
    `meta.cursor` from the previous response as `?cursor=...` to fetch the next
    page; do not parse or construct cursors client-side.
servers:
  - url: https://api.totalis.trade
    description: Production
security:
  - ApiKey: []
tags:
  - name: Markets
    description: Cached Kalshi and Polymarket market data.
  - name: User
    description: User profile, wallet, and devnet helpers.
  - name: API Keys
    description: Manage programmatic access keys for the authenticated user.
paths:
  /v1/me:
    get:
      tags:
        - User
      summary: Get Profile
      description: >-
        Get the authenticated user's profile. Auto-creates a user record on
        first call. Pass `?ref=<invite-code>` on first login to auto-redeem an
        invite code; when redemption succeeds the response includes
        `auto_redeemed: true` and, where configured, an `airdrop` outcome.
      operationId: getOrCreateUser
      parameters:
        - name: ref
          in: query
          description: Referral / invite code to auto-redeem on first login.
          schema:
            type: string
      responses:
        '200':
          description: User profile
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/User'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - PrivyJWT: []
        - ApiKey: []
components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: string
          description: Privy DID — internal identifier, not exposed on public endpoints.
        username:
          type: string
          description: >-
            Display name. Auto-set to the wallet address on first login; can be
            updated via `PUT /v1/username` to a 3-20 char alphanumeric.
        email:
          type: string
          nullable: true
        wallet_address:
          type: string
          nullable: true
        approved:
          type: boolean
          description: >-
            True once the user has redeemed a valid invite code or has been
            admin-approved.
        waitlisted:
          type: boolean
          description: >-
            True when `approved=false` and the user is on the waitlist; false
            otherwise. Always present.
        auto_redeemed:
          type: boolean
          description: >-
            Only present when the `?ref` param successfully redeemed an invite
            code in this exact request.
        airdrop:
          nullable: true
          description: >-
            Welcome-airdrop outcome from the auto-redeem path. Present alongside
            `auto_redeemed: true`. `null` when the invite has no airdrop
            configured or the user was already credited.
          allOf:
            - $ref: '#/components/schemas/AirdropOutcome'
        created_at:
          type: string
          format: date-time
    AirdropOutcome:
      type: object
      description: >-
        Welcome airdrop outcome. `success: true` with `pending: true` means the
        amount was staged and will mint on the user's next `POST
        /v1/wallet/enable-trading` call. `success: false` means staging failed.
      required:
        - success
        - amount
        - pending
      properties:
        success:
          type: boolean
        amount:
          type: number
          description: USDC (whole dollars).
        pending:
          type: boolean
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
    ErrorBody:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - VALIDATION_ERROR
            - UNAUTHORIZED
            - FORBIDDEN
            - NOT_FOUND
            - CONFLICT
            - RATE_LIMITED
            - PAYLOAD_TOO_LARGE
            - INTERNAL_ERROR
            - SERVICE_UNAVAILABLE
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error message.
        details:
          type: object
          description: Additional error context.
        retry_after:
          type: integer
          nullable: true
          description: Seconds until retry; set on 429 responses.
  responses:
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: UNAUTHORIZED
              message: Missing or invalid authentication
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Programmatic API key. Sent as `X-API-Key: <key>`. Generate one from the
        Totalis dashboard. The same header is accepted on the WebSocket auth
        message.
    PrivyJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Privy JWT issued to the web dashboard. Sent as `Authorization: Bearer
        <jwt>`. The Privy session signer underpins all wallet-signed actions.

````