Skip to content

The key making this request, and its tenant

GET
/v1/me
curl --request GET \
--url https://api.us.headerhawk.com/v1/me \
--header 'Authorization: Bearer <token>'

The one call that always works with a valid key: check a key, see which tenant it belongs to and when it expires, and read the budgets it is spending. It does not read reported data, so it spends only the key’s own budget.

The key and its tenant

Media typeapplication/json
object
tenant
required
object
id
required
string
name
required
string
plan
required

A HeaderHawk plan. An open enum.

string
Allowed values: free team professional business enterprise
retentionDays
required

How many days of reports HeaderHawk keeps for you.

integer
key
required
object
id
required
string
name
required
string
prefix
required

The 8 characters after hh_live_, as Settings lists the key.

string
createdAt
required
string format: date-time
expiresAt
required
string format: date-time
rateLimits
required
object
key
required
object
limit
required

Requests in each window.

integer
windowSeconds
required
integer
tenant
required
object
limit
required

Requests in each window.

integer
windowSeconds
required
integer
Example
{
"tenant": {
"plan": "free"
}
}
RateLimit-Limit
integer

The budget nearest to running out, per minute.

RateLimit-Remaining
integer

What is left of that budget this minute.

RateLimit-Reset
integer

Seconds until that budget starts again.

A parameter was refused, or one the operation does not take was sent. The message names it.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}

invalid_api_key: no key, or one that is malformed, unknown, revoked or expired. One answer for all of them.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}

plan_upgrade_required: the tenant’s plan does not include API access (the key works again when it does), or does not include what this operation reads.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}

rate_limited: over a budget. Wait Retry-After seconds.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}
Retry-After
integer

Seconds to wait before trying again.