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;targetingorcreativereturns501with codeunsupported_platform_operation. - Campaign duplication.
POST /v1/ads/campaigns/{campaignId}/duplicatereturns501on X. - An ads-only connection. The
xadsaccount is always connected from an X posting account. - Keyword targeting and follower look-alike targeting.
- A video,
descriptionorcallToActionon 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
| Error | Cause | Fix |
|---|---|---|
422 with code ads_connection_required | The profile has no xads account | Run the connect flow with the X posting account id. |
400 with code missing_required_field | body is absent on a create, or a website card misses one of imageUrl, headline and linkUrl | Send the ad text, and all three card fields or none of them. |
400 with code invalid_field_value | A goal outside the 5 X values, ad text over 280 characters, a headline over 70, or description, video or callToAction on a create | Use 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_exceeded | The team has no payment method on file and has reached 500 live ads | Add a card to resume creating ads. |
502 with code platform_api_error | X rejected the request | Read 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?