Errors and rate limits
HTTP status codes, the JSON error format, publishing-requirement errors and rate limits of the SocialKit API.
Errors come back with a standard HTTP status code and a JSON body. The body always has a message field.
{
"message": "Unauthenticated."
}Status codes
| Code | Meaning |
|---|---|
200 | Success. |
201 | Success, and a new record was created. Treat any 2xx as success. |
401 | The key is missing, wrong, expired or deleted. |
403 | The key works, but its user may not do this. |
404 | No workspace or record with that ID. |
422 | The request data is not valid. |
429 | Too many requests. |
500 | Something failed on our side. |
401 Unauthenticated
{
"message": "Unauthenticated."
}SocialKit did not get a usable key: the Authorization: Bearer <personal-key> header is absent, or the key is unknown, past its expiry, or was deleted (SocialKit cannot tell a deleted key from a made-up one).
403 Forbidden
{
"message": "Access forbidden."
}The key is fine, but its user either does not belong to the workspace named in the URL or has a role that may not call this endpoint (see Permissions). A workspace whose subscription does not allow the action is refused with 403 too, with a message that names the reason.
404 Not found
An unknown workspace UUID:
{
"message": "Workspace not found."
}An unknown record names its type: Post not found., Account not found., Media not found., Tag not found. and so on. If the workspace segment of the URL is not shaped like a UUID, no route matches and you get a bare 404.
422 Validation failed
errors lists each invalid field with its messages:
{
"message": "The name field is required. (and 1 more error)",
"errors": {
"name": ["The name field is required."],
"hex_color": ["The hex code is not valid"]
}
}message repeats the first error, so it changes from call to call. Read the keys of errors instead.
Publishing requirements
Before SocialKit commits a post to publishing, it checks the content against what each selected network accepts. The check runs when you schedule, add to the queue or approve a post, when you create a post with schedule, schedule_now or queue, and when you update a post that stays scheduled. Drafts are never checked, so you can save unfinished content.
Each problem is one entry in errors:
{
"message": "Instagram → Add a photo or a video. (and 1 more error)",
"errors": {
"requirements.0.instagram.post_0": ["Instagram → Add a photo or a video."],
"requirements.12.pinterest.board": ["Pinterest (Home Decor) → Choose a board."]
}
}The key reads requirements.<scope>.<provider>.<rule>:
<scope>:0points at the original version that all accounts share. An account ID points at that account's own version, or at a setting stored per account, like its Pinterest board or TikTok privacy level.<provider>: the network key, such asinstagramorpinterest.<rule>names what is missing or too much.<n>is the position of the post in a thread, from0.
| Rule | What it checks |
|---|---|
post_<n> | The post has what the network needs to publish it, for example a photo or video on Instagram, a video on YouTube, exactly one video for a reel. |
text_<n> | The text fits the network's length limit, counted the way that network counts. |
photos_<n>, videos_<n>, gifs_<n> | Not more photos, videos or GIFs than the network accepts. |
mixed_media_<n> | Photos, videos and GIFs are not mixed where the network does not allow it. |
hashtags_<n> | Not more hashtags than the network allows (Instagram, Facebook). |
media_items_<n> | Not more media items in total than the Pixelfed server accepts. |
first_comment | A first comment that is switched on has text (Facebook, Instagram, LinkedIn). |
board, link | Pinterest: each account has a board; a destination link, when given, starts with http or https. |
title | YouTube: a video title, 100 characters or fewer. Google Business Profile: offers and events need a title. |
dates, button_link, offer_link | Google Business Profile: start and end dates in order, a valid button link, a valid offer link. |
privacy_level, content_disclosure | TikTok: a privacy level is set; content disclosure has a brand option switched on. |
The messages are translated into the user's language. Match on the keys.
A scheduled post can still break a requirement later, for example when it is edited in the dashboard or loses a media file. SocialKit checks each account again right before publishing. An account that fails is not sent to the network: it is marked as failed with the message in its errors, like a rejection from the network itself.
429 Too many requests
Each user can make up to 60 API requests per minute. Running an account action has its own, lower limit: 30 per minute per user and 120 per minute per workspace.
Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. Past the limit you get 429 with a Retry-After header: wait that many seconds before you try again.
{
"message": "Too Many Attempts."
}500 Server error
{
"message": "Server Error"
}Try again later. If it keeps happening, contact SocialKit support with the endpoint and the time of the call.