About Ads.txt

With Wix Ads.txt, site owners can define which Authorized Digital Sellers are allowed to sell digital advertisements on their site. This enables them to increase revenue, while ensuring security, privacy, and transparency.

The Ads.txt APIs allow your app to:

  • Retrieve an existing Ads.txt file
  • Append data to and update Ads.txt
  • Re-set Ads.txt to Wix’s default state

The Ads.txt project is a simple, flexible, and secure method for publishers and distributors to declare authorized sellers. Read more about Ads.txt and its functionality on the website of the Interactive Advertising Bureau (IAB).

Was this helpful?
Yes
No

Sample Use Case: Ads.txt

This article shares a possible use case for your app. You're certainly not limited to this use case, but it might be a helpful start to plan your app's implementation.

Enable the owner of a blog to display advertisements on their site through a content discovery platform

The owners of a fitness blog would like to increase revenue by displaying advertisements on their Wix site. Your app will modify the existing Ads.txt file to enable a content discovery platform as an authorized seller.

Append an existing Ads.txt file

To add an authorized digital seller, your app will call the Append Ads.txt endpoint. You’ll need to pass the platform’s name, account id, payment type, and tag id inside the content field of the adsTxt object. You can read more about the structure of Ads.txt files on the IAB’s website.

Copy
1
curl -X PATCH https://www.wixapis.com/promote-seo-txt-file-server/v2/ads \
2
--header 'Content-Type: application/json;charset=UTF-8' \
3
--header 'Authorization: <AUTH>' \
4
--data-binary '{"adsTxt": {"content": "silveradexchange.com, pub-0000000000000001, RESELLER, b124y6716v287058"}}'

Notice that the content field in the response has two lines, separated by the new line (\n) control character.

Copy
1
{
2
"adsTxt": {
3
"content": "google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0\nsilveradexchange.com, pub-0000000000000001, RESELLER, b124y6716v287058",
4
"default": false,
5
"subdomain": "www"
6
}
7
}
Was this helpful?
Yes
No

PutUpdate Ads Txt

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates the Ads.txt file. When setting the content object to an empty string, an empty Ads.txt file will be created. In order to reset Ads.txt to Wix's default, send default: true without a content object.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Ads.txt
Learn more about permission scopes.
Endpoint
PUT
https://www.wixapis.com/promote-seo-txt-file-server/v2/ads

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

GetGet Ads Txt

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves the Ads.txt file.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Ads.txt
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/promote-seo-txt-file-server/v2/ads

Was this helpful?
Yes
No

PatchAppend Ads Txt

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

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.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Ads.txt
Learn more about permission scopes.
Endpoint
PATCH
https://www.wixapis.com/promote-seo-txt-file-server/v2/ads

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No