Accept Google Ads terms
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms \
--header 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms"
headers = {"api_key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {api_key: '<api-key>'}};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms', 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://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "accepted"
}Accounts
Accept Google Ads terms
This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.
Records acceptance of the Google Ads terms for the account.
The account cannot be provisioned until the terms are accepted.
A
not_recorded status is a failure, not a no-op. It means the account was in a blocked or terminal state (BLOCKED, SUSPENDED, BILLING_HOLD, CANCELED or PENDING_VERIFICATION) and the acceptance was not written. Read the account’s status and resolve that before retrying. The response is still a 200.This needs a payment method on the workspace, and the workspace must not be on a billing hold.
The response includes fields beyond the ones documented here. Don’t rely on undocumented response fields, as they can change at any time.
POST
/
api
/
apps
/
{app_id}
/
google-ads
/
accounts
/
{account_id}
/
accept-terms
Accept Google Ads terms
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms \
--header 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms"
headers = {"api_key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {api_key: '<api-key>'}};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms', 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://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/accounts/{account_id}/accept-terms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "accepted"
}Authorizations
Personal API key.
Path Parameters
ID of the app to advertise.
ID of the Google Ads account, as returned in id by Get Google Ads account. An account that belongs to a different app returns a 404.
Response
Successful Response
Outcome of accepting the Google Ads terms.
Outcome of the request. A status of accepted means the acceptance was recorded, while not_recorded means it was not written because the account is in a blocked or terminal state, which is a failure to act on rather than a no-op.
Example:
"accepted"
Was this page helpful?