Post apiv1campaignsad copyvalidate
Checks a marked-up ad text against exactly the rules campaign creation will apply to it, and answers with everything that is wrong rather than the first problem found. The WYSIWYG editor on the front end serialises its state into our markup and calls this on every pause in typing: there is no second parser anywhere, so this endpoint and campaign creation cannot disagree by construction. A text that is wrong is still a successful call — the verdict is in the body, and a 4xx here means the request itself was malformed (an unusable destinationUrl, a missing field).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The ad text as the advertiser wrote it, markup included. Formatting is written the way Telegram writes it — bold, italic, underline, strikethrough, ||spoiler||, monospace, >quote to the end of the line — plus two of ours: -- becomes an em dash, and {these words} become the post's link to destinationUrl. A premium custom emoji is written : the emoji with that document id is drawn over the character in the brackets, which has to be a single emoji itself — it is what a reader whose client cannot resolve the id goes on seeing, and it is what the visible length counts. Only the ten characters that mean something need escaping (* _ ~ ` | { } > - \); full stops, brackets and percent signs are plain text, unlike Bot API MarkdownV2. An exclamation mark is plain text too, everywhere except in front of a [, where it would begin the custom-emoji form: \! there is the character itself, and it is how a text carrying  as literal characters is written down. Inside a recognised web address none of them mean anything at all: mysite.com/my_page_2 keeps both underscores, /a--b keeps both hyphens and ?utm_campaign={campaign} keeps its braces, so nobody has to escape his own URL. The cap here is a bound on work per request, an order of magnitude above any text that could pass the 700-character visible limit; exceeding it is a 400, not a validation error.
8000Where the campaign's link goes. Required because it is what defines the advertiser's own domain, and the rule that no other domain may appear in the text cannot be evaluated without it. Accepted with or without a scheme while the advertiser is still typing the form field; anything that is not a URL either way is a 400.
1 - 2048Response
Success
True only when errors is empty. Campaign creation will accept exactly the texts this is true for
Length of what the reader will see — markup characters removed, -- already an em dash — counted in UTF-16 code units, so an emoji counts as 2. This is the number the 700 limit applies to and the number an editor should put in its character counter