Skip to content
Navigation

Close an account

DELETE
https://api.nicer.travel/identity/user/{id}

Closes a person's account everywhere: marks it deleted, removes their sign-in, frees their email and phone number, and publishes their removal from every agency they worked for, which leaves the travelers they served there for its admins to reassign. Answers the account as it was marked. A person may close their own account; an agency admin only the account of someone who belongs to the agency the request acts for and to no other; Nicer staff anyone's. Errors: 403 ERROR_UNAUTHORIZED for an account the caller may not close.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Path parameters

  • id
    string
    required

Returns

200

OK

JSON
  • familyName
    string
    required

    The person's last name.

  • fullName
    required

    givenName and familyName joined; null until the person has both.

    Any of the following:

    • string
    • null
  • givenName
    string
    required

    The person's first name.

  • role
    advisor
    or
    traveler
    or
    admin
    or
    superadmin
    required

    The person's role in the agency they last switched into.

  • tenantId
    string
    required

    The partition the account is stored in: the userId for every account opened today.

  • userId
    string
    required

    The person's id, their sign-in subject.

  • createdAt
    string
    required

    When the account was opened.

  • type
    string
    required
  • updatedAt
    string
    required

    When the account last changed.

  • avatar
    optional
    string

    The person's photo: a URL, or the file's storage key in the answers of DELETE /identity/user/{userId} and of an admin's GET /identity/users.

  • biography
    optional

    What the person writes about themself.

    Any of the following:

    • string
    • null
  • calendarUrl
    optional

    A link where people book time with the person.

    Any of the following:

    • string
    • null
  • companyName
    optional

    The agency the person last switched into; null, empty or absent on some older accounts.

    Any of the following:

    • string
    • null
  • deleted
    optional
    boolean

    True once the account is closed.

  • deletedAt
    optional

    When the account was closed.

    Any of the following:

    • string
    • null
  • deletedBy
    optional
    string

    The user id of whoever closed the account.

  • email
    optional

    The email the person signs in with; absent, or null on some older accounts, for a person who signed up by phone.

    Any of the following:

    • string
    • null
  • externalIntercomId
    optional

    A support-tool id some older accounts keep.

    Any of the following:

    • string
    • null
  • instagram
    optional

    The person's Instagram handle.

    Any of the following:

    • string
    • null
  • invitedAt
    optional

    When the person was invited, on some older accounts.

    Any of the following:

    • string
    • null
  • invitedBy
    optional

    The user id of whoever invited or referred the person.

    Any of the following:

    • string
    • null
  • lastModifiedBy
    optional
    string

    The user id of whoever last changed the account.

  • location
    optional
    object

    Where the person says they are.

    • address
      optional
      string
    • city
      optional
      string
    • country
      optional
      string
    • countryCode
      optional
      string
    • latitude
      optional
      number
    • longitude
      optional
      number
    • neighborhood
      optional
      string
    • region
      optional
      string
    • state
      optional
      string
    • zipCode
      optional
      string
  • phoneNumber
    optional

    The phone number the person signs in with; absent, or null on some older accounts, for a person who signed up by email.

    Any of the following:

    • string
    • null
  • registrationSource
    optional
    string

    How the account was opened, such as INVITATION_REGISTRATION.

  • searchKey
    optional
    string

    fullName in lowercase, which searches match.

  • tenantOwner
    optional
    boolean

    Set on some older accounts.

  • tourProgress
    optional
    map of
    object

    The in-app product tours the person completed, skipped or dismissed, by tour id.

  • username
    optional
    string

    The person's handle, made from their name, for referral links.

  • zoneinfo
    optional

    The person's time zone, an IANA name such as America/Bogota.

    Any of the following:

    • string
    • null

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close