Delete a user from the organization

posthttps://api.expiryedge.com/v1/user/delete
bearer token (Firebase ID token only); role admin60/min
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/user/delete' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "userId": "u_4Np8cZe",
  "expiriesAction": "reassign",
  "reassignToUserId": "u_71bXq",
  "assignedExpiriesAction": "unassign"
}'
Antwort
{
  "message": "User deleted successfully",
  "stats": {
    "expiriesProcessed": 14,
    "expiriesUnassigned": 3,
    "expiriesAssignedReassigned": 0,
    "teamMembershipsRemoved": 2
  }
}

Owned expiries are deleted or reassigned; the user is unassigned (or replaced) on assigned expiries. Contacts are kept. You cannot delete yourself, the organization owner or the last active admin. Irreversible.

Body-Parameter

application/json
  • userIdstringerforderlich
  • expiriesActionstringerforderlich
    What to do with expiries the user owns.
    Erlaubtdeletereassign
  • reassignToUserIdstring
    Required when expiriesAction is reassign.
  • assignedExpiriesActionstring
    ErlaubtunassignreassignStandard unassign
  • reassignAssignedToUserIdstring
    Required when assignedExpiriesAction is reassign.

Rückgabe

200
User deleted.
  • messagestringerforderlich
  • statsobjecterforderlich

Fehler

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
Authenticated, but your role or organization does not allow this action.
404
The record does not exist or is not in your organization.
405
The endpoint does not accept this HTTP method.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.
500
Unexpected server error. Retry later; quote requestId to support.