New versions of the Campaign Manager 360 API are released regularly. As new versions are
released, earlier versions are deprecated and eventually sunset.
When a version is sunset, all requests against that version begin returning
errors.

If the version you're using is deprecated, you must upgrade as soon as possible
to avoid service interruptions.

## Step 1: Determine which version you're using

You can determine which API version you're using with the following
instructions. In most cases, you'll be accessing the API using one of our
[language-specific client libraries](https://developers.google.com/doubleclick-advertisers/libraries.md.txt) or an official integration.

### Apps Script new editor

Version information for Apps Script is exposed in the advanced services
dialogue:

1. From the Apps Script editor, click **Add a service** .
2. Locate the Campaign Manager 360 API in the list of available services.
3. The value selected in the version drop-down is the Campaign Manager 360 API version in use.

### Apps Script legacy editor

Version information for Apps Script is exposed in the advanced services
dialogue:

1. From the Apps Script editor, navigate to **Resources \> Advanced Google services**.
2. Locate the Campaign Manager 360 API in the list of available services.
3. The value selected in the version drop-down is the Campaign Manager 360 API version in use.

### C#

Version information for the Google API Client Library for .NET is exposed in the
following places:

1. Included in the NuGet package name and service namespace.

   ```c#
   Google.Apis.Dfareporting.v5
   ```
2. Exposed using a public property of `DfareportingService`.

   ```c#
   Console.WriteLine(DfareportingService.Version);
   ```

### Java

Version information for the Google API Client Library for Java is exposed in the following
places:

1. Specified in the Maven artifactId.

   ```java
   <dependency> <groupId>com.google.apis</groupId>
   <artifactId>google-api-services-dfareporting</artifactId>
   <version>v5-rev20260213-2.0.0</version>
   </dependency>
   ```
2. Included in the JAR filename.

   ```java
   google-api-services-dfareporting-v5-rev20260213-2.0.0.jar
   ```
3. Exposed using a public property of `Dfareporting`.

   ```java
   System.out.println(Dfareporting.DEFAULT_SERVICE_PATH);
   ```

### PHP

Version information for the Google API Client Library for PHP is exposed using a public
property of `Google_Service_Dfareporting`:

```php
$service = new Google_Service_Dfareporting($client) print
$service->version;
```

<br />

### Python

The Google API Client Library for Python (v1/v2) is not versioned. The API version to use is
specified as an argument to the discovery builder:

```python
discovery.build('dfareporting', 'v5', http=http)
```

<br />

### Ruby

Google API Client Library for Ruby versions \< 0.9 are not versioned. The API version to use
is specified as an argument to the service constructor:

```ruby
service = Google::APIClient::Service.new("dfareporting", "v5", { :application_name => "My application",
:application_version => '1.0.0', :authorization => authorization } )
```

<br />

For Google API Client Library for Ruby versions \>= 0.9, version is exposed in the service
namespace:

```ruby
Google.Apis.DfareportingV5
```

<br />

## Step 2: Determine the status of your version

Check the [deprecation schedule](https://developers.google.com/doubleclick-advertisers/deprecation.md.txt) to determine the status of your
version. If your version isn't listed, it has been sunset and is no longer
supported.

If your version is listed, check the **Deprecation Date** and **Sunset Date**
columns:

- If no dates are present, your version is fully supported.
- If dates are present, your version is deprecated and will be sunset on the date specified.

If your version is deprecated or has been sunset, you need to migrate to a
newer version to avoid service interruptions. We recommend migrating to the
most recent version shown in the schedule (excluding beta releases) to maximize
time between upgrades.

## Step 3: Upgrade versions

To migrate to a newer version of the API, you will need to update your
integration or obtain an updated build of your preferred client library. Note
that while some client libraries may provide a single build that works with any
API version, others will have separate builds for each version. The following
list provides general upgrade information for the most widely used client
libraries and integrations.

### Apps Script new editor

Google Apps Script supports all versions of the Campaign Manager 360 API and lets you
select the version to use on a script-by-script basis. To change the version
used by a particular script:

1. From the Apps Script editor, click **Add a service** .
2. Locate the Campaign Manager 360 API in the list of available services.
3. Change the Campaign Manager 360 API version using the version drop-down.
4. Click **Add** to save your changes.

### Apps Script legacy editor

Google Apps Script supports all versions of the Campaign Manager 360 API and lets you
select the version to use on a script-by-script basis. To change the version
used by a particular script:

1. From the Apps Script editor, navigate to **Resources \> Advanced Google services**.
2. Locate the Campaign Manager 360 API in the list of available services.
3. Change the Campaign Manager 360 API version using the version drop-down.
4. Click **OK** to save your changes.

### C#

The Google API Client Library for .NET provides separate builds for each version of the
Campaign Manager 360 API, distributed through NuGet. Update to a version of the client
library that corresponds to the API version you want to use.

For detailed installation instructions or alternative download options,
refer to the [client library documentation](https://developers.google.com/api-client-library/dotnet/get_started.md.txt).

### Java

The Google API Client Library for Java provides separate builds for each version of the
Campaign Manager 360 API, distributed through Maven. Update to a version of the client
library that corresponds to the API version you want to use.

For detailed installation instructions or alternative download options,
refer to the [client library documentation](https://developers.google.com/api-client-library/java/).

### PHP

The Google API Client Library for PHP provides separate builds for each version of the
Campaign Manager 360 API, distributed through Packagist. Update to a version of the
client library that corresponds to the API version you want to use.

For detailed installation instructions or alternative download options, refer to the [client library documentation](https://developers.google.com/api-client-library/php).

### Python

Every build of the Google API Client Library for Python (v1/v2) supports all versions of the
Campaign Manager 360 API. To migrate to a new version of Campaign Manager 360 API, update the
version string being passed as an argument to the discovery builder:

```python
discovery.build('dfareporting', 'v5', http=http)
```
For detailed installation instructions or alternative download options, refer to the [client library documentation](https://developers.google.com/api-client-library/python).

<br />

### Ruby


The Google API Client Library for Ruby v0.8 and lower supports all versions of the
Campaign Manager 360 API. To migrate to a new version of Campaign Manager 360 API, update the
version string being passed as an argument to the service constructor:

```ruby
service = Google::APIClient::Service.new("dfareporting", "v5",
    {
      :application_name => "My application",
      :application_version => '1.0.0',
      :authorization => authorization
    }
)
```
The Google API Client Library for Ruby v0.9+ provides separate builds for each version of the Campaign Manager 360 API, distributed through RubyGems. Update to a version of the client library that corresponds to the API version you want to use. For detailed installation instructions or alternative download options, refer to the [client library documentation](https://developers.google.com/api-client-library/ruby/start/get_started).

<br />

### REST

If you're calling the API directly using HTTPS, update the endpoint for
your requests to use the new API version number.

For example, when migrating from `v4` to `v5`, you would change the base URL
from:

```restructuredtext
https://dfareporting.googleapis.com/dfareporting/v4/...
```
to:

```restructuredtext
https://dfareporting.googleapis.com/dfareporting/v5/...
```

<br />

## Step 4: Address version differences

New API versions are designed to be backward compatible whenever possible.
However, some updates may include breaking changes that require you to modify
your code. These changes are detailed in the [release notes](https://developers.google.com/doubleclick-advertisers/rel_notes.md.txt).

When migrating, review the release notes for each version between your current
version and the version you're upgrading to. Pay special attention to the
following sections:

- **New features**: Newly added functionality. These don't require code changes for migration.
- **Sunsets**: Functionality removed from the API. Replacement functionality is noted when available.
- **Known issues**: Modifications to existing functionality, such as renamed fields or methods, or changed validation logic.

If your application uses functionality listed in the **Sunsets** or **Known
issues** sections, you'll need to update your code to address these changes.

## Stay informed

Regularly monitor the [Google Ads developer blog](https://developers.google.com/ads/blog/feeds/products/campaign-manager-360-api.md.txt) to be the first to hear
about API releases, deprecations, and sunsets.