---
agentTools:
  projectIndex: https://adzumo.readme.io/llms.txt
---

# Create New Zone

Create a new ad zone for your site

[block:api-header]
{
  "type": "basic",
  "title": "PHP"
}
[/block]

Replace the following:
\[ZONE\_NAME] with your zones name
\[ZONE\_DESC] with your zones description
\[SITE\_ID] with one of your site IDs - [List sites](https://adzumo.readme.io/docs/publishersites)
\[RESTRICTIONS] with your restrictions - [List ad zone restrictions](https://adzumo.readme.io/docs/publisherzonerestrictions)
\[TRAFFIC\_TYPE] with your traffic type - [List traffic types](https://adzumo.readme.io/docs/publisherzonetraffic)
\[ZONE\_TYPE] with your zone type - [List ad zone types](https://adzumo.readme.io/docs/publisherzonetypes)
\[YOUR\_API\_TOKEN] with your token

[block:code]
{
  "codes": [
    {
      "code": "<?php\n  $params = array(\n    'name'=>'[ZONE_NAME]',\n    'description'=>'[ZONE_DESC]',\n    'site'=>[SITE_ID],\n    'restrictions'=>'[RESTRICTIONS]',\n    'traffic_type'=>[TRAFFIC_TYPE],\n    'zone_type'=>[ZONE_TYPE]\n  );\n  $curl = curl_init('https://api.adzumo.net/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_POST, true);\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>",
      "language": "php"
    }
  ]
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "API Settings",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.adzumo.net/v1"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/publisher/zone/add/": {
      "post": {
        "summary": "Create New Zone",
        "description": "Create a new ad zone for your site",
        "operationId": "publisherzoneadd",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the zone"
                  },
                  "description": {
                    "type": "string",
                    "description": "The description of the zone"
                  },
                  "site": {
                    "type": "integer",
                    "description": "The ID of the site to create the ad zone on",
                    "format": "int32"
                  },
                  "restrictions": {
                    "type": "string",
                    "description": "(optional) The restriction IDs, comma delimited e.g. 1,2,3"
                  },
                  "traffic_type": {
                    "type": "integer",
                    "description": "The ID of the traffic type",
                    "format": "int32"
                  },
                  "zone_type": {
                    "type": "integer",
                    "description": "The ID of the zone type",
                    "format": "int32"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "php",
              "code": "<?php\n  $params = array(\n    'name'=>'my new name',\n    'description'=>'my new description',\n    'site'=>1,\n    'restrictions'=>'1,2,3',\n    'traffic_type'=>1,\n    'rzone_type'=>1\n  );\n  $curl = curl_init('https://api.adzumo.net/v1/publisher/zone/add/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_POST, true);\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"
            }
          ],
          "samples-languages": [
            "php"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "60f594ea7275ac0071183ac9:60f594ea7275ac0071183b1a"
}
```