Create a promotional Tweet with Website Card


We have been integrating Twitter ADS services into our platform, and yes, of course, we have an active Twitter ads account.

We have a problem that worries us a lot when creating an ad, the problem is how to create a website Card. At the moment, we can only recover tweets that the user has already created. We can also create a new tweet but with flat content and associate a small image.

This is what we are using:

In case you have tweets compatible with Ads

  1. We obtain the ADS account of our user already logged in

  2. We get the funding_instrument_id to get the payment data, budgets, or lines of credit of the user to create the campaigns. We know that this can not be created via API.

  3. Create the campaign on Twitter

  4. We create and associate a line_items in our campaign

  5. Establish our audience, we already have this done and update it

  6. At this point we get the existing tweets or create a new one. We associate them with a line_item, we update and we finish the creation of the campaign

In case you do not have compatible tweets

The procedure is the same as the previous one except that in the course of the creation of the campaign we create a tweet with the following endpoint

In this Endpoint we have the possibility to add images to the tweet which we have also implemented with

The problem with this type of images is that we can only use 2 different and very specific sizes, which are:

BANNER: 320x50

At the end of the process we repeat step # 6 beforehand, associate the new tweet with line_items and create the campaigns.


We also created an endpoint within our platform to create Website Cards compatible with Twitter ADS and we did it with the following endpoint

This is where our problem really lies since the Twitter ADS documentation and we currently do not know how to associate the card with a promotional tweet or a line_items. Well, neither the promotional tweet has a field to associate IDs of Cards nor the line_items allows to associate anything other than a tweet.

We will thank you very much if you help us to find a solution to our promotional tweets, to create and to assign Cards to our campaign.

Greetings and good day.


@aojsamurai: Thanks for the question.

For creating website cards, please see this post. Note that the ratio of the image width to height should be 5:2.

This thread provides information on how to associate a website card with a Tweet. Just append the preview_url to your Tweet status.

Hope this helps!

Image for website card

@aojsamurai: Did this help answer any questions you may have had? If so, please consider marking this thread as solved.