Create or update a user's backup rule
post
https://api.expiryedge.com/v1/setBackupRuleeditor or admin60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/setBackupRule' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"primary_user_id": "u_4Np8cZe",
"backup_type": "mixed",
"general_backup_user_id": "u_71bXq",
"fallback_user_id": "u_71bXq",
"type_backups": [
{
"expiry_type_id": "et_2Lp9",
"expiry_type_name": "Professional License",
"backup_user_id": "u_9Qw3rTs"
}
]
}'Antwort
{
"success": true,
"rule_id": "br_8Vt1xKd"
}One rule per primary user (upsert). general uses one backup; type_based picks a backup per expiry type;
mixed uses type backups with fallback_user_id / general_backup_user_id for other types.
primary_user_idstringerforderlichUser whose expiries are covered while they are on leave.backup_typestringerforderlichErlaubtgeneraltype_basedmixedgeneral_backup_user_idstring | nullfallback_user_idstring | nullFormixed, catches expiry types without a type backup.type_backupsarray of objects
200
Saved.
successbooleanerforderlichrule_idstringerforderlich
400 | Missing or invalid fields (legacy {message} body). |
401 | Missing, expired or invalid bearer token. |
403 | Authenticated, but your role or organization does not allow this action. |
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). |
