The Socialit API uses conventional HTTP status codes and returns JSON error bodies.
Status codes
| Status | Meaning |
|---|---|
200 / 201 | Success |
400 | Validation error or malformed request |
401 | Missing or invalid API key |
402 | Insufficient credits to publish |
404 | Resource not found (or not in your workspace) |
413 | Uploaded file too large |
429 | Rate limit exceeded |
Error body
Most errors return an error string:
{ "error": "NotFound" }
Validation errors
Validation failures include a Zod-style issues array describing each problem:
{
"error": "ValidationError",
"issues": [
{
"code": "too_small",
"minimum": 1,
"path": ["content"],
"message": "String must contain at least 1 character(s)"
}
]
}
Insufficient credits
Publishing returns 402 with the required and available credit amounts:
{
"error": "InsufficientCredits",
"required": 3,
"available": 1,
"breakdown": []
}
Cross-workspace access
For security, requesting a resource that exists but belongs to another workspace returns 404 NotFound (rather than 403), so the existence of other workspaces’ resources is never revealed.