---
title: "Update an account"
method: PATCH
path: "/accounts/{account_id}"
tags: ["Accounts"]
---

# Update an account

`PATCH /accounts/{account_id}`

This API let’s you to update an account’s information using customer_id and account_id.

## Path parameters

- `account_id` string, required

## Request body

- UpdateAccountRequest — Payload to update account
  - `name` string — Name of the Account
  - `status` 'ACTIVE' | 'DRAFT'
  - `invoiceCurrency` string — [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency in which the account must be invoiced Defaults to Base currency.
  - `netTermDays` integer
  - `primaryEmail` string — Primary email of the account
  - `address` Address — billing address of the customer
    - `phoneNumber` string — Contact number
    - `line1` string — Address line 1 (eg. Street, PO Box, Company Name)
    - `line2` string — Address line 2 (eg. apartment, suite, unit or building)
    - `postalCode` string — ZIP or postal code
    - `city` string — City, district, suburb, town or village
    - `state` string — State, county, province or region
    - `country` string — Two letter country code [ISO-3166-1 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
  - `metadata` object — Additional information associated with the account. Example: GSTN, VATN NOTE: This replaces the existing metadata if the metadata in the request is not null. To remove all existing metadata, use empty object
  - `tags` string[] — Tag for accounts are stored in lowercase

## Response `200`

Response for Create and Get account requests

- Account — Structure of an account
  - `id` string, required — Identifier of the account
  - `togaiAccountId` string, required — Unique identifier of the account
  - `togaiCustomerId` string, required — Unique identifier of the customer
  - `name` string, required — Name of the Account
  - `customerId` string, required — Identifier of the customer
  - `invoiceCurrency` string — [ISO_4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency in which the account must be invoiced Defaults to Base currency.
  - `aliases` object[] — list of aliases of the account
    - `alias` string
  - `netTermDays` integer
  - `address` Address — billing address of the customer
    - `phoneNumber` string — Contact number
    - `line1` string — Address line 1 (eg. Street, PO Box, Company Name)
    - `line2` string — Address line 2 (eg. apartment, suite, unit or building)
    - `postalCode` string — ZIP or postal code
    - `city` string — City, district, suburb, town or village
    - `state` string — State, county, province or region
    - `country` string — Two letter country code [ISO-3166-1 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
  - `primaryEmail` string — Primary email of the customer
  - `status` 'ACTIVE' | 'DRAFT' | 'ARCHIVED', required — Status of the account
  - `settings` CreateEntitySetting[]
    - `id` string, required
    - `value` string, required
    - `namespace` string, required
    - `name` string, required
    - `dataType` 'STRING' | 'NUMERIC' | 'JSON' | 'JSON_LOGIC', required
  - `invoiceGroupDetails` InvoiceGroupDetails — Invoice group details
    - `id` string, required
    - `name` string, required
    - `email` string, required
    - `dailyInvoiceConsolidation` boolean, required
    - `netTermDays` integer
    - `invoiceCurrency` string, required
    - `billingAddress` Address, required — billing address of the customer
      - `phoneNumber` string — Contact number
      - `line1` string — Address line 1 (eg. Street, PO Box, Company Name)
      - `line2` string — Address line 2 (eg. apartment, suite, unit or building)
      - `postalCode` string — ZIP or postal code
      - `city` string — City, district, suburb, town or village
      - `state` string — State, county, province or region
      - `country` string — Two letter country code [ISO-3166-1 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
  - `metadata` object — Additional information associated with the account. Example: GSTN, VATN
  - `tags` string[] — Tag for accounts are stored in lowercase

## Other responses

- `400` — Error response
- `401` — Error response
- `403` — Error response
- `404` — Error response
- `429` — Error response
- `default` — Error response

---

[API](https://skmtc.net/togaihq/apis/togai-apis.md) · [All operations](https://skmtc.net/togaihq/apis/togai-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/togaihq/togai-apis/revisions/442f5d8f4aa0/schema)
