How to Work with API
Attention
The API access is only available with an active Professional or Business subscription!
API Basics
The API uses HTTP Basic authentication, where the API key is passed as the username and the password is left empty. Thus, every API request must include the mandatory Authorization header in the following format:
Authorization: Basic <authKey>
The <authKey> field in the Authorization header is generated by base64 encoding a string made up of the API key followed by a colon.
Note
The API keys are available in your profile on the Comsign website.
GET Parameters
To generate a safe page (preview or ZIP archive), you need to send an HTTP GET request to the URL https://api.comsign.io/v2, specifying the generation settings in the URL parameters.
Main parameters to work with API
Required |
Parameter |
Description |
|---|---|---|
Yes |
|
Generator selection:
sf – SafePage generator.gp – GooglePage generator.ms – MicrosoftPage generator.ap – ApplePage generator.as – AmazonPage generator.wp – WordPress (HTML) generator.wp&php=1 – WordPress (PHP) generator.wp_cms – WordPress CMS generator. |
Yes |
|
Topic or URL to fill the safe with content.
For WordPress and SafePage generators, you need to specify one of the available topics:
For GooglePage, ApplePage, AmazonPage and MicrosoftPage generators use the URL link to the app or product (themes are also available for the GooglePage v2 generator).
A list of available themes with codes is provided below.
|
Yes |
|
Selecting the necessary language for the safe page translation. Specify in the format: language_COUNTRY.
A list of available languages with codes is provided below.
|
No |
|
Reverse PHP integration with Adspect cloaking.
To activate, substitute the stream_id key from the Adspect stream.
|
No |
|
A ZIP file with the safe page will be delivered. When this parameter is active, the download limit is charged.
If the parameter is absent, a JPG preview will be delivered instead of the file.
|
No |
|
Template generation number, a random set of characters.
If the value is empty, the
seed will be generated automatically.If the value is not changed, the safe page template will be regenerated.
|
Additional parameters to work with API
Parameter |
Description |
|---|---|
|
Keywords to integrate into safe page, separate with commas.
Example: key, keyword1, keyword2
|
|
Domain name to integrate into TOS&Privacy.
Example: https://example.com или example.com
|
|
Company name to integrate into TOS&Privacy.
Example: Stratton Oakmont Ltd.
|
|
Phone number to integrate into TOS&Privacy.
Example: +1 (800) 999-9999
|
|
Email to integrate into TOS&Privacy.
Example: support@example.com
|
|
Change header of a safe page.
Example: Example Title
|
|
Change name of the index file.
Default: index.html
Example: page.html
|
|
Format of the index file extension, the default will be html.
Example: .html
If using Adspect Cloaking: .php is automatically applied
|
|
Parameter allows you to place links to redirect from buttons or form.
Example: https://exampleredirect.com
|
|
Parameter for redirection from forms.
To activate it enter this value: 1
|
|
Parameter for redirection from buttons.
To activate it enter this value: 1
|
|
Parameter to place the pixel on a safe page.
|
|
Parameter to place the code on a safe page in <head>.
|
|
Parameter to place the code on a safe page after <body>.
Example: <div>example for body start<div>
|
|
Parameter to place the code on a safe page before <body>.
Example: <div>example for body end<div></div>
|
Important
If you insert code via head, pixel, body_start or body_end parameters, you must use URL encoding.
Example of a relevant URL to work with the API:
https://api.comsign.io/v2?aid=2e2bbf52-adnc-5819-963c-8e0d48b26e9&keywords=example,keys&domain=example.com&lang=en_US&product=wp_v2&sid=3eb2a9d3-9k93-3etc-ci88-ac1f6f92a854&target=food&zip=true
Codes of Available Languages
Language |
Code |
|---|---|
English |
|
Arabic |
|
Armenian |
|
Azerbaijani |
|
Belarusian |
|
Bengali |
|
Bulgarian |
|
Hungarian |
|
Vietnamese |
|
Dutch |
|
Greek |
|
Georgian |
|
Danish |
|
Hebrew |
|
Icelandic |
|
Indonesian |
|
Spanish |
|
Italian |
|
Irish |
|
Kazakh |
|
Chinese |
|
Korean |
|
Latvian |
|
Lithuanian |
|
Macedonian |
|
Malay |
|
Mongolian |
|
German |
|
Norwegian |
|
Polish |
|
Portuguese |
|
Romanian |
|
Russian |
|
Serbian |
|
Slovenian |
|
Thai |
|
Turkish |
|
Ukrainian |
|
Finnish |
|
French |
|
Hindi |
|
Croatian |
|
Czech |
|
Swedish |
|
Estonian |
|
Japanese |
|
Codes of Available Themes
Codes for WordPress and SafePage |
Codes for GooglePage |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|