Create or update a user's backup rule

posthttps://api.expiryedge.com/v1/setBackupRule
editor or admin60/minAny method
Request
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"
    }
  ]
}'
Response
{
  "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.

Body parameters

application/json
  • primary_user_idstringrequired
    User whose expiries are covered while they are on leave.
  • backup_typestringrequired
    Allowedgeneraltype_basedmixed
  • general_backup_user_idstring | null
  • fallback_user_idstring | null
    For mixed, catches expiry types without a type backup.
  • type_backupsarray of objects

Returns

200
Saved.
  • successbooleanrequired
  • rule_idstringrequired

Errors

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).