OverviewProductsPlatformsAPI ReferenceResources
All platforms

Microsoft Ads

Advertising

Create Bing search campaigns with responsive search ads and keywords, pause or rebudget them, and read their daily metrics on a microsoftads account.

Create a search campaign with POST /v1/ads/create on a microsoftads account (ad platform value microsoft, alias microsoftads). Campaigns, ad groups and ads made in Microsoft Advertising sync in too.

Quick reference

PropertyValue
HierarchyCampaign > Ad Group > Ad, created in one call
Campaign typeSearch only
Goal (goal)traffic
Ad formatResponsive search ad: 3 to 15 headlines of up to 30 characters, 2 to 4 descriptions of up to 90 characters
KeywordsOptional on create, EXACT, PHRASE or BROAD (the default)
Budgetdaily only, set on the campaign
BiddingMaximize Clicks; bid fields are not available
TargetingCountries, required on every create
Edits after creationStatus at each level and the daily budget
DeleteDeletes on Microsoft Advertising
Performance syncDaily impressions, clicks, spend, conversions and revenue
Sign inMicrosoft account, or Google for a Microsoft Advertising login made with Google

Before you start

You need a user with access to at least one Microsoft Advertising ad account, set up at ads.microsoft.com with a payment method.

Microsoft Ads is a standalone connection: it has its own OAuth and its own accountId, with no posting account behind it.

Connect

Call GET /v1/connect/microsoftads/ads with the profileId the connection belongs to (Connect ads).

TypeScript
import Zernio from '@zernio/node';

const zernio = new Zernio();

const { data: start } = await zernio.connect.connectAds({
  path: { platform: 'microsoftads' },
  query: { profileId: '66a1f0c2a4b9d3e8f1a2b3c4', redirect_url: 'https://your-app.com/cb' }
});

console.log(start.authUrl ?? start.accountId);

Send the user to the authUrl the call returns. A user who signs in to ads.microsoft.com with a Google account adds identityProvider=google, and consent then runs on Google.

Choosing ad accounts. After consent, Zernio syncs every Microsoft Advertising ad account the user can reach.

Pass adAccountId (or adAccountIds) on the connect call to limit sync to some of them. The id is the numeric account Id, not the account number.

Call the connect endpoint again once the browser lands on your redirect_url: it answers with alreadyConnected: true and the accountId every sample in this section uses.

Common errors

ErrorCauseFix
error=microsoft_ads_unknown_userThe account that signed in is not a Microsoft Advertising userSign in with the account used at ads.microsoft.com, adding identityProvider=google for a Google login.
error=microsoft_ads_no_ad_accountsThe user reaches no Microsoft Advertising ad accountCreate one at ads.microsoft.com, or sign in with a user that has access.
error=microsoft_ads_scope_not_grantedThe user declined the Microsoft Advertising permissionConnect again and accept it.

In this section

Was this page helpful?

On this page