Zernio
APIFor you
Zernio
APIFor you
Platforms

X Ads

Overview

Build

Create a CampaignPromote a Post

Target

Tailored Audiences

Measure

Pixel & Analytics

Reference

Limits & Errors
Dashboard
OverviewPlatformsAPI ReferenceResources
X Ads

Limits & Errors

What X's Ads API does not expose and the errors it returns most often.


What you cannot do

X Ads through Zernio does not support:

  • Targeting or creative edits after creation. PUT /v1/ads/{adId} takes status and budget; targeting or creative returns 501 with code unsupported_platform_operation.
  • Campaign duplication. POST /v1/ads/campaigns/{campaignId}/duplicate returns 501 on X.
  • An ads-only connection. The xads account is always connected from an X posting account.
  • Keyword targeting and follower look-alike targeting.
  • A video, description or callToAction on a create. A create carries an image only through the website card; promote a post that carries the video with a boost.
  • Income tier, radius and behavior targeting.

Common errors

ErrorCauseFix
422 with code ads_connection_requiredThe profile has no xads accountRun the connect flow with the X posting account id.
400 with code missing_required_fieldbody is absent on a create, or a website card misses one of imageUrl, headline and linkUrlSend the ad text, and all three card fields or none of them.
400 with code invalid_field_valueA goal outside the 5 X values, ad text over 280 characters, a headline over 70, or description, video or callToAction on a createUse a supported goal, trim the text (counting about 24 characters for a link without a card) and drop the fields X has no slot for.
403 with code ads_allowance_exceededThe team has no payment method on file and has reached 500 live adsAdd a card to resume creating ads.
502 with code platform_api_errorX rejected the requestRead platformError for X's own payload.

A call against a profile with no X Ads connection returns:

{
  "error": "X Ads is not connected for this profile",
  "type": "invalid_request_error",
  "code": "ads_connection_required",
  "param": "accountId"
}

Error handling covers the envelope and the stable codes.

Was this page helpful?

Pixel & Analytics

Install the X Pixel, send conversion events and read ad analytics.

OpenAI Ads

Run ChatGPT ads on an openaiads account, from connecting an API key to creating chat card campaigns, pixels and server-side conversions.

On this page

What you cannot doCommon errors