Add or update my leave
post
https://api.expiryedge.com/v1/setAvailabilityany role (own records only)60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/setAvailability' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"start_date": "2026-10-15",
"end_date": "2026-10-22",
"reason": "Annual leave"
}'Antwort
{
"success": true,
"availability_id": "av_6Jc3nTy"
}Creates a leave period, or updates one when availability_id is given. Overlapping leave is rejected.
While on leave, expiries are reassigned according to your backup rule. Errors use {message}.
start_datestringerforderlichCalendar dateYYYY-MM-DDin the organization's timezone.end_datestringerforderlichCalendar dateYYYY-MM-DDin the organization's timezone.reasonstringavailability_idstringId of your existing leave record to update.
200
Saved.
successbooleanerforderlichavailability_idstringerforderlich
400 | Missing or invalid fields (legacy {message} body). |
401 | Missing, expired or invalid bearer token. |
403 | Not allowed (legacy {message} body). |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
500 | Server error, including a missing or invalid token (legacy {message} body). |
