Posts
One post goes to the chosen platforms with a single request. The API accepts it immediately, and publishing on each platform continues in the background with its own status.
Create a post
POST/projects/{projectId}/postsRequires a token
A multipart/form-data request with two parts:
post: JSON describing the post, with the typeapplication/json;files: files in the order they should appear. You can send this part many times (up to 20 files) or not at all.
Without scheduledAt, the post gets the status PROCESSING straight away. With a future date, it gets the status SCHEDULED and is published at that time.
The post part
descriptionstring | null- Post text or caption, up to 63,206 characters. Platforms have lower limits.
scheduledAtstring | null- Publication date in the future, ISO 8601 with a time zone. Leave it out to publish immediately.
platformsenum[]required- At least one of
FACEBOOK,TIKTOK. facebookobject- Required with
FACEBOOK. See Facebook options. tiktokobject- Required with
TIKTOK. See TikTok options.
Possible errors
- 400
platforms: must not be empty - Invalid field, a platform rule is not met or the file is not supported. The rules are on the Facebook and TikTok page.
- 401
(empty body) - The
Authorizationheader is missing, or the token has expired or is invalid. Refresh the session withPOST /auth/refresh. - 403
Limit reached: plan FREE allows 30 publications per project this month - The post would exceed the project's monthly publication limit.
- 404
Project not found - The project does not exist or belongs to another account.
- 413
Uploaded files are too large - A file is over 512 MB or the request is over 1 GB.
curl -X POST https://api.usocials.com/projects/12/posts \
-H "Authorization: Bearer $TOKEN" \
-F 'post={
"description": "New menu from Monday",
"scheduledAt": "2026-12-01T18:00:00+01:00",
"platforms": ["FACEBOOK", "TIKTOK"],
"facebook": {"pageId": "123456789012345", "format": "FEED"},
"tiktok": {"privacyLevel": "PUBLIC_TO_EVERYONE", "disableComment": false}
};type=application/json' \
-F "files=@menu.jpg"{
"Response": {
"status": {
"code": "202",
"msg": "Accepted",
"total": "0",
"page": "0",
"pagesize": "0"
},
"data": {
"id": 341,
"projectId": 12,
"taskId": "6f1c2a7e-3b0d-4c4e-9a51-2f8d7c1e0b42",
"description": "New menu from Monday",
"status": "SCHEDULED",
"scheduledAt": "2026-12-01T17:00:00Z",
"createdAt": "2026-11-23T09:20:00Z",
"updatedAt": "2026-11-23T09:20:00Z",
"media": [
{
"id": 87,
"position": 0,
"kind": "IMAGE",
"contentType": "image/jpeg",
"sizeBytes": 482113,
"originalFilename": "menu.jpg"
}
],
"targets": [
{
"platform": "FACEBOOK",
"status": "PENDING",
"externalPostId": null,
"externalUrl": null,
"errorCode": null,
"errorMessage": null,
"completedAt": null,
"updatedAt": "2026-11-23T09:20:00Z"
},
{
"platform": "TIKTOK",
"status": "PENDING",
"externalPostId": null,
"externalUrl": null,
"errorCode": null,
"errorMessage": null,
"completedAt": null,
"updatedAt": "2026-11-23T09:20:00Z"
}
]
}
}
}Get a post and its status
GET/projects/{projectId}/posts/{postId}Requires a token
Returns the post with its media and the publication state on each platform (targets). How often to poll is described on the Publication statuses page.
Post fields
idnumber- Post identifier.
projectIdnumber- Project the post belongs to.
taskIduuid- Publication task identifier. Include it when reporting a problem.
descriptionstring | null- Post text.
statusenum- Status of the whole post:
SCHEDULED,PROCESSING,COMPLETED,PARTIALLY_COMPLETED,FAILED. scheduledAtstring- Planned or actual publication start time (UTC).
createdAtstring- Creation date (UTC).
updatedAtstring- Date of the last status change (UTC).
mediaobject[]- The post's files in publication order.
targetsobject[]- Publication on each chosen platform.
media[] fields
idnumber- File identifier.
positionnumber- Order, from 0.
kindenumIMAGEorVIDEO.contentTypestring- Type detected from the content, for example
image/jpeg. sizeBytesnumber- Size in bytes.
originalFilenamestring | null- File name at upload.
targets[] fields
platformenumFACEBOOKorTIKTOK.statusenumPENDING,PROCESSING,PUBLISHED,FAILED.externalPostIdstring | null- Post ID on the platform after publishing.
externalUrlstring | null- Link to the post on the platform, if available.
errorCodestring | null- Error code for
FAILED. errorMessagestring | null- Error description for
FAILED. completedAtstring | null- When the publication finished (UTC).
updatedAtstring- Last change (UTC).
Possible errors
- 401
(empty body) - The
Authorizationheader is missing, or the token has expired or is invalid. Refresh the session withPOST /auth/refresh. - 404
Project not found - The project does not exist or belongs to another account.
- 404
Post not found - The post does not exist in this project.
curl https://api.usocials.com/projects/12/posts/341 \
-H "Authorization: Bearer $TOKEN"{
"Response": {
"status": {
"code": "200",
"msg": "OK",
"total": "0",
"page": "0",
"pagesize": "0"
},
"data": {
"id": 341,
"projectId": 12,
"taskId": "6f1c2a7e-3b0d-4c4e-9a51-2f8d7c1e0b42",
"description": "New menu from Monday",
"status": "PARTIALLY_COMPLETED",
"scheduledAt": "2026-12-01T17:00:00Z",
"createdAt": "2026-11-23T09:20:00Z",
"updatedAt": "2026-12-01T17:00:41Z",
"media": [
{
"id": 87,
"position": 0,
"kind": "IMAGE",
"contentType": "image/jpeg",
"sizeBytes": 482113,
"originalFilename": "menu.jpg"
}
],
"targets": [
{
"platform": "FACEBOOK",
"status": "PUBLISHED",
"externalPostId": "123456789012345_987654321098765",
"externalUrl": "https://www.facebook.com/123456789012345_987654321098765",
"errorCode": null,
"errorMessage": null,
"completedAt": "2026-12-01T17:00:12Z",
"updatedAt": "2026-12-01T17:00:12Z"
},
{
"platform": "TIKTOK",
"status": "FAILED",
"externalPostId": null,
"externalUrl": null,
"errorCode": "PLATFORM_NOT_CONNECTED",
"errorMessage": "TikTok publishing is not configured yet",
"completedAt": "2026-12-01T17:00:41Z",
"updatedAt": "2026-12-01T17:00:41Z"
}
]
}
}
}List posts
GET/projects/{projectId}/postsRequires a token
The project's posts, newest first, in the same format as a single post. Pagination is described on the Responses and errors page.
Query parameters
pagenumber- Page number from 0. Default 0.
sizenumber- Page size, 1–100. Default 20.
Possible errors
- 400
size: must be less than or equal to 100 - Parameter out of range.
- 401
(empty body) - The
Authorizationheader is missing, or the token has expired or is invalid. Refresh the session withPOST /auth/refresh. - 404
Project not found - The project does not exist or belongs to another account.
curl "https://api.usocials.com/projects/12/posts?page=0&size=20" \
-H "Authorization: Bearer $TOKEN"{
"Response": {
"status": {
"code": "200",
"msg": "OK",
"total": "47",
"page": "0",
"pagesize": "20"
},
"data": [
{
"id": 341,
"projectId": 12,
"taskId": "6f1c2a7e-3b0d-4c4e-9a51-2f8d7c1e0b42",
"description": "New menu from Monday",
"status": "PARTIALLY_COMPLETED",
"scheduledAt": "2026-12-01T17:00:00Z",
"createdAt": "2026-11-23T09:20:00Z",
"updatedAt": "2026-12-01T17:00:41Z",
"media": [
{
"id": 87,
"position": 0,
"kind": "IMAGE",
"contentType": "image/jpeg",
"sizeBytes": 482113,
"originalFilename": "menu.jpg"
}
],
"targets": [
{
"platform": "FACEBOOK",
"status": "PUBLISHED",
"externalPostId": "123456789012345_987654321098765",
"externalUrl": "https://www.facebook.com/123456789012345_987654321098765",
"errorCode": null,
"errorMessage": null,
"completedAt": "2026-12-01T17:00:12Z",
"updatedAt": "2026-12-01T17:00:12Z"
},
{
"platform": "TIKTOK",
"status": "FAILED",
"externalPostId": null,
"externalUrl": null,
"errorCode": "PLATFORM_NOT_CONNECTED",
"errorMessage": "TikTok publishing is not configured yet",
"completedAt": "2026-12-01T17:00:41Z",
"updatedAt": "2026-12-01T17:00:41Z"
}
]
}
]
}
}JavaScript example
In the browser and in Node.js, send the post part as a Blob with the type application/json, and add files with further append("files", …) calls. Do not set the Content-Type header yourself: fetch adds it together with the multipart boundary.
const form = new FormData();
form.append(
"post",
new Blob(
[JSON.stringify({
description: "New menu from Monday",
platforms: ["FACEBOOK"],
facebook: { pageId: "123456789012345", format: "FEED" },
})],
{ type: "application/json" },
),
);
form.append("files", fileInput.files[0]);
const response = await fetch("https://api.usocials.com/projects/12/posts", {
method: "POST",
headers: { Authorization: `Bearer ${accessToken}` },
body: form,
});
const { Response } = await response.json();
console.log(Response.data.status); // "PROCESSING"