Update the account organization's physical address.

Before you can send an email from the account, you must first specify the organization’s physical address.

Make a PUT call to the /account/summary/physical_address endpoint to update the organization’s physical mailing address for a Constant Contact user account. The physical_address displays on all emails that are sent from the account to provide the address to use to contact the organization. The account level address information can differ from the organization’s physical address.

To get the current physical address, make a GET call to /account/summary/physical_address. You can also get the physical address in addition to other account level details, by making a GET call to /account/summary and including physical_address as an extra_fields parameter.

You must have the role of Account Owner assigned to update account level details.

Parameters

The country (country_code) where the account organization resides determines whether you use the state_code to specify United States (US) and Canada (CA) addresses, or use the state_name to specify all other countries.

In the request body parameter, include all AccountPhysicalAddress properties required for the country_code that you specify, and then update only those properties that you want to change. Excluding a non-read only field from the request body removes it from the physical address.

  • address_line1: (string, required) Line 1 of the organization’s street address.
  • address_line2: (string) Line 2 of the organization’s street address.
  • address_line3: (string) Line 3 of the organization’s street address.
  • city: (string) The city where the organization is located. Required if country_code is US (United States) or CA.
  • state_code: (string) The two letter ISO 3166-1 code for the organization’s state and only used if the country_code is US or CA. If not, exclude this property from the request body.
  • state_name: (string) Used if the state where the organization is physically located is not in the United States or Canada. If country_code is US or CA, exclude this property from the request body.
  • postal_code: (string) The postal code address (ZIP code) of the organization. This property is required if the state_code is US or CA. If not, exclude this property from the request body.
  • country_code: (string, required) The two letter ISO 3166-1 code for the organization’s country.

Example PUT Request

PUT https://api.cc.email/v3/account/summary/physical_address

Endpoint Requirements

User privileges: account:update

Authorization scopes: account_update

<?php

$request = new HttpRequest();
$request->setUrl('https://api.cc.email/v3/account/summary/physical_address');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'Connection' => 'keep-alive',
  'content-length' => '211',
  'accept-encoding' => 'gzip, deflate',
  'Host' => 'api.cc.email',
  'Postman-Token' => 'db163cf3-2817-4acb-8cdd-074b9eeb6a96,a1e8aef7-1b74-45c4-90dc-b1d01321477a',
  'Cache-Control' => 'no-cache',
  'User-Agent' => 'PostmanRuntime/7.13.0',
  'Authorization' => 'Bearer {access token}',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
));

$request->setBody('{
    
  "address_line1": "123 Maple Street",
  "address_line2": "Unit 1",
  "address_line3": "Apartment 234",
  "city": "Boston",
  "state_code": "MA",
  "postal_code": "02451",
  "country_code": "us"
}
    
 
');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

curl -X PUT \
  https://api.cc.email/v3/account/summary/physical_address \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access token}' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Host: api.cc.email' \
  -H 'Postman-Token: db163cf3-2817-4acb-8cdd-074b9eeb6a96,7108479c-8c59-48c6-9612-69e83392b397' \
  -H 'User-Agent: PostmanRuntime/7.13.0' \
  -H 'accept-encoding: gzip, deflate' \
  -H 'cache-control: no-cache' \
  -H 'content-length: 211' \
  -d '{
    
  "address_line1": "123 Maple Street",
  "address_line2": "Unit 1",
  "address_line3": "Apartment 234",
  "city": "Boston",
  "state_code": "MA",
  "postal_code": "02451",
  "country_code": "us"
}
    
'

OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \n  \"address_line1\": \"123 Maple Street\",\n  \"address_line2\": \"Unit 1\",\n  \"address_line3\": \"Apartment 234\",\n  \"city\": \"Boston\",\n  \"state_code\": \"MA\",\n  \"postal_code\": \"02451\",\n  \"country_code\": \"us\"\n}\n    \n \n");
Request request = new Request.Builder()
  .url("https://api.cc.email/v3/account/summary/physical_address")
  .put(body)
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access token}")
  .addHeader("User-Agent", "PostmanRuntime/7.13.0")
  .addHeader("Cache-Control", "no-cache")
  .addHeader("Postman-Token", "db163cf3-2817-4acb-8cdd-074b9eeb6a96,3b326bea-fcd2-4cfb-88fe-90a8945499c8")
  .addHeader("Host", "api.cc.email")
  .addHeader("accept-encoding", "gzip, deflate")
  .addHeader("content-length", "211")
  .addHeader("Connection", "keep-alive")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Response

{
  "address_line1": "123 Maple Street",
  "address_line2": "Unit 1",
  "address_line3": "Apartment 234",
  "city": "Boston",
  "state_code": "MA",
  "postal_code": "02451",
  "country_code": "us"
}

Try it!