Additional validation for link creation API call
improved
After thorough thinking, we've added additional checks to the POST https://api.short.io/links API call. It is better to display errors to you during creation time than send your customers to a broken link. Some common use cases, which will raise an error starting from today:
Sending "allowDuplicates" parameter as a string
This parameter must be a boolean value (true or false).
  • Old behavior: non-empty string ("True", "TRUE" or "False") was converted to true, an empty string to false
  • New behavior: Returning 400 error with an error message
Sending empty originalURL (null or empty string)
  • Old behavior: link with empty destination was created
  • New behavior: Returning 400 error with an error message
Sending definitely invalid originalURL
- Old behavior: link with a broken destination was created (https:///?identifier=5, <@123131>, "www.google.com sample search")
  • New behavior: Returning 400 error with an error message
Sending "tags" parameter as a string instead of an array
  • Old behavior: we created a tag per letter in the string ("example" produced "a", "e", "m", "l", "p" and "x" tags)
  • New behavior: Returning 400 error with an error message
Sending array instead of a string in utmMedium parameter
  • Old behavior: we created a link with a parameter utmMedium of ["value"]
  • New behavior: Returning 400 error with an error message
Also
, please use "idString" field as a link identifier, "id" field is deprecated (but still supported)