# Users events

Notifies subscribers of user lifecycle events.
Triggered when a user is created, activated, deactivated, offboarded, or has a data change processed or rejected.
Upvest currently also sends `USER.ACTIVATED` when a new user passes the onboarding checks. This use of `USER.ACTIVATED` is deprecated: in a future release, Upvest will create new users as `ACTIVE` and will send `USER.ACTIVATED` only when an existing user becomes `ACTIVE` again. Do not wait for `USER.ACTIVATED` before you create an account group. To track onboarding, listen for the `ROLE.ACTIVATED` event of the role events webhook.
See the User webhook events guide ([TOL](https://docs.upvest.co/products/tol/guides/users/users_webhooks) / [BYOL](https://docs.upvest.co/products/byol/guides/users/users_webhooks)) for the full list of event types.

Endpoint: POST Users events
Version: 1.172.0

## Request fields (application/json):

  - `id` (string, required)
    Event unique identifier

  - `created_at` (string, required)
    Date and time when the event was created. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `type` (string, required)
    Event type indicating the user lifecycle change. Upvest currently also sends `USER.ACTIVATED` when a new user passes the onboarding checks. This use of `USER.ACTIVATED` is deprecated: in a future release, Upvest will create new users as `ACTIVE`. To track onboarding, listen for the `ROLE.ACTIVATED` webhook event.
    Enum: "USER.CREATED", "USER.ACTIVATED", "USER.DEACTIVATED", "USER.DATA_CHANGED", "USER.DATA_CHANGE_FAILED", "USER.OFFBOARDING_INITIATED", "USER.OFFBOARDED"

  - `object` (any, required)
    The object the event relates to: the user for lifecycle events, or a failure object for `USER.DATA_CHANGE_FAILED` events.

  - `object.id` (string, required)
    Unique identifier of the user, as a UUID.

  - `object.created_at` (string, required)
    Date and time when the resource was created. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `object.updated_at` (string, required)
    Date and time when the resource was last updated. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `object.first_name` (string, required)
    First name of the user. Provide any middle names in `middle_name`.

  - `object.middle_name` (string)
    If applicable, middle name(s) of the user.

  - `object.last_name` (string, required)
    Last name of the user.

  - `object.salutation` (string)
    Salutation of the user used in reports and statements.
* (empty string) -
* SALUTATION_MALE -
* SALUTATION_FEMALE -
* SALUTATION_FEMALE_MARRIED -
* SALUTATION_DIVERSE -
    Enum: "", "SALUTATION_MALE", "SALUTATION_FEMALE", "SALUTATION_FEMALE_MARRIED", "SALUTATION_DIVERSE"

  - `object.title` (string)
    Title of the user used in reports and statements.
* (empty string) -
* DR - Doctor
* PROF - Professor
* PROF_DR -
* DIPL_ING - Graduate engineer (Diplom-Ingenieur)
* MAGISTER -
    Enum: "", "DR", "PROF", "PROF_DR", "DIPL_ING", "MAGISTER"

  - `object.birth_date` (string, required)
    Birth date of the user in YYYY-MM-DD format. [RFC 3339, section 5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339)

  - `object.birth_city` (string)
    The name of a city, as it appears in a postal address.

  - `object.birth_country` (string)
    Accepted country code. [ISO 3166-1 alpha-2 codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
    Enum: "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW"

  - `object.birth_name` (string)
    If applicable, birth name of the user.

  - `object.decease_date` (any)

  - `object.nationalities` (array, required)
    Nationalities of the user. [ISO 3166 alpha-2 Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).

  - `object.address` (object, required)
    The end user's address.

  - `object.address.address_line1` (string, required)
    First address line of the address.

  - `object.address.address_line2` (string)
    Second address line of the address.

  - `object.address.postcode` (string, required)
    Postal code (postcode, PIN or ZIP code)

  - `object.address.country` (string, required)
    Accepted country code. [ISO 3166-1 alpha-2 codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
    Enum: "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW"

  - `object.address.state` (string)
    State, province, county. [ISO 3166 alpha-2 Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).

  - `object.address.city` (string, required)
    The name of a city, as it appears in a postal address.

  - `object.postal_address` (any)
    User postal address. Needs to be specified if different to the residential address, otherwise it is automatically populated.

  - `object.postal_address.address_line1` (string, required)
    First address line of the address.

  - `object.postal_address.address_line2` (string)
    Second address line of the address.

  - `object.postal_address.postcode` (string, required)
    Postal code (postcode, PIN or ZIP code)

  - `object.postal_address.country` (string, required)
    Accepted country code. [ISO 3166-1 alpha-2 codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
    Enum: "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW"

  - `object.postal_address.state` (string)
    State, province, county. [ISO 3166 alpha-2 Codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).

  - `object.postal_address.city` (string, required)
    The name of a city, as it appears in a postal address.

  - `object.status` (string, required)
    Status of the user.
* ACTIVE - The user is active.
* INACTIVE - The user is deactivated, or is a new user who has not yet passed the onboarding checks. Using
`INACTIVE`
 for new users is deprecated.
* OFFBOARDING - Offboarding of the user has been initiated.
* OFFBOARDED - The user has been offboarded.

In a future release, Upvest will create new users as `ACTIVE`, and `ACTIVE` will no longer mean that the user has passed the onboarding checks.
Do not wait for the user to become `ACTIVE` before you create an account group. Upvest creates the user's role with the account group (for example, the `OWNER` role for a `PERSONAL` account group). Any checks that the user has already passed count towards that role. To know when the user has met the onboarding requirements for an account group or business, listen for the `ROLE.ACTIVATED` webhook event. The account group stays `PENDING_APPROVAL` until all its requirements are met, and the `ACCOUNT_GROUP.ACTIVATED` webhook event signals that it is `ACTIVE`.
    Enum: "ACTIVE", "INACTIVE", "OFFBOARDING", "OFFBOARDED"

  - `object.email` (string)
    Email of the user. Must be a valid email address.

  - `object.branch_id` (string)
    Unique identifier of the market the user is onboarded on. Only relevant if the client is operating in different markets and the client is configured accordingly

  - `object.gender` (string)
    Gender of the user. Required for users applying for the German pension government bonus.
* (empty string) -
* MALE -
* FEMALE -
* DIVERSE -
    Enum: "", "MALE", "FEMALE", "DIVERSE"

  - `object.social_security_number` (string)
    The user's assigned social security number (German social insurance number, e.g. `25300972S014`). Required for users applying for the German pension government bonus.

  - `object.tags` (array)
    Labels applied to the user by the client. Omitted for users that have no tags.
* CLIENT_EMPLOYEE - The user is an employee of the client.

Providing this field in a data change request replaces the full set of tags; send an empty array to remove all tags.

  - `object.address` (object, required)
    Address. Must not be a P.O. box or c/o address.

  - `object.phone_number` (string)
    Phone number of the user. [Phone number E.164 format](https://en.wikipedia.org/wiki/E.164).

  - `object.fatca` (object)
    The user's FATCA status and when it was confirmed

  - `object.fatca.status` (boolean, required)
    The user’s FATCA status is true if the user is subject to paying taxes in the US, otherwise it can be set to false.

  - `object.fatca.confirmed_at` (string, required)
    Timestamp at which the user confirmed their FATCA status. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `object.terms_and_conditions` (object)
    Terms & Conditions will be needed for all users unless they are a child user or only a user on a business.

  - `object.terms_and_conditions.consent_document_id` (string, required)
    Consent unique identifier.

  - `object.terms_and_conditions.confirmed_at` (string, required)
    Timestamp at which the user consented to the terms & conditions. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `object.data_privacy_and_sharing_agreement` (object)
    Data privacy agreement will be needed for all users unless they are a child user or only a user on a business.

  - `object.data_privacy_and_sharing_agreement.consent_document_id` (string, required)
    Consent unique identifier.

  - `object.data_privacy_and_sharing_agreement.confirmed_at` (string, required)
    Timestamp at which the user consented to the data sharing agreement. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `object.user_id` (string, required)
    Event unique identifier

  - `object.reason` (string, required)
    The reason why the data change failed.

  - `webhook_id` (string, required)
    Webhook unique identifier.

## Request examples:

  - `BYOL user event` (unknown)

  - `TOL user event` (unknown)

## Response 200:

  - `200` (unknown)
    Request has been processed successfully.

