Hi Anna,
With regard to your questions, please see the below items:
How can we create Ad (not from google UI, but from API)?
You are able to create Ads from the API using the
customer.Ad object.
About the other questions:
To add an Ad to a campaign first you need to create an
AdGroup and add the Ads to the Group using an
AdGroupAd operation.
An
AdGroup can be linked to a campaign using its "campaign" field.
To link a
LeadFormAsset to a Campaign you would use the
CampaignAsset.
Finally, I know you are using the REST API and everything can be done using the REST API with the links i sent you but I would suggest to use one
of our client libraries as they make this a lot easier and we have multiple examples. For example, see this one on
Python about creating a LeadForm. Regardless if you decide to use a client library or not those examples are a great resource to find the resource names in the documentation.
Regards,