Перейти до вмісту
AstroWay/api v2.73.0 · docs
усі системи в нормі

API Key Introspection

GET
/auth/keys/me
request.sh
curl -X GET https://api.astroway.info/v1/auth/keys/me \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json"

Return metadata about the calling API key: plan, remaining credits, period end, bound domain, status. Useful for any SDK consumer that wants to surface plan and balance in its own UI.

Successful calculation

Media type application/json
object
ok
boolean
data
object
key_prefix
string
plan
string
credits_remaining
number
credits_total_this_period
number
period_end
string
status
string
domain
string
domain_bound_at
string
created_at
string
referrer_source
string
Example
{
"ok": true,
"data": {
"key_prefix": "aw_live_a3f...",
"plan": "indie",
"credits_remaining": 18432,
"credits_total_this_period": 50000,
"period_end": "2026-06-01T00:00:00.000Z",
"status": "active",
"domain": "example.com",
"domain_bound_at": "2026-05-14T18:22:00.000Z",
"created_at": "2026-05-12T08:00:00.000Z",
"referrer_source": "wp_plugin"
}
}

Validation error

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_INPUT",
"message": "Validation failed: date: Date must be YYYY-MM-DD",
"details": [
{
"path": "date",
"message": "Date must be YYYY-MM-DD"
}
]
}
}

Missing or invalid API key

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Корисно?