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

Register VOC-Start Webhook

POST
/webhooks/void-of-course-start

Fires at the start of every VOC Moon period.

curl -X POST https://api.astroway.info/v1/webhooks/void-of-course-start \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/hook" }'
object
url
required
string format: uri
<= 2048 characters
Example
{
"url": "https://example.com/hook"
}

Successful calculation

object
ok
boolean
Example
true
data
object
id
number
event
string
Example
{
"ok": true,
"data": {
"id": 49,
"event": "void-of-course-start"
}
}

Validation error

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

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