AdSense Host API (adsensehost:v4.1)

2024-09-29

26 new methods | New API

Additions

    Methods
  • adsensehost.accounts.get

      Path: accounts/{accountId}

      HTTP Method: GET

      Description: Get information about the selected associated AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account to get information about.

          Required: Yes

          Location: path

      Parameter Order: accountId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.list

      Path: accounts

      HTTP Method: GET

      Description: List hosted accounts associated with this AdSense account by ad client id.

      Parameters:

        filterAdClientId

          Type: string

          Description: Ad clients to list accounts for.

          Required: Yes

          Repeated: Yes

          Location: query

      Parameter Order: filterAdClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adclients.get

      Path: accounts/{accountId}/adclients/{adClientId}

      HTTP Method: GET

      Description: Get information about one of the ad clients in the specified publisher's AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client to get.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adclients.list

      Path: accounts/{accountId}/adclients

      HTTP Method: GET

      Description: List all hosted ad clients in the specified hosted account.

      Parameters:

        accountId

          Type: string

          Description: Account for which to list ad clients.

          Required: Yes

          Location: path

        maxResults

          Type: integer

          Description: The maximum number of ad clients to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Parameter Order: accountId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.delete

      Path: accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}

      HTTP Method: DELETE

      Description: Delete the specified ad unit from the specified publisher AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad unit.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client for which to get ad unit.

          Required: Yes

          Location: path

        adUnitId

          Type: string

          Description: Ad unit to delete.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • adUnitId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.get

      Path: accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}

      HTTP Method: GET

      Description: Get the specified host ad unit in this AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad unit.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client for which to get ad unit.

          Required: Yes

          Location: path

        adUnitId

          Type: string

          Description: Ad unit to get.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • adUnitId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.getAdCode

      Path: accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode

      HTTP Method: GET

      Description: Get ad code for the specified ad unit, attaching the specified host custom channels.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client with contains the ad unit.

          Required: Yes

          Location: path

        adUnitId

          Type: string

          Description: Ad unit to get the code for.

          Required: Yes

          Location: path

        hostCustomChannelId

          Type: string

          Description: Host custom channel to attach to the ad code.

          Repeated: Yes

          Location: query

      Parameter Order:

    • accountId
    • adClientId
    • adUnitId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.insert

      Path: accounts/{accountId}/adclients/{adClientId}/adunits

      HTTP Method: POST

      Description: Insert the supplied ad unit into the specified publisher AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which will contain the ad unit.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client into which to insert the ad unit.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.list

      Path: accounts/{accountId}/adclients/{adClientId}/adunits

      HTTP Method: GET

      Description: List all ad units in the specified publisher's AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client for which to list ad units.

          Required: Yes

          Location: path

        includeInactive

          Type: boolean

          Description: Whether to include inactive ad units. Default: true.

          Location: query

        maxResults

          Type: integer

          Description: The maximum number of ad units to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Parameter Order:

    • accountId
    • adClientId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.patch

      Path: accounts/{accountId}/adclients/{adClientId}/adunits

      HTTP Method: PATCH

      Description: Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client which contains the ad unit.

          Required: Yes

          Location: path

        adUnitId

          Type: string

          Description: Ad unit to get.

          Required: Yes

          Location: query

      Parameter Order:

    • accountId
    • adClientId
    • adUnitId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.update

      Path: accounts/{accountId}/adclients/{adClientId}/adunits

      HTTP Method: PUT

      Description: Update the supplied ad unit in the specified publisher AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client which contains the ad unit.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.reports.generate

      Path: accounts/{accountId}/reports

      HTTP Method: GET

      Description: Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.

      Parameters:

        accountId

          Type: string

          Description: Hosted account upon which to report.

          Required: Yes

          Location: path

        dimension

          Type: string

          Description: Dimensions to base the report on.

          Pattern: [a-zA-Z_]+

          Repeated: Yes

          Location: query

        endDate

          Type: string

          Description: End of the date range to report on in "YYYY-MM-DD" format, inclusive.

          Required: Yes

          Pattern: \d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)

          Location: query

        filter

          Type: string

          Description: Filters to be run on the report.

          Pattern: [a-zA-Z_]+(==|=@).+

          Repeated: Yes

          Location: query

        locale

          Type: string

          Description: Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.

          Pattern: [a-zA-Z_]+

          Location: query

        maxResults

          Type: integer

          Description: The maximum number of rows of report data to return.

          Format: uint32

          Minimum: 0

          Maximum: 50000

          Location: query

        metric

          Type: string

          Description: Numeric columns to include in the report.

          Pattern: [a-zA-Z_]+

          Repeated: Yes

          Location: query

        sort

          Type: string

          Description: The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.

          Pattern: (\+|-)?[a-zA-Z_]+

          Repeated: Yes

          Location: query

        startDate

          Type: string

          Description: Start of the date range to report on in "YYYY-MM-DD" format, inclusive.

          Required: Yes

          Pattern: \d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)

          Location: query

        startIndex

          Type: integer

          Description: Index of the first row of report data to return.

          Format: uint32

          Minimum: 0

          Maximum: 5000

          Location: query

      Parameter Order:

    • accountId
    • startDate
    • endDate
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.adclients.get

      Path: adclients/{adClientId}

      HTTP Method: GET

      Description: Get information about one of the ad clients in the Host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client to get.

          Required: Yes

          Location: path

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.adclients.list

      Path: adclients

      HTTP Method: GET

      Description: List all host ad clients in this AdSense account.

      Parameters:

        maxResults

          Type: integer

          Description: The maximum number of ad clients to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.associationsessions.start

      Path: associationsessions/start

      HTTP Method: GET

      Description: Create an association session for initiating an association with an AdSense user.

      Parameters:

        callbackUrl

          Type: string

          Description: The URL to redirect the user to once association is completed. It receives a token parameter that can then be used to retrieve the associated account.

          Location: query

        productCode

          Type: string

          Description: Products to associate with the user.

          Required: Yes

          Enum:

        • AFC
        • AFG
        • AFMC
        • AFS
        • AFV
        • Enum Descriptions:

        • AdSense For Content
        • AdSense For Games
        • AdSense For Mobile Content - deprecated
        • AdSense For Search - deprecated
        • AdSense For Video
        • Repeated: Yes

          Location: query

        userLocale

          Type: string

          Description: The preferred locale of the user.

          Location: query

        websiteLocale

          Type: string

          Description: The locale of the user's hosted website.

          Location: query

        websiteUrl

          Type: string

          Description: The URL of the user's hosted website.

          Required: Yes

          Location: query

      Parameter Order:

    • productCode
    • websiteUrl
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.associationsessions.verify

      Path: associationsessions/verify

      HTTP Method: GET

      Description: Verify an association session after the association callback returns from AdSense signup.

      Parameters:

        token

          Type: string

          Description: The token returned to the association callback URL.

          Required: Yes

          Location: query

      Parameter Order: token

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.delete

      Path: adclients/{adClientId}/customchannels/{customChannelId}

      HTTP Method: DELETE

      Description: Delete a specific custom channel from the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client from which to delete the custom channel.

          Required: Yes

          Location: path

        customChannelId

          Type: string

          Description: Custom channel to delete.

          Required: Yes

          Location: path

      Parameter Order:

    • adClientId
    • customChannelId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.get

      Path: adclients/{adClientId}/customchannels/{customChannelId}

      HTTP Method: GET

      Description: Get a specific custom channel from the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client from which to get the custom channel.

          Required: Yes

          Location: path

        customChannelId

          Type: string

          Description: Custom channel to get.

          Required: Yes

          Location: path

      Parameter Order:

    • adClientId
    • customChannelId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.insert

      Path: adclients/{adClientId}/customchannels

      HTTP Method: POST

      Description: Add a new custom channel to the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client to which the new custom channel will be added.

          Required: Yes

          Location: path

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.list

      Path: adclients/{adClientId}/customchannels

      HTTP Method: GET

      Description: List all host custom channels in this AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client for which to list custom channels.

          Required: Yes

          Location: path

        maxResults

          Type: integer

          Description: The maximum number of custom channels to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.patch

      Path: adclients/{adClientId}/customchannels

      HTTP Method: PATCH

      Description: Update a custom channel in the host AdSense account. This method supports patch semantics.

      Parameters:

        adClientId

          Type: string

          Description: Ad client in which the custom channel will be updated.

          Required: Yes

          Location: path

        customChannelId

          Type: string

          Description: Custom channel to get.

          Required: Yes

          Location: query

      Parameter Order:

    • adClientId
    • customChannelId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.update

      Path: adclients/{adClientId}/customchannels

      HTTP Method: PUT

      Description: Update a custom channel in the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client in which the custom channel will be updated.

          Required: Yes

          Location: path

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.reports.generate

      Path: reports

      HTTP Method: GET

      Description: Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.

      Parameters:

        dimension

          Type: string

          Description: Dimensions to base the report on.

          Pattern: [a-zA-Z_]+

          Repeated: Yes

          Location: query

        endDate

          Type: string

          Description: End of the date range to report on in "YYYY-MM-DD" format, inclusive.

          Required: Yes

          Pattern: \d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)

          Location: query

        filter

          Type: string

          Description: Filters to be run on the report.

          Pattern: [a-zA-Z_]+(==|=@).+

          Repeated: Yes

          Location: query

        locale

          Type: string

          Description: Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.

          Pattern: [a-zA-Z_]+

          Location: query

        maxResults

          Type: integer

          Description: The maximum number of rows of report data to return.

          Format: uint32

          Minimum: 0

          Maximum: 50000

          Location: query

        metric

          Type: string

          Description: Numeric columns to include in the report.

          Pattern: [a-zA-Z_]+

          Repeated: Yes

          Location: query

        sort

          Type: string

          Description: The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.

          Pattern: (\+|-)?[a-zA-Z_]+

          Repeated: Yes

          Location: query

        startDate

          Type: string

          Description: Start of the date range to report on in "YYYY-MM-DD" format, inclusive.

          Required: Yes

          Pattern: \d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)

          Location: query

        startIndex

          Type: integer

          Description: Index of the first row of report data to return.

          Format: uint32

          Minimum: 0

          Maximum: 5000

          Location: query

      Parameter Order:

    • startDate
    • endDate
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.urlchannels.delete

      Path: adclients/{adClientId}/urlchannels/{urlChannelId}

      HTTP Method: DELETE

      Description: Delete a URL channel from the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client from which to delete the URL channel.

          Required: Yes

          Location: path

        urlChannelId

          Type: string

          Description: URL channel to delete.

          Required: Yes

          Location: path

      Parameter Order:

    • adClientId
    • urlChannelId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.urlchannels.insert

      Path: adclients/{adClientId}/urlchannels

      HTTP Method: POST

      Description: Add a new URL channel to the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client to which the new URL channel will be added.

          Required: Yes

          Location: path

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.urlchannels.list

      Path: adclients/{adClientId}/urlchannels

      HTTP Method: GET

      Description: List all host URL channels in the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client for which to list URL channels.

          Required: Yes

          Location: path

        maxResults

          Type: integer

          Description: The maximum number of URL channels to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

