Remove ad-group assets
curl --request DELETE \
--url https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionId": "<string>"
}
'import requests
url = "https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets"
payload = { "connectionId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({connectionId: '<string>'})
};
fetch('https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'connectionId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets"
payload := strings.NewReader("{\n \"connectionId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connectionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"removed": true
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "<string>",
"retryable": true,
"type": "<string>"
}
}Assets
Remove ad-group assets
Ad Campaigns. Changes the ad account without starting or raising spend; audited. Detaches assets from a Google ad group without deleting them, so they stay in the account and on anything else they are attached to. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility. Fields go in the query string. A JSON body with the same fields is also accepted and, when sent, the query string is ignored.
DELETE
https://api.aisa.one
/
apis
/
v1
/
ads
/
ad-sets
/
{adSetId}
/
assets
Remove ad-group assets
curl --request DELETE \
--url https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionId": "<string>"
}
'import requests
url = "https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets"
payload = { "connectionId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({connectionId: '<string>'})
};
fetch('https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'connectionId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets"
payload := strings.NewReader("{\n \"connectionId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connectionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"removed": true
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "<string>",
"retryable": true,
"type": "<string>"
}
}Request contract
- Method and path: DELETE /apis/v1/ads/ad-sets/{adSetId}/assets
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/ads/ad-sets/{adSetId}/assets - adSetId: path; required
- connectionId: query; required
- adAccountId: query; optional
- customerId: query; optional
- assetResourceNames: query; required
- adGroupAssetResourceNames: query; required
{
"operationId": "delete_aisa_ads_apis_v1_ads_ad_sets_adsetid_assets",
"method": "DELETE",
"path": "/apis/v1/ads/ad-sets/{adSetId}/assets",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Numeric Google platform id.",
"in": "path",
"name": "adSetId",
"required": true,
"schema": {
"pattern": "^\\d+$",
"type": "string"
}
},
{
"description": "The ads connection (adc_...) the request runs on: one of yours, from GET /apis/v1/ads/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
"in": "query",
"name": "connectionId",
"required": true,
"schema": {
"pattern": "^adc_[0-9A-Za-z]+$",
"type": "string"
}
},
{
"description": "Platform ad account ID (Google customer ID, digits only). Required when the connection has multiple customers.",
"in": "query",
"name": "adAccountId",
"required": false,
"schema": {
"pattern": "^\\d+$",
"type": "string"
}
},
{
"description": "Alias of adAccountId, kept for existing callers",
"in": "query",
"name": "customerId",
"required": false,
"schema": {
"pattern": "^\\d+$",
"type": "string"
}
},
{
"description": "Asset resource names, retained for compatibility. Repeat the parameter or pass a comma-separated list.",
"in": "query",
"name": "assetResourceNames",
"required": true,
"schema": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
{
"description": "ad_group_asset resource names to remove, e.g. customers/1234567890/adGroupAssets/456~123~CALLOUT. Repeat the parameter or pass a comma-separated list.",
"in": "query",
"name": "adGroupAssetResourceNames",
"required": true,
"schema": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": true,
"properties": {
"connectionId": {
"description": "The ads connection, when not sent as a query parameter.",
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}