---
title: "Update sub account details"
method: PATCH
path: "/subaccounts/{Id}"
tags: ["subaccounts"]
---

# Update sub account details

`PATCH /subaccounts/{Id}`

## Request

- Base URL: `https://pro.api.serversmtp.com/api/v2`
- URL: `https://pro.api.serversmtp.com/api/v2/subaccounts/{Id}`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `consumerKey` and API key in header `consumerSecret`

Update sub account details.

## Path parameters

- `Id` integer, required

## Request body

- SubaccountUpdateRequest
  - `ip` string, required: IP address to use for sending emails.
  - `first_name` string, required: subaccount owner first name
  - `last_name` string, required: subaccount owner last name
  - `address_1` string, nullable: Address Line 1
  - `address_2` string, nullable: Address Line 2
  - `city` string, nullable: City
  - `company_name` string, nullable: Agency Name
  - `country` string, nullable: Country
  - `region` string, nullable: Region
  - `zip_code` string, nullable: Zip Code
  - `phone_number` string, nullable: Phone Number
  - `policy_agree` boolean, required: Policy must be agreed in order to be able to create a subaccount.
  - `site_url` string, nullable: Website
  - `password` string: subaccount password
  - `confirm_password` string: subaccount confirm password

## Response `200`

Sub account updated sucessfully.

- Subaccount
  - `email` string, email, required
  - `ip` string: IP address to use for sending emails.
  - `active` boolean, required: Active subaccounts can be used for login purpose, while users can´t login to inactive subaccounts. Notice that in order to be able to send emails the subaccount subscription must also be active. User can set subaccounts to active / inactive from the dashboard.
  - `subaccount_id` integer: Sub account Id
  - `parent_id` integer: Sub account parent Id
  - `first_name` string: subaccount owner first name
  - `last_name` string: subaccount owner last name
  - `address_1` string, nullable: Address Line 1
  - `address_2` string, nullable: Address Line 2
  - `city` string, nullable: City
  - `company_name` string, nullable: Agency Name
  - `country` string, nullable: Country
  - `region` string, nullable: Region
  - `zip_code` string, nullable: Zip Code
  - `phone_number` string, nullable: Phone Number
  - `policy_agree` boolean: Policy must be agreed in order to be able to create a subaccount.
  - `site_url` string, nullable: Website

## Other responses

- `400`: Bad Request ###### Produces: * password_length_should_not_be_less_than_10_characters * password_should_contain_at_least_one_uppercase_character * password_should_contain_at_least_one_digit * password_should_equal_confirm_password * ip_should_be_IPV4_format * ip_not_associated_to_user_account * policy_agree_should_be_true
- `401`: Unauthorized This API requires a valid API Key to be provided. (Use [/authentication/authorize](#/authentication/AuthenticationLogin) to obtain an API Key) Produces: * missing_authorization_key * invalid_authorization_key * account_is_inactive
- `403`: Forbidden The current active plan does not include this feature, upgrade is required to use this feature.
- `404`: Not Found Please verify the subaccount id is valid.

---

[API](https://skmtc.dev/serversmtp/apis/turbosmtp-public-apis.md) - [All operations](https://skmtc.dev/serversmtp/apis/turbosmtp-public-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/serversmtp/apis/turbosmtp-public-apis/revisions/8503e099b215?raw)
