API Reference / Vedic Astrology / Muhurta
/v1/muhurta/upanayan
Upanayan muhurta — score a moment for the sacred thread ceremony.
What this tells you
Scores a proposed moment for the upanayan (sacred thread) ceremony: tithi, weekday, Moon's nakshatra, the Sun's course (Uttarayana or Dakshinayana), the part of the day, Jupiter and Venus being set, Rahu Kaal, Yamaganda, Durmuhurta, Bhadra and adhika masa. result has score (0–100), grade, is_acceptable, prohibited_by, factors and warnings, as on the other muhurta validators. A moment under a classical prohibition is graded inauspicious and is_acceptable is false, with the prohibitions listed in prohibited_by; score stays the weighted total, so you can still show how the other factors scored.
Request
All requests require an Authorization header with your dv_live_* API key.
curl "https://api.lifeastroapi.com/v1/muhurta/upanayan?date=2027-01-15&tz=Asia%2FKolkata&lat=28.6139&lon=77.209&time=10%3A00" \
-H "Authorization: Bearer YOUR_API_KEY"Query parameters
Checked against the API: a parameter is marked required when the request fails without it.
| Name | Required | Example | Description |
|---|---|---|---|
date | yes | 2027-01-15 | Date (YYYY-MM-DD). |
tz | yes | Asia/Kolkata | Timezone: IANA name (Asia/Kolkata) or UTC offset (+05:30). |
lat | yes | 28.6139 | Latitude in decimal degrees. |
lon | yes | 77.209 | Longitude in decimal degrees. |
time | no | 10:00 | Local time (HH:MM, 24-hour). Defaults to 12:00. |
ayanamsa | no | — | Ayanamsa (sidereal offset) to use. Defaults to lahiri. |
lang | no | — | Language of names, labels and readings in the response: `en` (default), `hi`, `mr`, `gu`, `bn`, `te`, `ta`, `kn`, `ml`, `pa`. `locale` is accepted as an alias. |
Response (200 OK)
The real response to the example request above, generated from the API itself. Long arrays are trimmed to their first two items. Field names are stable across versions.
{
"date": "2027-01-15",
"time": "10:00",
"lat": 28.6139,
"lon": 77.209,
"ayanamsa": "lahiri",
"result": {
"score": 89,
"grade": "good",
"factors": [
{
"name": "Tithi",
"value": "Saptami",
"weight": 12,
"score": 6,
"ok": false
},
{
"name": "Vara",
"value": "Friday",
"weight": 10,
"score": 10,
"ok": true
}
],
"warnings": [
"Proposed time falls in Durmuhurta — a less favourable time"
],
"is_acceptable": true,
"prohibited_by": [],
"notes": []
},
"source": "Muhurta Chintamani, Samskara-prakarana (ch. 5) v. 26, 40 and 48, cross-checked with B.V. Raman, Muhurtha; Bhadra and adhika masa from Shubhashubha-prakarana v. 34-35."
}Errors
Every error follows the same envelope. Use the error.code field (not the message) for conditional logic in your integration.
401 Unauthorized
{
"error": {
"code": "unauthorized",
"message": "unknown or revoked API key",
"request_id": "52a520f261d3db37"
}
}402 Payment Required
{
"error": {
"code": "daily_cap_exceeded",
"message": "free-plan daily limit reached — try again tomorrow or upgrade to a paid plan",
"request_id": "52a520f261d3db37"
}
}429 Too Many Requests
{
"error": {
"code": "rate_limited",
"message": "rate limit exceeded — retry after 12 seconds",
"request_id": "52a520f261d3db37"
}
}Try it
Get a dv_live_* key from your dashboard and paste into the cURL snippet above. New accounts get 7,500 welcome credits plus 1,500 free credits a month. Sign up.