Skip to content
Navigation

Get the account

GET
https://whyviral.ai/api/v1/account

Your credit balance, the credits that expire next, and the calling key’s price per read, monthly limit and this month’s use. Free.

Authorization

  • bearer
    optional
    HTTP Bearer

    Authorization: Bearer <token>

  • apiKeyHeader
    optional
    API key in header

    x-api-key: <token>

Returns

200

The account.

JSON
  • object
    string
    required
  • credits
    integer
    required

    Your credit balance.

    minimum: 0
  • next_expiry
    required

    Any of the following:

    • object
      • credits
        integer
        required
      • expires_at
        string
        required
        format: date-time
    • null
  • key
    object
    required

    The calling key.

    • id
      string
      required

      The calling key’s id.

    • credits_per_read
      integer
      required

      What one read costs this key.

      minimum: 0
    • monthly_reads
      required

      Any of the following:

      • integer
        The key’s monthly limit, or null when its owner set none.
      • null
    • this_month
      object
      required

      Reads and credits this calendar month, in UTC.

      • reads
        integer
        required
      • credits
        integer
        required

401

INVALID_API_KEY: The key is missing, mistyped or revoked.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

403

ACCOUNT_DISABLED: The key’s account is disabled.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

500

INTERNAL: Something broke on our side; try again.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

Type to search…

↑↓ navigate↵ selectEsc close