Create ad account
Changed onCreates a new Meta ad account in the user's own business portfolio, or a Google Ads client account under a manager (MCC) account the connection reaches. Billing must then be set up on the platform.
Meta (omit platform or send meta).
Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token.
Meta requirements
- An active metaads accountId
- Ads access
- business_management permission
- Business admin access
Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case.
Meta billing and limits
The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods.
Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business.
Meta fields
- timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles.
- Meta validates supported currencies and IDs.
- endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow.
Meta connection scope
The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it.
Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints.
Meta retries and failures
Zernio never retries creation. Send an Idempotency-Key to make a resend safe: the same key and body replay the original 201 without creating again. Without a key every request creates a new account. Unknown body fields are rejected. The Meta flow has no validateOnly or dry-run option.
- After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. An Idempotency-Key does not cover that 502.
- A 201 with connectionUpdated=false means the account exists but needs reconnecting via GET /v1/connect/facebook/ads, with adAccountIds containing the returned ID and the previous scoped IDs. Do not repeat the create call.
Google (send platform: google).
Google only creates accounts through a manager account. The new client account is created under managerCustomerId, which must be a manager the Google user behind the googleads accountId reaches (directly or as a sub-manager). List them with GET /v1/ads/accounts/hierarchy.
Whose manager it is (the integrator's or the end user's) is the caller's choice: pass the connection that reaches it.
Google fields and limits
- currency (ISO 4217) and timeZone (IANA name, for example Europe/Madrid) cannot be changed after creation.
- The account starts without billing: set it up in Google Ads before ads can serve.
- Google caps how many accounts a manager can create and how many active client accounts it can hold.
Google result and retries
The new customer is added to the connection (and to a scoped connection's allowlist). Discovery is nudged immediately, and the returned adAccountId works with every other ads endpoint.
validateOnly: true asks Google to validate the request without creating anything and returns 200.
Zernio never retries creation. Send an Idempotency-Key to make a resend safe: the same key and body replay the original 201 without creating again. Without a key every request creates a new account.
- A validateOnly call and the real create need different keys.
- After a 502 with details.creationStatus=unknown, check the manager in Google Ads before trying again: an Idempotency-Key does not cover that 502.
Request
- Base URLhttps://zernio.com/api
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Optional client-generated unique key (e.g. a UUID) that makes retries safe.
- Same key + same body: replays the original response.
- Same key + different body: 422.
- Key still processing: 409.
A request cut off mid-handler (e.g. by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
On the Ads create, boost and duplicate endpoints, a same-body retry runs again once the cut-off request started more than 15 minutes ago.
Request body
Response
Google validateOnly request accepted by Google. Nothing was created.
Changes
- info
added the new optional
headerrequest parameterIdempotency-Key - info
added the non-success response with the status
- info
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info