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

# Get current API key identity and owner overview



## OpenAPI

````yaml /openapi.json get /me
openapi: 3.1.0
info:
  title: AgentRef REST API
  version: 1.0.0
  description: >-
    REST API v1 for merchants and affiliates. Authentication via API keys
    (Authorization: Bearer ak_...).
servers:
  - url: /api/v1
    description: Current API version
security:
  - ApiKeyAuth: []
tags:
  - name: Auth
  - name: Onboarding
  - name: Programs
  - name: Merchant
  - name: Applications
  - name: Affiliates
  - name: Me
  - name: Coupons
  - name: Invites
  - name: Conversions
  - name: Payouts
  - name: Flags
  - name: Billing
  - name: Marketplace
  - name: Marketing Resources
  - name: Notifications
  - name: Webhooks
  - name: Docs
  - name: Meta
paths:
  /me:
    get:
      tags:
        - Me
      summary: Get current API key identity and owner overview
      operationId: getCurrentApiIdentity
      responses:
        '200':
          description: Current API key identity
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    oneOf:
                      - $ref: '#/components/schemas/MeMerchantIdentity'
                      - $ref: '#/components/schemas/MeAffiliateIdentity'
                  meta:
                    $ref: '#/components/schemas/RequestMeta'
                required:
                  - data
                  - meta
        '401':
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    MeMerchantIdentity:
      type: object
      properties:
        key:
          type: object
          properties:
            ownerType:
              type: string
              enum:
                - merchant
            ownerId:
              type: string
              format: uuid
            keyType:
              type: string
              enum:
                - onboarding
                - full
            scopes:
              type: array
              items:
                type: string
          required:
            - ownerType
            - ownerId
            - keyType
            - scopes
        account:
          type: object
          properties:
            billingTier:
              type: string
            billingRequirementStatus:
              type: string
              enum:
                - not_required
                - required
                - grace_period
                - restricted
                - active
            trustLevel:
              type:
                - string
                - 'null'
            isSuspended:
              type: boolean
          required:
            - billingTier
            - billingRequirementStatus
            - trustLevel
            - isSuspended
        owner:
          type: object
          properties:
            merchantId:
              type: string
              format: uuid
            companyName:
              type: string
            accountOnboardingCompleted:
              type: boolean
            onboardingStep:
              type: integer
          required:
            - merchantId
            - companyName
            - accountOnboardingCompleted
            - onboardingStep
        programs:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              slug:
                type: string
              status:
                type: string
                enum:
                  - active
                  - paused
                  - archived
              marketplaceStatus:
                type: string
                enum:
                  - private
                  - draft
                  - public
              readiness:
                $ref: '#/components/schemas/ProgramReadiness'
              website:
                type:
                  - string
                  - 'null'
                format: uri
              landingPageUrl:
                type:
                  - string
                  - 'null'
                format: uri
              stripeConnectedAt:
                type:
                  - string
                  - 'null'
                format: date-time
            required:
              - id
              - name
              - slug
              - status
              - marketplaceStatus
              - readiness
              - website
              - landingPageUrl
              - stripeConnectedAt
      required:
        - key
        - account
        - owner
        - programs
    MeAffiliateIdentity:
      type: object
      properties:
        key:
          type: object
          properties:
            ownerType:
              type: string
              enum:
                - affiliate
            ownerId:
              type: string
              format: uuid
            keyType:
              type: string
              enum:
                - onboarding
                - full
            scopes:
              type: array
              items:
                type: string
          required:
            - ownerType
            - ownerId
            - keyType
            - scopes
        account:
          type: object
          properties:
            billingTier:
              type: string
            trustLevel:
              type:
                - string
                - 'null'
            isSuspended:
              type: boolean
          required:
            - billingTier
            - trustLevel
            - isSuspended
        owner:
          type: object
          properties:
            affiliateId:
              type: string
              format: uuid
            code:
              type: string
            isApproved:
              type: boolean
            isBlocked:
              type: boolean
            trustLevel:
              type:
                - string
                - 'null'
            programId:
              type: string
              format: uuid
            programName:
              type: string
            merchantCompanyName:
              type: string
          required:
            - affiliateId
            - code
            - isApproved
            - isBlocked
            - trustLevel
            - programId
            - programName
            - merchantCompanyName
      required:
        - key
        - account
        - owner
    RequestMeta:
      type: object
      properties:
        requestId:
          type: string
      required:
        - requestId
    ProgramReadiness:
      type: string
      enum:
        - setup
        - partial
        - ready
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
        meta:
          $ref: '#/components/schemas/RequestMeta'
      required:
        - error
        - meta
  responses:
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use API key as Bearer token, for example: Bearer ak_live_xxx'

````