AstroMCP API
Žemėlapių skaičiavimas, horoskopai, taro ir paskyros valdymas, visa tai kaip REST API. Šioje dokumentacijoje aprašyti visi šiuo metu prieinami AstroMCP API galiniai taškai.
astromcp.com dar nepasiekiamas; šį puslapį skaitote AstroCompass portale. Baziniai URL ir savarankiško rakto generavimo srauto nuorodos bus perkeltos čia, kai bus paleistas tas domenas.
Autentifikacija
Kiekvienas žemiau esantis galinis taškas, išskyrus pažymėtus "Autentifikacija nereikalinga", reikalauja jūsų API rakto kaip autorizacijos prieigos rakto:
Authorization: Bearer <your-api-key>
Kiekvienas klaidų atsakymas iš bet kurio galinio taško turi tą pačią struktūrą:
{
"error": {
"code": "SOME_ERROR_CODE",
"message": "Human-readable explanation."
}
}Health
/healthNo auth requiredLiveness probe for the distributor, plus a downstream health check of the supplier service.
Response: { status: "ok"|"degraded", service: "distributor", version, timestamp, upstream: { supplier: "ok"|"unreachable", supplierDiagnostics } }: always HTTP 200; read `status` for degraded state.
API Keys
Every endpoint below except the first requires the Authorization header described in Authentication.
/v1/keysNo auth requiredCreate an API key. Unprotected by design (it's how you get your first key), tier is clamped to free unless the caller already has authority for a higher tier.
Request: { name: string, tier?: "free"|"starter"|"growth"|"scale"|"enterprise", tenantId?: uuid }
Response: 201 { key, prefix, name, tier, createdAt }: `key` is the raw secret, shown exactly once and never retrievable again.
/v1/keys/meAPI key requiredLook up your own key record.
Response: 200: your ApiKeyRecord.
/v1/keysAPI key required (enterprise tier)List every API key (admin surface).
Response: 200 { keys: [{ id, name, keyPrefix, tier, isActive, createdAt, lastUsedAt }] }: the key secret itself is never returned.
/v1/keys/:idAPI key required (enterprise tier)Revoke a key. Irreversible.
Response: 204 on success, 404 if no such key.
Chart Data
All chart/horoscope/tarot endpoints are metered and, where noted, cached: repeat requests for the same inputs within the cache window return the cached result.
/v1/chart/natalAPI key requiredCompute a full natal chart for a birth date, time, and location. Cached 7 days per input.
Request: { year, month, day, hour?, minute?, second?, latitude, longitude, houseSystem?, locale? }
Response: { julian_day, planets[], houses[], ascendant, aspects[] }
/v1/planets/currentAPI key requiredReal-time current planetary positions. Cached 1 hour.
Response: { julian_day, planets[] }
/v1/horoscope/:sign/dailyAPI key requiredDaily horoscope for a zodiac sign. Cached 24 hours.
Request: params: sign. query: date?, locale?
Response: { sign, period, content: { title, body, theme } }
/v1/horoscope/:sign/weeklyAPI key requiredA week-ahead overview plus each individual day's reading for that week.
Request: params: sign. query: date?, locale?
Response: { sign, period: "weekly", week_start, week_end, overview, days[] }
/v1/horoscope/:sign/monthlyAPI key requiredMonthly horoscope for a sign. Cached per calendar month.
Request: params: sign. query: date?, locale?
Response: { sign, period, content: { title, body, theme } }
/v1/tarot/dailyAPI key requiredThe shared daily tarot advice card: one card for every caller that day. Cached 24 hours.
Request: query: date?, locale?
Response: { spread_type, generated_at, cards[], summary }
/v1/tarot/weeklyAPI key requiredThe shared weekly tarot reading. Cached 7 days.
Request: query: date?, locale?
Response: { spread_type, generated_at, cards[], summary }
/v1/tarot/monthlyAPI key requiredMonthly tarot reading composed from that month's weekly readings. Cached 31 days.
Request: query: date?, locale?
Response: { spread_type: "monthly", generated_at, cards[], summary }
/v1/tarot/readingAPI key requiredAn on-demand personal tarot draw. Never cached: every draw is unique.
Request: { spreadType: "single"|"three_card"|"celtic_cross", allowReversals?, question?, locale? }
Response: Opaque reading object (shape varies by spread type).
Analytics
Admin-portal surfaces, not general third-party endpoints: every route here requires an enterprise-tier key.
/v1/analytics/summaryAPI key required (enterprise tier)Headline usage metrics for a time window.
Request: query: range? (24h|7d|30d, default 24h)
Response: { totalRequests, cacheHitRate, uniqueKeys, avgLatencyMs, requestsByTier[], requestsByStatus[] }
/v1/analytics/timeseriesAPI key required (enterprise tier)Chartable request/cache-hit volume over time.
Request: query: range?
Response: { buckets: [{ timestamp, requests, hits }] }
/v1/analytics/top-keysAPI key required (enterprise tier)Busiest API keys by request count.
Request: query: range?, limit? (default 10, max 100)
Response: { keys: [{ keyId, keyName, prefix, tier, requests, cacheHits }] }
Tenants
Admin-only white-label tenant management, enterprise tier required.
/v1/tenantsAPI key required (enterprise tier)Paginated, searchable, sortable white-label tenant list.
Request: query: page?, limit? (max 100), q?, sort?, dir?
Response: { tenants[], total, page, limit }
/v1/tenants/:idAPI key required (enterprise tier)Single tenant detail plus 30-day usage summary.
Response: { tenant, usage: { totalApiKeys, totalRequests30d, cacheHitRate30d } }; 404 if not found.
B2C Users
Admin-only consumer account management, enterprise tier required.
/v1/b2c-usersAPI key required (enterprise tier)Paginated, searchable, sortable B2C consumer account list.
Request: query: page?, limit? (max 100), q?, sort?, dir?
Response: { users[], total, page, limit }
/v1/b2c-users/:idAPI key required (enterprise tier)Grant or revoke the super-admin bypass flag on a user.
Request: { isSuperAdmin: boolean }
Response: The updated user row. 404 if not found.
Branding
/v1/branding/:platformKeyNo auth requiredAdmin-managed branding asset overrides (favicon/app-icon/lockup) for a platform.
Request: params: platformKey ("web"|"portal-horoscope"|"portal-tarot")
Response: { platformKey, assets: Record<assetType, url> }; cached 10 minutes.
Contact
/v1/contactNo auth requiredThe platform's admin-managed public contact identity.
Response: { displayName, contactEmail }; cached 10 minutes.
Webhooks
Unlike every endpoint above (which you call), this is a true webhook: Stripe calls this route. You will never call it directly.
/v1/webhooks/stripeStripe webhook signatureReceives and processes inbound Stripe billing events, verified via Stripe's signature scheme.
Request: Raw Stripe event payload; requires a Stripe-Signature header.
Response: 200 { received: true } on success; 400 if the signature is missing or invalid.