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

# Identify the authenticated API key



## OpenAPI

````yaml /new-api/openapi.json get /whoami
openapi: 3.1.0
info:
  title: Riqra Public API
  version: 1.0.0
  description: Programmatic access to a merchant's commerce data.
servers:
  - url: https://api-v2.riqra.com/public/v1
security: []
paths:
  /whoami:
    get:
      tags:
        - Identity
      summary: Identify the authenticated API key
      responses:
        '200':
          description: The key's organization, environment and granted scopes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhoAmI'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    WhoAmI:
      type: object
      properties:
        organizationId:
          type: string
          description: Organization the key belongs to (UUID).
        environment:
          type: string
          enum:
            - LIVE
            - SANDBOX
          description: 'Key environment: `LIVE` (`rq_live_`) or `SANDBOX` (`rq_test_`).'
        apiKeyPrefix:
          type: string
          description: Safe-to-log key prefix (e.g. `rq_live_abcd`).
          example: rq_live_abcd
        scopes:
          type: array
          items:
            type: string
          description: Scopes granted to this key.
      required:
        - organizationId
        - environment
        - apiKeyPrefix
        - scopes
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
          required:
            - code
            - message
            - requestId
      required:
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Public API key presented as `Authorization: Bearer rq_live_…`.'

````