# Account events

Notifies subscribers of account lifecycle events.
Triggered when an account is created, activated, updated, locked, closed, or has its closure initiated.
See the Account webhooks guide ([TOL](https://docs.upvest.co/products/tol/guides/accounts/accounts_webhooks) / [BYOL](https://docs.upvest.co/products/byol/guides/accounts/accounts_webhooks)) for payloads and event sequencing.

Endpoint: POST Account events
Version: 1.154.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.
* `ACCOUNT.CREATED` — An account has been created.
* `ACCOUNT.ACTIVATED` — An account has become active.
* `ACCOUNT.CLOSING_INITIATED` — Closure of an account has been initiated.
* `ACCOUNT.CLOSED` — An account has been closed.
* `ACCOUNT.LOCKED` — An account has been locked.
* `ACCOUNT.UPDATED` — An account has been updated.
    Enum: "ACCOUNT.CREATED", "ACCOUNT.ACTIVATED", "ACCOUNT.CLOSING_INITIATED", "ACCOUNT.CLOSED", "ACCOUNT.LOCKED", "ACCOUNT.UPDATED"

  - `object` (any, required)

  - `object.id` (string, required)
    Universally Unique Identifier (UUID) of the account.

  - `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.account_group_id` (string, required)
    Universally Unique Identifier (UUID) of the account group.

  - `object.type` (string, required)
    Account type.
* TRADING - Orders in accounts of this type are created on a specific instrument basis.
* PORTFOLIO - Orders in accounts of this type are created on a portfolio basis and additional portfolio functionality is available.
    Enum: "TRADING", "PORTFOLIO"

  - `object.users` (array, required)
    The users associated with the account, each with their relation type.

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

  - `object.users.type` (string)
    Relation of the user to the account group.
* `OWNER` — The user owns the account group. A `JOINT` account group has exactly 2 `OWNER` users.
* `CHILD` — The user is the child in a child account group.
* `GUARDIAN` — The user is a guardian of a child account group.
    Enum: "OWNER", "GUARDIAN", "CHILD"

  - `object.account_number` (integer, required)
    The serial account number of the account in the account group.

  - `object.name` (string, required)
    The name of the account.

  - `object.status` (string, required)
    The status of the account.
* `PENDING_APPROVAL` — Account approval is pending — the account is visible through our API but cannot be acted on.
* `ACTIVE` — Account is active — full functionality of the Investment API is accessible.
* `CLOSING` — Account is closing — only sell orders or the transfer of positions out are permissible before the account is closed.
* `CLOSED` — Account is closed with zero balance.
* `LOCKED` — Account is locked for all actions.
    Enum: "PENDING_APPROVAL", "ACTIVE", "CLOSING", "CLOSED", "LOCKED"

  - `object.business_id` (string, required)
    Unique identifier for the business.

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

## Request examples:

  - `User account event` (unknown)

  - `Business account event` (unknown)

## Response 200:

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

