DELETE/admin/v1/users/{userId}

Delete a user

Marks specified user for deletion.

path parameters

  • userId

    string

    Required

    The identifier of the user.

Returns

  • id

    string

    The system-assigned identifier of the user.

  • state

    enum

    The current state of the user.

    Possible values:
    ACTIVEDISABLEDARCHIVEDPENDING_DELETION
  • stateReason

    string

    The code that best describes the reason for the state.

  • uniqueId

    string

    The client defined unique identifier of the user account.

  • displayName

    string

    The human-readable display name of the user.

  • email

    string

    The email address of the user.

  • emailVerified

    boolean

    Whether the user's email address has been verified.

  • phoneNumber

    string

    The E164 phone number for the user (e.g. +12125550123).

  • phoneNumberVerified

    boolean

    Whether the user's phone number has been verified.

  • imageUrl

    string

    The photo/avatar URL of the user.

  • currencyCode

    string

    The default ISO-4217 currency code for the user (e.g. USD).

  • languageCode

    string

    The IETF BCP-47 language code for the user (e.g. en).

  • regionCode

    string

    The country/region code for the user (e.g. US).

  • timeZone

    string

    The IANA time zone for the user (e.g. America/New_York).

  • address

    Address

    The billing address for the user.

  • accountConnections

    AccountConnection[]

    The connected accounts.

  • subscription

    AccountSubscription

    The user's default active individual subscription.

    See memberships for organization subscription and seat information.

  • memberships

    Membership[]

    The user's organization memberships.

  • signupTime

    date-time

    The sign-up time for the user.

  • disabled

    boolean

    Whether the user is disabled.

  • createTime

    date-time

    The creation time of the user.

  • updateTime

    date-time

    The last update time of the user.

curl https://api.userhub.com/admin/v1/users/usr_MKFxzgJaAH8JQ4 \
  -H "Authorization: Bearer $ADMIN_API_KEY" \
  -X DELETE
Response bodyJSON
{
  "id": "usr_MKFxzgJaAH8JQ4",
  "state": "PENDING_DELETION",
  "displayName": "Jane Doe",
  "email": "[email protected]",
  "emailVerified": true,
  "phoneNumber": "+12125550123",
  "phoneNumberVerified": false,
  "imageUrl": "https://example.com/jane.jpg",
  "currencyCode": "USD",
  "languageCode": "en",
  "regionCode": "US",
  "timeZone": "America/New_York",
  "address": {
    "lines": [
      "42 West St"
    ],
    "city": "Brooklyn",
    "state": "New York",
    "postalCode": "11222",
    "country": "US"
  },
  "accountConnections": [],
  "subscription": null,
  "memberships": [],
  "signupTime": "2024-06-15T13:00:00Z",
  "createTime": "2024-06-15T13:00:00Z",
  "updateTime": "2024-06-15T13:00:00Z"
}
PreviousUpdate a user
NextRestore a user

Turn users intorevenue
$

Subscribe to monthly product updates

© 2024 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth