PATCH

Append Ads Txt


Appends the submitted content object to Ads.txt. In order to reset Ads.txt to Wix's default, send default: true without a content object.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Ads.txt
Learn more about app permissions.
Endpoint
PATCH
https://www.wixapis.com/promote-seo-robots-server/v2/ads

Body Params
adsTxtAdsTxt

Submitted content object will be appended to the existing Ads.txt file. To reset Ads.txt to Wix's default, submit default:true without a content object.

Response Object
adsTxtAdsTxt

Appended Ads.txt file.

Append Ads.txt Example
Request
cURL
curl PATCH https://www.wixapis.com/promote-seo-txt-file-server/v2/ads \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: <AUTH>' \ -d '{"adsTxt": {"content": "google.com, pub-0000000000000001, DIRECT, f08c47fec0942fa0", "subdomain": "www"}}'
Response
JSON
{ "adsTxt": { "content": "google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0\ngoogle.com, pub-0000000000000001, DIRECT, f08c47fec0942fa0", "default": false, "subdomain": "www" } }
Errors
428Failed Precondition

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?