# List of Identity Web socket events

Source: https://dev.arcxp.com/subscriptions/identity/learn/list-of-identity-events/

> **Note:**
> 
> If you are using [IFX](https://dev.arcxp.com/integrations/events/ifx-events), event names must be prefixed with the namespace `commerce:` i.e. `commerce:PRICE_CHANGE`.
> 
> For all these events involving a _nonce_, the _nonce_ will be valid for 24 hours. After this period, the user or CSR will need to submit a new request. Each _nonce_ can only be used once, and if the same request is made multiple times, only the most recent _nonce_ will be valid.

## Identity: user account events

### Account Deletion notification

`ACCOUNT_DELETION_NOTIFICATION` is sent when an account is slated to be deleted due to one of the following reasons: _inactivity or email was not verified_.

This event is generated by the system based on the [\_User account configuration: Automatic account deletion\_](https://dev.arcxp.com/subscriptions/identity/configure/user-account-configuration-manage-sessions-automatic-account-deletion-device-limits-and-account-locks/#automatic-account-deletion) setting.

```js
message: {
  uuid: '8d9294d3-3aec-48c7-86c6-b2d97b93aefb',
  email: 'test@gift.com',
  deletionDate: 1597536000000
}
```

### Account deletion requested

`ACCOUNT_DELETION_REQUESTED` is sent when a [CSR requests](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-csr-perspective/#account-status) initiates a request to delete an account.

```js
message: {
  uuid: '82d2884c-4ab7-4e50-964f-c5c4716f526f'
}
```

### Account deletion requested with _nonce_

`ANONYMIZE_USER_DELETION_REQUESTED` is sent when a [end user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#account-deletion) request to have an account deleted.

```js
message: {
  uuid: '82d2884c-4ab7-4e50-964f-c5c4716f526f',
  nonce: 'GAib1uYD835DYFZ340KVpr-pOXwR_pDMpju2YZZ2gGU968qc'
}

// APIs dispatching this event
DELETE /identity/public/v1/user/anonymize
```

### Account deletion requested decision

`ACCOUNT_DELETION_REQUEST_DECISION` is sent when an [end user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#account-deletion) rejects the decision using a _nonce_ or when [CSR](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-csr-perspective/#pending-account-deletion-request) rejects a deletion request in the Requests tab.

```js
message: {
  uuid:'82d2884c-4ab7-4e50-964f-c5c4716f526f',
  type: 'DECLINED'
}

// APIs dispatching this event
PUT /identity/public/v1/user/anonymize/decline/{nonce}
```

### Account deletion request completed

`ACCOUNT_DELETION_REQUEST_COMPLETED` is sent when an [end user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#account-deletion) approves the deletion using a _nonce_, the [CSR](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-csr-perspective/#pending-account-deletion-request) approves the deletion via the Requests tab, or a [developer](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-developer-interface/#anonymizedelete-user) deletes a user account.

```js
message: {
  uuid: '82d2884c-4ab7-4e50-964f-c5c4716f526f',
}

// APIs dispatching this event
DELETE /identity/api/v1/user/anonymize/email/{email}
DELETE /identity/api/v1/user/anonymize/uuid/{uuid}
PUT /identity/public/v1/user/anonymize/approve/{nonce}
```

### Email verify request

`VERIFY_EMAIL` is sent when an email verify request is sent by a [CSR](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-csr-perspective/#customer-email), an [end-user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#verify-email), or during Sign up when the [verify email setting is \_0N\_](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#sign-up-with-email-and-password).

```js
message: {
  email: 'mail@test.com',
  nonce: 'q1aGlVxfmeqv0_B2N8LTVKA1jU2bsd7qUG_7jiIXhCxuxrBG',
  uuid: '92252cf0-1aa9-4ab8-9071-5d9ca976e510'
}

// APIs dispatching this event
POST /identity/public/v1/email/verify
POST /identity/public/v1/signup
```

### Email Verified

`EMAIL_VERIFIED` is sent when an email verification has been completed by a [CSR](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-csr-perspective/#customer-email) or [end user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#verify-email).

`EMAIL_VERIFIED` is also sent when a user proves access to the email address that is pending verification on their account in another way:

- By logging in with a magic link sent to that address.
- By completing a password reset with the link sent to that address.
- By signing in with Google, Apple, or an OIDC provider that has already verified the same address.

```js
message:{
  email: 'mail@wapo.com',
  uuid: '82d2884c-4ab7-4e50-964f-c5c4716f526f',
  createdOn: 1552413860000,
  lastUpdatedOn: 1572468392597,
  previousEmail: 'previous@wapo.com'
}

// APIs dispatching this event
GET /identity/public/v1/email/verify/{nonce}
```

### Profile edit

`PROFILE_EDIT` is sent when a profile is updated by [CSR](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-csr-perspective/#customer-information), [end-user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#view-and-update-user-profile) or [developer](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-developer-interface/#view-and-update-profile).

```js
message:{
  "identifier":"mail@wapo.com",
  "uuid":"82d2884c-4ab7-4e50-964f-c5c4716f526f",
  "email":"mail@wapo.com"
}

// APIs dispatching this event
PUT /identity/api/v1/profile/{uuid}
PATCH /identity/api/v1/profile/{uuid}
PUT /identity/public/v1/profile
PATCH /identity/public/v1/profile
```

### GDPR report

`GDPR_REPORT_READY` is sent when an end user requests a GDPR report.

```js
message:{
  clientID: '',
  reportID: '',
}

// APIs dispatching this event
GET /identity/public/v1/gdpr/${id}
```

### **User account locked**

`USER_ACCOUNT_LOCKED` is sent when a user account has been locked due to [failed password attempts](https://dev.arcxp.com/subscriptions/identity/configure/user-account-configuration-manage-sessions-automatic-account-deletion-device-limits-and-account-locks/#account-lock-out).

```js
message:{
  uuid: "803a0521-63c7-4ffe-9915-c7789fc2245f",
  email: "name@washpost.com",
  reason: 'Incorrect Password Attempts',
}

// APIs dispatching this event
POST /identity/public/v1/auth/login
```

### User sign in added

`USER_SIGN_IN_ADDED` is sent when an end user connects an additional sign-in method to their profile.

```js
message:{
"identifier":"13698636286381",
"uuid":"803a0521-63c7-4ffe-9915-c7789fc2245f",
"email":"name@washpost.com"
}

// APIs dispatching this event
POST /identity/public/v1/auth/login
```

### User sign up

`USER_SIGN_UP` is sent when a new user signs up. This can be done by the [end user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#user-sign-up) or a [developer](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-developer-interface/#user-sign-up).

```js
message:{
"identifier":"mail@wapo.com",
"uuid":"803a0521-63c7-4ffe-9915-c7789fc2245f",
"email":"mail@wapo.com"
}

// APIs dispatching this event
POST /identity/api/v1/signup
POST /identity/public/v1/signup
POST /identity/public/v1/auth/login
```

### User status updated

`USER_STATUS_UPDATED` is sent when the user status is changed.

```js
message:{
  "uuid": '803a0521-63c7-4ffe-9915-c7789fc2245f',
  "status": 'active' | 'PendingAnonymize' | 'Anonymized' | 'Disabled',
  "email": 'mail@wapo.com'
}

// APIs dispatching this event
PUT identity/public/v1/user/status
```

## Identity: Password events

### Express checkout password reset request

`EXPRESS_CHECKOUT_PASSWORD_RESET_REQUEST` is sent when a user completed a purchase prior to creating an account using the Express Checkout flow. These users do not have a password and will need to complete their account by going through the password reset process to gain access to their subscription.

```js
message: {
  "identifier": "mail@wapo.com",
  "uuid":"82d2884c-4ab7-4e50-964f-c5c4716f526f",
  "nonce": "q1aGlVxfmeqv0_B2N8LTVKA1jU2bsd7qUG_7jiIXhCxuxrBG",
  "email":"mail@wapo.com"
}
```

### Express checkout without password

`EXPRESS_CHECKOUT_PASSWORD_RESET_REQUEST` is sent when a user completed a purchase prior to creating an account using the Express Checkout flow. These users do not have a password and will need to complete their account by going through the password reset process to gain access to their subscription.

```js
message:{
  "identifier":"mail@wapo.com",
  "uuid":"803a0521-63c7-4ffe-9915-c7789fc2245f",
  "nonce":"TA8QQ4D22I9Px7dmtahj73YObKDk-ZxaTGTvxaBXCGUa2Gid",
  "email":"mail@wapo.com"
}
```

### Force password reset

`FORCE_PASSWORD_RESET` is sent when a forcePasswordReset is requested for a user.

```js
message:{
  "identifier":"mail@wapo.com",
  "uuid":"82d2884c-4ab7-4e50-964f-c5c4716f526f",
  "email":"mail@wapo.com"
}
```

### One time access link request

(Previously Magic Link Request)

`MAGIC_LINK_SEND` is sent when a magic link is requested by an [end user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#login-with-one-time-access-link).

```js
message:{
  "email":"mail@wapo.com",
  "nonce":"EZo7Y5Rt6s6ETCm7vDOjY7g-2h4W35AdPGZyUddIlTQgPpX0",
  "uuid":"ANONYMOUS"
}

// APIs dispatching this event
POST /identity/public/v1/auth/magiclink
```

### Password reset request

`PASSWORD_RESET_REQUEST` is sent when a password reset is requested by the [CSR](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-csr-perspective/#customer-email) or [end user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#cannot-remember-the-password).

```json
message:{
  "identifier":"mail@wapo.com",
  "uuid":"bc53b219-6f68-47aa-a5f4-b58cabfef881",
  "nonce":"TA8QQ4D22I9Px7dmtahj73YObKDk-ZxaTGTvxaBXCGUa2Gid",
  "email":"mail@wapo.com"
}

// APIs dispatching this event
POST /identity/public/v1/password/reset
```

### Password reset

`PASSWORD_RESET` is sent when a password is reset by the [end user](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-reader-experience/#password-reset) or a [developer](https://dev.arcxp.com/subscriptions/identity/learn/manage-user-accounts-developer-interface/#password-reset).

```js
message:{
  "identifier":"mail@wapo.com",
  "uuid":"ff092b05-d96d-45a2-8169-73e328d3f914",
  "email":"mail@wapo.com"
}

// APIs dispatching this event
PUT /identity/api/v1/password/{uuid}
PUT /identity/public/v1/password/reset/{nonce}
PUT /identity/public/v1/password
```
