Create Unit size
Create Unit size
POST
https://api.ocamba.com/v2/adex/unit-sizes
Creates a new Unit size object
Request schema
bodyPOST https://api.ocamba.com/v2/adex/unit-sizes HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
{
"name": "medium ad size"
}
curl -X POST "https://api.ocamba.com/v2/adex/unit-sizes" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"medium ad size"}'
fetch("https://api.ocamba.com/v2/adex/unit-sizes", {
method: "POST",
headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify(
{
"name": "medium ad size"
}
)
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v2/adex/unit-sizes");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $token",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "medium ad size"
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Responses
201 Created
HTTP/1.1 201 Created
Content-Type: application/json
Responses
Info
1
Unit size with same width and height should not exist.