Avnology ID
API ReferenceUsers

Delete User

Soft-delete a user with a 30-day grace period, or force hard-delete immediately.

Endpoint

DELETE /v1/identities/{id}

Base URL: https://api-id.avnology.net

Authentication: API Key or OAuth token with admin:users:write scope

By default, deletion is a soft-delete that moves the user to scheduled_deletion state with a 30-day grace period. During this period, the deletion can be cancelled. After the grace period, a 14-point cascade cleanup permanently removes all user data.

Set force=true to skip the grace period and hard-delete immediately (requires elevated admin permissions).

Request

Path Parameters

ParameterTypeRequiredDescription
idstringYesUser ID

Query Parameters

ParameterTypeRequiredDescription
forcebooleanNoSkip grace period, hard-delete immediately

Headers

HeaderRequiredDescription
AuthorizationYesBearer <api_key>
If-MatchNoETag for conditional delete

Example Request

# Soft delete (30-day grace period)
curl -X DELETE "https://api-id.avnology.net/v1/identities/usr_4f18acec-2712-4be7-a9af-b063b4f6deba" \
  -H "Authorization: Bearer ak_live_..."

# Force hard delete
curl -X DELETE "https://api-id.avnology.net/v1/identities/usr_4f18acec-2712-4be7-a9af-b063b4f6deba?force=true" \
  -H "Authorization: Bearer ak_live_..."

Response

Success (204 No Content)

No response body.

Errors

StatusCodeDescription
404AVNOLOGY_AUTH_901User not found
403AVNOLOGY_AUTH_100Insufficient permissions
409AVNOLOGY_AUTH_903ETag mismatch

Code Examples

JavaScript (fetch)

async function deleteUser(apiKey, userId, force = false) {
  const url = `https://api-id.avnology.net/v1/identities/${userId}${force ? '?force=true' : ''}`;
  await fetch(url, { method: 'DELETE', headers: { 'Authorization'

Python (httpx)

import httpx

def delete_user(api_key: str, user_id: str, force: bool = False) -> None:
    params = {"force": "true"} 

Go (net/http)

func deleteUser(ctx context.Context, apiKey, userID string, force bool) error {
	u := fmt.











  • Disable User -- deactivate without deleting
  • Get User -- check deletion status
  • SDK: client.admin.deleteUser(userId) (TypeScript)