---
title: Update Billing Email
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/go)

[Billing](https://developers.cloudflare.com/api/go/resources/billing)

[Profiles](https://developers.cloudflare.com/api/go/resources/billing/subresources/profiles)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Update Billing Email

client.Billing.Profiles.UpdateBillingEmail(ctx, params) (\*[ProfileUpdateBillingEmailResponse](https://developers.cloudflare.com/api/go/resources/billing#%28resource%29%20billing.profiles%20%3E%20%28model%29%20ProfileUpdateBillingEmailResponse%20%3E%20%28schema%29), error)

PATCH/accounts/{account\_id}/billing/profile

Updates the billing email addresses and preferred locale for an account.

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### Accepted Permissions (at least one required)

`Billing Write`

##### ParametersExpand Collapse 

params ProfileUpdateBillingEmailParams

AccountID param.Field\[string\]

Path param: Identifier

maxLength32

BillingEmail param.Field\[string\]Optional

Body param

PreferredLocale param.Field\[string\]Optional

Body param

SecondaryBillingEmail param.Field\[string\]Optional

Body param

##### ReturnsExpand Collapse 

type ProfileUpdateBillingEmailResponse struct{…}

ID stringOptional

Billing item identifier tag.

maxLength32

AccountType stringOptional

Address stringOptional

Address2 stringOptional

Balance stringOptional

CardExpiryMonth int64Optional

CardExpiryYear int64Optional

CardNumber stringOptional

City stringOptional

Company stringOptional

Country stringOptional

CreatedOn TimeOptional

formatdate-time

DeviceData stringOptional

EditedOn TimeOptional

formatdate-time

EnterpriseBillingEmail stringOptional

EnterprisePrimaryEmail stringOptional

FirstName stringOptional

IsPartner boolOptional

LastName stringOptional

NextBillDate TimeOptional

formatdate-time

PaymentAddress stringOptional

PaymentAddress2 stringOptional

PaymentCity stringOptional

PaymentCountry stringOptional

PaymentEmail stringOptional

PaymentFirstName stringOptional

PaymentGateway stringOptional

PaymentLastName stringOptional

PaymentNonce stringOptional

PaymentState stringOptional

PaymentZipcode stringOptional

PrimaryEmail stringOptional

State stringOptional

TaxIDType stringOptional

Telephone stringOptional

ValidationCode stringOptional

Vat stringOptional

Zipcode stringOptional

### Update Billing Email

Go

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/billing"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Billing.Profiles.UpdateBillingEmail(context.TODO(), billing.ProfileUpdateBillingEmailParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ID)
}

```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "b69a9f3492637782896352daae219e7d",
    "account_type": "type",
    "address": "123 Main Street",
    "address2": "Apt 1",
    "balance": "0",
    "card_expiry_month": 12,
    "card_expiry_year": 2099,
    "card_number": "4242424242424242",
    "city": "Anytown",
    "company": "Company",
    "country": "Anycountry",
    "created_on": "2014-03-01T12:21:59.3456Z",
    "edited_on": "2014-03-01T12:21:59.3456Z",
    "enterprise_billing_email": "johndoe@gmail.com",
    "enterprise_primary_email": "johndoe@gmail.com",
    "first_name": "John",
    "is_partner": false,
    "last_name": "Doe",
    "next_bill_date": "2014-03-01T12:21:59.3456Z",
    "payment_address": "123 Main Street",
    "payment_address2": "Apt 1",
    "payment_city": "Anytown",
    "payment_country": "Anycountry",
    "payment_email": "johndoe@gmail.com",
    "payment_first_name": "John",
    "payment_last_name": "Doe",
    "payment_state": "state",
    "payment_zipcode": "12345",
    "primary_email": "johndoe@gmail.com",
    "state": "AnyState",
    "tax_id_type": "type",
    "telephone": "1234567899",
    "validation_code": "1111",
    "vat": "GB123456789",
    "zipcode": "12345"
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "b69a9f3492637782896352daae219e7d",
    "account_type": "type",
    "address": "123 Main Street",
    "address2": "Apt 1",
    "balance": "0",
    "card_expiry_month": 12,
    "card_expiry_year": 2099,
    "card_number": "4242424242424242",
    "city": "Anytown",
    "company": "Company",
    "country": "Anycountry",
    "created_on": "2014-03-01T12:21:59.3456Z",
    "edited_on": "2014-03-01T12:21:59.3456Z",
    "enterprise_billing_email": "johndoe@gmail.com",
    "enterprise_primary_email": "johndoe@gmail.com",
    "first_name": "John",
    "is_partner": false,
    "last_name": "Doe",
    "next_bill_date": "2014-03-01T12:21:59.3456Z",
    "payment_address": "123 Main Street",
    "payment_address2": "Apt 1",
    "payment_city": "Anytown",
    "payment_country": "Anycountry",
    "payment_email": "johndoe@gmail.com",
    "payment_first_name": "John",
    "payment_last_name": "Doe",
    "payment_state": "state",
    "payment_zipcode": "12345",
    "primary_email": "johndoe@gmail.com",
    "state": "AnyState",
    "tax_id_type": "type",
    "telephone": "1234567899",
    "validation_code": "1111",
    "vat": "GB123456789",
    "zipcode": "12345"
  },
  "success": true
}
```