{"info": {"description":"These APIs are part of the Amazon DSP Campaign Management API closed beta and only accessible to closed beta participants at this time. Because these APIs are in closed beta, they don’t follow our normal versioning standards and are subject to change. If you are interested in joining the closed beta, please [submit a support ticket](https://amzn-clicks.atlassian.net/servicedesk/customer/portal/2/group/2/create/5) and we’ll follow up with additional information. <br><br> Adds, lists, or removes audience targeting on an ad group.","title":"Ad Group Targeting - Audiences","version":"3.0"},"paths": {"/dsp/adGroups/{adGroupId}/targetingTypes/audience/targets/delete":{"post":{"requestBody":{"content":{"application/vnd.dspAdGroupTargetingAudience.v1+json":{"schema":{"$ref":"#/components/schemas/DspDeleteAdGroupAudienceTargetsRequestContentV1"}}},"required":true},"description":"Delete one or more audiences from an ad group.\n\n**Requires one of these permissions**:\n[]","operationId":"DspDeleteAdGroupAudienceTargets","responses":{"400":{"description":"Bad Request or request body is not matching with input model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspBadRequestExceptionV1ResponseContent"}}}},"401":{"description":"Unauthenticated request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnauthorizedExceptionV1ResponseContent"}}}},"500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspInternalServerExceptionV1ResponseContent"}}}},"204":{"description":"Success with no body content."},"403":{"description":"Forbidden - Request failed because user is not authorized to access a resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspForbiddenExceptionV1ResponseContent"}}}},"404":{"description":"Not Found - Requested resource does not exist or is not visible for the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspNotFoundExceptionV1ResponseContent"}}}},"415":{"description":"Unsupported Media Type - Version not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnsupportedMediaTypeExceptionV1ResponseContent"}}}},"429":{"description":"Too Many Requests - Request was rate-limited. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspTooManyRequestsExceptionV1ResponseContent"}}}},"409":{"description":"DspConflictExceptionV1 409 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspConflictExceptionV1ResponseContent"}}}}},"parameters":[{"schema":{"description":"The ad group identifier.","type":"string"},"in":"path","name":"adGroupId","description":"The ad group identifier.","required":true},{"schema":{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","type":"string"},"in":"header","name":"Amazon-Ads-AccountId","description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","required":true},{"schema":{"description":"The identifier of a client associated with a \"Login with Amazon\" account.","type":"string"},"in":"header","name":"Amazon-Advertising-API-ClientId","description":"The identifier of a client associated with a \"Login with Amazon\" account.","required":true},{"schema":{"description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","type":"string"},"in":"header","name":"Amazon-Advertising-API-Scope","description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","required":true}],"tags":["Ad Group Targeting - Audiences"]}},"/dsp/adGroups/{adGroupId}/targetingTypes/audience/targets":{"post":{"requestBody":{"content":{"application/vnd.dspAdGroupTargetingAudience.v1+json":{"schema":{"$ref":"#/components/schemas/DspCreateAdGroupAudienceTargetsRequestContentV1"}}},"required":true},"description":"Add one or more audiences to groups to build and associate a targeting expression to an ad group. To add audiences to a *new* group, provide any new string as the `groupId`. To add audiences to an *existing* group, provide the existing string for `groupId`. Audiences with the same group identifier will be placed into the same group.\n* Included groups are joined by an intersection. Users must be in all of the groups specified to be included.\n* Audiences within an inclusion group are joined by OR/ANY logic. Audiences within the exclusion group are joined by AND/ALL logic. This means that users can be in any of the audiences inside a group to be included or excluded.\n* All audiences within the same group must either be included or excluded.\n* You can specify up to 10 groups to be included, but only 1 group to be excluded.\n* Up to 500 audience IDs can be specified per group\n* You will incur fees (CPM-based) for using Amazon or third-party audiences. These fees are in addition to media costs (e.g. supply cost).\n\n**Requires one of these permissions**:\n[]","operationId":"DspCreateAdGroupAudienceTargets","responses":{"400":{"description":"Bad Request or request body is not matching with input model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspBadRequestExceptionV1ResponseContent"}}}},"401":{"description":"Unauthenticated request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnauthorizedExceptionV1ResponseContent"}}}},"500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspInternalServerExceptionV1ResponseContent"}}}},"204":{"description":"Success with no body content."},"403":{"description":"Forbidden - Request failed because user is not authorized to access a resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspForbiddenExceptionV1ResponseContent"}}}},"404":{"description":"Not Found - Requested resource does not exist or is not visible for the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspNotFoundExceptionV1ResponseContent"}}}},"415":{"description":"Unsupported Media Type - Version not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnsupportedMediaTypeExceptionV1ResponseContent"}}}},"429":{"description":"Too Many Requests - Request was rate-limited. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspTooManyRequestsExceptionV1ResponseContent"}}}},"409":{"description":"DspConflictExceptionV1 409 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspConflictExceptionV1ResponseContent"}}}}},"parameters":[{"schema":{"description":"The ad group identifier.","type":"string"},"in":"path","name":"adGroupId","description":"The ad group identifier.","required":true},{"schema":{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","type":"string"},"in":"header","name":"Amazon-Ads-AccountId","description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","required":true},{"schema":{"description":"The identifier of a client associated with a \"Login with Amazon\" account.","type":"string"},"in":"header","name":"Amazon-Advertising-API-ClientId","description":"The identifier of a client associated with a \"Login with Amazon\" account.","required":true},{"schema":{"description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","type":"string"},"in":"header","name":"Amazon-Advertising-API-Scope","description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","required":true}],"tags":["Ad Group Targeting - Audiences"]},"get":{"description":"Gets a list of audiences and audience groups associated to an ad group.\n\n**Requires one of these permissions**:\n[]","operationId":"DspGetAdGroupAudienceTargets","responses":{"200":{"description":"Successful operation.","content":{"application/vnd.dspAdGroupTargetingAudience.v1+json":{"schema":{"$ref":"#/components/schemas/DspGetAdGroupAudienceTargetsResponseContent"}}}},"400":{"description":"Bad Request or request body is not matching with input model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspBadRequestExceptionV1ResponseContent"}}}},"401":{"description":"Unauthenticated request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnauthorizedExceptionV1ResponseContent"}}}},"500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspInternalServerExceptionV1ResponseContent"}}}},"403":{"description":"Forbidden - Request failed because user is not authorized to access a resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspForbiddenExceptionV1ResponseContent"}}}},"404":{"description":"Not Found - Requested resource does not exist or is not visible for the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspNotFoundExceptionV1ResponseContent"}}}},"415":{"description":"Unsupported Media Type - Version not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspUnsupportedMediaTypeExceptionV1ResponseContent"}}}},"429":{"description":"Too Many Requests - Request was rate-limited. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspTooManyRequestsExceptionV1ResponseContent"}}}},"409":{"description":"DspConflictExceptionV1 409 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DspConflictExceptionV1ResponseContent"}}}}},"parameters":[{"schema":{"description":"The ad group identifier.","type":"string"},"in":"path","name":"adGroupId","description":"The ad group identifier.","required":true},{"schema":{"description":"Operations that return paginated results include a pagination token in this field. To retrieve the next page of results, call the same operation and specify this token in the request. If the nextToken field is empty, there are no further results.","type":"string"},"in":"query","name":"nextToken","description":"Operations that return paginated results include a pagination token in this field. To retrieve the next page of results, call the same operation and specify this token in the request. If the nextToken field is empty, there are no further results."},{"schema":{"description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","type":"string"},"in":"header","name":"Amazon-Ads-AccountId","description":"Account identifier you use to access the DSP. This is your Amazon DSP Advertiser ID.","required":true},{"schema":{"description":"The identifier of a client associated with a \"Login with Amazon\" account.","type":"string"},"in":"header","name":"Amazon-Advertising-API-ClientId","description":"The identifier of a client associated with a \"Login with Amazon\" account.","required":true},{"schema":{"description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","type":"string"},"in":"header","name":"Amazon-Advertising-API-Scope","description":"The identifier of a profile associated with the advertiser account. Use GET method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header.","required":true}],"tags":["Ad Group Targeting - Audiences"]}}},"components": {"headers":{},"examples":{},"schemas":{"DspInGroupOperatorV1":{"description":"The interoperator used among audiences within the same audience group. This is a legacy field that is no longer supported, and will only return a non-null value on legacy ad groups.","type":"string","enum":["ANY","ALL"]},"DspSubErrorV1":{"type":"object","properties":{"fieldName":{"type":"string"},"errorType":{"type":"string"},"message":{"type":"string"}},"required":["errorType","message"]},"DspAcrossGroupOperatorV1":{"description":"The intraoperator used among audiences between audience groups. This is a legacy field that is no longer supported, and will only return a non-null value on legacy ad groups.","type":"string","enum":["ANY","ALL"]},"DspCreateAdGroupAudienceTargetV1":{"type":"object","properties":{"negative":{"description":"Whether to include (false) or exclude (true) users who match the given target when serving an ad.","type":"boolean"},"groupId":{"description":"The string identifying a group of audiences. Only numbers formatted as strings are accepted (e.g., \"1\"). To add audiences to a new group, choose any string not currently being used on this ad group. To add audiences to an existing group, use the existing groupId from this ad group. You may specify up to 10 include groups and 1 exclude group.","type":"string"},"audienceId":{"description":"The unique identifier for the audience. Use the [audiences](https://advertising.amazon.com/API/docs/en-us/audiences/#/Discovery/listAudiences) discovery resource to look up audience identifiers.","type":"string"}},"required":["audienceId","groupId","negative"]},"DspUnsupportedMediaTypeExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspCreateAdGroupAudienceTargetsRequestContentV1":{"type":"object","properties":{"audienceTargets":{"minItems":1,"maxItems":1000,"description":"A list of targets.","type":"array","items":{"$ref":"#/components/schemas/DspCreateAdGroupAudienceTargetV1"}}},"required":["audienceTargets"]},"DspConflictExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspGetAdGroupAudienceTargetV1":{"type":"object","properties":{"negative":{"description":"Whether to include (false) or exclude (true) users who match the given target when serving an ad.","type":"boolean"},"inGroupOperator":{"$ref":"#/components/schemas/DspInGroupOperatorV1"},"acrossGroupOperator":{"$ref":"#/components/schemas/DspAcrossGroupOperatorV1"},"groupId":{"description":"A unique ID for the audience group.","type":"string"},"audienceId":{"description":"The unique identifier for the audience. Use the [audiences](https://advertising.amazon.com/API/docs/en-us/audiences/#/Discovery/listAudiences) discovery resource to look up audience identifiers.","type":"string"}},"required":["audienceId","groupId","negative"]},"DspGetAdGroupAudienceTargetsResponseContent":{"type":"object","properties":{"audienceTargets":{"minItems":0,"maxItems":5500,"description":"A list of targets.","type":"array","items":{"$ref":"#/components/schemas/DspGetAdGroupAudienceTargetV1"}},"nextToken":{"description":"Operations that return paginated results include a pagination token in this field. To retrieve the next page of results, call the same operation and specify this token in the request. If the nextToken field is empty, there are no further results.","type":"string"}},"required":["audienceTargets"]},"DspDeleteAdGroupAudienceTargetsRequestContentV1":{"type":"object","properties":{"audienceTargets":{"minItems":1,"maxItems":1000,"description":"A list of targets.","type":"array","items":{"$ref":"#/components/schemas/DspDeleteAdGroupAudienceTargetV1"}}},"required":["audienceTargets"]},"DspDeleteAdGroupAudienceTargetV1":{"type":"object","properties":{"negative":{"description":"Whether to include (false) or exclude (true) users who match the given target when serving an ad.","type":"boolean"},"groupId":{"description":"A unique ID for the audience group.","type":"string"},"audienceId":{"description":"The unique identifier for the audience. Use the [audiences](https://advertising.amazon.com/API/docs/en-us/audiences/#/Discovery/listAudiences) discovery resource to look up audience identifiers.","type":"string"}},"required":["audienceId","groupId","negative"]},"DspBadRequestExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspInternalServerExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspTooManyRequestsExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspForbiddenExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspUnauthorizedExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}},"DspNotFoundExceptionV1ResponseContent":{"type":"object","properties":{"requestId":{"type":"string"},"message":{"type":"string"},"errors":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DspSubErrorV1"}}}}},"requestBodies":{},"responses":{},"callbacks":{},"links":{},"securitySchemes":{},"parameters":{}},"openapi": "3.0.1"}