The following endpoints validate social posts and a JSON objects.
POST Validate a Post
POSThttps://app.ayrshare.com/api/validate/post
Useful for pre-validating a post before publishing.
Instead of publishing a post with the /post endpoint, use the /validate/post endpoint to verify the content and parameters are correct. Validate by sending the exact same JSON you normally send to the /post endpoint.
⮕ Validation tests based on Ayrshare's own internal algorithms.
⮕ Posts are not sent to the social networks.
⮕ Posts may still return an error by the social networks even with a passed validation.
{"status":"success", "message": "No validation issues were found with this post. This is only an Ayrshare validation test and the post may still return an error by the social networks.",
}
{"action":"post","status":"error","code":136,"message":"Media URLs invalid. Please verify the media is an externally accessible URL.",}
{"status":"success", "message": "No validation issues were found with this post. This is only an Ayrshare validation test and the post may still return an error by the social networks.",
"warnings": [ {"action":"post","status":"error","code":156, "message": "Twitter is not linked with Ayrshare. Please confirm the linkage on the Social Accounts page in your dashboard."
} ]}
POST Validate JSON
POSThttps://app.ayrshare.com/api/validate/json
Send JSON to validate if correctly formatted. You can validate your JSON by using either an online linter, such as https://jsonlint.com/ or using Postman.
If you use no-code tool such as Bubble or Make or receive a 500 "Bad Request" response, this endpoint is useful to debug the JSON request.
Headers
Name
Type
Description
Authorization*
string
Format: Authorization: Bearer API_KEY. See Overview for more information.
Calculate the weighted length, or character count, of a post string for Facebook, Google Business Profile, Instagram, LinkedIn, Pinterest, Reddit, TikTok, X/Twitter, and YouTube. Checks if the post length is valid and returns the maximum length allowed for each social network.
Special characters, such as ü, ø, or 😊, have a higher character count value (unicode).
This check is automatically done with the /post endpoint.
The weighted length is an estimate calculated by Ayrshare. Social networks may have slightly different character counts based on their own calculation methods.
Headers
Name
Type
Description
Authorization*
string
Format: Authorization: Bearer API_KEY See Overview for more information.