Creating a publisher’s ad space

Parameters

HTTP method

Access rights

URL

Parameters

Note

POST manage_websites https://api.admitad.com/websites/v2/create/ Parameter request list
  • Request data format application/json

  • Returns created ad space.*

  • * Returns the result in the JSON format.

Parameter request list

Name

Type

Required

Settings restrictions

Note, allowed values

name string max length - 200  
kind string max length - 20 Types of ad spaces (‘social_network’, ‘traffic_purchase’)
adservice_id integer    

List of advertising services (required for kind = ‘drop_shipping’)

url string   max length - 255  
category array of integers     Categories of affiliate programs
region array of strings     Ad space regions

Example of data for a request

{
    "name": "Test Website",
    "kind": "social_network",
    "url": "https://test.com",
    "adservice_id": 9
}

Example of use

Example of a request with utility ``curl``:

curl -L -H 'Authorization: Bearer access_token' -H "Content-Type: application/json" -X POST https://api.admitad.com/websites/v2/create/ -d '{ "name": "Test Website", "kind": "social_network", "url": "https://test.com", "adservice_id": 9 }'

Example of a raw request:

POST /websites/v2/create/ HTTP/1.1
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Host: api.admitad.com
Accept: */*
Authorization: Bearer access_token
Content-Type: application/json

{
    "name": "Test Website",
    "kind": "social_network",
    "url": "https://test.com",
}

Example of the response from the API server in the JSON format:

{
    "status": "active",
    "kind": "social_network",
    "is_old": false,
    "account_id": "",
    "verification_code": "d47d616e54",
    "creation_date": "2020-02-06T16:22:46",
    "adservice": {
        "id": 9,
        "name": "VK"
    },
    "id": 35,
    "site_url": "",
    "validation_passed": false,
    "name": "Test Website",
    "is_lite": false
}

Description of API server response fields

Name

Description

id

Ad space ID

name

Name of ad space

status

Ad space status

creation_date

Ad space creation date

site_url

Ad space website

verification_code

Verification code

validation_passed

Indicator for successful validation

is_old

Old-type indicator

account_id

Account identifier

is_lite

Whether this is a Lite ad space

kind Types of ad spaces
adservice List of advertising services