Ad Serving
This page contains a documentation for each API related to Ad Serving
Last updated
This page contains a documentation for each API related to Ad Serving
Last updated
If you want to list Ad Networks for Ad Serving, please refer to this
This endpoint requests an HTTP POST to enable Ad Tag for a specific design
Method: POST
Endpoint: https://api.creatopy.com/v1/adServing/{{design_hash}}
Upon a successful execution, the response will have a status code of 200 and a JSON content type. The response body will contain the following structure:
JSON
You need to provide a valid design hash to this API in order to enable its Ad Tag.
We only support Ad Tag for designs not templates.
You can't enable Ad Tag for a design that has already enabled. In this case, an error will be thrown.
This endpoint requests an HTTP DELETE to disable Ad Tag for a specific design
Method: DELETE
Endpoint: https://api.creatopy.com/v1/adServing/{{design_hash}}
Upon a successful execution, the response will have a status code of 200 and a JSON content type. The response body will contain the following structure:
JSON
You need to provide a valid design hash to this API in order to disable its Ad Tag.
We only support Ad Tag for designs not templates.
You must have an enabled Ad Tag for this design before calling this endpoint, otherwise, an error will be thrown.
This endpoint makes an HTTP POST request to update the settings for an AdTag.
Method: POST
Endpoint: https://api.creatopy.com/v1/adServing/{{design_hash}}/update-settings
The request body must be sent in JSON format and include the following parameters:
useAsClickTag
Boolean
Enables/disables click tag functionality
url
String
URL associated with the AdTag
target
String
Target window for the AdTag (_blank
, _top
)
responsiveScaling
Boolean
Enables/disables responsive scaling
networkIds
Array of Numbers
List of ad network IDs to associate
You don't need to pass all the request body's parameters. for example, the following body is valid
Upon a successful execution, the response will have a status code of 200
and a JSON content type. The response body will contain the following structure:
JSON
useAsClickTag
Boolean
Indicates if the click tag is enabled
url
String
The URL configured for the AdTag
target
String
The target window for the AdTag (_blank
, _top
)
responsiveScaling
Boolean
Indicates if responsive scaling is enabled
networkIds
Array of Numbers
List of ad network IDs linked to the AdTag
This endpoint makes an HTTP GET request to generate the embed code for an Ad Tag.
Method: GET
Endpoint: https://api.creatopy.com/v1/adServing/{{design_hash}}/generate-code
Upon a successful execution, the response will have a status code of 200
and a JSON content type.
You may encounter an error if you update the settings and then directly call this endpoint. The error will be like this
In this case, you need to wait a few seconds until all Ad Tags are synced, and then you can generate the Ad Tag code.
This endpoint makes an HTTP POST request to generate a file containing AdTag data in either XLSX or CSV format. The response provides a URL to download the generated file.
Method: POST
Endpoint: https://api.creatopy.com/v1/adServing/{{design_hash}}/generate-file?format=XLSX
cURL Example (Generating XLSX File):
cURL Example (Generating CSV File):
Upon a successful execution, the response will have a status code of 200
and a JSON content type.
The file format is determined by the format
query parameter (XLSX
or CSV
).
The url
returned is a temporary link with a time-limited expiration.
The generated file contains Ad Tag data in the specified format.