---
title: "Update an account"
description: "Update an account information"
canonical: https://www.charitips.com/docs/api-reference/update-account
---

# Update an account

`PATCH /v1/accounts/{accountId}`

Update an account information

**Authentication**: Bearer access token.

## Parameters

- `accountId` (string, required)

## Body

- `titleColor` (string, hex color): Customize the default color of titles used in the campaign page
- `accentColor` (string, hex color): Customize the default color of buttons used in the campaign page
- `subdomain` (string): Subdomain of the external page
- `customDomain` (string): Custom domain of the external page
- `billingInfo` (UpdateBillingInfoDto)
  - `street` (string): Headquarters' address line 1
  - `streetAddition` (string): Headquarters' address line 2
  - `city` (string): Headquarters' city
  - `country` (string): Headquarters' country ISO code
  - `zip` (string): Headquarters' zip code
  - `companyName` (string, 3 to 100 characters)
  - `legalRegistrationNumber` (string)
  - `email` (string, email address)
  - `phone` (string)
- `fiscalInfo` (UpdateFiscalInfoDto)
  - `street` (string): Headquarters' address line 1
  - `streetAddition` (string): Headquarters' address line 2
  - `city` (string): Headquarters' city
  - `country` (string): Headquarters' country ISO code
  - `zip` (string): Headquarters' zip code
  - `companyName` (string, 3 to 100 characters)
  - `legalRegistrationNumber` (string)
  - `email` (string, email address)
- `name` (string, 3 to 100 characters)
- `logoUrl` (string, URL)
- `faviconUrl` (string, URL)

## Response 200

- `accountId` (string, required)
- `name` (string, required)
- `status` (AccountStatus, required) One of `PENDING`, `VALIDATED`, `CLOSED`.
- `type` (AccountType, required) One of `INDIVIDUAL`, `COMPANY`.
- `logoUrl` (string)
- `faviconUrl` (string)
- `titleColor` (string)
- `accentColor` (string)
- `headcount` (string)
- `authSchemes` (AuthScheme[], required)
- `parentAccountId` (string)
- `linkedAccountId` (string)
- `createdAt` (string (date-time), required)
- `updatedAt` (string (date-time), required)

## Errors

- 400 `Subdomain must ends with .<subdomain>`: A child account's subdomain sits under yours: send `<child>.<your subdomain>`, for example `shop.acme` when your subdomain is `acme`. The message gives your subdomain. See https://www.charitips.com/docs/use-cases/account-hierarchy.md.
- 400 `Nested subdomains are not allowed`: The part before your own subdomain must be a single label: 1 to 63 lowercase letters, digits or hyphens, no dot, not starting or ending with a hyphen. See https://www.charitips.com/docs/use-cases/account-hierarchy.md.
- 400 `Invalid customDomain`: A custom domain cannot contain a Charitips domain (charitips.com, charitips.net, charitips.org, charitips.tech, chari.tips). Use a domain you own, or `subdomain` for an address under Charitips. See https://www.charitips.com/docs/api-reference/create-site.md.
- 400 `A field is missing, has the wrong type, or is not part of the request schema.`: `message` lists every problem. Unknown fields are rejected, not ignored: remove them rather than sending extra data. See https://www.charitips.com/docs/api-reference/errors.md.
- 401 `Unauthorized`: The access token is missing, expired or invalid. Create a new one with your client id and secret, send it as `Authorization: Bearer <accessToken>`, then retry once. Sandbox tokens only work on api.sandbox.charitips.com. See https://www.charitips.com/docs/get-started/authentication.md.
- 402 `Plan upgrade required`: Your plan does not include this feature. Upgrade the plan from the dashboard, then retry. See https://www.charitips.com/docs/overview/plans.md.
- 403 `Subdomain can't be updated for parent accounts`: Accounts with account hierarchy can set a subdomain only on their child accounts: the `accountId` in the path is your own account. See https://www.charitips.com/docs/api-reference/list-child-accounts.md.
- 403 `Parent account is missing a domain`: A child's subdomain is built under your own subdomain, and your account has none. Contact us to set it up, or give the child account a `customDomain` instead. See https://www.charitips.com/docs/use-cases/account-hierarchy.md.
- 403 `Custom domain can't be updated for parent accounts`: Accounts with account hierarchy can set a custom domain only on their child accounts: the `accountId` in the path is your own account. Use the site endpoints for your own domains. See https://www.charitips.com/docs/api-reference/update-site.md.
- 403 `Account closed`: The account behind these credentials is closed: no token is issued and every call is refused, reads included. Contact Charitips to reopen it. See https://www.charitips.com/docs/api-reference/troubleshooting.md#calls-answer-403-account-not-active-account-not-validated-or-account-closed.
- 403 `Forbidden`: Your credentials cannot perform this action on this resource. An id from another account never answers 403: it is treated as unknown, with a 404 in the path or a 400 `Bad Request` in the body or the query. See https://www.charitips.com/docs/api-reference/errors.md.
- 404 `Not Found`: No resource with this id on your account and environment. An id that belongs to another account answers 404 too when it is in the path. Ids from the sandbox do not exist in production. See https://www.charitips.com/docs/get-started/sandbox.md.

## Example

```bash
curl -X PATCH https://api.sandbox.charitips.com/v1/accounts/<accountId> \
  -H "Authorization: Bearer $CHARITIPS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "titleColor": "#080808",
    "accentColor": "#929FFF"
  }'
```

```javascript
const response = await fetch('https://api.sandbox.charitips.com/v1/accounts/<accountId>', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.CHARITIPS_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "titleColor": "#080808",
    "accentColor": "#929FFF"
  }),
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
const data = await response.json();
```

```python
import os, requests

response = requests.patch(
    "https://api.sandbox.charitips.com/v1/accounts/<accountId>",
    headers={"Authorization": f"Bearer {os.environ['CHARITIPS_TOKEN']}"},
    json={
      "titleColor": "#080808",
      "accentColor": "#929FFF"
    },
)
response.raise_for_status()
data = response.json()
```

## Response example (200, placeholder values)

```json
{
  "accountId": "<accountId>",
  "name": "<name>",
  "status": "PENDING",
  "type": "INDIVIDUAL",
  "logoUrl": "<logoUrl>",
  "faviconUrl": "<faviconUrl>",
  "titleColor": "<titleColor>",
  "accentColor": "<accentColor>"
}
```
