---
title: "Update a customer"
method: PUT
path: "/customers/{customer_id}"
tags: ["Customer"]
---

# Update a customer

`PUT /customers/{customer_id}`

## Request

- Base URL: `https://api.gocardless.com`
- URL: `https://api.gocardless.com/customers/{customer_id}`
- Auth: HTTP bearer

Updates a customer object. Supports all of the fields supported when creating a customer.

## Path parameters

- `customer_id` string, required

## Headers

- `GoCardless-Version` string, required

## Request body

- object
  - `customers` object
    - `email` string, nullable: Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
    - `given_name` string, nullable: Customer's first name. Required unless a `company_name` is provided.
    - `family_name` string, nullable: Customer's surname. Required unless a `company_name` is provided.
    - `company_name` string, nullable: Customer's company name. Required unless a `given_name` and `family_name` are provided. For Canadian customers, the use of a `company_name` value will mean that any mandate created from this customer will be considered to be a "Business PAD" (otherwise, any mandate will be considered to be a "Personal PAD").
    - `address_line1` string, nullable: The first line of the customer's address.
    - `address_line2` string, nullable: The second line of the customer's address.
    - `address_line3` string, nullable: The third line of the customer's address.
    - `city` string, nullable: The city of the customer's address.
    - `region` string, nullable: The customer's address region, county or department. For US customers a 2 letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. `CA` for California).
    - `postal_code` string, nullable: The customer's postal code.
    - `country_code` string, nullable: [ISO 3166-1 alpha-2 code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
    - `language` string, nullable: [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the language for notification emails sent by GoCardless if your organisation does not send its own (see [compliance requirements](https://docs.gocardless.com/docs/api-reference/compliance-requirements)). Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this is not provided, the language will be chosen based on the `country_code` (if supplied) or default to "en".
    - `phone_number` string, nullable: [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including country code.
    - `swedish_identity_number` string, nullable: For Swedish customers only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
    - `danish_identity_number` string, nullable: For Danish customers only. The civic/company number (CPR or CVR) of the customer. Must be supplied if the customer's bank account is denominated in Danish krone (DKK).
    - `metadata` CustomerMetadata: Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.

## Response `200`

Successful response

- CustomerSingleResourceResponse
  - `customers` Customer: Customer objects hold the contact details for a customer. A customer can have several [customer bank accounts](https://docs.gocardless.com/docs/api-reference/customer-bank-account), which in turn can have several Direct Debit [mandates](https://docs.gocardless.com/docs/api-reference/mandate).
    - `id` string: Unique identifier, beginning with "CU".
    - `created_at` string, date-time: Fixed [timestamp](https://docs.gocardless.com/docs/api-reference/data-conventions#dates-and-times), recording when this resource was created.
    - `email` string, nullable: Customer's email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
    - `given_name` string, nullable: Customer's first name. Required unless a `company_name` is provided.
    - `family_name` string, nullable: Customer's surname. Required unless a `company_name` is provided.
    - `company_name` string, nullable: Customer's company name. Required unless a `given_name` and `family_name` are provided. For Canadian customers, the use of a `company_name` value will mean that any mandate created from this customer will be considered to be a "Business PAD" (otherwise, any mandate will be considered to be a "Personal PAD").
    - `address_line1` string, nullable: The first line of the customer's address.
    - `address_line2` string, nullable: The second line of the customer's address.
    - `address_line3` string, nullable: The third line of the customer's address.
    - `city` string, nullable: The city of the customer's address.
    - `region` string, nullable: The customer's address region, county or department. For US customers a 2 letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state code is required (e.g. `CA` for California).
    - `postal_code` string, nullable: The customer's postal code.
    - `country_code` string, nullable: [ISO 3166-1 alpha-2 code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
    - `language` string, nullable: [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used as the language for notification emails sent by GoCardless if your organisation does not send its own (see [compliance requirements](https://docs.gocardless.com/docs/api-reference/compliance-requirements)). Currently only "en", "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. If this is not provided, the language will be chosen based on the `country_code` (if supplied) or default to "en".
    - `phone_number` string, nullable: [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, including country code.
    - `swedish_identity_number` string, nullable: For Swedish customers only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
    - `danish_identity_number` string, nullable: For Danish customers only. The civic/company number (CPR or CVR) of the customer. Must be supplied if the customer's bank account is denominated in Danish krone (DKK).
    - `metadata` CustomerMetadata: Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.

## Other responses

- `400`: Bad Request
- `401`: Unauthorised
- `404`: Not found
- `422`: Validation Error
- `500`: Internal Error

---

[API](https://skmtc.dev/gocardless/apis/gocardless-api.md) - [All operations](https://skmtc.dev/gocardless/apis/gocardless-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gocardless/apis/gocardless-api/revisions/4dd3dae45364?raw)
