openapi: 3.2.0 info: title: AdMob Mediation Groups API version: v1beta description: The AdMob API allows publishers to programmatically get information about their AdMob account. contact: name: Google url: https://developers.google.com/admob/api/ termsOfService: https://developers.google.com/terms license: name: Google APIs Terms of Service url: https://developers.google.com/terms x-discovery-revision: '20260731' servers: - url: https://admob.googleapis.com description: AdMob API security: - GoogleOAuth2: - https://www.googleapis.com/auth/admob.readonly - https://www.googleapis.com/auth/admob.report tags: - name: mediationGroups paths: /v1beta/accounts/{accountsId}/mediationGroups: get: operationId: accounts_mediationGroups_list summary: List mediation groups under the specified AdMob account. This method has limited access. If you see a 403 permission den description: List mediation groups under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access. tags: - mediationGroups parameters: - name: parent in: path description: 'Required. Resource name of the account to list mediation groups for. Example: accounts/pub-9876543210987654' required: true schema: type: string pattern: ^accounts/[^/]+$ - name: pageToken in: query description: The value returned by the last `ListMediationGroupsResponse`; indicates that this is a continuation of a prior `ListMediationGroups` call, and that the system should return the next page of data. schema: type: string - name: pageSize in: query description: The maximum number of mediation groups to return. If unspecified or 0, at most 10,000 mediation groups will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000. schema: type: integer format: int32 - name: filter in: query description: 'The filter string that uses [EBNF grammar syntax](https://google.aip.dev/assets/misc/ebnf-filtering.txt). Possible fields to filter by are: - "AD_SOURCE_IDS" - "AD_UNIT_IDS" - "APP_IDS" - "DISPLAY_NAME" - "FORMAT" - "MEDIATION_GROUP_ID" - "PLATFORM" - "STATE" - "TARGETED_REGION_CODES" Possible filter functions are: - `IN`: Used to filter fields that represent a singleton including "MEDIATION_GROUP_ID", "DISPLAY_NAME", "STATE", "PLATFORM", and "FORMAT". - `CONTAINS_ANY`: Used to filter fields that represent a collection including "AD_SOURCE_IDS", "AD_UNIT_IDS", "APP_IDS", and "TARGETED_REGION_CODES". The filter functions can be added together using `AND`. `OR` functionality is not supported. Example: filter: IN(DISPLAY_NAME, "Test Group 1", "Test Group 2") AND IN(PLATFORM, "ANDROID") AND CONTAINS_ANY(AD_SOURCE_IDS, "5450213213286189855")' schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/ListMediationGroupsResponse' security: - GoogleOAuth2: - https://www.googleapis.com/auth/admob.readonly post: operationId: accounts_mediationGroups_create summary: Create a mediation group under the specific AdMob account. This method has limited access. If you see a 403 permission d description: Create a mediation group under the specific AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access. tags: - mediationGroups parameters: - name: parent in: path description: 'Required. The parent which owns the mediation group. Format: accounts/{publisher_id}' required: true schema: type: string pattern: ^accounts/[^/]+$ requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MediationGroup' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/MediationGroup' /v1beta/accounts/{accountsId}/mediationGroups/{mediationGroupsId}: patch: operationId: accounts_mediationGroups_patch summary: Update the specified mediation group under the specified AdMob account. This method has limited access. If you see a 403 description: Update the specified mediation group under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access. tags: - mediationGroups parameters: - name: name in: path description: 'Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789' required: true schema: type: string pattern: ^accounts/[^/]+/mediationGroups/[^/]+$ - name: updateMask in: query description: 'List of mediation group fields to be updated. Updates to repeated fields such as items in a list will fully replace the existing value(s) with the new value(s). Updates to individual values in a map can be done by indexing by the key. The following field masks are supported for mediation group updates: - "mediation_group_lines[\"{mediation_group_line_id}\"]" clang-format off - "mediation_group_lines[\"{mediation_group_line_id}\"].ad_unit_mappings[\"{ad_unit_id}\"]" clang-format on - "mediation_group_lines[\"{mediation_group_line_id}\"].cpm_micros" - "mediation_group_lines[\"{mediation_group_line_id}\"].cpm_mode" - "mediation_group_lines[\"{mediation_group_line_id}\"].state" - "mediation_group_lines[\"{mediation_group_line_id}\"].display_name" - "targeting.ad_unit_ids" To update a mediation group with a new mediation group line, use a distinct negative number for the "mediation_group_line_id". For Example: update_mask { paths: "mediation_group_lines[\"123456789012345\"].cpm_micros" }' schema: type: string format: google-fieldmask requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MediationGroup' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/MediationGroup' components: schemas: MediationGroup: type: object description: Describes an AdMob Mediation group. properties: mediationGroupId: type: string description: 'The ID of the mediation group. Example: "0123456789". This is a read only property.' targeting: $ref: '#/components/schemas/MediationGroupTargeting' state: type: string description: The status of the mediation group. Only enabled mediation groups will be served. enum: - STATE_UNSPECIFIED - ENABLED - DISABLED x-enumDescriptions: - Default value for an unset field. Do not use. - The mediation group is active and used to serve ads or to collect stats. - The mediation group has been disabled and is no longer serving ads or collecting stats. Disabled mediation groups can be re-enabled. mediationGroupLines: type: object description: The mediation lines used for serving for this mediation group. Key is the ID of the mediation group line. For creation, use distinct negative values as placeholder. additionalProperties: $ref: '#/components/schemas/MediationGroupMediationGroupLine' name: type: string description: 'Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789' displayName: type: string description: User provided name for the mediation group. The maximum length allowed is 120 characters. mediationAbExperimentState: type: string description: Output only. The state of the mediation a/b experiment that belongs to this mediation group. enum: - EXPERIMENT_STATE_UNSPECIFIED - RUNNING - NOT_RUNNING x-enumDescriptions: - Default value for an unset field. Do not use. - The mediation group has an experiment in the RUNNING state. - There is no experiment in the RUNNING state in the mediation group. readOnly: true MediationGroupTargeting: type: object description: Set of criteria targeted by this mediation group. For example, a mediation group can target specific ad unit IDs, platform, format and geo location. properties: platform: type: string description: 'Describes the platform of the app. Examples: "IOS", "ANDROID".' targetedRegionCodes: type: array description: The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group targets all available regions. For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag. items: type: string adUnitIds: type: array description: 'Ad units targeted by this mediation group. Example: "ca-app-pub-1234/8790".' items: type: string excludedRegionCodes: type: array description: The Unicode country/region code (CLDR) of a location, such as "US". Unset if this mediation group does not exclude any region. items: type: string idfaTargeting: type: string description: The parameter can be used to target ad requests based on the availability of the IDFA. If set to ALL, the mediation group applies to all ad requests (with or without IDFA). If set to AVAILABLE, the mediation group applies to ad requests with IDFA. If set to NOT_AVAILABLE, the mediation group applies to ad requests without IDFA. Doesn't need to be specified for an ANDROID device. enum: - IDFA_TARGETING_UNSPECIFIED - ALL - AVAILABLE - NOT_AVAILABLE x-enumDescriptions: - Default value. This value is unused. - All the devices are targeted, regardless of IDFA availability. - Only the devices with IDFA availability are targeted. - Only the devices without IDFA availability are targeted. format: type: string description: 'Ad format targeted by this mediation group. Examples: "BANNER", "NATIVE".' MediationGroupMediationGroupLine: type: object description: Settings for an ad network used by a mediation group. properties: adSourceId: type: string description: The ID of the ad source this mediation line is associated with. state: type: string description: The status of the mediation group line. Only enabled mediation group lines will be served. enum: - STATE_UNSPECIFIED - ENABLED - DISABLED - REMOVED x-enumDescriptions: - Default value for an unset field. Do not use. - The mediation group line is active and used to serve ads. - The mediation group line has been disabled and is no longer served. Disabled mediation group lines can be re-enabled. - The mediation group line will be removed and no longer served. Removed mediation group lines can not be re-enabled and will no longer be visible. This is an input only field. cpmMicros: type: string format: int64 description: The CPM for this allocation line. $0.01 is the minimum allowed amount. For LIVE CPM modes, the default amount is $0.01. This value is ignored if `cpm_mode` is `LIVE`. **Warning:** "USD" is the only supported currency at the moment. The unit is in micros. cpmMode: type: string description: Indicates how the CPM for this mediation line is provided. Note that `MANUAL` and `LIVE` are the only fully-supported mode at the moment. Please use the AdMob UI (https://admob.google.com) if you wish to create or update to other cpm modes. enum: - CPM_MODE_UNSPECIFIED - LIVE - MANUAL - ANO x-enumDescriptions: - Default value for an unset field. Do not use. - CPM is calculated per ad request based on the ad auction. - CPM is set by the user manually. - CPM is retrieved from the ad network using the publisher specified credentials. Output only. adUnitMappings: type: object description: References of the ad unit mappings for each ad unit associated with this mediation line. Key is the ad unit ID, value is resource name of the ad unit mapping. For mediation lines where the ad source id is the AdMob Network, ad unit mappings will be ignored. additionalProperties: type: string experimentVariant: type: string description: Output only. The Mediation A/B experiment variant to which the mediation group line belongs to. enum: - VARIANT_UNSPECIFIED - VARIANT_A - VARIANT_B - ORIGINAL x-enumDescriptions: - Default value for an unset field. Do not use. - The mediation group line belongs to the variant A. - The mediation group line belongs to the variant B. - The mediation group line isn't a part of an experiment. readOnly: true id: type: string description: The 16 digit ID for this mediation line e.g. 0123456789012345. When creating a new mediation group line, use a distinct negative integer as the ID place holder. displayName: type: string description: User-provided label for this mediation line. The maximum length allowed is 255 characters. ListMediationGroupsResponse: type: object description: Response for the mediation groups list request. properties: mediationGroups: type: array description: The resulting mediation groups for the requested account. items: $ref: '#/components/schemas/MediationGroup' nextPageToken: type: string description: If not empty, indicates that there may be more mediation groups for the request; this value should be passed in a new `ListMediationGroupsRequest`. securitySchemes: GoogleOAuth2: type: oauth2 description: Google OAuth 2.0. See https://developers.google.com/admob/api/v1/auth flows: authorizationCode: authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth tokenUrl: https://oauth2.googleapis.com/token scopes: https://www.googleapis.com/auth/admob.readonly: See your AdMob data https://www.googleapis.com/auth/admob.report: See your AdMob data externalDocs: url: https://developers.google.com/admob/api/