Archive a user

📘

Permanently delete a user

The archive action will not perform a 'hard' delete. If you want to permanently delete your user then you will need to use the permanent delete API.

Example ID Archive Request

$ curl \ -s https://api.intercom.io/users/5321a20f72cdbb4192000013 \ -X DELETE \ -H 'Authorization:Bearer <Your access token>' \ -H 'Accept:application/json'
HTTP/1.1 200 Ok { "type": "user", "id": "5714dd359a3fd47136000001", "user_id": "25", "anonymous": false, "email": "wash@serenity.io", "phone": "555671243", "name": "Hoban Washburne", "pseudonym": null, ... } # NB: Full User objects are returned
user = intercom.users.find(:id => "56e1e5d4a40df1cc57000101") intercom.users.delete(user)
<?php $intercom->users->deleteUser("596d3bfdd45d2162b28560ea"); ?>
User user = new User().setId("5310d8e8598c9a0b24000005"); User.delete(user.getId());
Example User ID Archive Request

$ curl \ -s https://api.intercom.io/users?user_id=25 \ -X DELETE \ -H 'Authorization:Bearer <Your access token>' \ -H 'Accept:application/json'
HTTP/1.1 200 Ok { "type": "user", "id": "5714dd359a3fd47136000001", "user_id": "25", "anonymous": false, "email": "wash@serenity.io", "phone": "555671243", "name": "Hoban Washburne", "pseudonym": null, ... } # NB: Full User objects are returned
user = intercom.users.find(:user_id => "1") intercom.users.delete(user)
Map<String, String> params = Maps.newHashMap(); params.put("user_id", "1"); user = User.find(params); User.delete(user.getId());
<?php $intercom->users->deleteUser("", ["user_id" => "5087"]); ?>
Example User Email Archive Request

$ curl \ -s https://api.intercom.io/users?email=wash%40serenity.io \ -X DELETE \ -H 'Authorization:Bearer <Your access token>' \ -H 'Accept:application/json'
HTTP/1.1 200 Ok { "type": "user", "id": "5714dd359a3fd47136000001", "user_id": "25", "anonymous": false, "email": "wash@serenity.io", "phone": "555671243", "name": "Hoban Washburne", "pseudonym": null, ... } # NB: Full User objects are returned
user = intercom.users.find(:email => "foo@bar.com") intercom.users.delete(user)
Map<String, String> params = Maps.newHashMap(); params.put("email", "malcolm@serenity.io"); user = User.find(params); User.delete(user.getId());
<?php $intercom->users->deleteUser("", ["email" => "test@example.com"]); ?>

A user can be archived by sending a DELETE request to its URL using the user's id field as part of the path -

  • https://api.intercom.io/users/{id}

Alternatively, you can archive a user by sending a DELETE request using the email or user_id as query parameters -

  • https://api.intercom.io/users?email={email}
  • https://api.intercom.io/users?user_id={user_id}

Request Parameters

ParameterRequiredDescription
emailnoThe email you have defined for the user
user_idnoThe user id you have defined for the user

Please note that when a user is archived, all of their conversations and message history will also be archived.

Returns

A User object.