26 removed methods | Removed API

Deletions

    Methods
  • adsensehost.accounts.get

      Path: accounts/{accountId}

      HTTP Method: GET

      Description: Get information about the selected associated AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account to get information about.

          Required: Yes

          Location: path

      Parameter Order: accountId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.list

      Path: accounts

      HTTP Method: GET

      Description: List hosted accounts associated with this AdSense account by ad client id.

      Parameters:

        filterAdClientId

          Type: string

          Description: Ad clients to list accounts for.

          Required: Yes

          Repeated: Yes

          Location: query

      Parameter Order: filterAdClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adclients.get

      Path: accounts/{accountId}/adclients/{adClientId}

      HTTP Method: GET

      Description: Get information about one of the ad clients in the specified publisher's AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client to get.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adclients.list

      Path: accounts/{accountId}/adclients

      HTTP Method: GET

      Description: List all hosted ad clients in the specified hosted account.

      Parameters:

        accountId

          Type: string

          Description: Account for which to list ad clients.

          Required: Yes

          Location: path

        maxResults

          Type: integer

          Description: The maximum number of ad clients to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Parameter Order: accountId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.delete

      Path: accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}

      HTTP Method: DELETE

      Description: Delete the specified ad unit from the specified publisher AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad unit.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client for which to get ad unit.

          Required: Yes

          Location: path

        adUnitId

          Type: string

          Description: Ad unit to delete.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • adUnitId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.get

      Path: accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}

      HTTP Method: GET

      Description: Get the specified host ad unit in this AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad unit.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client for which to get ad unit.

          Required: Yes

          Location: path

        adUnitId

          Type: string

          Description: Ad unit to get.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • adUnitId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.getAdCode

      Path: accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode

      HTTP Method: GET

      Description: Get ad code for the specified ad unit, attaching the specified host custom channels.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client with contains the ad unit.

          Required: Yes

          Location: path

        adUnitId

          Type: string

          Description: Ad unit to get the code for.

          Required: Yes

          Location: path

        hostCustomChannelId

          Type: string

          Description: Host custom channel to attach to the ad code.

          Repeated: Yes

          Location: query

      Parameter Order:

    • accountId
    • adClientId
    • adUnitId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.insert

      Path: accounts/{accountId}/adclients/{adClientId}/adunits

      HTTP Method: POST

      Description: Insert the supplied ad unit into the specified publisher AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which will contain the ad unit.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client into which to insert the ad unit.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.list

      Path: accounts/{accountId}/adclients/{adClientId}/adunits

      HTTP Method: GET

      Description: List all ad units in the specified publisher's AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client for which to list ad units.

          Required: Yes

          Location: path

        includeInactive

          Type: boolean

          Description: Whether to include inactive ad units. Default: true.

          Location: query

        maxResults

          Type: integer

          Description: The maximum number of ad units to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Parameter Order:

    • accountId
    • adClientId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.patch

      Path: accounts/{accountId}/adclients/{adClientId}/adunits

      HTTP Method: PATCH

      Description: Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client which contains the ad unit.

          Required: Yes

          Location: path

        adUnitId

          Type: string

          Description: Ad unit to get.

          Required: Yes

          Location: query

      Parameter Order:

    • accountId
    • adClientId
    • adUnitId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.adunits.update

      Path: accounts/{accountId}/adclients/{adClientId}/adunits

      HTTP Method: PUT

      Description: Update the supplied ad unit in the specified publisher AdSense account.

      Parameters:

        accountId

          Type: string

          Description: Account which contains the ad client.

          Required: Yes

          Location: path

        adClientId

          Type: string

          Description: Ad client which contains the ad unit.

          Required: Yes

          Location: path

      Parameter Order:

    • accountId
    • adClientId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.accounts.reports.generate

      Path: accounts/{accountId}/reports

      HTTP Method: GET

      Description: Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.

      Parameters:

        accountId

          Type: string

          Description: Hosted account upon which to report.

          Required: Yes

          Location: path

        dimension

          Type: string

          Description: Dimensions to base the report on.

          Pattern: [a-zA-Z_]+

          Repeated: Yes

          Location: query

        endDate

          Type: string

          Description: End of the date range to report on in "YYYY-MM-DD" format, inclusive.

          Required: Yes

          Pattern: \d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)

          Location: query

        filter

          Type: string

          Description: Filters to be run on the report.

          Pattern: [a-zA-Z_]+(==|=@).+

          Repeated: Yes

          Location: query

        locale

          Type: string

          Description: Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.

          Pattern: [a-zA-Z_]+

          Location: query

        maxResults

          Type: integer

          Description: The maximum number of rows of report data to return.

          Format: uint32

          Minimum: 0

          Maximum: 50000

          Location: query

        metric

          Type: string

          Description: Numeric columns to include in the report.

          Pattern: [a-zA-Z_]+

          Repeated: Yes

          Location: query

        sort

          Type: string

          Description: The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.

          Pattern: (\+|-)?[a-zA-Z_]+

          Repeated: Yes

          Location: query

        startDate

          Type: string

          Description: Start of the date range to report on in "YYYY-MM-DD" format, inclusive.

          Required: Yes

          Pattern: \d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)

          Location: query

        startIndex

          Type: integer

          Description: Index of the first row of report data to return.

          Format: uint32

          Minimum: 0

          Maximum: 5000

          Location: query

      Parameter Order:

    • accountId
    • startDate
    • endDate
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.adclients.get

      Path: adclients/{adClientId}

      HTTP Method: GET

      Description: Get information about one of the ad clients in the Host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client to get.

          Required: Yes

          Location: path

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.adclients.list

      Path: adclients

      HTTP Method: GET

      Description: List all host ad clients in this AdSense account.

      Parameters:

        maxResults

          Type: integer

          Description: The maximum number of ad clients to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.associationsessions.start

      Path: associationsessions/start

      HTTP Method: GET

      Description: Create an association session for initiating an association with an AdSense user.

      Parameters:

        callbackUrl

          Type: string

          Description: The URL to redirect the user to once association is completed. It receives a token parameter that can then be used to retrieve the associated account.

          Location: query

        productCode

          Type: string

          Description: Products to associate with the user.

          Required: Yes

          Enum:

        • AFC
        • AFG
        • AFMC
        • AFS
        • AFV
        • Enum Descriptions:

        • AdSense For Content
        • AdSense For Games
        • AdSense For Mobile Content - deprecated
        • AdSense For Search - deprecated
        • AdSense For Video
        • Repeated: Yes

          Location: query

        userLocale

          Type: string

          Description: The preferred locale of the user.

          Location: query

        websiteLocale

          Type: string

          Description: The locale of the user's hosted website.

          Location: query

        websiteUrl

          Type: string

          Description: The URL of the user's hosted website.

          Required: Yes

          Location: query

      Parameter Order:

    • productCode
    • websiteUrl
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.associationsessions.verify

      Path: associationsessions/verify

      HTTP Method: GET

      Description: Verify an association session after the association callback returns from AdSense signup.

      Parameters:

        token

          Type: string

          Description: The token returned to the association callback URL.

          Required: Yes

          Location: query

      Parameter Order: token

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.delete

      Path: adclients/{adClientId}/customchannels/{customChannelId}

      HTTP Method: DELETE

      Description: Delete a specific custom channel from the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client from which to delete the custom channel.

          Required: Yes

          Location: path

        customChannelId

          Type: string

          Description: Custom channel to delete.

          Required: Yes

          Location: path

      Parameter Order:

    • adClientId
    • customChannelId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.get

      Path: adclients/{adClientId}/customchannels/{customChannelId}

      HTTP Method: GET

      Description: Get a specific custom channel from the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client from which to get the custom channel.

          Required: Yes

          Location: path

        customChannelId

          Type: string

          Description: Custom channel to get.

          Required: Yes

          Location: path

      Parameter Order:

    • adClientId
    • customChannelId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.insert

      Path: adclients/{adClientId}/customchannels

      HTTP Method: POST

      Description: Add a new custom channel to the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client to which the new custom channel will be added.

          Required: Yes

          Location: path

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.list

      Path: adclients/{adClientId}/customchannels

      HTTP Method: GET

      Description: List all host custom channels in this AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client for which to list custom channels.

          Required: Yes

          Location: path

        maxResults

          Type: integer

          Description: The maximum number of custom channels to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.patch

      Path: adclients/{adClientId}/customchannels

      HTTP Method: PATCH

      Description: Update a custom channel in the host AdSense account. This method supports patch semantics.

      Parameters:

        adClientId

          Type: string

          Description: Ad client in which the custom channel will be updated.

          Required: Yes

          Location: path

        customChannelId

          Type: string

          Description: Custom channel to get.

          Required: Yes

          Location: query

      Parameter Order:

    • adClientId
    • customChannelId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.customchannels.update

      Path: adclients/{adClientId}/customchannels

      HTTP Method: PUT

      Description: Update a custom channel in the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client in which the custom channel will be updated.

          Required: Yes

          Location: path

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.reports.generate

      Path: reports

      HTTP Method: GET

      Description: Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.

      Parameters:

        dimension

          Type: string

          Description: Dimensions to base the report on.

          Pattern: [a-zA-Z_]+

          Repeated: Yes

          Location: query

        endDate

          Type: string

          Description: End of the date range to report on in "YYYY-MM-DD" format, inclusive.

          Required: Yes

          Pattern: \d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)

          Location: query

        filter

          Type: string

          Description: Filters to be run on the report.

          Pattern: [a-zA-Z_]+(==|=@).+

          Repeated: Yes

          Location: query

        locale

          Type: string

          Description: Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.

          Pattern: [a-zA-Z_]+

          Location: query

        maxResults

          Type: integer

          Description: The maximum number of rows of report data to return.

          Format: uint32

          Minimum: 0

          Maximum: 50000

          Location: query

        metric

          Type: string

          Description: Numeric columns to include in the report.

          Pattern: [a-zA-Z_]+

          Repeated: Yes

          Location: query

        sort

          Type: string

          Description: The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.

          Pattern: (\+|-)?[a-zA-Z_]+

          Repeated: Yes

          Location: query

        startDate

          Type: string

          Description: Start of the date range to report on in "YYYY-MM-DD" format, inclusive.

          Required: Yes

          Pattern: \d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)

          Location: query

        startIndex

          Type: integer

          Description: Index of the first row of report data to return.

          Format: uint32

          Minimum: 0

          Maximum: 5000

          Location: query

      Parameter Order:

    • startDate
    • endDate
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.urlchannels.delete

      Path: adclients/{adClientId}/urlchannels/{urlChannelId}

      HTTP Method: DELETE

      Description: Delete a URL channel from the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client from which to delete the URL channel.

          Required: Yes

          Location: path

        urlChannelId

          Type: string

          Description: URL channel to delete.

          Required: Yes

          Location: path

      Parameter Order:

    • adClientId
    • urlChannelId
    • Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.urlchannels.insert

      Path: adclients/{adClientId}/urlchannels

      HTTP Method: POST

      Description: Add a new URL channel to the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client to which the new URL channel will be added.

          Required: Yes

          Location: path

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost

  • adsensehost.urlchannels.list

      Path: adclients/{adClientId}/urlchannels

      HTTP Method: GET

      Description: List all host URL channels in the host AdSense account.

      Parameters:

        adClientId

          Type: string

          Description: Ad client for which to list URL channels.

          Required: Yes

          Location: path

        maxResults

          Type: integer

          Description: The maximum number of URL channels to include in the response, used for paging.

          Format: uint32

          Minimum: 0

          Maximum: 10000

          Location: query

        pageToken

          Type: string

          Description: A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

          Location: query

      Parameter Order: adClientId

      Scopes: https://www.googleapis.com/auth/adsensehost