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

# General API Access Check

> Verify general API authentication and return broker, key, and permission details.

Verify that an API key can authenticate. Any valid Live or Sandbox key can use this operation without a feature scope.

Read [Verify API Access](/api/verify-api-access) to choose the correct check and follow the recommended verification sequence.


## OpenAPI

````yaml api/openapi.yaml GET /v1/auth-check
openapi: 3.1.0
info:
  title: Broker API
  version: 1.0.0
  description: API for broker-scoped service, request, and report operations.
servers:
  - url: https://brokers.newyorkcityservers.com/api
    description: Broker Panel API
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Services
  - name: Requests
  - name: Reports
paths:
  /v1/auth-check:
    get:
      tags:
        - Authentication
      summary: Check authentication
      description: >-
        Verifies the API key and returns broker, key, and permission details.
        Any valid API key may call this operation; no feature scope is required.
      operationId: checkAuthentication
      responses:
        '200':
          description: Authentication verified.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    required:
                      - data
                    properties:
                      data:
                        $ref: '#/components/schemas/AuthCheckData'
              example:
                success: true
                data:
                  message: API authentication successful
                  broker:
                    id: 41bb428c-bd24-445e-83de-388388ff593d
                    company_name: Example Broker
                    email: broker@example.com
                    created_at: '2026-03-01T10:00:00.000Z'
                  api_key:
                    name: Production Integration
                    created_at: '2026-04-01T09:30:00.000Z'
                    last_used_at: '2026-04-11T12:45:00.000Z'
                    scopes:
                      - services:read
                    mode: live
                  permissions:
                    has_services_read: true
                    has_admin_access: false
                    service_count: 12
                  security_info:
                    broker_isolation: All queries automatically filtered by broker_id
                    scope_enforcement: API operations limited by assigned scopes
                    resource_verification: Ownership verified before resource access
                  timestamp: '2026-04-11T13:00:00.000Z'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/PermissionError'
        '429':
          $ref: '#/components/responses/RateLimitError'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          const: true
        message:
          type: string
        pagination:
          $ref: '#/components/schemas/Pagination'
    AuthCheckData:
      type: object
      required:
        - message
        - broker
        - api_key
        - permissions
        - security_info
        - timestamp
      properties:
        message:
          type: string
        broker:
          type: object
          required:
            - id
            - company_name
            - email
            - created_at
          properties:
            id:
              type: string
              format: uuid
            company_name:
              type: string
            email:
              type: string
              format: email
            created_at:
              type: string
              format: date-time
        api_key:
          type: object
          required:
            - name
            - created_at
            - last_used_at
            - scopes
            - mode
          properties:
            name:
              type: string
            created_at:
              type: string
              format: date-time
            last_used_at:
              type:
                - string
                - 'null'
              format: date-time
            scopes:
              type: array
              items:
                type: string
            mode:
              type: string
              enum:
                - live
                - test
        permissions:
          type: object
          required:
            - has_services_read
            - has_admin_access
            - service_count
          properties:
            has_services_read:
              type: boolean
            has_admin_access:
              type: boolean
            service_count:
              type:
                - integer
                - 'null'
              minimum: 0
        security_info:
          type: object
          required:
            - broker_isolation
            - scope_enforcement
            - resource_verification
          properties:
            broker_isolation:
              type: string
            scope_enforcement:
              type: string
            resource_verification:
              type: string
        timestamp:
          type: string
          format: date-time
    Pagination:
      type: object
      required:
        - page
        - perPage
        - total
        - totalPages
      properties:
        page:
          type: integer
          minimum: 1
        perPage:
          type: integer
          minimum: 1
          maximum: 100
        total:
          type: integer
          minimum: 0
        totalPages:
          type: integer
          minimum: 0
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          $ref: '#/components/schemas/Error'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
  responses:
    AuthenticationError:
      description: >-
        Code `authentication_failed` for a missing, malformed, invalid,
        inactive, or expired API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: authentication_failed
              message: Invalid API key
    PermissionError:
      description: >-
        Code `insufficient_permissions` when the request IP is not whitelisted
        or a required scope is missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: insufficient_permissions
              message: IP address not whitelisted
    RateLimitError:
      description: Code `rate_limit_exceeded` when the API key exceeds its rate limit.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: rate_limit_exceeded
              message: Rate limit exceeded
    ServerError:
      description: >-
        Code `server_error` when authentication or internal processing cannot
        complete.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: server_error
              message: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Send the API key in the Authorization bearer header. Production keys
        begin with `sk_live_`.

````