SharpAPI Account API

Account info, usage, and key management

Business capability
Developer Identity & Credential Management BC-4270.40

Operations 6

GET /account Get account info #
GET /account/usage Get usage statistics #
GET /account/keys List API keys #
POST /account/keys Create a new API key #
DELETE /account/keys/{keyId} Revoke an API key #
POST /account/keys/{keyId}/rotate Rotate an API key #

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/sharpapi:sharpapi-account-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

sharpapi-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sharp Account API
  version: 3.28.0
  description: Real-time sports betting odds API with +EV detection, arbitrage, middles, and low-hold opportunities.
  contact:
    name: SharpAPI Support
    url: https://sharpapi.io
    email: support@sharpapi.io
  license:
    name: Proprietary
    url: https://sharpapi.io/terms
  x-generated-at: '2026-10-13T20:02:34Z'
  x-commit-sha: 850f5cb
servers:
- url: https://api.sharpapi.io/api/v1
  description: Production
security:
- ApiKeyHeader: []
- BearerAuth: []
tags:
- name: Account
  description: Account info, usage, and key management
paths:
  /account:
    get:
      operationId: getAccount
      summary: Get account info
      description: Returns API key details, tier, limits, feature access, and add-on status.
      tags:
      - Account
      responses:
        '200':
          description: Account information
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/DataEnvelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/Account'
              example:
                data:
                  key_id: key_abc123
                  tier: pro
                  rate_limit:
                    requests_per_minute: 300
                    max_books: 15
                  features:
                  - odds
                  - schedule
                  - ev
                  - arbitrage
                  - middles
                  - low_hold
                  - closing_line
                  - splits
                  streaming:
                    enabled: false
                    max_connections: 0
                updated_at: '2026-02-08T14:44:32.123Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /account/usage:
    get:
      operationId: getAccountUsage
      summary: Get usage statistics
      description: Returns request counts, rate limit status, and stream usage for the current billing period.
      tags:
      - Account
      responses:
        '200':
          description: Usage statistics
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/DataEnvelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/Usage'
              example:
                success: true
                data:
                  requests:
                    today: 1420
                    this_week: 8200
                    this_month: 32500
                    limit:
                      per_minute: 300
                      remaining: 285
                      resets_at: '2026-03-09T14:23:00Z'
                  streams:
                    active: 0
                    max: 0
                  period:
                    start: '2026-03-01T00:00:00Z'
                    end: '2026-03-31T23:59:59Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /account/keys:
    get:
      operationId: listApiKeys
      summary: List API keys
      description: Returns all API keys for the authenticated user.
      tags:
      - Account
      responses:
        '200':
          description: List of API keys
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/DataEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/ApiKey'
              example:
                success: true
                data:
                - id: key_abc123
                  id_masked: '...key_abc123'
                  name: Production Key
                  tier: pro
                  is_active: true
                  created_at: '2026-01-15T10:00:00Z'
                  updated_at: '2026-03-01T00:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createApiKey
      summary: Create a new API key
      description: 'Creates a new API key for the authenticated user. The key value is returned only once in the response.

        Maximum keys per tier: Free/Hobby/Pro = 1, Sharp = 2, Enterprise = custom.'
      tags:
      - Account
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 100
                  description: Optional display name for the key
            example:
              name: My new key
      responses:
        '200':
          description: New API key created (key value shown only once)
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/DataEnvelope'
                - type: object
                  properties:
                    data:
                      type: object
                      required:
                      - id
                      - key
                      - tier
                      properties:
                        id:
                          type: string
                        key:
                          type: string
                          description: The API key value (shown only once)
                        name:
                          type:
                          - string
                          - 'null'
                        tier:
                          type: string
              example:
                success: true
                data:
                  id: key_new456
                  key: REDACTED_STRIPE_KEY
                  name: My new key
                  tier: pro
                meta:
                  warning: This is the only time the key value will be shown. Store it securely.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /account/keys/{keyId}:
    delete:
      operationId: deleteApiKey
      summary: Revoke an API key
      description: Permanently revokes a specific API key. Users can only revoke their own keys.
      tags:
      - Account
      parameters:
      - name: keyId
        in: path
        required: true
        description: The Unkey key ID to revoke
        schema:
          type: string
      responses:
        '200':
          description: Key revoked successfully
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/DataEnvelope'
                - type: object
                  properties:
                    data:
                      type: object
                      properties:
                        id:
                          type: string
                        revoked:
                          type: boolean
              example:
                success: true
                data:
                  id: key_abc123
                  revoked: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /account/keys/{keyId}/rotate:
    post:
      operationId: rotateApiKey
      summary: Rotate an API key
      description: 'Creates a new API key and revokes the old one. Supports an optional grace period

        (0-72 hours) to keep the old key valid during migration.'
      tags:
      - Account
      parameters:
      - name: keyId
        in: path
        required: true
        description: The Unkey key ID to rotate
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                gracePeriodHours:
                  type: integer
                  minimum: 0
                  maximum: 72
                  default: 0
                  description: Hours to keep the old key valid (0 = immediate revocation)
                name:
                  type: string
                  maxLength: 100
                  description: Optional name for the new key
            example:
              gracePeriodHours: 24
              name: Rotated production key
      responses:
        '200':
          description: Key rotated successfully (new key value shown only once)
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/DataEnvelope'
                - type: object
                  properties:
                    data:
                      type: object
                      required:
                      - new_key_id
                      - new_key
                      - old_key_id
                      properties:
                        new_key_id:
                          type: string
                        new_key:
                          type: string
                          description: The new API key value (shown only once)
                        old_key_id:
                          type: string
                        old_key_expires_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                          description: When the old key expires (null if immediate)
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    DataEnvelope:
      type: object
      description: Standard shape for non-paginated responses. Emitted by endpoints that return a single resource or a small fixed list. No `success` flag — HTTP status codes indicate success/failure.
      required:
      - data
      - updated_at
      properties:
        data: {}
        updated_at:
          type: string
          format: date-time
          description: Server emit time (RFC 3339).
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              enum:
              - missing_api_key
              - invalid_api_key
              - unauthorized
              - forbidden
              - tier_restricted
              - rate_limited
              - invalid_request
              - validation_error
              - not_found
              - streaming_not_available
              - stream_limit_exceeded
              - service_unavailable
              - internal_error
              description: Machine-readable error code
            message:
              type: string
              description: Human-readable error message
            docs:
              type: string
              format: uri
              description: Link to relevant documentation
            tier:
              type: string
              description: Current subscription tier
            required_tier:
              type: string
              description: Minimum tier required for this feature
            retry_after:
              type: integer
              description: Unix timestamp (ms) when request can be retried
            retryAfter:
              type: integer
              description: Seconds until the request can be retried — same instant as retry_after, different unit and casing
            max_books:
              type: integer
            requested_books:
              type: integer
    ApiKey:
      type: object
      required:
      - id
      - id_masked
      - name
      - tier
      - is_active
      - created_at
      - updated_at
      properties:
        id:
          type: string
        id_masked:
          type: string
        name:
          type:
          - string
          - 'null'
        tier:
          type: string
        is_active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Account:
      type: object
      description: Flat account shape returned by `GET /api/v1/account`. All fields are always present.
      required:
      - key_id
      - tier
      - rate_limit
      - features
      - streaming
      properties:
        key_id:
          type: string
          description: Identifier for the API key used in this request.
        tier:
          type: string
          description: Subscription tier.
          enum:
          - free
          - hobby
          - pro
          - sharp
          - enterprise
        rate_limit:
          type: object
          required:
          - requests_per_minute
          - max_books
          properties:
            requests_per_minute:
              type: integer
              description: Maximum API requests allowed per minute on this tier.
            max_books:
              type: integer
              description: Maximum sportsbooks accessible on this tier (999 = unlimited).
        features:
          type: array
          description: Capabilities enabled on this tier.
          items:
            type: string
            enum:
            - odds
            - schedule
            - ev
            - arbitrage
            - middles
            - low_hold
            - history
            - futures
            - closing_line
            - splits
            - injuries
        streaming:
          type: object
          required:
          - enabled
          - max_connections
          properties:
            enabled:
              type: boolean
              description: Whether SSE/WebSocket streaming is available (via tier, add-on, or trial).
            max_connections:
              type: integer
              description: Maximum concurrent SSE/WebSocket connections (0 if streaming not enabled).
    Usage:
      type: object
      required:
      - requests
      - streams
      - period
      properties:
        requests:
          type: object
          required:
          - today
          - this_week
          - this_month
          - limit
          properties:
            today:
              type: integer
            this_week:
              type: integer
            this_month:
              type: integer
            limit:
              type: object
              required:
              - per_minute
              - remaining
              - resets_at
              properties:
                per_minute:
                  type: integer
                remaining:
                  type: integer
                resets_at:
                  type: string
                  format: date-time
        streams:
          type: object
          required:
          - active
          - max
          properties:
            active:
              type: integer
            max:
              type: integer
        period:
          type: object
          required:
          - start
          - end
          properties:
            start:
              type: string
              format: date-time
            end:
              type: string
              format: date-time
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: invalid_request
              message: Missing required parameter
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: Resource not found
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing:
              summary: Missing API key
              value:
                error:
                  code: missing_api_key
                  message: API key required
                  docs: https://docs.sharpapi.io/en/authentication#authentication-methods
            invalid:
              summary: Invalid API key
              value:
                error:
                  code: invalid_api_key
                  message: Invalid API key
                  docs: https://docs.sharpapi.io/en/authentication#authentication-methods
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key passed in the `X-API-Key` header
    BearerAuth:
      type: http
      scheme: bearer
      description: API key passed as a Bearer token in the `Authorization` header
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: API key as query parameter (for SSE/EventSource only)