# PostAccountExternalAccountsId

From **Stripe API**.

`POST /v1/account/external_accounts/{id}`

<p>Updates the metadata, account holder name, account holder type of a bank account belonging to a <a href="/docs/connect/custom-accounts">Custom account</a>, and optionally sets it as the default for its currency. Other bank account details are not editable by design.</p>

<p>You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.</p>

## Parameters

### `id`

- Location: path
- Required: true
- Type: `string`

## Request body

- Required: false
### `application/x-www-form-urlencoded`

- Type: `object`

```json
{"additionalProperties":false,"properties":{"account_holder_name":{"description":"The name of the person or business that owns the bank account.","maxLength":5000,"type":"string"},"account_holder_type":{"description":"The type of entity that holds the account. This can be either `individual` or `company`.","enum":["","company","individual"],"maxLength":5000,"type":"string"},"account_type":{"description":"The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.","enum":["checking","futsu","savings","toza"],"maxLength":5000,"type":"string"},"address_city":{"description":"City/District/Suburb/Town/Village.","maxLength":5000,"type":"string"},"address_country":{"description":"Billing address country, if provided when creating card.","maxLength":5000,"type":"string"},"address_line1":{"description":"Address line 1 (Street address/PO Box/Company name).","maxLength":5000,"type":"string"},"address_line2":{"description":"Address line 2 (Apartment/Suite/Unit/Building).","maxLength":5000,"type":"string"},"address_state":{"description":"State/County/Province/Region.","maxLength":5000,"type":"string"},"address_zip":{"description":"ZIP or postal code.","maxLength":5000,"type":"string"},"default_for_currency":{"description":"When set to true, this becomes the default external account for its currency.","type":"boolean"},"exp_month":{"description":"Two digit number representing the card’s expiration month.","maxLength":5000,"type":"string"},"exp_year":{"description":"Four digit number representing the card’s expiration year.","maxLength":5000,"type":"string"},"expand":{"description":"Specifies which fields in the response should be expanded.","items":{"maxLength":5000,"type":"string"},"type":"array"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"enum":[""],"type":"string"}],"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`."},"name":{"description":"Cardholder name.","maxLength":5000,"type":"string"}},"type":"object"}
```

## Security

### `basicAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `basic`
Send credentials in the `Authorization` request header using the `Basic` scheme.

Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>

### `bearerAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `bearer`
- Bearer format: `auth-scheme`
Send the token in the `Authorization` request header using the `Bearer` scheme.

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

## Responses

### `200`

Successful response.

### `application/json`

```json
{"anyOf":[{"$ref":"#/components/schemas/bank_account"},{"$ref":"#/components/schemas/card"}],"title":"Polymorphic","x-resourceId":"external_account","x-stripeBypassValidation":true}
```

### `default`

Error response.

### `application/json`

- Type: `object`

An error response from the Stripe API

```json
{"description":"An error response from the Stripe API","properties":{"error":{"$ref":"#/components/schemas/api_errors"}},"required":["error"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request POST \
  --url https://api.stripe.com/v1/account/external_accounts/{id} \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{
  "account_holder_name": "string",
  "account_holder_type": "string",
  "account_type": "string",
  "address_city": "string",
  "address_country": "string",
  "address_line1": "string",
  "address_line2": "string",
  "address_state": "string",
  "address_zip": "string",
  "default_for_currency": true,
  "exp_month": "string",
  "exp_year": "string",
  "expand": [
    "string"
  ],
  "metadata": "string",
  "name": "string"
}'
```
