Community Discussion

Ask a Question
Back to All

Why Do I get an error when posting a new ad (item)?

I'm trying to make a post request in order to submit a new item (ad), but. But when I do so I get a 400 error:
http_status: 400,
message: "Unknown field name 'url'",
message_code: 'api.action.bad_request.null'

This is the code:

const url = 'https://backstage.taboola.com/backstage/api/1.0/'+accountID+'/campaigns/'+cID+'items/';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer" + await getToken(),
Accept: 'application/json',
'Content-Type': 'application/json'},
body: JSON.stringify({
url: landingPage,
thumbnail_url: image,
title: adTitle
})

}
const respose = await fetch(url, options);

ο»Ώ