You can pass (almost) any full page name to API calls. Wikidot will convert it to "valid" name just like it does when making full page name out of title or URL. The general rules for validity of page names are:
- latin letters and digits are allowed [0-9a-z]
- dash (-) is only allowed when it's surrounded by latin letters or digits or mix of those (page-name, page-0-name, 10-01), two dashes in row, dash in the beginning or in the end are not allowed
- empty name is not allowed
The same rules applies to category names. Category name and page name in full page name is separated by ":". Full page name can have no category in which case ":" is omitted too. These pages belong to category named "_default".
Additional rules:
- "_" is allowed in the front of full page name when there's no ":" in page name
- "_" is allowed in full page name if it follows ":" and it's followed by a digit or letter
- (note "_" is not allowed in category name)
- there can be many ":"s in the full page name, but each part between ":"s must meet the page name rules. String before the first ":" is category name, string after the first ":" (including the remaining ":"s) is page name
- as a special exception the full name <category>:_ IS allowed but discouraged
All these rules can be checked at once using one regular expression, but I think it is more useful to explain them in human language.
Of course rules for constructing valid full page name from user-entered string are even more complicated, but they work quite as you would expect, so I will omit them now.